Chemical Data Processing Library Python API - Version 1.4.0
Classes | Public Member Functions | List of all members
CDPL.Chem.PatternBasedTautomerizationRule Class Reference

Match pattern-based implementation of the Chem.TautomerizationRule interface. More...

+ Inheritance diagram for CDPL.Chem.PatternBasedTautomerizationRule:

Classes

class  BondOrderChange
 Encodes a single bond-order change between two pattern atoms applied when the parent transformation pattern matches. More...
 

Public Member Functions

None __init__ (int id)
 Initializes the PatternBasedTautomerizationRule instance. More...
 
None __init__ (PatternBasedTautomerizationRule rule)
 Constructs a copy of the PatternBasedTautomerizationRule instance rule. More...
 
None addTransformationPattern (MolecularGraph molgraph, object bond_chgs)
 
None addExcludePattern (MolecularGraph molgraph)
 Registers a rule exclude pattern. More...
 
None addExcludePatterns (PatternBasedTautomerizationRule rule)
 Copies all exclude patterns of rule into this rule. More...
 
None clearExcludePatterns ()
 Removes all registered exclude patterns.
 
PatternBasedTautomerizationRule assign (PatternBasedTautomerizationRule rule)
 Replaces the state of this rule by a copy of the state of rule. More...
 
- Public Member Functions inherited from CDPL.Chem.TautomerizationRule
None __init__ ()
 Initializes the TautomerizationRule instance.
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
int getID ()
 Returns the rule's identifier (see Chem.TautomerizationType). More...
 
bool setup (MolecularGraph parent_molgraph)
 Sets the parent molecular graph for which the rule is to enumerate tautomers. More...
 
bool generate (Molecule tautomer)
 Generates the next tautomer. More...
 
TautomerizationRule clone ()
 Returns a deep copy of this rule instance. More...
 

Additional Inherited Members

- Properties inherited from CDPL.Chem.TautomerizationRule
 objectID = property(getObjectID)
 

Detailed Description

Match pattern-based implementation of the Chem.TautomerizationRule interface.

The rule is configured with a set of transformation patterns describing the source substructure together with per-atom pair bond order changes that apply when the pattern matches plus optional exclude patterns (substructures that, when present, suppress the application of the rule). The setup() / generate() pair from the base class then enumerates the tautomers reachable from the parent molecular graph by applying the configured transformations.

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Chem.PatternBasedTautomerizationRule.__init__ ( int  id)

Initializes the PatternBasedTautomerizationRule instance.

Parameters
id

◆ __init__() [2/2]

None CDPL.Chem.PatternBasedTautomerizationRule.__init__ ( PatternBasedTautomerizationRule  rule)

Constructs a copy of the PatternBasedTautomerizationRule instance rule.

Parameters
ruleThe PatternBasedTautomerizationRule to copy.

Member Function Documentation

◆ addTransformationPattern()

None CDPL.Chem.PatternBasedTautomerizationRule.addTransformationPattern ( MolecularGraph  molgraph,
object  bond_chgs 
)
Parameters
molgraph
bond_chgs

◆ addExcludePattern()

None CDPL.Chem.PatternBasedTautomerizationRule.addExcludePattern ( MolecularGraph  molgraph)

Registers a rule exclude pattern.

When this substructure is present in the parent molecular graph then the matching transformation will not be applied.

Parameters
molgraphThe exclude pattern.

◆ addExcludePatterns()

None CDPL.Chem.PatternBasedTautomerizationRule.addExcludePatterns ( PatternBasedTautomerizationRule  rule)

Copies all exclude patterns of rule into this rule.

Parameters
ruleThe source rule whose exclude patterns are copied.

◆ assign()

PatternBasedTautomerizationRule CDPL.Chem.PatternBasedTautomerizationRule.assign ( PatternBasedTautomerizationRule  rule)

Replaces the state of this rule by a copy of the state of rule.

Parameters
ruleThe source PatternBasedTautomerizationRule.
Returns
self