Chemical Data Processing Library C++ API - Version 1.2.0
MMFF94TorsionInteractionParameterizer.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94TorsionInteractionParameterizer.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_MMFF94TORSIONINTERACTIONPARAMETERIZER_HPP
30 #define CDPL_FORCEFIELD_MMFF94TORSIONINTERACTIONPARAMETERIZER_HPP
31 
32 #include <vector>
33 #include <memory>
34 
42 
43 
44 namespace CDPL
45 {
46 
47  namespace Chem
48  {
49 
50  class MolecularGraph;
51  class Atom;
52  class Bond;
53  } // namespace Chem
54 
55  namespace ForceField
56  {
57 
59  {
60 
61  public:
62  typedef std::shared_ptr<MMFF94TorsionInteractionParameterizer> SharedPointer;
63 
65 
68  bool strict);
69 
71 
73 
75 
77 
79 
81 
83 
84  void parameterize(const Chem::MolecularGraph& molgraph, MMFF94TorsionInteractionList& ia_list, bool strict);
85 
86  private:
88  typedef std::vector<const Chem::Atom*> AtomList;
89  typedef std::vector<const Chem::Bond*> BondList;
90 
91  bool getParameters(const Chem::MolecularGraph& molgraph, const Chem::Atom& term_atom1, const Chem::Atom& ctr_atom1,
92  const Chem::Atom& ctr_atom2, const Chem::Atom& term_atom2, const Chem::Bond& ctr_bond,
93  unsigned int term_atom1_type, unsigned int ctr_atom1_type, unsigned int ctr_atom2_type,
94  unsigned int term_atom2_type, unsigned int tor_type_idx, const AtomTypePropEntry& ctr_atom1_prop_entry,
95  const AtomTypePropEntry& ctr_atom2_prop_entry, double& tor_param1, double& tor_param2,
96  double& tor_param3) const;
97 
98  unsigned int getTorsionTypeIndex(const Chem::MolecularGraph& molgraph, const Chem::Atom& term_atom1, const Chem::Atom& ctr_atom1,
99  const Chem::Atom& ctr_atom2, const Chem::Atom& term_atom2, const Chem::Bond& ctr_bond,
100  unsigned int term_atom1_type, unsigned int ctr_atom1_type, unsigned int ctr_atom2_type,
101  unsigned int term_atom2_type, unsigned int term_bond1_type_idx, unsigned int ctr_bond_type_idx,
102  unsigned int term_bond2_type_idx) const;
103 
104  bool isInSecondPTERow(unsigned int atomic_no) const;
105 
106  InteractionFilterFunction4 filterFunc;
107  MMFF94NumericAtomTypeFunction atomTypeFunc;
108  MMFF94BondTypeIndexFunction bondTypeIdxFunc;
109  MMFF94RingSetFunction aromRingSetFunc;
113  AtomList nbrAtoms1;
114  AtomList nbrAtoms2;
115  BondList nbrBonds1;
116  BondList nbrBonds2;
117  };
118  } // namespace ForceField
119 } // namespace CDPL
120 
121 #endif // CDPL_FORCEFIELD_MMFF94TORSIONINTERACTIONPARAMETERIZER_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.
Type definition of generic wrapper classes for storing user-defined interaction filtering functions.
Definition of the class CDPL::ForceField::MMFF94AtomTypePropertyTable.
Definition of the class CDPL::ForceField::MMFF94PrimaryToParameterAtomTypeMap.
Type definition of generic wrapper classes for storing user-defined functions for the retrieval of MM...
Definition of the class CDPL::ForceField::MMFF94TorsionInteractionList.
Definition of the class CDPL::ForceField::MMFF94TorsionParameterTable.
Atom.
Definition: Atom.hpp:52
Bond.
Definition: Bond.hpp:50
MolecularGraph.
Definition: MolecularGraph.hpp:52
Definition: MMFF94AtomTypePropertyTable.hpp:62
std::shared_ptr< MMFF94AtomTypePropertyTable > SharedPointer
Definition: MMFF94AtomTypePropertyTable.hpp:59
std::shared_ptr< MMFF94PrimaryToParameterAtomTypeMap > SharedPointer
Definition: MMFF94PrimaryToParameterAtomTypeMap.hpp:59
Definition: MMFF94TorsionInteractionParameterizer.hpp:59
void setAromaticRingSetFunction(const MMFF94RingSetFunction &func)
void setParameterAtomTypeMap(const MMFF94PrimaryToParameterAtomTypeMap::SharedPointer &map)
void setAtomTypeFunction(const MMFF94NumericAtomTypeFunction &func)
void setFilterFunction(const InteractionFilterFunction4 &func)
void setAtomTypePropertyTable(const MMFF94AtomTypePropertyTable::SharedPointer &table)
std::shared_ptr< MMFF94TorsionInteractionParameterizer > SharedPointer
Definition: MMFF94TorsionInteractionParameterizer.hpp:62
void setBondTypeIndexFunction(const MMFF94BondTypeIndexFunction &func)
MMFF94TorsionInteractionParameterizer(const Chem::MolecularGraph &molgraph, MMFF94TorsionInteractionList &ia_list, bool strict)
void parameterize(const Chem::MolecularGraph &molgraph, MMFF94TorsionInteractionList &ia_list, bool strict)
void setTorsionParameterTable(const MMFF94TorsionParameterTable::SharedPointer &table)
std::shared_ptr< MMFF94TorsionParameterTable > SharedPointer
Definition: MMFF94TorsionParameterTable.hpp:60
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
std::function< const Chem::FragmentList::SharedPointer &(const Chem::MolecularGraph &)> MMFF94RingSetFunction
A generic wrapper class used to store a user-defined MMFF94 ring set function.
Definition: MMFF94PropertyFunctions.hpp:76
std::function< bool(const Chem::Atom &, const Chem::Atom &, const Chem::Atom &, const Chem::Atom &)> InteractionFilterFunction4
Definition: InteractionFilterFunctions.hpp:52
std::function< unsigned int(const Chem::Bond &)> MMFF94BondTypeIndexFunction
A generic wrapper class used to store a user-defined MMFF94 bond type index function.
Definition: MMFF94PropertyFunctions.hpp:71
The namespace of the Chemical Data Processing Library.