Chemical Data Processing Library C++ API - Version 1.4.0
ConformerGeneratorSettings.hpp
Go to the documentation of this file.
1 /*
2  * ConformerGeneratorSettings.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_CONFGEN_CONFORMERGENERATORSETTINGS_HPP
30 #define CDPL_CONFGEN_CONFORMERGENERATORSETTINGS_HPP
31 
32 #include <cstddef>
33 #include <vector>
34 #include <utility>
35 
38 
39 
40 namespace CDPL
41 {
42 
43  namespace ConfGen
44  {
45 
50  {
51 
52  public:
67 
72 
77  void setSamplingMode(unsigned int mode);
78 
83  unsigned int getSamplingMode() const;
84 
89  void sampleHeteroAtomHydrogens(bool sample);
90 
96 
101  void sampleAngleToleranceRanges(bool sample);
102 
108 
113  void enumerateRings(bool enumerate);
114 
119  bool enumerateRings() const;
120 
125  void setNitrogenEnumerationMode(unsigned int mode);
126 
131  unsigned int getNitrogenEnumerationMode() const;
132 
137  void generateCoordinatesFromScratch(bool generate);
138 
144 
149  void includeInputCoordinates(bool include);
150 
156 
161  void setEnergyWindow(double win_size);
162 
167  double getEnergyWindow() const;
168 
179  double getEnergyWindow(std::size_t num_rot_bonds) const;
180 
186 
193  void addEnergyWindowRange(std::size_t num_rot_bonds, double win_size);
194 
199  void setMaxPoolSize(std::size_t max_size);
200 
205  std::size_t getMaxPoolSize() const;
206 
212  void setMaxRotatableBondCount(long max_count);
213 
220 
225  void setTimeout(std::size_t mil_secs);
226 
231  std::size_t getTimeout() const;
232 
237  void setForceFieldTypeSystematic(unsigned int type);
238 
243  unsigned int getForceFieldTypeSystematic() const;
244 
249  void setForceFieldTypeStochastic(unsigned int type);
250 
255  unsigned int getForceFieldTypeStochastic() const;
256 
263 
269 
274  void setDielectricConstant(double de_const);
275 
280  double getDielectricConstant() const;
281 
286  void setDistanceExponent(double exponent);
287 
292  double getDistanceExponent() const;
293 
298  void setMaxNumOutputConformers(std::size_t max_num);
299 
304  std::size_t getMaxNumOutputConformers() const;
305 
316  std::size_t getMaxNumOutputConformers(std::size_t num_rot_bonds) const;
317 
323 
330  void addMaxNumOutputConformersRange(std::size_t num_rot_bonds, std::size_t max_num);
331 
336  void setMinRMSD(double min_rmsd);
337 
342  double getMinRMSD() const;
343 
354  double getMinRMSD(std::size_t num_rot_bonds) const;
355 
361 
368  void addMinRMSDRange(std::size_t num_rot_bonds, double min_rmsd);
369 
374  void setMaxNumRefinementIterations(std::size_t max_iter);
375 
380  std::size_t getMaxNumRefinementIterations() const;
381 
386  void setRefinementTolerance(double tol);
387 
392  double getRefinementTolerance() const;
393 
398  void setMaxNumSampledConformers(std::size_t max_num);
399 
404  std::size_t getMaxNumSampledConformers() const;
405 
410  void setConvergenceCheckCycleSize(std::size_t size);
411 
416  std::size_t getConvergenceCheckCycleSize() const;
417 
422  void setMacrocycleRotorBondCountThreshold(std::size_t min_count);
423 
429 
435 
441 
442  private:
443  typedef std::pair<std::size_t, std::size_t> STPair;
444  typedef std::pair<std::size_t, double> STDoublePair;
445  typedef std::vector<STPair> STPairArray;
446  typedef std::vector<STDoublePair> STDoublePairArray;
447 
448  template <typename A>
449  static typename A::value_type::second_type getValueForCount(const A& array, std::size_t num_rot_bonds);
450 
451  unsigned int samplingMode;
452  bool sampleHetAtomHs;
453  bool sampleTolRanges;
454  bool enumRings;
455  unsigned int nitrogenEnumMode;
456  bool fromScratch;
457  bool incInputCoords;
458  double eWindow;
459  STDoublePairArray eWindowRanges;
460  std::size_t maxPoolSize;
461  long maxRotorBondCount;
462  std::size_t timeout;
463  unsigned int forceFieldTypeSys;
464  unsigned int forceFieldTypeStoch;
465  bool strictParam;
466  double dielectricConst;
467  double distExponent;
468  std::size_t maxNumOutputConfs;
469  STPairArray maxNumOutputConfRanges;
470  double minRMSD;
471  STDoublePairArray minRMSDRanges;
472  std::size_t maxNumRefIters;
473  double refTolerance;
474  std::size_t maxNumSampledConfs;
475  std::size_t convCheckCycleSize;
476  std::size_t mcRotorBondCountThresh;
477  FragmentConformerGeneratorSettings fragBuildSettings;
478  };
479  }; // namespace ConfGen
480 } // namespace CDPL
481 
482 #endif // CDPL_CONFGEN_CONFORMERGENERATORSETTINGS_HPP
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::FragmentConformerGeneratorSettings.
Bundle of configuration parameters for conformer ensemble generation via class ConfGen::ConformerGene...
Definition: ConformerGeneratorSettings.hpp:50
void setForceFieldTypeSystematic(unsigned int type)
Sets the force field type used by the systematic sampling pipeline.
bool generateCoordinatesFromScratch() const
Tells whether 3D coordinates are generated from scratch.
std::size_t getMaxNumOutputConformers() const
Returns the configured maximum number of output conformers.
double getMinRMSD(std::size_t num_rot_bonds) const
Returns the minimum RMSD threshold that applies for molecules with num_rot_bonds rotatable bonds.
double getRefinementTolerance() const
Returns the convergence tolerance of the MMFF94 energy minimization step.
std::size_t getConvergenceCheckCycleSize() const
Returns the cycle size at which the stochastic sampler tests for convergence.
void addMinRMSDRange(std::size_t num_rot_bonds, double min_rmsd)
Registers a minimum RMSD override that applies up to and including num_rot_bonds rotatable bonds.
std::size_t getMacrocycleRotorBondCountThreshold() const
Returns the flexible macrocycle rotatable bond count threshold.
void addEnergyWindowRange(std::size_t num_rot_bonds, double win_size)
Registers an energy window override that applies up to and including num_rot_bonds rotatable bonds.
void setMinRMSD(double min_rmsd)
Sets the minimum pairwise heavy atom RMSD that conformers in the output ensemble must keep.
bool sampleHeteroAtomHydrogens() const
Tells whether torsions of heteroatom hydrogen rotors are sampled.
static const ConformerGeneratorSettings SMALL_SET_DENSE
Preset producing a small, dense conformer ensemble (tight RMSD threshold).
Definition: ConformerGeneratorSettings.hpp:62
void setNitrogenEnumerationMode(unsigned int mode)
Sets the enumeration mode for stereogenic nitrogen centers.
bool strictForceFieldParameterization() const
Tells whether strict MMFF94 parameterization is required.
void addMaxNumOutputConformersRange(std::size_t num_rot_bonds, std::size_t max_num)
Registers an output conformer limit override that applies up to and including num_rot_bonds rotatable...
void clearMinRMSDRanges()
Removes all registered rotatable bond count-dependent minimum RMSD overrides.
unsigned int getNitrogenEnumerationMode() const
Returns the currently configured nitrogen enumeration mode.
void enumerateRings(bool enumerate)
Specifies whether ring conformations shall be enumerated.
void setMaxPoolSize(std::size_t max_size)
Sets the maximum number of conformers to keep in the internal candidate pool.
void setSamplingMode(unsigned int mode)
Specifies the conformer-sampling strategy to use.
const FragmentConformerGeneratorSettings & getFragmentBuildSettings() const
Returns a const reference to the nested fragment conformer build settings.
void setMaxRotatableBondCount(long max_count)
Sets the upper limit on the number of rotatable bonds an input molecule may have to be processed.
void setMaxNumRefinementIterations(std::size_t max_iter)
Sets the maximum number of MMFF94 energy minimization iterations per conformer.
static const ConformerGeneratorSettings LARGE_SET_DENSE
Preset producing a large, dense conformer ensemble (tight RMSD threshold).
Definition: ConformerGeneratorSettings.hpp:66
void setRefinementTolerance(double tol)
Sets the convergence tolerance of the MMFF94 energy minimization step.
static const ConformerGeneratorSettings MEDIUM_SET_DENSE
Preset producing a medium-sized, dense conformer ensemble (tight RMSD threshold).
Definition: ConformerGeneratorSettings.hpp:64
void setMacrocycleRotorBondCountThreshold(std::size_t min_count)
Sets the minimum number of rotatable bonds a ring must contain to be considered as a flexible macrocy...
std::size_t getMaxNumSampledConformers() const
Returns the upper bound on the number of trial conformations produced by the stochastic sampler.
double getEnergyWindow(std::size_t num_rot_bonds) const
Returns the energy window size that applies for molecules with num_rot_bonds rotatable bonds.
void setConvergenceCheckCycleSize(std::size_t size)
Sets the cycle size (in trial conformations) at which the stochastic sampler tests for convergence.
void sampleAngleToleranceRanges(bool sample)
Specifies whether additional torsion samples within the tolerance ranges defined by the torsion libra...
void strictForceFieldParameterization(bool strict)
Specifies whether strict MMFF94 parameterization is required.
unsigned int getForceFieldTypeSystematic() const
Returns the force field type used by the systematic sampling pipeline.
double getMinRMSD() const
Returns the globally configured minimum RMSD threshold.
bool includeInputCoordinates() const
Tells whether the input coordinates are included in the output conformer ensemble.
std::size_t getMaxNumOutputConformers(std::size_t num_rot_bonds) const
Returns the maximum number of output conformers that applies for molecules with num_rot_bonds rotatab...
ConformerGeneratorSettings()
Constructs the ConformerGeneratorSettings instance with default configuration parameter values.
void sampleHeteroAtomHydrogens(bool sample)
Specifies whether torsions of heteroatom hydrogen rotors shall be sampled.
unsigned int getForceFieldTypeStochastic() const
Returns the force field type used by the stochastic sampling pipeline.
static const ConformerGeneratorSettings SMALL_SET_DIVERSE
Preset producing a small, diversity-optimized conformer ensemble.
Definition: ConformerGeneratorSettings.hpp:56
void generateCoordinatesFromScratch(bool generate)
Specifies whether 3D coordinates shall be generated from scratch (ignoring any 3D input).
void includeInputCoordinates(bool include)
Specifies whether the input conformation shall be included in the output conformer ensemble.
std::size_t getMaxNumRefinementIterations() const
Returns the maximum number of MMFF94 energy minimization iterations per conformer.
void setMaxNumSampledConformers(std::size_t max_num)
Sets the upper bound on the number of trial conformations produced by the stochastic sampler.
bool sampleAngleToleranceRanges() const
Tells whether tolerance-range sampling is enabled.
double getDistanceExponent() const
Returns the exponent of the MMFF94 distance-dependent electrostatic term.
void setDistanceExponent(double exponent)
Sets the exponent of the MMFF94 distance-dependent electrostatic term.
bool enumerateRings() const
Tells whether ring conformations are enumerated.
void clearEnergyWindowRanges()
Removes all registered rotatable bond count-dependent energy window overrides.
static const ConformerGeneratorSettings MEDIUM_SET_DIVERSE
Preset producing a medium-sized, diversity-optimized conformer ensemble.
Definition: ConformerGeneratorSettings.hpp:58
unsigned int getSamplingMode() const
Returns the currently configured conformer-sampling strategy.
void setMaxNumOutputConformers(std::size_t max_num)
Sets the maximum number of output conformers per molecule.
static const ConformerGeneratorSettings DEFAULT
Instance providing configuration parameter default values.
Definition: ConformerGeneratorSettings.hpp:54
void setForceFieldTypeStochastic(unsigned int type)
Sets the force field type used by the stochastic sampling pipeline.
std::size_t getTimeout() const
Returns the configured per-molecule wall clock time limit.
double getDielectricConstant() const
Returns the dielectric constant used by the MMFF94 electrostatic interactions.
void setDielectricConstant(double de_const)
Sets the dielectric constant used by the MMFF94 electrostatic interactions.
void clearMaxNumOutputConformersRanges()
Removes all registered rotatable bond count-dependent output conformer overrides.
std::size_t getMaxPoolSize() const
Returns the maximum number of conformers kept in the internal candidate pool.
static const ConformerGeneratorSettings LARGE_SET_DIVERSE
Preset producing a large, diversity-optimized conformer ensemble.
Definition: ConformerGeneratorSettings.hpp:60
FragmentConformerGeneratorSettings & getFragmentBuildSettings()
Returns a reference to the nested fragment conformer build settings.
double getEnergyWindow() const
Returns the configured energy window size.
void setEnergyWindow(double win_size)
Sets the energy window size (in kcal/mol) above the found global minimum within which conformers are ...
void setTimeout(std::size_t mil_secs)
Sets the maximum allowed wall clock processing time per molecule.
long getMaxRotatableBondCount() const
Returns the rotatable bond count limit above which input molecules are rejected.
Bundle of configuration parameters for fragment conformer ensemble generation via class ConfGen::Frag...
Definition: FragmentConformerGeneratorSettings.hpp:48
constexpr unsigned int A
Generic type that covers any element except hydrogen.
Definition: AtomType.hpp:637
Array< STPair > STPairArray
Array storing pairs of unsigned integers of type std::size_t.
Definition: Array.hpp:590
std::pair< std::size_t, std::size_t > STPair
Pair of unsigned integers of type std::size_t.
Definition: Array.hpp:585
The namespace of the Chemical Data Processing Library.