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