29 #ifndef CDPL_CONFGEN_DGCONSTRAINTGENERATOR_HPP
30 #define CDPL_CONFGEN_DGCONSTRAINTGENERATOR_HPP
34 #include <unordered_map>
51 class MMFF94InteractionData;
85 typedef std::vector<StereoCenterData> StereoCenterDataArray;
257 std::size_t& num_vol_constr, std::size_t level);
264 void extractAtomStereoCenterData();
265 void extractBondStereoCenterData();
267 void setBondLength(std::size_t atom1_idx, std::size_t atom2_idx,
double length);
268 double getBondLength(std::size_t atom1_idx, std::size_t atom2_idx)
const;
270 void setBondAngle(std::size_t atom1_idx, std::size_t atom2_idx, std::size_t atom3_idx,
double angle);
271 double getBondAngle(std::size_t atom1_idx, std::size_t atom2_idx, std::size_t atom3_idx)
const;
274 std::size_t getSmallestRingSize(
const Chem::FragmentList& sssr, std::size_t atom1_idx, std::size_t atom2_idx)
const;
276 void markAtomPairProcessed(std::size_t atom1_idx, std::size_t atom2_idx);
277 bool atomPairProcessed(std::size_t atom1_idx, std::size_t atom2_idx)
const;
279 double calc13AtomDistance(
double bond1_len,
double bond2_len,
double angle)
const;
281 double calcCis14AtomDistance(
double bond1_len,
double bond2_len,
double bond3_len,
282 double angle_12,
double angle_23)
const;
283 double calcTrans14AtomDistance(
double bond1_len,
double bond2_len,
double bond3_len,
284 double angle_12,
double angle_23)
const;
289 typedef std::vector<std::size_t> AtomIndexList;
291 std::size_t getNeighborAtoms(
const Chem::Atom& atom, AtomIndexList& idx_list,
294 typedef std::pair<std::size_t, std::size_t> BondLengthKey;
295 typedef std::tuple<std::size_t, std::size_t, std::size_t> BondAngleKey;
300 std::size_t operator()(
const BondAngleKey& k)
const;
306 std::size_t operator()(
const BondLengthKey& k)
const;
309 typedef std::unordered_map<BondLengthKey, double, BondLengthKeyHash> BondLengthTable;
310 typedef std::unordered_map<BondAngleKey, double, BondAngleKeyHash> BondAngleTable;
316 BondLengthTable bondLengthTable;
317 BondAngleTable bondAngleTable;
318 StereoCenterDataArray atomStereoData;
319 StereoCenterDataArray bondStereoData;
320 std::size_t numAtoms;
321 AtomIndexList atomIndexList1;
322 AtomIndexList atomIndexList2;
323 DGConstraintGeneratorSettings settings;
Declaration of type CDPL::Util::BitSet.
Definition of the preprocessor macro CDPL_CONFGEN_API.
#define CDPL_CONFGEN_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of class CDPL::ConfGen::DGConstraintGeneratorSettings.
Implementation of a distance geometry based coordinates generator.
Definition of the type CDPL::Chem::StereoDescriptor.
Definition of class CDPL::Math::VectorArray.
Common interface for data structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Data type for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
Data structure for the storage and retrieval of stereochemical information about atoms and bonds.
Definition: StereoDescriptor.hpp:102
Bundle of configuration parameters for distance-geometry constraint generation via class ConfGen::DGC...
Definition: DGConstraintGeneratorSettings.hpp:45
Constructs geometric constraints (distance, planarity, volume) for distance-geometry-based 3D structu...
Definition: DGConstraintGenerator.hpp:78
ConstStereoCenterDataIterator getBondStereoCenterDataEnd() const
Returns a constant iterator pointing one past the last bond stereo center.
void addAtomConfigurationConstraints(Util::DG3DCoordinatesGenerator &coords_gen)
Adds volume constraints enforcing the registered atom stereo-center configurations to coords_gen.
void addFixedSubstructureConstraints(const Chem::AtomContainer &atoms, const Math::Vector3DArray &coords, Util::DG3DCoordinatesGenerator &coords_gen)
Adds distance and volume constraints that fix the supplied substructure to the given coordinates.
void addBondPlanarityConstraints(Util::DG3DCoordinatesGenerator &coords_gen)
Adds planarity (zero-volume) constraints for double and aromatic bonds to coords_gen.
void addDefaultDistanceConstraints(Util::DG3DCoordinatesGenerator &coords_gen)
Adds default (Van der Waals-derived) lower/upper distance constraints between all non-bonded atom pai...
void setup(const Chem::MolecularGraph &molgraph, const ForceField::MMFF94InteractionData &ia_data)
Initializes the generator for the molecular graph molgraph using bond lengths and angles obtained fro...
void add14DistanceConstraints(Util::DG3DCoordinatesGenerator &coords_gen)
Adds 1,4-distance constraints (cis/trans bounds) to coords_gen.
const StereoCenterData & getAtomStereoCenterData(std::size_t idx) const
Returns the stereo-center data for the atom stereo center at index idx.
void addBondLengthConstraints(Util::DG3DCoordinatesGenerator &coords_gen)
Adds bond-length distance constraints to coords_gen.
void addBondStereoCenter(const Chem::Bond &bond, const Chem::StereoDescriptor &descr)
Registers a bond stereo center to be constrained.
void addAtomPlanarityConstraints(Util::DG3DCoordinatesGenerator &coords_gen)
Adds planarity (zero-volume) constraints for sp2-hybridized / aromatic atoms to coords_gen.
StereoCenterDataArray::const_iterator ConstStereoCenterDataIterator
A constant iterator over StereoCenterData entries.
Definition: DGConstraintGenerator.hpp:89
const DGConstraintGeneratorSettings & getSettings() const
Returns a const reference to the constraint-generation settings.
std::size_t getNumBondStereoCenters() const
Returns the number of registered bond stereo centers.
ConstStereoCenterDataIterator getBondStereoCenterDataBegin() const
Returns a constant iterator pointing to the first bond stereo center.
DGConstraintGenerator()
Constructs the DGConstraintGenerator instance.
void setup(const Chem::MolecularGraph &molgraph)
Initializes the generator for the molecular graph molgraph using default geometry data.
std::pair< std::size_t, Chem::StereoDescriptor > StereoCenterData
Pair holding an atom or bond index plus the associated stereo descriptor.
Definition: DGConstraintGenerator.hpp:82
ConstStereoCenterDataIterator getAtomStereoCenterDataEnd() const
Returns a constant iterator pointing one past the last atom stereo center.
void addAtomStereoCenter(const Chem::Atom &atom, const Chem::StereoDescriptor &descr)
Registers an atom stereo center to be constrained.
const Util::BitSet & getExcludedHydrogenMask() const
Returns the bit mask of hydrogen atoms that have been excluded from constraint generation.
const StereoCenterData & getBondStereoCenterData(std::size_t idx) const
Returns the stereo-center data for the bond stereo center at index idx.
void addBondConfigurationConstraints(Util::DG3DCoordinatesGenerator &coords_gen)
Adds distance and volume constraints enforcing the registered bond stereo-center configurations to co...
DGConstraintGeneratorSettings & getSettings()
Returns a reference to the constraint-generation settings.
ConstStereoCenterDataIterator getAtomStereoCenterDataBegin() const
Returns a constant iterator pointing to the first atom stereo center.
std::size_t getNumAtomStereoCenters() const
Returns the number of registered atom stereo centers.
void addBondAngleConstraints(Util::DG3DCoordinatesGenerator &coords_gen)
Adds bond-angle (1,3) distance constraints to coords_gen.
Container holding the full set of MMFF94 interaction parameters for a molecular graph.
Definition: MMFF94InteractionData.hpp:60
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:85
VectorNorm2< E >::ResultType length(const VectorExpression< E > &e)
Returns the length (L2 norm) of the vector expression e (alias of norm2()).
Definition: VectorExpression.hpp:979
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
DGCoordinatesGenerator< 3, double > DG3DCoordinatesGenerator
Convenience alias for the 3D coordinates generator with double-precision values.
Definition: DGCoordinatesGenerator.hpp:544
The namespace of the Chemical Data Processing Library.