1.1.1.3.1.1.1.4.5. FilterMorphsOper¶
-
class
molpher.swig_wrappers.core.FilterMorphsOper(*args)[source]¶ Bases:
molpher.swig_wrappers.core.TreeOperationParameters: - *args – constructor takes either no arguments at all or the following positional arguments (in that order):
- tree – the tree to operate on (optional)
- filters – the union of filtering options to use (optional, see the descriptions below for more information)
- verbose – toggles if a verbose output is required (optional, defaults to
False)
This operation can filter the candidate morphs in an exploration tree according to a given set of filtering options that it implements. The current set of available filters is in the table below. For more detailed information on each filter see the member descriptions of this class.
Table 1.12 Filtering options and their descriptions.¶ Option Description PROBABILITYFilter the candidate morphsaccording to probability based on their position inExplorationTree.candidates.WEIGHTRemove molecules that do not satisfy the weight constraints. SYNTHESISThe inbuilt synthetic feasibility filter. MAX_DERIVATIONSMaximum number of morphs derived from one molecule. DUPLICATESRemove candidates that are already in the tree (always on). HISTORIC_DESCENDENTSRemove candidates that have already been tried by their parents. ALLUse all of the above filters. -
PROBABILITY= 1¶ If the number of derived morphs for a molecule exceeds
ExplorationData.accept_min, then the probability of accepting every extra molecule is determined according to the following formula: \(\frac{0.25 - (idx - morphs_{min})}{4(morphs_{all} - morphs_{min})}\), where \(morphs_{min}\) is theExplorationData.accept_minparameter, \(morphs_{all}\) is the current number of molecules in the exploration tree and \(idx\) is the position of the given morph inExplorationTree.candidates.
-
WEIGHT= 2¶ Uses the
ExplorationData.weight_minandExplorationData.weight_maxoptions to remove candidate morphs that do not satisfy the weight constraints.
-
SYNTHESIS= 4¶
-
MAX_DERIVATIONS= 8¶ Each
ExplorationTreeinstance keeps track of the number of morphs generated from each molecule in the tree. If there are candidate morphs inExplorationTree.candidatessuch that more thanExplorationData.max_morphs_totalnumber of morphs would be derived from the given molecule, then these candidate morphs will be filtered out.
-
DUPLICATES= 16¶ Remove all duplicate morphs (same canonical SMILES representation as a molecule already present in the tree).
Note
This filter is always turned on and can’t be disabled at the moment.
-
HISTORIC_DESCENDENTS= 32¶ The tree also keeps track of all molecules previously derived from any molecule in the tree. This filter removes candidate morphs that have already been previously derived from their parent molecule.
-
ALL= 63¶ Use all of the filters mentioned above.