13#include "../RDKitBase.h"
21class MaximumCommonSubgraph;
36 unsigned SourceAtomIdx{0};
39 unsigned NewAtomIdx{0};
41 const Atom* NewAtom{
nullptr};
43 unsigned EndAtomIdx{0};
50 NewBond(
unsigned from_atom,
unsigned bond_idx,
unsigned new_atom,
51 unsigned to_atom,
const Atom* a)
52 : SourceAtomIdx(from_atom),
56 EndAtomIdx(to_atom) {}
61 mutable std::vector<NewBond> NewBonds;
64 bool CopyComplete{
false};
66 mutable unsigned GrowingStage{0};
72 unsigned LastAddedAtomsBeginIdx{0};
74 unsigned LastAddedBondsBeginIdx{0};
75 unsigned RemainingBonds{0};
76 unsigned RemainingAtoms{0};
77#ifdef DUP_SUBSTRUCT_CACHE
90 NewBonds = src.NewBonds;
99#ifdef DUP_SUBSTRUCT_CACHE
112#ifdef DUP_SUBSTRUCT_CACHE
115 LastAddedAtomsBeginIdx = getNumAtoms();
116 LastAddedBondsBeginIdx = getNumBonds();
125 unsigned maxAtoms)
const {
126 return RemainingBonds + getNumBonds() > maxBonds ||
127 (RemainingBonds + getNumBonds() == maxBonds &&
128 RemainingAtoms + getNumAtoms() > maxAtoms);
The class for representing atoms.
class for representing a bond
unsigned getNumBonds() const
bool canGrowBiggerThan(unsigned maxBonds, unsigned maxAtoms) const
void createFromParent(const Seed *parent)
unsigned LastAddedBondsBeginIdx
void grow(MaximumCommonSubgraph &mcs) const
unsigned getNumAtoms() const
MolFragment MoleculeFragment
DuplicatedSeedCache::TKey DupCacheKey
std::vector< TargetMatch > MatchResult
unsigned addAtom(const Atom *atom)
void setMoleculeFragment(const Seed &src)
void fillNewBonds(const ROMol &qmol)
std::vector< bool > ExcludedBonds
Seed & operator=(const Seed &src)
unsigned LastAddedAtomsBeginIdx
void computeRemainingSize(const ROMol &qmol)
unsigned addBond(const Bond *bond)
#define RDKIT_FMCS_EXPORT
std::vector< unsigned > AtomsIdx
std::vector< const Atom * > Atoms
std::vector< const Bond * > Bonds
std::vector< unsigned > BondsIdx
std::map< unsigned, unsigned > SeedAtomIdxMap
NewBond(unsigned from_atom, unsigned bond_idx, unsigned new_atom, unsigned to_atom, const Atom *a)