Chemical Data Processing Library C++ API - Version 1.1.1
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
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::end
ConstEntryIterator end() const
APIPrefix.hpp
Definition of the preprocessor macro CDPL_FORCEFIELD_API.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry::Entry
Entry(unsigned int atom_type, double atom_pol, double eff_el_num, double fact_a, double fact_g, HDonorAcceptorType don_acc_type)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::setFactorDARAD
void setFactorDARAD(double value)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::removeEntry
bool removeEntry(unsigned int atom_type)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry
Definition: MMFF94VanDerWaalsParameterTable.hpp:64
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::loadDefaults
void loadDefaults()
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::clear
void clear()
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getFactorDAEPS
double getFactorDAEPS() const
Returns the value of the DAEPS factor used in the calculation of van der Waals interaction energies.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getEntriesBegin
ConstEntryIterator getEntriesBegin() const
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::get
static const SharedPointer & get()
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::EntryIterator
boost::transform_iterator< std::function< Entry &(DataStorage::value_type &)>, DataStorage::iterator > EntryIterator
Definition: MMFF94VanDerWaalsParameterTable.hpp:122
CDPL::ForceField::MMFF94VanDerWaalsParameterTable
Definition: MMFF94VanDerWaalsParameterTable.hpp:51
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::begin
ConstEntryIterator begin() const
MMFF94VanDerWaalsInteraction.hpp
Definition of the class CDPL::ForceField::MMFF94VanDerWaalsInteraction.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry::getAtomType
unsigned int getAtomType() const
bool
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry::getFactorG
double getFactorG() const
Returns the scaling factor G parameter.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry::getAtomicPolarizability
double getAtomicPolarizability() const
Returns the atomic polarizability parameter.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::addEntry
void addEntry(unsigned int atom_type, double atom_pol, double eff_el_num, double fact_a, double fact_g, HDonorAcceptorType don_acc_type)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::removeEntry
EntryIterator removeEntry(const EntryIterator &it)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::setExponent
void setExponent(double value)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::ConstEntryIterator
boost::transform_iterator< std::function< const Entry &(const DataStorage::value_type &)>, DataStorage::const_iterator > ConstEntryIterator
Definition: MMFF94VanDerWaalsParameterTable.hpp:118
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getBeta
double getBeta() const
Returns the value of beta used in the calculation of van der Waals interaction energies.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::setFactorDAEPS
void setFactorDAEPS(double value)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::load
void load(std::istream &is)
CDPL::ForceField::MMFF94VanDerWaalsInteraction::HDonorAcceptorType
HDonorAcceptorType
Definition: MMFF94VanDerWaalsInteraction.hpp:47
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::setFactorB
void setFactorB(double value)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getNumEntries
std::size_t getNumEntries() const
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getEntriesBegin
EntryIterator getEntriesBegin()
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getEntriesEnd
EntryIterator getEntriesEnd()
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getEntry
const Entry & getEntry(unsigned int atom_type) const
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry::Entry
Entry()
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getFactorDARAD
double getFactorDARAD() const
Returns the value of the DARAD factor used in the calculation of van der Waals interaction energies.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::SharedPointer
std::shared_ptr< MMFF94VanDerWaalsParameterTable > SharedPointer
Definition: MMFF94VanDerWaalsParameterTable.hpp:60
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getExponent
double getExponent() const
Returns the exponent used in the calculation of van der Waals interaction energies.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::end
EntryIterator end()
CDPL_FORCEFIELD_API
#define CDPL_FORCEFIELD_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getFactorB
double getFactorB() const
Returns the value of the B factor used in the calculation of van der Waals interaction energies.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::HDonorAcceptorType
MMFF94VanDerWaalsInteraction::HDonorAcceptorType HDonorAcceptorType
Definition: MMFF94VanDerWaalsParameterTable.hpp:61
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::MMFF94VanDerWaalsParameterTable
MMFF94VanDerWaalsParameterTable()
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::begin
EntryIterator begin()
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry::getHDonorAcceptorType
HDonorAcceptorType getHDonorAcceptorType() const
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::setBeta
void setBeta(double value)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::getEntriesEnd
ConstEntryIterator getEntriesEnd() const
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry::getFactorA
double getFactorA() const
Returns the scaling factor A parameter.
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::set
static void set(const SharedPointer &table)
CDPL::ForceField::MMFF94VanDerWaalsParameterTable::Entry::getEffectiveElectronNumber
double getEffectiveElectronNumber() const
Returns the Slater-Kirkwood effective number of valence electrons parameter.