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

property leaves

The last set of leaves fetched from a tree.

Returns

fetched leaves

Return type

tuple of MolpherMol 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 an ExplorationTree using a given callback function. If no callback function is specified, candidates are sorted in ascending order according to dist_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 compared

Customized callback that calls any supplied callable as a callback of SortMorphsOper and injects instances of molpher.core.MolpherMol rather than molpher.swig_wrappers.core.MolpherMol.

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 than molpher.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 instance

Return type

ExplorationTree

property tree

The ExplorationTree instance this operation currently operates on. It can also be written into to change the current tree instance.

Returns

current ExplorationTree instance

Return 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

TreeOperation

1.1.1.1.2.2.12.2. SortMorphsOper

A direct reference to molpher.core.operations.SortMorphsOper.SortMorphsOper.

See also

SortMorphsOper

1.1.1.1.2.2.12.3. FindLeavesOper

A direct reference to molpher.core.operations.FindLeavesOper.FindLeavesOper.

See also

FindLeavesOper

1.1.1.1.2.2.12.4. FilterMorphsOper

A direct reference to molpher.core.operations.FilterMorphsOper.FilterMorphsOper.

See also

FilterMorphsOper

1.1.1.1.2.2.12.5. ExtendTreeOper

A direct reference to molpher.core.operations.ExtendTreeOper.ExtendTreeOper.

See also

ExtendTreeOper

1.1.1.1.2.2.12.6. PruneTreeOper

A direct reference to molpher.core.operations.PruneTreeOper.PruneTreeOper.

See also

PruneTreeOper

1.1.1.1.2.2.12.7. TraverseOper

A direct reference to molpher.core.operations.TraverseOper.TraverseOper.

See also

TraverseOper

1.1.1.1.2.2.12.8. GenerateMorphsOper

A direct reference to molpher.core.operations.GenerateMorphsOper.GenerateMorphsOper.