Chemical Data Processing Library C++ API - Version 1.2.0
MMFF94InteractionParameterizer.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94InteractionParameterizer.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_MMFF94INTERACTIONPARAMETERIZER_HPP
30 #define CDPL_FORCEFIELD_MMFF94INTERACTIONPARAMETERIZER_HPP
31 
32 #include <string>
33 #include <cstddef>
34 #include <memory>
35 
68 #include "CDPL/Util/Array.hpp"
69 #include "CDPL/Math/Matrix.hpp"
70 
71 
72 namespace CDPL
73 {
74 
75  namespace Chem
76  {
77 
78  class Atom;
79  class Bond;
80  } // namespace Chem
81 
82  namespace ForceField
83  {
84 
85  class MMFF94InteractionData;
86 
88  {
89 
90  public:
91  typedef std::shared_ptr<MMFF94InteractionParameterizer> SharedPointer;
92 
94 
96 
98 
100 
102 
104 
106 
108 
110 
112 
114 
116 
118 
120 
122 
124 
126 
128 
130 
132 
134 
136 
138 
140 
142 
144 
146 
147  void setDielectricConstant(double de_const);
148 
149  void setDistanceExponent(double dist_expo);
150 
151  void setParameterSet(unsigned int param_set);
152 
154 
156  unsigned int ia_types = InteractionType::ALL, bool strict = true);
157 
158  private:
159  void setPropertyFunctions();
160 
161  unsigned int getBondTypeIndex(const Chem::Bond& bond) const;
162 
163  unsigned int getNumericAtomType(const Chem::Atom& atom) const;
164 
165  const std::string& getSymbolicAtomType(const Chem::Atom& atom) const;
166 
167  double getAtomCharge(const Chem::Atom& atom) const;
168 
170 
171  std::size_t getTopologicalDistance(const Chem::Atom& atom1, const Chem::Atom& atom2,
172  const Chem::MolecularGraph& molgraph) const;
173 
174  void setup(const Chem::MolecularGraph& molgraph, unsigned int ia_types, bool strict);
175 
176  void setupAromaticRingSet();
177  void setupAtomTypes(bool strict);
178  void setupBondTypeIndices(bool strict);
179  void setupAtomCharges(bool strict);
180  void setupTopDistances();
181 
182  MMFF94BondStretchingInteractionParameterizer bondStretchingParameterizer;
183  MMFF94AngleBendingInteractionParameterizer angleBendingParameterizer;
184  MMFF94StretchBendInteractionParameterizer stretchBendParameterizer;
185  MMFF94OutOfPlaneBendingInteractionParameterizer outOfPlaneParameterizer;
186  MMFF94TorsionInteractionParameterizer torsionParameterizer;
187  MMFF94VanDerWaalsInteractionParameterizer vanDerWaalsParameterizer;
188  MMFF94ElectrostaticInteractionParameterizer electrostaticParameterizer;
189  MMFF94AtomTyper atomTyper;
190  MMFF94BondTyper bondTyper;
191  MMFF94ChargeCalculator chargeCalculator;
193  Chem::FragmentList::SharedPointer usedAromRings;
194  Math::ULMatrix::SharedPointer topDistMatrix;
195  Math::ULMatrix::SharedPointer usedTopDistMatrix;
196  Util::UIArray numAtomTypes;
197  Util::SArray symAtomTypes;
198  Util::UIArray bondTypeIndices;
199  Util::DArray atomCharges;
200  const Chem::MolecularGraph* molGraph;
201  };
202  } // namespace ForceField
203 } // namespace CDPL
204 
205 #endif // CDPL_FORCEFIELD_MMFF94INTERACTIONPARAMETERIZER_HPP
Definition of the class CDPL::Util::Array.
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.
Type definition of generic wrapper classes for storing user-defined interaction filtering functions.
Definition of constants in namespace CDPL::ForceField::InteractionType.
Definition of the class CDPL::ForceField::MMFF94AngleBendingInteractionParameterizer.
Definition of the class CDPL::ForceField::MMFF94AngleBendingParameterTable.
Definition of the class CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable.
Definition of the class CDPL::ForceField::MMFF94AromaticSSSRSubset.
Definition of the class CDPL::ForceField::MMFF94AtomTypePropertyTable.
Definition of the class CDPL::ForceField::MMFF94AtomTyper.
Definition of the class CDPL::ForceField::MMFF94BondChargeIncrementTable.
Definition of the class CDPL::ForceField::MMFF94BondStretchingInteractionParameterizer.
Definition of the class CDPL::ForceField::MMFF94BondStretchingParameterTable.
Definition of the class CDPL::ForceField::MMFF94BondStretchingRuleParameterTable.
Definition of the class CDPL::ForceField::MMFF94BondTyper.
Definition of the class CDPL::ForceField::MMFF94ChargeCalculator.
Definition of the class CDPL::ForceField::MMFF94DefaultStretchBendParameterTable.
Definition of the class CDPL::ForceField::MMFF94ElectrostaticInteractionParameterizer.
Definition of the class CDPL::ForceField::MMFF94FormalAtomChargeDefinitionTable.
Definition of the class CDPL::ForceField::MMFF94HeavyToHydrogenAtomTypeMap.
Definition of the class CDPL::ForceField::MMFF94OutOfPlaneBendingInteractionParameterizer.
Definition of the class CDPL::ForceField::MMFF94OutOfPlaneBendingParameterTable.
Definition of constants in namespace CDPL::ForceField::MMFF94ParameterSet.
Definition of the class CDPL::ForceField::MMFF94PartialBondChargeIncrementTable.
Definition of the class CDPL::ForceField::MMFF94PrimaryToParameterAtomTypeMap.
Definition of the class CDPL::ForceField::MMFF94StretchBendInteractionParameterizer.
Definition of the class CDPL::ForceField::MMFF94StretchBendParameterTable.
Pattern of the class CDPL::ForceField::MMFF94SymbolicAtomTypePatternTable.
Definition of the class CDPL::ForceField::MMFF94SymbolicToNumericAtomTypeMap.
Definition of the class CDPL::ForceField::MMFF94TorsionInteractionParameterizer.
Definition of the class CDPL::ForceField::MMFF94TorsionParameterTable.
Definition of the class CDPL::ForceField::MMFF94VanDerWaalsInteractionParameterizer.
Definition of the class CDPL::ForceField::MMFF94VanDerWaalsParameterTable.
Definition of matrix data types.
Atom.
Definition: Atom.hpp:52
Bond.
Definition: Bond.hpp:50
std::shared_ptr< FragmentList > SharedPointer
Definition: FragmentList.hpp:52
MolecularGraph.
Definition: MolecularGraph.hpp:52
Definition: MMFF94AngleBendingInteractionParameterizer.hpp:63
std::shared_ptr< MMFF94AngleBendingParameterTable > SharedPointer
Definition: MMFF94AngleBendingParameterTable.hpp:60
std::shared_ptr< MMFF94AromaticAtomTypeDefinitionTable > SharedPointer
Definition: MMFF94AromaticAtomTypeDefinitionTable.hpp:57
std::shared_ptr< MMFF94AromaticSSSRSubset > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94AromaticSSSRSubset instance...
Definition: MMFF94AromaticSSSRSubset.hpp:64
std::shared_ptr< MMFF94AtomTypePropertyTable > SharedPointer
Definition: MMFF94AtomTypePropertyTable.hpp:59
Definition: MMFF94AtomTyper.hpp:61
std::shared_ptr< MMFF94BondChargeIncrementTable > SharedPointer
Definition: MMFF94BondChargeIncrementTable.hpp:60
Definition: MMFF94BondStretchingInteractionParameterizer.hpp:57
std::shared_ptr< MMFF94BondStretchingParameterTable > SharedPointer
Definition: MMFF94BondStretchingParameterTable.hpp:60
std::shared_ptr< MMFF94BondStretchingRuleParameterTable > SharedPointer
Definition: MMFF94BondStretchingRuleParameterTable.hpp:60
Definition: MMFF94BondTyper.hpp:51
Definition: MMFF94ChargeCalculator.hpp:59
std::shared_ptr< MMFF94DefaultStretchBendParameterTable > SharedPointer
Definition: MMFF94DefaultStretchBendParameterTable.hpp:60
Definition: MMFF94ElectrostaticInteractionParameterizer.hpp:54
std::shared_ptr< MMFF94FormalAtomChargeDefinitionTable > SharedPointer
Definition: MMFF94FormalAtomChargeDefinitionTable.hpp:61
std::shared_ptr< MMFF94HeavyToHydrogenAtomTypeMap > SharedPointer
Definition: MMFF94HeavyToHydrogenAtomTypeMap.hpp:53
Definition: MMFF94InteractionData.hpp:51
Definition: MMFF94InteractionParameterizer.hpp:88
void setTorsionFilterFunction(const InteractionFilterFunction4 &func)
void setAngleBendingParameterTable(const MMFF94AngleBendingParameterTable::SharedPointer &table)
void setSymbolicToNumericAtomTypeMap(const MMFF94SymbolicToNumericAtomTypeMap::SharedPointer &map)
void setBondStretchingFilterFunction(const InteractionFilterFunction2 &func)
void setOutOfPlaneBendingParameterTable(const MMFF94OutOfPlaneBendingParameterTable::SharedPointer &table)
MMFF94InteractionParameterizer(unsigned int param_set=MMFF94ParameterSet::STATIC)
void setDefaultStretchBendParameterTable(const MMFF94DefaultStretchBendParameterTable::SharedPointer &table)
void parameterize(const Chem::MolecularGraph &molgraph, MMFF94InteractionData &ia_data, unsigned int ia_types=InteractionType::ALL, bool strict=true)
void setStretchBendFilterFunction(const InteractionFilterFunction3 &func)
void setAngleBendingFilterFunction(const InteractionFilterFunction3 &func)
std::shared_ptr< MMFF94InteractionParameterizer > SharedPointer
Definition: MMFF94InteractionParameterizer.hpp:91
void setAromaticAtomTypeDefinitionTable(const MMFF94AromaticAtomTypeDefinitionTable::SharedPointer &table)
MMFF94InteractionParameterizer & operator=(const MMFF94InteractionParameterizer &parameterizer)
void setBondChargeIncrementTable(const MMFF94BondChargeIncrementTable::SharedPointer &table)
void setBondStretchingParameterTable(const MMFF94BondStretchingParameterTable::SharedPointer &table)
void setFormalAtomChargeDefinitionTable(const MMFF94FormalAtomChargeDefinitionTable::SharedPointer &table)
void setOutOfPlaneBendingFilterFunction(const InteractionFilterFunction4 &func)
void setVanDerWaalsFilterFunction(const InteractionFilterFunction2 &func)
void setParameterSet(unsigned int param_set)
void setHeavyToHydrogenAtomTypeMap(const MMFF94HeavyToHydrogenAtomTypeMap::SharedPointer &map)
void setAtomTypePropertyTable(const MMFF94AtomTypePropertyTable::SharedPointer &table)
void setStretchBendParameterTable(const MMFF94StretchBendParameterTable::SharedPointer &table)
void setPartialBondChargeIncrementTable(const MMFF94PartialBondChargeIncrementTable::SharedPointer &table)
void setBondStretchingRuleParameterTable(const MMFF94BondStretchingRuleParameterTable::SharedPointer &table)
void setPrimaryToParameterAtomTypeMap(const MMFF94PrimaryToParameterAtomTypeMap::SharedPointer &map)
MMFF94InteractionParameterizer(const MMFF94InteractionParameterizer &parameterizer)
void setVanDerWaalsParameterTable(const MMFF94VanDerWaalsParameterTable::SharedPointer &table)
void setSymbolicAtomTypePatternTable(const MMFF94SymbolicAtomTypePatternTable::SharedPointer &table)
void setElectrostaticFilterFunction(const InteractionFilterFunction2 &func)
void setTorsionParameterTable(const MMFF94TorsionParameterTable::SharedPointer &table)
Definition: MMFF94OutOfPlaneBendingInteractionParameterizer.hpp:58
std::shared_ptr< MMFF94OutOfPlaneBendingParameterTable > SharedPointer
Definition: MMFF94OutOfPlaneBendingParameterTable.hpp:60
std::shared_ptr< MMFF94PartialBondChargeIncrementTable > SharedPointer
Definition: MMFF94PartialBondChargeIncrementTable.hpp:59
std::shared_ptr< MMFF94PrimaryToParameterAtomTypeMap > SharedPointer
Definition: MMFF94PrimaryToParameterAtomTypeMap.hpp:59
Definition: MMFF94StretchBendInteractionParameterizer.hpp:64
std::shared_ptr< MMFF94StretchBendParameterTable > SharedPointer
Definition: MMFF94StretchBendParameterTable.hpp:60
std::shared_ptr< MMFF94SymbolicAtomTypePatternTable > SharedPointer
Definition: MMFF94SymbolicAtomTypePatternTable.hpp:58
std::shared_ptr< MMFF94SymbolicToNumericAtomTypeMap > SharedPointer
Definition: MMFF94SymbolicToNumericAtomTypeMap.hpp:53
Definition: MMFF94TorsionInteractionParameterizer.hpp:59
std::shared_ptr< MMFF94TorsionParameterTable > SharedPointer
Definition: MMFF94TorsionParameterTable.hpp:60
Definition: MMFF94VanDerWaalsInteractionParameterizer.hpp:55
std::shared_ptr< MMFF94VanDerWaalsParameterTable > SharedPointer
Definition: MMFF94VanDerWaalsParameterTable.hpp:60
CDPL_CHEM_API FragmentList::SharedPointer getAromaticRings(const MolecularGraph &molgraph)
CDPL_CHEM_API std::size_t getTopologicalDistance(const Atom &atom1, const Atom &atom2, const MolecularGraph &molgraph)
constexpr unsigned int ALL
Definition: InteractionType.hpp:53
constexpr unsigned int STATIC
Definition: MMFF94ParameterSet.hpp:46
std::function< bool(const Chem::Atom &, const Chem::Atom &, const Chem::Atom &)> InteractionFilterFunction3
Definition: InteractionFilterFunctions.hpp:50
std::function< bool(const Chem::Atom &, const Chem::Atom &, const Chem::Atom &, const Chem::Atom &)> InteractionFilterFunction4
Definition: InteractionFilterFunctions.hpp:52
std::function< bool(const Chem::Atom &, const Chem::Atom &)> InteractionFilterFunction2
Definition: InteractionFilterFunctions.hpp:48
Array< double > DArray
An array of double precision floating-point numbers.
Definition: Array.hpp:587
Array< unsigned int > UIArray
An array of unsigned integers.
Definition: Array.hpp:562
Array< std::string > SArray
An array of std::string objects.
Definition: Array.hpp:592
The namespace of the Chemical Data Processing Library.