29 #ifndef CDPL_FORCEFIELD_ELASTICPOTENTIAL_HPP
30 #define CDPL_FORCEFIELD_ELASTICPOTENTIAL_HPP
58 ElasticPotential(std::size_t atom1_idx, std::size_t atom2_idx,
double force_const,
double ref_length):
59 atom1Idx(atom1_idx), atom2Idx(atom2_idx), forceConst(force_const), refLength(ref_length) {}
107 std::size_t atom1Idx;
108 std::size_t atom2Idx;
Stores parameters for an elastic potential (harmonic distance restraint) between a pair of atoms.
Definition: ElasticPotential.hpp:47
ElasticPotential(std::size_t atom1_idx, std::size_t atom2_idx, double force_const, double ref_length)
Constructs the elastic potential between atoms atom1_idx and atom2_idx with the specified force const...
Definition: ElasticPotential.hpp:58
std::size_t getAtom2Index() const
Returns the zero-based index of the second atom.
Definition: ElasticPotential.hpp:74
std::size_t getAtom1Index() const
Returns the zero-based index of the first atom.
Definition: ElasticPotential.hpp:65
double getForceConstant() const
Returns the force constant of the potential.
Definition: ElasticPotential.hpp:83
double getReferenceLength() const
Returns the reference length of the potential.
Definition: ElasticPotential.hpp:92
void setReferenceLength(double length)
Sets the reference length of the potential.
Definition: ElasticPotential.hpp:101
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.