Chemical Data Processing Library C++ API - Version 1.1.1
MMFF94StretchBendInteractionParameterizer.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94StretchBendInteractionParameterizer.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_MMFF94STRETCHBENDINTERACTIONPARAMETERIZER_HPP
30 #define CDPL_FORCEFIELD_MMFF94STRETCHBENDINTERACTIONPARAMETERIZER_HPP
31 
32 #include <utility>
33 #include <cstddef>
34 #include <unordered_map>
35 #include <memory>
36 
37 #include <boost/functional/hash.hpp>
38 
48 
49 
50 namespace CDPL
51 {
52 
53  namespace Chem
54  {
55 
56  class MolecularGraph;
57  class Atom;
58  } // namespace Chem
59 
60  namespace ForceField
61  {
62 
64  {
65 
66  public:
67  typedef std::shared_ptr<MMFF94StretchBendInteractionParameterizer> SharedPointer;
68 
70 
73  bool strict);
74 
76 
78 
80 
82 
84 
86  const MMFF94AngleBendingInteractionList& ab_ia_list, MMFF94StretchBendInteractionList& ia_list, bool strict);
87 
88  private:
89  void initBondStretchingParamLookupTable(const MMFF94BondStretchingInteractionList& bs_ia_list);
90 
91  void getBondStretchingParameters(std::size_t atom1_idx, std::size_t atom2_idx, unsigned int& bond_type_idx, double& ref_length) const;
92 
93  void getStretchBendParameters(const Chem::MolecularGraph& molgraph, const Chem::Atom& term_atom1, unsigned int term_atom1_type, const Chem::Atom& ctr_atom, unsigned int ctr_atom_type,
94  const Chem::Atom& term_atom2, unsigned int term_atom2_type, unsigned int bond_type_idx1, unsigned int bond_type_idx2,
95  unsigned int angle_type_idx, unsigned int& sb_type_idx, double& ijk_force_const, double& kji_force_const) const;
96 
97  void getStretchBendParameters(const Chem::MolecularGraph& molgraph, const Chem::Atom& term_atom1, const Chem::Atom& ctr_atom,
98  const Chem::Atom& term_atom2, unsigned int bond_type_idx1, unsigned int bond_type_idx2,
99  unsigned int angle_type_idx, unsigned int& sb_type_idx, double& ijk_force_const, double& kji_force_const, bool strict) const;
100 
129  unsigned int getStretchBendTypeIndex(bool symmetric, unsigned int bond_type_idx1, unsigned int bond_type_idx2, unsigned int angle_type_idx) const;
130 
131  unsigned int getPTERow(const Chem::MolecularGraph& molgraph, const Chem::Atom& atom, unsigned int atom_type) const;
132 
133  typedef std::unordered_map<std::pair<std::size_t, std::size_t>, const MMFF94BondStretchingInteraction*, boost::hash<std::pair<std::size_t, std::size_t> > > BondStretchingParamLookupTable;
134 
135  InteractionFilterFunction3 filterFunc;
136  MMFF94NumericAtomTypeFunction atomTypeFunc;
140  BondStretchingParamLookupTable bsParamTable;
141  };
142  } // namespace ForceField
143 } // namespace CDPL
144 
145 #endif // CDPL_FORCEFIELD_MMFF94STRETCHBENDINTERACTIONPARAMETERIZER_HPP
APIPrefix.hpp
Definition of the preprocessor macro CDPL_FORCEFIELD_API.
MMFF94BondStretchingInteractionList.hpp
Definition of the class CDPL::ForceField::MMFF94BondStretchingInteractionList.
MMFF94DefaultStretchBendParameterTable.hpp
Definition of the class CDPL::ForceField::MMFF94DefaultStretchBendParameterTable.
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::setStretchBendParameterTable
void setStretchBendParameterTable(const MMFF94StretchBendParameterTable::SharedPointer &table)
CDPL::ForceField::MMFF94BondStretchingInteraction
Definition: MMFF94BondStretchingInteraction.hpp:42
InteractionFilterFunctions.hpp
Type definition of generic wrapper classes for storing user-defined interaction filtering functions.
CDPL::Util::Array< MMFF94BondStretchingInteraction >
CDPL::Chem::Atom
Atom.
Definition: Atom.hpp:52
CDPL::ForceField::MMFF94AtomTypePropertyTable::SharedPointer
std::shared_ptr< MMFF94AtomTypePropertyTable > SharedPointer
Definition: MMFF94AtomTypePropertyTable.hpp:59
CDPL::ForceField::MMFF94DefaultStretchBendParameterTable::SharedPointer
std::shared_ptr< MMFF94DefaultStretchBendParameterTable > SharedPointer
Definition: MMFF94DefaultStretchBendParameterTable.hpp:60
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer
Definition: MMFF94StretchBendInteractionParameterizer.hpp:64
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::setFilterFunction
void setFilterFunction(const InteractionFilterFunction3 &func)
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::setAtomTypeFunction
void setAtomTypeFunction(const MMFF94NumericAtomTypeFunction &func)
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::parameterize
void parameterize(const Chem::MolecularGraph &molgraph, const MMFF94BondStretchingInteractionList &bs_ia_list, const MMFF94AngleBendingInteractionList &ab_ia_list, MMFF94StretchBendInteractionList &ia_list, bool strict)
CDPL::ForceField::MMFF94NumericAtomTypeFunction
std::function< unsigned int(const Chem::Atom &)> MMFF94NumericAtomTypeFunction
A generic wrapper class used to store a user-defined numeric MMFF94 atom type function.
Definition: MMFF94PropertyFunctions.hpp:56
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::MMFF94StretchBendInteractionParameterizer
MMFF94StretchBendInteractionParameterizer(const Chem::MolecularGraph &molgraph, const MMFF94BondStretchingInteractionList &bs_ia_list, const MMFF94AngleBendingInteractionList &ab_ia_list, MMFF94StretchBendInteractionList &ia_list, bool strict)
MMFF94StretchBendInteractionList.hpp
Definition of the class CDPL::ForceField::MMFF94StretchBendInteractionList.
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::SharedPointer
std::shared_ptr< MMFF94StretchBendInteractionParameterizer > SharedPointer
Definition: MMFF94StretchBendInteractionParameterizer.hpp:67
MMFF94StretchBendParameterTable.hpp
Definition of the class CDPL::ForceField::MMFF94StretchBendParameterTable.
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::setDefaultStretchBendParameterTable
void setDefaultStretchBendParameterTable(const MMFF94DefaultStretchBendParameterTable::SharedPointer &table)
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::setAtomTypePropertyTable
void setAtomTypePropertyTable(const MMFF94AtomTypePropertyTable::SharedPointer &table)
MMFF94AtomTypePropertyTable.hpp
Definition of the class CDPL::ForceField::MMFF94AtomTypePropertyTable.
CDPL_FORCEFIELD_API
#define CDPL_FORCEFIELD_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::ForceField::MMFF94StretchBendParameterTable::SharedPointer
std::shared_ptr< MMFF94StretchBendParameterTable > SharedPointer
Definition: MMFF94StretchBendParameterTable.hpp:60
CDPL::ForceField::InteractionFilterFunction3
std::function< bool(const Chem::Atom &, const Chem::Atom &, const Chem::Atom &)> InteractionFilterFunction3
Definition: InteractionFilterFunctions.hpp:50
MMFF94AngleBendingInteractionList.hpp
Definition of the class CDPL::ForceField::MMFF94AngleBendingInteractionList.
MMFF94PropertyFunctions.hpp
Type definition of generic wrapper classes for storing user-defined functions for the retrieval of MM...
CDPL::ForceField::MMFF94StretchBendInteractionParameterizer::MMFF94StretchBendInteractionParameterizer
MMFF94StretchBendInteractionParameterizer()