smartsexplore.molecules.draw module

Functions for drawing molecule structure diagrams. Uses the mol2svg NAOMI tool for this purpose.

smartsexplore.molecules.draw.draw_molecules_from_molset(molset: smartsexplore.database.models.MoleculeSet)None

Draws all molecules contained in a set of molecules (a MoleculeSet instance) as SVG images, to the static molecule image path defined in the app config (STATIC_MOL2SVG_MOLECULE_SETS_PATH).

A subfolder named by the MoleculeSet’s ID will be created under the static path, and the molecule images will be stored inside that folder, named by their IDs ({id}.svg).

Parameters

molset – The MoleculeSet instance to render all molecules of.