1.1.1.2.1.1.1.4.8. TraverseOper

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

Bases: molpher.swig_wrappers.core.TreeOperation

Parameters:*args (ExplorationTree, TraverseCallback and MolpherMol (optional)) – the exploration tree and the callback to call. Optionally we can specify a morph which will define the root of the subtree to traverse. If no root is specified, then the source molecule is selected automatically.

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]

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