26 TargetMatch() : Empty(true), MatchedAtomSize(0), MatchedBondSize(0) {}
35 sizeof(
unsigned) * TargetAtomIdx.size());
38 sizeof(
unsigned) * TargetBondIdx.size());
48 TargetAtomIdx.clear();
49 TargetBondIdx.clear();
50 VisitedTargetBonds.clear();
51 VisitedTargetAtoms.clear();
60 memset(&TargetAtomIdx[0], 0xFF,
sizeof(
unsigned) * TargetAtomIdx.size());
61 memset(&TargetBondIdx[0], 0xFF,
sizeof(
unsigned) * TargetBondIdx.size());
68 for (
size_t i = 0; i < VisitedTargetBonds.size(); i++)
69 VisitedTargetBonds[i] =
false;
70 for (
size_t i = 0; i < VisitedTargetAtoms.size(); i++)
71 VisitedTargetAtoms[i] =
false;
73 MatchedAtomSize = match.size();
74 for (match_V_t::const_iterator mit = match.begin(); mit != match.end();
77 VisitedTargetAtoms[mit->second] =
true;
81 for (std::vector<const Bond*>::const_iterator bond =
84 unsigned i = (*bond)->getBeginAtomIdx();
85 unsigned j = (*bond)->getEndAtomIdx();
86 unsigned ti = TargetAtomIdx[i];
87 unsigned tj = TargetAtomIdx[j];
91 TargetBondIdx[(*bond)->getIdx()] = tb->
getIdx();
92 VisitedTargetBonds[tb->
getIdx()] =
true;
std::vector< unsigned > TargetBondIdx
void init(const Seed &seed, const match_V_t &match, const ROMol &query, const Target &target)
unsigned int getNumAtoms(bool onlyExplicit=1) const
returns our number of atoms
unsigned int getNumBonds(bool onlyHeavy=1) const
returns our number of Bonds
std::vector< unsigned > TargetAtomIdx
std::vector< bool > VisitedTargetAtoms
ROMol is a molecule class that is intended to have a fixed topology.
TargetMatch(const TargetMatch &src)
Bond * getBondBetweenAtoms(unsigned int idx1, unsigned int idx2)
returns a pointer to the bond between two atoms, Null on failure
std::vector< bool > VisitedTargetBonds
Includes a bunch of functionality for handling Atom and Bond queries.
TargetMatch & operator=(const TargetMatch &src)
class for representing a bond
std::vector< std::pair< FMCS::Graph::vertex_descriptor, FMCS::Graph::vertex_descriptor > > match_V_t
MolFragment MoleculeFragment
std::vector< const Bond * > Bonds
unsigned int getIdx() const
returns our index within the ROMol
std::vector< unsigned > AtomsIdx