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 
45  {
46 
47  public:
56  MMFF94BondStretchingInteraction(std::size_t atom1_idx, std::size_t atom2_idx, unsigned int bond_type_idx,
57  double force_const, double ref_length):
58  atom1Idx(atom1_idx),
59  atom2Idx(atom2_idx), bondTypeIdx(bond_type_idx), forceConst(force_const), refLength(ref_length) {}
60 
65  std::size_t getAtom1Index() const
66  {
67  return atom1Idx;
68  }
69 
74  std::size_t getAtom2Index() const
75  {
76  return atom2Idx;
77  }
78 
83  unsigned int getBondTypeIndex() const
84  {
85  return bondTypeIdx;
86  }
87 
92  double getForceConstant() const
93  {
94  return forceConst;
95  }
96 
101  double getReferenceLength() const
102  {
103  return refLength;
104  }
105 
111  {
112  refLength = length;
113  }
114 
115  private:
116  std::size_t atom1Idx;
117  std::size_t atom2Idx;
118  unsigned int bondTypeIdx;
119  double forceConst;
120  double refLength;
121  };
122  } // namespace ForceField
123 } // namespace CDPL
124 
125 #endif // CDPL_FORCEFIELD_MMFF94BONDSTRETCHINGINTERACTION_HPP
Stores parameters for a single MMFF94 bond-stretching interaction between two bonded atoms.
Definition: MMFF94BondStretchingInteraction.hpp:45
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:56
double getReferenceLength() const
Returns the reference bond length.
Definition: MMFF94BondStretchingInteraction.hpp:101
unsigned int getBondTypeIndex() const
Returns the MMFF94 bond type index of this bond.
Definition: MMFF94BondStretchingInteraction.hpp:83
double getForceConstant() const
Returns the bond-stretching force constant.
Definition: MMFF94BondStretchingInteraction.hpp:92
void setReferenceLength(double length)
Sets the reference bond length.
Definition: MMFF94BondStretchingInteraction.hpp:110
std::size_t getAtom1Index() const
Returns the zero-based index of the first bonded atom.
Definition: MMFF94BondStretchingInteraction.hpp:65
std::size_t getAtom2Index() const
Returns the zero-based index of the second bonded atom.
Definition: MMFF94BondStretchingInteraction.hpp:74
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.