Chemical Data Processing Library C++ API - Version 1.2.0
MMFF94VanDerWaalsParameterTable.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94VanDerWaalsParameterTable.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_FORCEFIELD_MMFF94VANDERWAALSPARAMETERTABLE_HPP
30 #define CDPL_FORCEFIELD_MMFF94VANDERWAALSPARAMETERTABLE_HPP
31 
32 #include <iosfwd>
33 #include <cstddef>
34 #include <unordered_map>
35 #include <memory>
36 #include <functional>
37 
38 #include <boost/iterator/transform_iterator.hpp>
39 
42 
43 
44 namespace CDPL
45 {
46 
47  namespace ForceField
48  {
49 
51  {
52 
53  public:
54  class Entry;
55 
56  private:
57  typedef std::unordered_map<unsigned int, Entry> DataStorage;
58 
59  public:
60  typedef std::shared_ptr<MMFF94VanDerWaalsParameterTable> SharedPointer;
62 
64  {
65 
66  public:
67  Entry();
68 
69  Entry(unsigned int atom_type, double atom_pol, double eff_el_num, double fact_a, double fact_g,
70  HDonorAcceptorType don_acc_type);
71 
72  unsigned int getAtomType() const;
73 
78  double getAtomicPolarizability() const;
79 
85 
90  double getFactorA() const;
91 
96  double getFactorG() const;
97 
103 
104  operator bool() const;
105 
106  private:
107  unsigned int atomType;
108  double polarizability;
109  double effElNumber;
110  double factA;
111  double factG;
112  HDonorAcceptorType donAccType;
113  bool initialized;
114  };
115 
116  typedef boost::transform_iterator<std::function<const Entry&(const DataStorage::value_type&)>,
117  DataStorage::const_iterator>
119 
120  typedef boost::transform_iterator<std::function<Entry&(DataStorage::value_type&)>,
121  DataStorage::iterator>
123 
125 
126  void addEntry(unsigned int atom_type, double atom_pol, double eff_el_num, double fact_a, double fact_g,
127  HDonorAcceptorType don_acc_type);
128 
129  const Entry& getEntry(unsigned int atom_type) const;
130 
131  std::size_t getNumEntries() const;
132 
133  void clear();
134 
135  bool removeEntry(unsigned int atom_type);
136 
138 
140 
142 
144 
146 
148 
150 
152 
154 
155  void setExponent(double value);
156 
157  void setBeta(double value);
158 
159  void setFactorB(double value);
160 
161  void setFactorDARAD(double value);
162 
163  void setFactorDAEPS(double value);
164 
170  double getExponent() const;
171 
177  double getFactorB() const;
178 
184  double getBeta() const;
185 
191  double getFactorDARAD() const;
192 
198  double getFactorDAEPS() const;
199 
200  void load(std::istream& is);
201 
202  void loadDefaults();
203 
204  static void set(const SharedPointer& table);
205 
206  static const SharedPointer& get();
207 
208  private:
209  static SharedPointer defaultTable;
210  DataStorage entries;
211  double exponent;
212  double factB;
213  double beta;
214  double factDARAD;
215  double factDAEPS;
216  };
217  } // namespace ForceField
218 } // namespace CDPL
219 
220 #endif // CDPL_FORCEFIELD_MMFF94VANDERWAALSPARAMETERTABLE_HPP
Definition of the preprocessor macro CDPL_FORCEFIELD_API.
#define CDPL_FORCEFIELD_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the class CDPL::ForceField::MMFF94VanDerWaalsInteraction.
HDonorAcceptorType
Definition: MMFF94VanDerWaalsInteraction.hpp:47
Definition: MMFF94VanDerWaalsParameterTable.hpp:64
double getAtomicPolarizability() const
Returns the atomic polarizability parameter.
Entry(unsigned int atom_type, double atom_pol, double eff_el_num, double fact_a, double fact_g, HDonorAcceptorType don_acc_type)
double getFactorG() const
Returns the scaling factor G parameter.
double getFactorA() const
Returns the scaling factor A parameter.
double getEffectiveElectronNumber() const
Returns the Slater-Kirkwood effective number of valence electrons parameter.
Definition: MMFF94VanDerWaalsParameterTable.hpp:51
static void set(const SharedPointer &table)
EntryIterator removeEntry(const EntryIterator &it)
boost::transform_iterator< std::function< Entry &(DataStorage::value_type &)>, DataStorage::iterator > EntryIterator
Definition: MMFF94VanDerWaalsParameterTable.hpp:122
double getFactorB() const
Returns the value of the B factor used in the calculation of van der Waals interaction energies.
double getFactorDARAD() const
Returns the value of the DARAD factor used in the calculation of van der Waals interaction energies.
boost::transform_iterator< std::function< const Entry &(const DataStorage::value_type &)>, DataStorage::const_iterator > ConstEntryIterator
Definition: MMFF94VanDerWaalsParameterTable.hpp:118
MMFF94VanDerWaalsInteraction::HDonorAcceptorType HDonorAcceptorType
Definition: MMFF94VanDerWaalsParameterTable.hpp:61
const Entry & getEntry(unsigned int atom_type) const
double getBeta() const
Returns the value of beta used in the calculation of van der Waals interaction energies.
std::shared_ptr< MMFF94VanDerWaalsParameterTable > SharedPointer
Definition: MMFF94VanDerWaalsParameterTable.hpp:60
double getFactorDAEPS() const
Returns the value of the DAEPS factor used in the calculation of van der Waals interaction energies.
void addEntry(unsigned int atom_type, double atom_pol, double eff_el_num, double fact_a, double fact_g, HDonorAcceptorType don_acc_type)
double getExponent() const
Returns the exponent used in the calculation of van der Waals interaction energies.
The namespace of the Chemical Data Processing Library.