Chemical Data Processing Library C++ API - Version 1.4.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 
67  {
68 
69  public:
71  typedef std::shared_ptr<MMFF94TorsionInteractionParameterizer> SharedPointer;
72 
77 
87  bool strict);
88 
94 
100 
106 
112 
118 
124 
130 
139  void parameterize(const Chem::MolecularGraph& molgraph, MMFF94TorsionInteractionList& ia_list, bool strict);
140 
141  private:
143  typedef std::vector<const Chem::Atom*> AtomList;
144  typedef std::vector<const Chem::Bond*> BondList;
145 
146  bool getParameters(const Chem::MolecularGraph& molgraph, const Chem::Atom& term_atom1, const Chem::Atom& ctr_atom1,
147  const Chem::Atom& ctr_atom2, const Chem::Atom& term_atom2, const Chem::Bond& ctr_bond,
148  unsigned int term_atom1_type, unsigned int ctr_atom1_type, unsigned int ctr_atom2_type,
149  unsigned int term_atom2_type, unsigned int tor_type_idx, const AtomTypePropEntry& ctr_atom1_prop_entry,
150  const AtomTypePropEntry& ctr_atom2_prop_entry, double& tor_param1, double& tor_param2,
151  double& tor_param3) const;
152 
153  unsigned int getTorsionTypeIndex(const Chem::MolecularGraph& molgraph, const Chem::Atom& term_atom1, const Chem::Atom& ctr_atom1,
154  const Chem::Atom& ctr_atom2, const Chem::Atom& term_atom2, const Chem::Bond& ctr_bond,
155  unsigned int term_atom1_type, unsigned int ctr_atom1_type, unsigned int ctr_atom2_type,
156  unsigned int term_atom2_type, unsigned int term_bond1_type_idx, unsigned int ctr_bond_type_idx,
157  unsigned int term_bond2_type_idx) const;
158 
159  bool isInSecondPTERow(unsigned int atomic_no) const;
160 
161  InteractionFilterFunction4 filterFunc;
162  MMFF94NumericAtomTypeFunction atomTypeFunc;
163  MMFF94BondTypeIndexFunction bondTypeIdxFunc;
164  MMFF94RingSetFunction aromRingSetFunc;
168  AtomList nbrAtoms1;
169  AtomList nbrAtoms2;
170  BondList nbrBonds1;
171  BondList nbrBonds2;
172  };
173  } // namespace ForceField
174 } // namespace CDPL
175 
176 #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 declaration of generic wrapper class types for storing user-defined interaction filtering predic...
Definition of class CDPL::ForceField::MMFF94AtomTypePropertyTable.
Definition of class CDPL::ForceField::MMFF94PrimaryToParameterAtomTypeMap.
Type declaration of generic wrapper classes for storing user-defined functions for the retrieval of M...
Declaration of type CDPL::ForceField::MMFF94TorsionInteractionList.
Definition of class CDPL::ForceField::MMFF94TorsionParameterTable.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
A single atom-type property record.
Definition: MMFF94AtomTypePropertyTable.hpp:74
std::shared_ptr< MMFF94AtomTypePropertyTable > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94AtomTypePropertyTable insta...
Definition: MMFF94AtomTypePropertyTable.hpp:68
std::shared_ptr< MMFF94PrimaryToParameterAtomTypeMap > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94PrimaryToParameterAtomTypeM...
Definition: MMFF94PrimaryToParameterAtomTypeMap.hpp:64
Detects and parameterizes the MMFF94 torsion interactions of a molecular graph.
Definition: MMFF94TorsionInteractionParameterizer.hpp:67
void setAromaticRingSetFunction(const MMFF94RingSetFunction &func)
Sets the function used to obtain the set of MMFF94 aromatic rings of the input molecular graph.
void setParameterAtomTypeMap(const MMFF94PrimaryToParameterAtomTypeMap::SharedPointer &map)
Sets the map used to translate primary atom types into their corresponding parameter atom types.
void setAtomTypeFunction(const MMFF94NumericAtomTypeFunction &func)
Sets the function used to look up the MMFF94 numeric atom type of an atom.
void setFilterFunction(const InteractionFilterFunction4 &func)
Sets the filter function used to skip atom quadruplets during parameterization.
void setAtomTypePropertyTable(const MMFF94AtomTypePropertyTable::SharedPointer &table)
Sets the table providing MMFF94 numeric atom type property data (used by the empirical fallback).
std::shared_ptr< MMFF94TorsionInteractionParameterizer > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94TorsionInteractionParameter...
Definition: MMFF94TorsionInteractionParameterizer.hpp:71
void setBondTypeIndexFunction(const MMFF94BondTypeIndexFunction &func)
Sets the function used to look up the MMFF94 bond type index of a bond.
MMFF94TorsionInteractionParameterizer(const Chem::MolecularGraph &molgraph, MMFF94TorsionInteractionList &ia_list, bool strict)
Constructs the parameterizer and processes the molecular graph molgraph.
void parameterize(const Chem::MolecularGraph &molgraph, MMFF94TorsionInteractionList &ia_list, bool strict)
Perceives the MMFF94 torsion interactions for molgraph and outputs the corresponding parameter data i...
void setTorsionParameterTable(const MMFF94TorsionParameterTable::SharedPointer &table)
Sets the primary table providing torsion type-specific parameters.
MMFF94TorsionInteractionParameterizer()
Constructs an MMFF94TorsionInteractionParameterizer instance using the default MMFF94 parameter table...
std::shared_ptr< MMFF94TorsionParameterTable > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94TorsionParameterTable insta...
Definition: MMFF94TorsionParameterTable.hpp:67
std::function< unsigned int(const Chem::Atom &)> MMFF94NumericAtomTypeFunction
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
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
Generic wrapper for storing user-defined four-atom interaction filtering functions (see [FUNWRP]).
Definition: InteractionFilterFunctions.hpp:72
std::function< unsigned int(const Chem::Bond &)> MMFF94BondTypeIndexFunction
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.