Chemical Data Processing Library C++ API - Version 1.1.1
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 
42  {
43 
44  public:
45  MMFF94BondStretchingInteraction(std::size_t atom1_idx, std::size_t atom2_idx, unsigned int bond_type_idx,
46  double force_const, double ref_length):
47  atom1Idx(atom1_idx),
48  atom2Idx(atom2_idx), bondTypeIdx(bond_type_idx), forceConst(force_const), refLength(ref_length) {}
49 
50  std::size_t getAtom1Index() const
51  {
52  return atom1Idx;
53  }
54 
55  std::size_t getAtom2Index() const
56  {
57  return atom2Idx;
58  }
59 
60  unsigned int getBondTypeIndex() const
61  {
62  return bondTypeIdx;
63  }
64 
65  double getForceConstant() const
66  {
67  return forceConst;
68  }
69 
70  double getReferenceLength() const
71  {
72  return refLength;
73  }
74 
76  {
77  refLength = length;
78  }
79 
80  private:
81  std::size_t atom1Idx;
82  std::size_t atom2Idx;
83  unsigned int bondTypeIdx;
84  double forceConst;
85  double refLength;
86  };
87  } // namespace ForceField
88 } // namespace CDPL
89 
90 #endif // CDPL_FORCEFIELD_MMFF94BONDSTRETCHINGINTERACTION_HPP
CDPL::ForceField::MMFF94BondStretchingInteraction::getBondTypeIndex
unsigned int getBondTypeIndex() const
Definition: MMFF94BondStretchingInteraction.hpp:60
CDPL::ForceField::MMFF94BondStretchingInteraction::setReferenceLength
void setReferenceLength(double length)
Definition: MMFF94BondStretchingInteraction.hpp:75
CDPL::ForceField::MMFF94BondStretchingInteraction
Definition: MMFF94BondStretchingInteraction.hpp:42
CDPL::ForceField::MMFF94BondStretchingInteraction::getReferenceLength
double getReferenceLength() const
Definition: MMFF94BondStretchingInteraction.hpp:70
CDPL::ForceField::MMFF94BondStretchingInteraction::getForceConstant
double getForceConstant() const
Definition: MMFF94BondStretchingInteraction.hpp:65
CDPL::ForceField::MMFF94BondStretchingInteraction::getAtom1Index
std::size_t getAtom1Index() const
Definition: MMFF94BondStretchingInteraction.hpp:50
CDPL::ForceField::MMFF94BondStretchingInteraction::MMFF94BondStretchingInteraction
MMFF94BondStretchingInteraction(std::size_t atom1_idx, std::size_t atom2_idx, unsigned int bond_type_idx, double force_const, double ref_length)
Definition: MMFF94BondStretchingInteraction.hpp:45
CDPL::ForceField::MMFF94BondStretchingInteraction::getAtom2Index
std::size_t getAtom2Index() const
Definition: MMFF94BondStretchingInteraction.hpp:55
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Math::length
VectorNorm2< E >::ResultType length(const VectorExpression< E > &e)
Definition: VectorExpression.hpp:553