Chemical Data Processing Library Python API - Version 1.2.0
|
A data structure for the common storage of related atom to atom and bond to bond mappings. More...
Public Member Functions | |
None | __init__ () |
Initializes the AtomBondMapping instance. | |
None | __init__ (AtomBondMapping mapping) |
Initializes a copy of the AtomBondMapping instance mapping. More... | |
int | getObjectID () |
Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
AtomBondMapping | assign (AtomBondMapping mapping) |
Replaces the current state of self with a copy of the state of the AtomBondMapping instance mapping. More... | |
AtomMapping | getAtomMapping () |
Returns a reference to the Chem.AtomMapping data member storing the atom to atom mappings. More... | |
BondMapping | getBondMapping () |
Returns a reference to the Chem.BondMapping data member storing the bond to bond mappings. More... | |
None | clear () |
Removes all atom to atom and bond to bond mappings. | |
bool | __eq__ (AtomBondMapping mapping) |
Equality comparison operator. More... | |
bool | __ne__ (AtomBondMapping mapping) |
Inequality comparison operator. More... | |
Properties | |
objectID = property(getObjectID) | |
atomMapping = property(getAtomMapping) | |
bondMapping = property(getBondMapping) | |
A data structure for the common storage of related atom to atom and bond to bond mappings.
AtomBondMapping
is used to represent arbitrary mappings between the atoms and bonds of two (or more) molecular graphs (e.g. results of a substructure search). The atom and bond mappings are stored in respective data members of type Chem.AtomMapping and Chem.BondMapping. They can be accessed by the provided getAtomMapping() and getBondMapping() family of overloaded methods.
None CDPL.Chem.AtomBondMapping.__init__ | ( | AtomBondMapping | mapping | ) |
Initializes a copy of the AtomBondMapping instance mapping.
mapping | The AtomBondMapping instance to copy. |
int CDPL.Chem.AtomBondMapping.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python AtomBondMapping instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b
thus cannot tell reliably whether the two AtomBondMapping instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID()
.
AtomBondMapping CDPL.Chem.AtomBondMapping.assign | ( | AtomBondMapping | mapping | ) |
Replaces the current state of self with a copy of the state of the AtomBondMapping instance mapping.
mapping | The AtomBondMapping instance to copy. |
AtomMapping CDPL.Chem.AtomBondMapping.getAtomMapping | ( | ) |
Returns a reference to the Chem.AtomMapping data member storing the atom to atom mappings.
BondMapping CDPL.Chem.AtomBondMapping.getBondMapping | ( | ) |
Returns a reference to the Chem.BondMapping data member storing the bond to bond mappings.
bool CDPL.Chem.AtomBondMapping.__eq__ | ( | AtomBondMapping | mapping | ) |
Equality comparison operator.
mapping | The other AtomBondMapping instance to be compared with. |
True
if the atom to atom and bond to bond mappings compare equal, and False
otherwise. bool CDPL.Chem.AtomBondMapping.__ne__ | ( | AtomBondMapping | mapping | ) |
Inequality comparison operator.
The result is equivalent to !(self == mapping)
.
mapping | The other AtomBondMapping instance to be compared with. |
True
if the atom to atom and/or bond to bond mappings compare non-equal, and False
otherwise.