Chemical Data Processing Library C++ API - Version 1.4.0
MMFF94StretchBendInteraction.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94StretchBendInteraction.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_MMFF94STRETCHBENDINTERACTION_HPP
30 #define CDPL_FORCEFIELD_MMFF94STRETCHBENDINTERACTION_HPP
31 
32 #include <cstddef>
33 
34 
35 namespace CDPL
36 {
37 
38  namespace ForceField
39  {
40 
45  {
46 
47  public:
60  MMFF94StretchBendInteraction(std::size_t term_atom1_idx, std::size_t ctr_atom_idx, std::size_t term_atom2_idx,
61  unsigned int sb_type_idx, double ref_angle, double ref_length1, double ref_length2,
62  double ijk_force_const, double kji_force_const):
63  termAtom1Idx(term_atom1_idx),
64  ctrAtomIdx(ctr_atom_idx), termAtom2Idx(term_atom2_idx),
65  sbTypeIdx(sb_type_idx), refAngle(ref_angle), refLength1(ref_length1), refLength2(ref_length2),
66  ijkForceConst(ijk_force_const), kjiForceConst(kji_force_const) {}
67 
72  std::size_t getTerminalAtom1Index() const
73  {
74  return termAtom1Idx;
75  }
76 
81  std::size_t getCenterAtomIndex() const
82  {
83  return ctrAtomIdx;
84  }
85 
90  std::size_t getTerminalAtom2Index() const
91  {
92  return termAtom2Idx;
93  }
94 
99  std::size_t getAtom1Index() const
100  {
101  return termAtom1Idx;
102  }
103 
108  std::size_t getAtom2Index() const
109  {
110  return ctrAtomIdx;
111  }
112 
117  std::size_t getAtom3Index() const
118  {
119  return termAtom2Idx;
120  }
121 
126  unsigned int getStretchBendTypeIndex() const
127  {
128  return sbTypeIdx;
129  }
130 
135  double getIJKForceConstant() const
136  {
137  return ijkForceConst;
138  }
139 
144  double getKJIForceConstant() const
145  {
146  return kjiForceConst;
147  }
148 
153  double getReferenceAngle() const
154  {
155  return refAngle;
156  }
157 
162  void setReferenceAngle(double angle)
163  {
164  refAngle = angle;
165  }
166 
171  double getReferenceLength1() const
172  {
173  return refLength1;
174  }
175 
181  {
182  refLength1 = length;
183  }
184 
189  double getReferenceLength2() const
190  {
191  return refLength2;
192  }
193 
199  {
200  refLength2 = length;
201  }
202 
203  private:
204  std::size_t termAtom1Idx;
205  std::size_t ctrAtomIdx;
206  std::size_t termAtom2Idx;
207  unsigned int sbTypeIdx;
208  double refAngle;
209  double refLength1;
210  double refLength2;
211  double ijkForceConst;
212  double kjiForceConst;
213  };
214  } // namespace ForceField
215 } // namespace CDPL
216 
217 #endif // CDPL_FORCEFIELD_MMFF94STRETCHBENDINTERACTION_HPP
Stores paramters for a single MMFF94 stretch-bend coupling interaction.
Definition: MMFF94StretchBendInteraction.hpp:45
std::size_t getTerminalAtom2Index() const
Returns the zero-based index of the second terminal atom k.
Definition: MMFF94StretchBendInteraction.hpp:90
MMFF94StretchBendInteraction(std::size_t term_atom1_idx, std::size_t ctr_atom_idx, std::size_t term_atom2_idx, unsigned int sb_type_idx, double ref_angle, double ref_length1, double ref_length2, double ijk_force_const, double kji_force_const)
Constructs the stretch-bend interaction parameter set.
Definition: MMFF94StretchBendInteraction.hpp:60
double getKJIForceConstant() const
Returns the force constant coupling j-k bond stretching with the central angle.
Definition: MMFF94StretchBendInteraction.hpp:144
std::size_t getCenterAtomIndex() const
Returns the zero-based index of the central atom j.
Definition: MMFF94StretchBendInteraction.hpp:81
double getReferenceLength1() const
Returns the reference length of bond i-j.
Definition: MMFF94StretchBendInteraction.hpp:171
std::size_t getTerminalAtom1Index() const
Returns the zero-based index of the first terminal atom i.
Definition: MMFF94StretchBendInteraction.hpp:72
double getReferenceAngle() const
Returns the reference angle.
Definition: MMFF94StretchBendInteraction.hpp:153
std::size_t getAtom1Index() const
Returns the zero-based index of the first terminal atom (alias for getTerminalAtom1Index()).
Definition: MMFF94StretchBendInteraction.hpp:99
std::size_t getAtom2Index() const
Returns the zero-based index of the central atom (alias for getCenterAtomIndex()).
Definition: MMFF94StretchBendInteraction.hpp:108
double getReferenceLength2() const
Returns the reference length of bond j-k.
Definition: MMFF94StretchBendInteraction.hpp:189
void setReferenceAngle(double angle)
Sets the reference angle.
Definition: MMFF94StretchBendInteraction.hpp:162
unsigned int getStretchBendTypeIndex() const
Returns the MMFF94 stretch-bend type index.
Definition: MMFF94StretchBendInteraction.hpp:126
void setReferenceLength1(double length)
Sets the reference length of bond i-j.
Definition: MMFF94StretchBendInteraction.hpp:180
std::size_t getAtom3Index() const
Returns the zero-based index of the second terminal atom (alias for getTerminalAtom2Index()).
Definition: MMFF94StretchBendInteraction.hpp:117
void setReferenceLength2(double length)
Sets the reference length of bond j-k.
Definition: MMFF94StretchBendInteraction.hpp:198
double getIJKForceConstant() const
Returns the force constant coupling i-j bond stretching with the central angle.
Definition: MMFF94StretchBendInteraction.hpp:135
VectorNorm2< E >::ResultType length(const VectorExpression< E > &e)
Returns the length (L2 norm) of the vector expression e (alias of norm2()).
Definition: VectorExpression.hpp:979
The namespace of the Chemical Data Processing Library.