OEMatch¶
class OEMatch : public OEMatchBase
This class represents OEMatch.
The OEMatch class is a concrete instance of the OEMatchBase abstract base class. The purpose of an OEMatch object is to represent a pairwise correspondence between atoms and/or bonds in two different molecules. The correspondences are normally generated as the result of graph matching operations such as subgraph isomorphism determination, maximal common subgraph search, or supergraph search.
The following methods are publicly inherited from OEMatchBase:
The following methods are publicly inherited from OERoleSet:
operator=¶
const OEMatch &operator=(const OEMatch &rhs)
Assignment operator that copies the data of the ‘rhs’ OEMatch object into the right-hand side OEMatch object.
AddPair¶
bool AddPair(const OEBondBase *, const OEBondBase *)
Adds a pair of bonds (OEBondBase) to the
OEMatch object. Returns true
if the bonds
are successfully added. Returns false
and throws a warning
if the bonds being added do not belong to the same parent
molecule as previously added bonds.
bool AddPair(const OEAtomBase *, const OEAtomBase *)
Adds a pair of atoms (OEAtomBase) to the
OEMatch object. Returns true
if the atoms
are successfully added. Returns false
and throws a warning
if the atoms being added do not belong to the same parent
molecule as previously added atoms.
See also
Example program smartsalign.cpp
CreateCopy¶
OESystem::OEMatchBase *CreateCopy() const
Deep copy constructor that returns a copy of the object. The memory for the returned object derived from OEMatchBase is dynamically allocated and owned by the caller.
The returned copy should be deallocated using C++ delete operator in order to prevent a memory leak.
GetAtoms¶
OESystem::OEIterBase<OEMatchPair<OEAtomBase> > *GetAtoms() const
Returns an iterator over
OEMatchPairs
which contain
the atom to atom correspondences in the
OEMatchBase object.
The returned OEIterBase pointer should be
assigned to an OEIter object to prevent
memory leaks.
GetBonds¶
OESystem::OEIterBase<OEMatchPair<OEBondBase> > *GetBonds() const
Returns an iterator over
OEMatchPairs
which contain
the bond to bond correspondences in the
OEMatchBase object.
The returned OEIterBase pointer should be
assigned to an OEIter object to prevent
memory leaks.