smartsexplore.database.models module¶
Defines all relevant models for SMARTSexplore, as SQLAlchemy ORM models.
-
class
smartsexplore.database.models.DirectedEdge(from_smarts, to_smarts, mcssim, spsim)¶ Bases:
sqlalchemy.ext.declarative.api.BaseA directed edge between two
SMARTS, describing a subset relationship as determined by SMARTScompare, along with an MCS similarity value and an SP similarity value, see [Ehmki2019].-
from_id¶ The ID of the SMARTS this edge goes to.
-
from_smarts¶ The SMARTS this edge goes to.
-
id¶ The ID of the SMARTS this edge comes from.
-
mcssim¶ The statistical pattern similarity, see [Ehmki2019], annotated on this edge.
-
spsim¶
-
to_id¶ The SMARTS this edge comes from.
-
to_smarts¶ The maximum common subgraph similarity, see [Ehmki2019], annotated on this edge.
-
-
class
smartsexplore.database.models.Match(molecule, smarts)¶ Bases:
sqlalchemy.ext.declarative.api.BaseA successful match of a
SMARTSto aMolecule.-
id¶ The ID of the molecule this match refers to.
-
molecule¶ The SMARTS this match refers to.
-
molecule_id¶ The ID of the SMARTS this match refers to.
-
smarts¶
-
smarts_id¶ The molecule this match refers to.
-
-
class
smartsexplore.database.models.Molecule(molset, name, pattern)¶ Bases:
sqlalchemy.ext.declarative.api.BaseA molecule consisting of a SMILES pattern and an optional name. Belongs to a
MoleculeSet.-
id¶ The SMILES pattern encoding the molecule.
-
molset¶
-
molset_id¶ The MoleculeSet this molecule belongs to.
-
name¶ The ID of the MoleculeSet this molecule belongs to.
-
pattern¶ The name of the molecule.
-
-
class
smartsexplore.database.models.MoleculeSet(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.BaseA set of
Molecule, grouped together to be more easily manageable. Typically corresponds to a set of molecules that were uploaded together as one molecule file by a frontend user.-
id¶ The Molecule instances belonging to this molecule set.
-
molecules¶
-
-
class
smartsexplore.database.models.SMARTS(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.BaseA single SMARTS consisting of its SMARTS pattern, a name, and the SMARTS library it belongs to.
-
id¶ The name of this SMARTS.
-
library¶
-
name¶ The SMARTS pattern.
-
pattern¶ The library this SMARTS belongs to (as a string).
-
-
class
smartsexplore.database.models.UndirectedEdge(low_smarts, high_smarts, mcssim, spsim)¶ Bases:
sqlalchemy.ext.declarative.api.BaseAn undirected edge between two
SMARTS, describing a similarity relationship as determined by SMARTScompare, along with an MCS similarity value and an SP similarity value.Note
This class is currently unused within the larger context of the SMARTSexplore app, because only directed edges are delivered to the frontend and rendered.
-
high_id¶ The connected SMARTS with the smaller ID.
-
high_smarts¶ The maximum common subgraph similarity, see [Ehmki2019], annotated on this edge.
-
id¶ The smaller ID of the connected SMARTS. Used to ensure undirected edge uniqueness.
-
low_id¶ The larger ID of the connected SMARTS. Used to ensure undirected edge uniqueness.
-
low_smarts¶ The connected SMARTS with the larger ID.
-
mcssim¶ The statistical pattern similarity, see [Ehmki2019], annotated on this edge.
-
spsim¶
-