12 #include "../RDKitBase.h" 20 class MaximumCommonSubgraph;
38 NewBond() : SourceAtomIdx(-1), BondIdx(-1), NewAtomIdx(-1), NewAtom(0), EndAtomIdx(-1) {}
40 NewBond(
unsigned from_atom,
unsigned bond_idx,
unsigned new_atom,
unsigned to_atom,
const Atom* a)
41 : SourceAtomIdx(from_atom), BondIdx(bond_idx), NewAtomIdx(new_atom), NewAtom(a), EndAtomIdx(to_atom) {}
46 mutable std::vector<NewBond> NewBonds;
58 #ifdef DUP_SUBSTRUCT_CACHE 63 Seed() : CopyComplete(false)
64 , GrowingStage(0), LastAddedAtomsBeginIdx(0), LastAddedBondsBeginIdx(0)
65 , RemainingBonds(-1), RemainingAtoms(-1)
72 NewBonds = src.NewBonds;
81 #ifdef DUP_SUBSTRUCT_CACHE 94 #ifdef DUP_SUBSTRUCT_CACHE 97 LastAddedAtomsBeginIdx = getNumAtoms();
98 LastAddedBondsBeginIdx = getNumBonds();
103 return MoleculeFragment.
AtomsIdx.size();
106 return MoleculeFragment.
BondsIdx.size();
111 return RemainingBonds + getNumBonds() > maxBonds
112 ||(RemainingBonds + getNumBonds() == maxBonds && RemainingAtoms + getNumAtoms() > maxAtoms);
115 void computeRemainingSize(
const ROMol& qmol);
117 unsigned addAtom (
const Atom* atom);
118 unsigned addBond (
const Bond* bond);
119 void fillNewBonds(
const ROMol& qmol);
std::vector< TargetMatch > MatchResult
std::vector< unsigned > BondsIdx
void setMoleculeFragment(const Seed &src)
std::map< unsigned, unsigned > SeedAtomIdxMap
ROMol is a molecule class that is intended to have a fixed topology.
std::vector< bool > ExcludedBonds
unsigned getNumBonds() const
unsigned LastAddedAtomsBeginIdx
Includes a bunch of functionality for handling Atom and Bond queries.
class for representing a bond
bool canGrowBiggerThan(unsigned maxBonds, unsigned maxAtoms) const
MolFragment MoleculeFragment
DuplicatedSeedCache::TKey DupCacheKey
std::vector< const Bond * > Bonds
NewBond(unsigned from_atom, unsigned bond_idx, unsigned new_atom, unsigned to_atom, const Atom *a)
void createFromParent(const Seed *parent)
unsigned LastAddedBondsBeginIdx
unsigned getNumAtoms() const
std::vector< const Atom * > Atoms
The class for representing atoms.
std::vector< unsigned > AtomsIdx