1.1.1.3.1.1.1.5.8. TraverseOper

class molpher.swig_wrappers.core.TraverseOper(*args)[source]

Bases: molpher.swig_wrappers.core.TreeOperation

Parameters:*args (ExplorationTree, TraverseCallback and str (optional)) – the exploration tree and the callback to call. Optionally, a canonical SMILES string of a morph which will define the root of the subtree to traverse can be specified. If no root is given, then the source molecule is selected automatically and the traversal will be performed on the whole tree.

A tree operation that can register a TraverseCallback and call its __call__() method on every molecule it encounters in the given subtree (defined by its root).

__call__()[source]

Call self as a function.

Run the attached callback on every molecule in a subtree with the given root.