1.1.1.3.1.1.1.5.11. SortMorphsCallback

class molpher.swig_wrappers.core.SortMorphsCallback[source]

A simple callback that can be used to override how morphs are sorted. When supplied to SortMorphsOper, the __call__ method is executed every time two morphs need to be compared by the sorting algorithm. The return value of __call__ indicates the result of the comparison.

Note

This is an abstract class. You will have to declare a derived class to that implements the abstract features.

See also

SortMorphsOper

__call__(morph_1, morph_2)[source]

Call self as a function.

An abstract method overridden in derived classes. It should return True or False. True indicates that the morph_a is greater than the morph_b.

Parameters:
  • morph_a (MolpherMol) – first morph in comparison
  • morph_b (MolpherMol) – second morph in comparison
Return type:

bool