26 TargetMatch() : Empty(true), MatchedAtomSize(0), MatchedBondSize(0) {}
36 memcpy(&TargetAtomIdx[0], &src.
TargetAtomIdx[0],
sizeof(
unsigned)*TargetAtomIdx.size());
38 memcpy(&TargetBondIdx[0], &src.
TargetBondIdx[0],
sizeof(
unsigned)*TargetBondIdx.size());
50 TargetAtomIdx.clear();
51 TargetBondIdx.clear();
52 VisitedTargetBonds.clear();
53 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(); mit++) {
77 VisitedTargetAtoms[mit->second] =
true;
82 unsigned i = (*bond)->getBeginAtomIdx();
83 unsigned j = (*bond)->getEndAtomIdx();
84 unsigned ti= TargetAtomIdx[i];
85 unsigned tj= TargetAtomIdx[j];
89 TargetBondIdx[(*bond)->getIdx()] = tb->
getIdx();
90 VisitedTargetBonds[tb->
getIdx()] =
true;
std::vector< unsigned > TargetBondIdx
void init(const Seed &seed, const match_V_t &match, const ROMol &query, const Target &target)
std::vector< unsigned > TargetAtomIdx
unsigned int getNumAtoms(bool onlyExplicit=1) const
returns our number of atoms
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
unsigned int getNumBonds(bool onlyHeavy=1) const
returns our number of Bonds
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