Chemical Data Processing Library C++ API - Version 1.4.0
MMFF94BondStretchingInteraction.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94BondStretchingInteraction.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_MMFF94BONDSTRETCHINGINTERACTION_HPP
30 #define CDPL_FORCEFIELD_MMFF94BONDSTRETCHINGINTERACTION_HPP
31 
32 #include <cstddef>
33 
34 
35 namespace CDPL
36 {
37 
38  namespace ForceField
39  {
40 
46  {
47 
48  public:
57  MMFF94BondStretchingInteraction(std::size_t atom1_idx, std::size_t atom2_idx, unsigned int bond_type_idx,
58  double force_const, double ref_length):
59  atom1Idx(atom1_idx),
60  atom2Idx(atom2_idx), bondTypeIdx(bond_type_idx), forceConst(force_const), refLength(ref_length) {}
61 
66  std::size_t getAtom1Index() const
67  {
68  return atom1Idx;
69  }
70 
75  std::size_t getAtom2Index() const
76  {
77  return atom2Idx;
78  }
79 
84  unsigned int getBondTypeIndex() const
85  {
86  return bondTypeIdx;
87  }
88 
93  double getForceConstant() const
94  {
95  return forceConst;
96  }
97 
102  double getReferenceLength() const
103  {
104  return refLength;
105  }
106 
112  {
113  refLength = length;
114  }
115 
116  private:
117  std::size_t atom1Idx;
118  std::size_t atom2Idx;
119  unsigned int bondTypeIdx;
120  double forceConst;
121  double refLength;
122  };
123  } // namespace ForceField
124 } // namespace CDPL
125 
126 #endif // CDPL_FORCEFIELD_MMFF94BONDSTRETCHINGINTERACTION_HPP
Stores parameters for a single MMFF94 bond-stretching interaction between two bonded atoms.
Definition: MMFF94BondStretchingInteraction.hpp:46
MMFF94BondStretchingInteraction(std::size_t atom1_idx, std::size_t atom2_idx, unsigned int bond_type_idx, double force_const, double ref_length)
Constructs the bond-stretching interaction parameter set.
Definition: MMFF94BondStretchingInteraction.hpp:57
double getReferenceLength() const
Returns the reference bond length.
Definition: MMFF94BondStretchingInteraction.hpp:102
unsigned int getBondTypeIndex() const
Returns the MMFF94 bond type index of this bond.
Definition: MMFF94BondStretchingInteraction.hpp:84
double getForceConstant() const
Returns the bond-stretching force constant.
Definition: MMFF94BondStretchingInteraction.hpp:93
void setReferenceLength(double length)
Sets the reference bond length.
Definition: MMFF94BondStretchingInteraction.hpp:111
std::size_t getAtom1Index() const
Returns the zero-based index of the first bonded atom.
Definition: MMFF94BondStretchingInteraction.hpp:66
std::size_t getAtom2Index() const
Returns the zero-based index of the second bonded atom.
Definition: MMFF94BondStretchingInteraction.hpp:75
VectorNorm2< E >::ResultType length(const VectorExpression< E > &e)
Returns the length (L2 norm) of the vector expression e (alias of norm2()).
Definition: VectorExpression.hpp:1129
The namespace of the Chemical Data Processing Library.