RDKit is a cheminformatics library that provides a wide array of features for working with molecular structures, fingerprints, geometric optimization, molecular dynamics, and more. It is written in C++ with the source code available on GitHub.

Like other C++ libraries, RDKit can be compiled to WebAssembly so that the functionality can be used on the web. This allows RDKit to be used within the browser context and opens opportunities for creating fast, interactive, and smart web applications for cheminformatics (think education, visualization, drug discovery, materials science, etc.).

The RDKit team already provides a ready-to-use WASM module (also known as RDKit's MinimalLib) that includes a subset of the RDKit functionality and comes with RDKit.js. Actually, before I learned about RDKit.js, I'd already compiled RDKit to WASM and created the demo below to showcase the SDF-to-SVG functionality. (It was a lot of work but in the end I mananed to get it working. Now I'm glad that the RDKit team has already done this work and everyone can just use their module.)

Demo (SDF to SVG)

The content of the SDF file with the molecule to be rendered as SVG.

See also

Made by Anton Vasetenkov.

If you want to say hi, you can reach me on LinkedIn or via email. If you like my work, you can support me by buying me a coffee.