13#include <boost/dynamic_bitset.hpp>
14#include "../RDKitBase.h"
23class MaximumCommonSubgraph;
28 std::vector<const Atom *>
Atoms;
29 std::vector<const Bond *>
Bonds;
37 unsigned int BondIdx{0};
40 unsigned int NewAtomIdx{0};
43 unsigned int EndAtomIdx{0};
46 const Atom *NewAtom{
nullptr};
52 NewBond(
unsigned int bond_idx,
unsigned int new_atom,
unsigned int to_atom,
62 boost::dynamic_bitset<> addNewBondsToSeed(
const ROMol &qmol,
64 bool canAddAllNonFusedRingBondsConnectedToBond(
66 void addNewBondFromAtom(
const Atom &srcAtom,
const Bond &bond)
const;
68 mutable std::vector<NewBond> NewBonds;
69 bool StoreAllDegenerateMCS =
false;
74 bool CopyComplete{
false};
77 mutable unsigned int GrowingStage{0};
85 unsigned int LastAddedAtomsBeginIdx{0};
87 unsigned int LastAddedBondsBeginIdx{0};
88 unsigned int RemainingBonds{0};
89 unsigned int RemainingAtoms{0};
90#ifdef DUP_SUBSTRUCT_CACHE
105 NewBonds = src.NewBonds;
114 StoreAllDegenerateMCS = src.StoreAllDegenerateMCS;
115#ifdef DUP_SUBSTRUCT_CACHE
128 StoreAllDegenerateMCS = parent->StoreAllDegenerateMCS;
129#ifdef DUP_SUBSTRUCT_CACHE
132 LastAddedAtomsBeginIdx = getNumAtoms();
133 LastAddedBondsBeginIdx = getNumBonds();
142 return RemainingBonds + getNumBonds() > maxBonds ||
143 (RemainingBonds + getNumBonds() == maxBonds &&
144 (RemainingAtoms + getNumAtoms() > maxAtoms ||
145 (StoreAllDegenerateMCS &&
146 RemainingAtoms + getNumAtoms() == maxAtoms)));
The class for representing atoms.
class for representing a bond
unsigned int LastAddedBondsBeginIdx
unsigned int addBond(const Bond *bond)
unsigned int getNumAtoms() const
void createFromParent(const Seed *parent)
unsigned int GrowingStage
unsigned int LastAddedAtomsBeginIdx
unsigned int getNumBonds() const
void grow(MaximumCommonSubgraph &mcs) const
void setStoreAllDegenerateMCS(bool value)
void fillNewBonds(const ROMol &qmol, MaximumCommonSubgraph *mcs=nullptr) const
unsigned int RemainingAtoms
MolFragment MoleculeFragment
DuplicatedSeedCache::TKey DupCacheKey
std::vector< TargetMatch > MatchResult
void setMoleculeFragment(const Seed &src)
unsigned int RemainingBonds
bool canGrowBiggerThan(unsigned int maxBonds, unsigned int maxAtoms) const
unsigned int addAtom(const Atom *atom)
boost::dynamic_bitset ExcludedBonds
Seed & operator=(const Seed &src)
void computeRemainingSize(const ROMol &qmol)
#define RDKIT_FMCS_EXPORT
std::map< unsigned int, unsigned int > SeedAtomIdxMap
std::vector< const Bond * > Bonds
std::vector< const Atom * > Atoms
NewBond(unsigned int bond_idx, unsigned int new_atom, unsigned int to_atom, const Atom *a)