1.1.1.2. molpher.algorithms package¶
The algorithms package contains implementations of
complete exploration algorithms. Each algorithm is
implemented within its own subpackage. All subpackages
contain a run module that contains the run()
function which can be used to set up and initiate a search
(or multiple searches).
1.1.1.2.1. Subpackages¶
- 1.1.1.2.1.1. molpher.algorithms.antidecoys package
- 1.1.1.2.1.1.1. Submodules
- 1.1.1.2.1.1.2. molpher.algorithms.antidecoys.custom_opers module
- 1.1.1.2.1.1.3. molpher.algorithms.antidecoys.pathfinder module
- 1.1.1.2.1.1.4. molpher.algorithms.antidecoys.run module
- 1.1.1.2.1.1.5. molpher.algorithms.antidecoys.settings module
- 1.1.1.2.1.1.6. molpher.algorithms.antidecoys.utils module
- 1.1.1.2.1.1.7. Module contents
- 1.1.1.2.1.2. molpher.algorithms.bidirectional package
- 1.1.1.2.1.3. molpher.algorithms.classic package
1.1.1.2.2. Submodules¶
1.1.1.2.3. molpher.algorithms.functions module¶
General utility functions for the algorithms.
-
molpher.algorithms.functions.find_path(tree, end_mol=None)[source]¶ Backtracks the tree starting from
end_moland returns a list of SMILES strings representing the path from the root of the tree toend_mol.Parameters: - tree (instance of
ExplorationTree) – a tree to backtrack through - end_mol (
str) – SMILES of the last molecule in the requested path (target molecule by default)
Returns: list of SMILES of molecules on the path
Return type: - tree (instance of
1.1.1.2.4. molpher.algorithms.operations module¶
Custom operations and callbacks shared between algorithms.
-
class
molpher.algorithms.operations.FindClosest[source]¶ Bases:
objectCallback that will search for a molecule closest to the target and saves it as a copy to the self.closest
See also
-
closest= None¶ MolpherMolinstance (copy of the closest molecule) after the callback was executed, initialized toNone
-
1.1.1.2.5. molpher.algorithms.settings module¶
-
class
molpher.algorithms.settings.Settings(source, target, storage_dir, max_threads=None, max_iters=100, tree_params=None, verbose=False, filters=63)[source]¶ Bases:
objectHolds basic settings and parameters shared among the exploration algorithms.
-
max_iters= None¶ maximum number of iterations to spend on a search
-
max_threads= None¶ maximum number of threads to use in computations (uses all available CPUs by default)
-
source= None¶ SMILES string of the source molecule
-
storage_dir= None¶ path to a directory where results will be stored
-
target= None¶ SMILES string of the target molecule
-
tree_params= None¶ parameters of the exploration tree; either a dictionary like in
paramsor an instance ofExplorationData
-
verbose= None¶ some algorithms can support verbose output
-