1.1.1.1.2.2. molpher.core.operations package¶
1.1.1.1.2.2.1. Submodules¶
1.1.1.1.2.2.2. molpher.core.operations.ExtendTreeOper module¶
-
class
molpher.core.operations.ExtendTreeOper.
ExtendTreeOper
(*args)[source]¶ Bases:
molpher.swig_wrappers.core.ExtendTreeOper
,molpher.core.operations.TreeOperation.TreeOperation
1.1.1.1.2.2.3. molpher.core.operations.FilterMorphsOper module¶
-
class
molpher.core.operations.FilterMorphsOper.
FilterMorphsOper
(*args)[source]¶ Bases:
molpher.swig_wrappers.core.FilterMorphsOper
,molpher.core.operations.TreeOperation.TreeOperation
1.1.1.1.2.2.4. molpher.core.operations.FindLeavesOper module¶
-
class
molpher.core.operations.FindLeavesOper.
FindLeavesOper
(*args)[source]¶ Bases:
molpher.swig_wrappers.core.FindLeavesOper
,molpher.core.operations.TreeOperation.TreeOperation
-
leaves
¶ The last set of leaves fetched from a tree.
Returns: fetched leaves Return type: tuple
ofMolpherMol
instances
-
1.1.1.1.2.2.5. molpher.core.operations.GenerateMorphsOper module¶
-
class
molpher.core.operations.GenerateMorphsOper.
GenerateMorphsOper
(tree=None, collectors=())[source]¶ Bases:
molpher.swig_wrappers.core.GenerateMorphsOper
,molpher.core.operations.TreeOperation.TreeOperation
1.1.1.1.2.2.6. molpher.core.operations.PruneTreeOper module¶
-
class
molpher.core.operations.PruneTreeOper.
PruneTreeOper
(*args)[source]¶ Bases:
molpher.swig_wrappers.core.PruneTreeOper
,molpher.core.operations.TreeOperation.TreeOperation
1.1.1.1.2.2.7. molpher.core.operations.SortMorphsOper module¶
-
class
molpher.core.operations.SortMorphsOper.
SortMorphsOper
(tree=None, callback=None)[source]¶ Bases:
molpher.swig_wrappers.core.SortMorphsOper
,molpher.core.operations.TreeOperation.TreeOperation
Parameters: - tree (
ExplorationTree
instance) – a tree to run this operation on (optional) - callback (any callable object with two positional arguments and a single
bool
return value) – callable to call every time two molecules need to be compared (optional)
This operation sorts the
candidates
list of anExplorationTree
using a given callback function. If no callback function is specified, candidates are sorted in ascending order according todist_to_target
.-
class
SortCallback
(callback)[source]¶ Bases:
molpher.swig_wrappers.core.SortMorphsCallback
Parameters: callback (any callable object with two positional arguments and a single bool
return value) – callable to call every time two molecules need to be comparedCustomized callback that calls any supplied callable as a callback of
SortMorphsOper
and injects instances ofmolpher.core.MolpherMol
rather thanmolpher.swig_wrappers.core.MolpherMol
.
- tree (
1.1.1.1.2.2.8. molpher.core.operations.TraverseOper module¶
-
class
molpher.core.operations.TraverseOper.
Callback
(callback)[source]¶ Bases:
molpher.swig_wrappers.core.TraverseCallback
Parameters: callback (any callable object with one required parameter) – the callable to call every time a molecule is encountered during traversal Basic callback class used to traverse the tree with an arbitrary callable. It registers a callable and calls it every time a morph is processed. It also prevents possible errors and supplies instances of
molpher.core.MolpherMol
rather thanmolpher.swig_wrappers.core.MolpherMol
.
-
class
molpher.core.operations.TraverseOper.
TraverseOper
(tree=None, callback=None, root=None)[source]¶ Bases:
molpher.swig_wrappers.core.TraverseOper
,molpher.core.operations.TreeOperation.TreeOperation
1.1.1.1.2.2.9. molpher.core.operations.CleanMorphsOper module¶
-
class
molpher.core.operations.CleanMorphsOper.
CleanMorphsOper
(*args)[source]¶ Bases:
molpher.swig_wrappers.core.CleanMorphsOper
,molpher.core.operations.TreeOperation.TreeOperation
1.1.1.1.2.2.10. molpher.core.operations.TreeOperation module¶
-
class
molpher.core.operations.TreeOperation.
TreeOperation
(*args)[source]¶ Bases:
molpher.swig_wrappers.core.TreeOperation
Abstract base class derived from the
molpher.swig_wrappers.core.TreeOperation
proxy class.-
getTree
()[source]¶ Getter which returns the
ExplorationTree
instance this operation currently operates on.Returns: current ExplorationTree
instanceReturn type: ExplorationTree
-
tree
¶ The
ExplorationTree
instance this operation currently operates on. It can also be written into to change the current tree instance.Returns: current ExplorationTree
instanceReturn type: ExplorationTree
-
1.1.1.1.2.2.11. molpher.core.operations.callbacks module¶
Holds references to TraverseCallback
and SortMorphsCallback
.
1.1.1.1.2.2.12. Module contents¶
1.1.1.1.2.2.12.1. TreeOperation¶
A direct reference to molpher.core.operations.TreeOperation.TreeOperation
.
See also
1.1.1.1.2.2.12.2. SortMorphsOper¶
A direct reference to molpher.core.operations.SortMorphsOper.SortMorphsOper
.
See also
1.1.1.1.2.2.12.3. FindLeavesOper¶
A direct reference to molpher.core.operations.FindLeavesOper.FindLeavesOper
.
See also
1.1.1.1.2.2.12.4. FilterMorphsOper¶
A direct reference to molpher.core.operations.FilterMorphsOper.FilterMorphsOper
.
See also
1.1.1.1.2.2.12.5. ExtendTreeOper¶
A direct reference to molpher.core.operations.ExtendTreeOper.ExtendTreeOper
.
See also
1.1.1.1.2.2.12.6. PruneTreeOper¶
A direct reference to molpher.core.operations.PruneTreeOper.PruneTreeOper
.
See also
1.1.1.1.2.2.12.7. TraverseOper¶
A direct reference to molpher.core.operations.TraverseOper.TraverseOper
.
See also
1.1.1.1.2.2.12.8. GenerateMorphsOper¶
A direct reference to molpher.core.operations.GenerateMorphsOper.GenerateMorphsOper
.
See also