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:

operator bool GetBonds GetTargetBonds
Clear GetPatternAtoms IsValid
CreateCopy GetPatternBonds NumAtoms
GetAtoms GetTargetAtoms NumBonds

The following methods are publicly inherited from OERoleSet:

AddRole GetRoles  
ClearRoles HasRole  
DeleteRole NumRoles  

Constructors

OEMatch()

Default constructor.

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

Clear

void Clear()

Removes all atom and bond of pairs from the OEMatch and clears the OERoleSet.

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.

NumAtoms

unsigned int NumAtoms() const

Returns the number of atom equivalences in the OEMatch object.

NumBonds

unsigned int NumBonds() const

Returns the number of bond equivalences in the OEMatch object.