10 #ifndef RDKIT_MOLENUMERATOR_H
11 #define RDKIT_MOLENUMERATOR_H
23 class ChemicalReaction;
24 namespace MolEnumerator {
38 const std::vector<size_t> &which)
const = 0;
42 virtual std::unique_ptr<MolEnumeratorOp>
copy()
const = 0;
61 : dp_mol(other.dp_mol), d_variationPoints(other.d_variationPoints){};
66 dp_mol = other.dp_mol;
67 d_variationPoints = other.d_variationPoints;
75 const std::vector<size_t> &which)
const override;
81 std::unique_ptr<MolEnumeratorOp>
copy()
const override {
86 std::shared_ptr<ROMol> dp_mol{
nullptr};
87 std::vector<std::pair<unsigned int, std::vector<unsigned int>>>
89 std::vector<size_t> d_dummiesAtEachPoint{};
99 LinkNodeOp(
const std::shared_ptr<ROMol> mol) : dp_mol(mol) {
105 : dp_mol(other.dp_mol),
106 dp_frame(other.dp_frame),
107 d_countAtEachPoint(other.d_countAtEachPoint),
108 d_variations(other.d_variations),
109 d_pointRanges(other.d_pointRanges),
110 d_isotopeMap(other.d_isotopeMap){};
112 if (&other ==
this) {
115 dp_mol = other.dp_mol;
116 dp_frame = other.dp_frame;
117 d_countAtEachPoint = other.d_countAtEachPoint;
118 d_variations = other.d_variations;
119 d_pointRanges = other.d_pointRanges;
120 d_isotopeMap = other.d_isotopeMap;
128 const std::vector<size_t> &which)
const override;
134 std::unique_ptr<MolEnumeratorOp>
copy()
const override {
135 return std::unique_ptr<MolEnumeratorOp>(
new LinkNodeOp(*
this));
139 std::shared_ptr<ROMol> dp_mol{
nullptr};
140 std::shared_ptr<RWMol> dp_frame{
nullptr};
141 std::vector<size_t> d_countAtEachPoint{};
142 std::vector<std::tuple<unsigned, unsigned, unsigned>> d_variations;
143 std::vector<std::pair<unsigned, unsigned>> d_pointRanges;
144 std::map<unsigned, unsigned> d_isotopeMap;
151 bool sanitize =
false;
152 size_t maxToEnumerate = 1000;
153 bool doRandom =
false;
#define PRECONDITION(expr, mess)
Defines a class for managing bundles of molecules.
pulls in the core RDKit functionality
MolBundle contains a collection of related ROMols.
Molecule enumeration operation corresponding to LINKNODES.
LinkNodeOp(const LinkNodeOp &other)
LinkNodeOp & operator=(const LinkNodeOp &other)
void initFromMol(const ROMol &mol) override
\override
LinkNodeOp(const std::shared_ptr< ROMol > mol)
LinkNodeOp(const ROMol &mol)
std::unique_ptr< MolEnumeratorOp > copy() const override
\override
std::vector< size_t > getVariationCounts() const override
\override
std::unique_ptr< ROMol > operator()(const std::vector< size_t > &which) const override
\override
abstract base class for the a molecule enumeration operation
virtual std::unique_ptr< MolEnumeratorOp > copy() const =0
polymorphic copy
virtual std::unique_ptr< ROMol > operator()(const std::vector< size_t > &which) const =0
returns a the molecule corresponding to a particular variation
virtual std::vector< size_t > getVariationCounts() const =0
virtual void initFromMol(const ROMol &mol)=0
initializes this operation to work on a particular molecule
virtual ~MolEnumeratorOp()
Molecule enumeration operation corresponding to position variation bonds.
std::unique_ptr< MolEnumeratorOp > copy() const override
\override
std::vector< size_t > getVariationCounts() const override
\override
PositionVariationOp & operator=(const PositionVariationOp &other)
void initFromMol(const ROMol &mol) override
\override
PositionVariationOp(const PositionVariationOp &other)
PositionVariationOp(const std::shared_ptr< ROMol > mol)
std::unique_ptr< ROMol > operator()(const std::vector< size_t > &which) const override
\override
PositionVariationOp(const ROMol &mol)
#define RDKIT_MOLENUMERATOR_EXPORT
RDKIT_MOLENUMERATOR_EXPORT MolBundle enumerate(const ROMol &mol, const MolEnumeratorParams ¶ms)
Parameters used to control the molecule enumeration.
std::shared_ptr< MolEnumeratorOp > dp_operation