smartsexplore.molecules.actions module¶
Functions that interact with the database and external programs to manage molecule and molecule-SMARTS match data.
-
smartsexplore.molecules.actions.calculate_molecule_matches(uploaded_molecules_file: BinaryIO) → smartsexplore.database.models.MoleculeSet¶ Calculate molecule matches of all SMARTS in the database given a molecule file, and store the Molecule and Match instances in the database.
- Parameters
uploaded_molecules_file – An open file handle to a molecule file to match
-
smartsexplore.molecules.actions.create_molecules_from_smiles_file(file: BinaryIO) → smartsexplore.database.models.MoleculeSet¶ Reads in a .smiles file and constructs
Moleculeinstances from it, all linked to a single newMoleculeSetinstance.- Parameters
file – A file handle to a .smiles file.
- Returns
The newly created
MoleculeSetinstance. The createdMoleculeinstances are available as its.moleculesproperty.