27 TargetMatch() : Empty(true), MatchedAtomSize(0), MatchedBondSize(0) {}
36 sizeof(
unsigned) * TargetAtomIdx.size());
39 sizeof(
unsigned) * TargetBondIdx.size());
49 TargetAtomIdx.clear();
50 TargetBondIdx.clear();
51 VisitedTargetBonds.clear();
52 VisitedTargetAtoms.clear();
61 memset(&TargetAtomIdx[0], 0xFF,
sizeof(
unsigned) * TargetAtomIdx.size());
62 memset(&TargetBondIdx[0], 0xFF,
sizeof(
unsigned) * TargetBondIdx.size());
69 for (
size_t i = 0; i < VisitedTargetBonds.size(); i++)
70 VisitedTargetBonds[i] =
false;
71 for (
size_t i = 0; i < VisitedTargetAtoms.size(); i++)
72 VisitedTargetAtoms[i] =
false;
74 MatchedAtomSize = match.size();
75 for (match_V_t::const_iterator mit = match.begin(); mit != match.end();
78 VisitedTargetAtoms[mit->second] =
true;
82 for (std::vector<const Bond*>::const_iterator bond =
85 unsigned i = (*bond)->getBeginAtomIdx();
86 unsigned j = (*bond)->getEndAtomIdx();
87 unsigned ti = TargetAtomIdx[i];
88 unsigned tj = TargetAtomIdx[j];
92 TargetBondIdx[(*bond)->getIdx()] = tb->
getIdx();
93 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
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
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