smartsexplore.smarts.actions module¶
Functions that interact with the database and external programs to manage SMARTS and SMARTS-SMARTS match data.
-
smartsexplore.smarts.actions.add_library(name: str, filename: str) → None¶ Add a SMARTS library (name and a .smarts file) to the db, by adding corresponding SMARTS objects to the database.
Note that, if available, the SMARTS label will be used as the newly created SMARTS objects’ names. This is typically a tab- or space-separated string that comes after each SMARTS pattern in the .smarts file.
- Parameters
name – The name of the library to add. Will be stored on the created SMARTS instances.
filename – The filename of the .smarts file to create and store SMARTS from.
-
smartsexplore.smarts.actions.calculate_edges(mode)¶ Calculate and add edges between all SMARTS in the database.
Currently implements modes ‘Similarity’ and ‘SubsetOfFirst’. ‘SubsetOfSecond’ is redundant, and ‘Identical’ is currently just not implemented.
When ‘Similarity’ mode is chosen, 0.1 is picked as a fixed similarity value lower bound; otherwise a too large number of edges for our purposes would (generally) be generated.