13#include <boost/dynamic_bitset.hpp>
14#include "../RDKitBase.h"
24class MaximumCommonSubgraph;
29 std::vector<const Atom *>
Atoms;
30 std::vector<const Bond *>
Bonds;
38 unsigned int BondIdx{0};
41 unsigned int NewAtomIdx{0};
44 unsigned int EndAtomIdx{0};
47 const Atom *NewAtom{
nullptr};
53 NewBond(
unsigned int bond_idx,
unsigned int new_atom,
unsigned int to_atom,
63 boost::dynamic_bitset<> addNewBondsToSeed(
const ROMol &qmol,
65 bool canAddAllNonFusedRingBondsConnectedToBond(
67 void addNewBondFromAtom(
const Atom &srcAtom,
const Bond &bond)
const;
69 mutable std::vector<NewBond> NewBonds;
70 bool StoreAllDegenerateMCS =
false;
75 bool CopyComplete{
false};
78 mutable unsigned int GrowingStage{0};
86 unsigned int LastAddedAtomsBeginIdx{0};
88 unsigned int LastAddedBondsBeginIdx{0};
89 unsigned int RemainingBonds{0};
90 unsigned int RemainingAtoms{0};
91#ifdef DUP_SUBSTRUCT_CACHE
106 NewBonds = src.NewBonds;
115 StoreAllDegenerateMCS = src.StoreAllDegenerateMCS;
116#ifdef DUP_SUBSTRUCT_CACHE
129 StoreAllDegenerateMCS = parent->StoreAllDegenerateMCS;
130#ifdef DUP_SUBSTRUCT_CACHE
133 LastAddedAtomsBeginIdx = getNumAtoms();
134 LastAddedBondsBeginIdx = getNumBonds();
143 return RemainingBonds + getNumBonds() > maxBonds ||
144 (RemainingBonds + getNumBonds() == maxBonds &&
145 (RemainingAtoms + getNumAtoms() > maxAtoms ||
146 (StoreAllDegenerateMCS &&
147 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)