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:
57 
62 
67 
72 
77 
82 
87 
92 
97  void setSamplingMode(unsigned int mode);
98 
103  unsigned int getSamplingMode() const;
104 
109  void sampleHeteroAtomHydrogens(bool sample);
110 
116 
121  void sampleAngleToleranceRanges(bool sample);
122 
128 
133  void enumerateRings(bool enumerate);
134 
139  bool enumerateRings() const;
140 
145  void setNitrogenEnumerationMode(unsigned int mode);
146 
151  unsigned int getNitrogenEnumerationMode() const;
152 
157  void generateCoordinatesFromScratch(bool generate);
158 
164 
169  void includeInputCoordinates(bool include);
170 
176 
181  void setEnergyWindow(double win_size);
182 
187  double getEnergyWindow() const;
188 
199  double getEnergyWindow(std::size_t num_rot_bonds) const;
200 
206 
213  void addEnergyWindowRange(std::size_t num_rot_bonds, double win_size);
214 
219  void setMaxPoolSize(std::size_t max_size);
220 
225  std::size_t getMaxPoolSize() const;
226 
232  void setMaxRotatableBondCount(long max_count);
233 
240 
245  void setTimeout(std::size_t mil_secs);
246 
251  std::size_t getTimeout() const;
252 
257  void setForceFieldTypeSystematic(unsigned int type);
258 
263  unsigned int getForceFieldTypeSystematic() const;
264 
269  void setForceFieldTypeStochastic(unsigned int type);
270 
275  unsigned int getForceFieldTypeStochastic() const;
276 
283 
289 
294  void setDielectricConstant(double de_const);
295 
300  double getDielectricConstant() const;
301 
306  void setDistanceExponent(double exponent);
307 
312  double getDistanceExponent() const;
313 
318  void setMaxNumOutputConformers(std::size_t max_num);
319 
324  std::size_t getMaxNumOutputConformers() const;
325 
336  std::size_t getMaxNumOutputConformers(std::size_t num_rot_bonds) const;
337 
343 
350  void addMaxNumOutputConformersRange(std::size_t num_rot_bonds, std::size_t max_num);
351 
356  void setMinRMSD(double min_rmsd);
357 
362  double getMinRMSD() const;
363 
374  double getMinRMSD(std::size_t num_rot_bonds) const;
375 
381 
388  void addMinRMSDRange(std::size_t num_rot_bonds, double min_rmsd);
389 
394  void setMaxNumRefinementIterations(std::size_t max_iter);
395 
400  std::size_t getMaxNumRefinementIterations() const;
401 
406  void setRefinementTolerance(double tol);
407 
412  double getRefinementTolerance() const;
413 
418  void setMaxNumSampledConformers(std::size_t max_num);
419 
424  std::size_t getMaxNumSampledConformers() const;
425 
430  void setConvergenceCheckCycleSize(std::size_t size);
431 
436  std::size_t getConvergenceCheckCycleSize() const;
437 
442  void setMacrocycleRotorBondCountThreshold(std::size_t min_count);
443 
449 
455 
461 
462  private:
463  typedef std::pair<std::size_t, std::size_t> STPair;
464  typedef std::pair<std::size_t, double> STDoublePair;
465  typedef std::vector<STPair> STPairArray;
466  typedef std::vector<STDoublePair> STDoublePairArray;
467 
468  template <typename A>
469  static typename A::value_type::second_type getValueForCount(const A& array, std::size_t num_rot_bonds);
470 
471  unsigned int samplingMode;
472  bool sampleHetAtomHs;
473  bool sampleTolRanges;
474  bool enumRings;
475  unsigned int nitrogenEnumMode;
476  bool fromScratch;
477  bool incInputCoords;
478  double eWindow;
479  STDoublePairArray eWindowRanges;
480  std::size_t maxPoolSize;
481  long maxRotorBondCount;
482  std::size_t timeout;
483  unsigned int forceFieldTypeSys;
484  unsigned int forceFieldTypeStoch;
485  bool strictParam;
486  double dielectricConst;
487  double distExponent;
488  std::size_t maxNumOutputConfs;
489  STPairArray maxNumOutputConfRanges;
490  double minRMSD;
491  STDoublePairArray minRMSDRanges;
492  std::size_t maxNumRefIters;
493  double refTolerance;
494  std::size_t maxNumSampledConfs;
495  std::size_t convCheckCycleSize;
496  std::size_t mcRotorBondCountThresh;
497  FragmentConformerGeneratorSettings fragBuildSettings;
498  };
499  }; // namespace ConfGen
500 } // namespace CDPL
501 
502 #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:76
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:86
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:81
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:61
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:66
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:56
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:71
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:593
std::pair< std::size_t, std::size_t > STPair
Pair of unsigned integers of type std::size_t.
Definition: Array.hpp:588
The namespace of the Chemical Data Processing Library.