Stores parameters for an elastic potential (harmonic distance restraint) between a pair of atoms.
More...
#include <ElasticPotential.hpp>
|
| | 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 constant and reference length. More...
|
| |
| std::size_t | getAtom1Index () const |
| | Returns the zero-based index of the first atom. More...
|
| |
| std::size_t | getAtom2Index () const |
| | Returns the zero-based index of the second atom. More...
|
| |
| double | getForceConstant () const |
| | Returns the force constant of the potential. More...
|
| |
| double | getReferenceLength () const |
| | Returns the reference length of the potential. More...
|
| |
| void | setReferenceLength (double length) |
| | Sets the reference length of the potential. More...
|
| |
Stores parameters for an elastic potential (harmonic distance restraint) between a pair of atoms.
- See also
- ForceField::calcElasticPotentialEnergy()
- Since
- 1.1
◆ ElasticPotential()
| CDPL::ForceField::ElasticPotential::ElasticPotential |
( |
std::size_t |
atom1_idx, |
|
|
std::size_t |
atom2_idx, |
|
|
double |
force_const, |
|
|
double |
ref_length |
|
) |
| |
|
inline |
Constructs the elastic potential between atoms atom1_idx and atom2_idx with the specified force constant and reference length.
- Parameters
-
| atom1_idx | The zero-based index of the first restrained atom. |
| atom2_idx | The zero-based index of the second restrained atom. |
| force_const | The force constant k of the harmonic potential. |
| ref_length | The reference length \( r_0 \) of the harmonic potential. |
◆ getAtom1Index()
| std::size_t CDPL::ForceField::ElasticPotential::getAtom1Index |
( |
| ) |
const |
|
inline |
Returns the zero-based index of the first atom.
- Returns
- The first atom index.
◆ getAtom2Index()
| std::size_t CDPL::ForceField::ElasticPotential::getAtom2Index |
( |
| ) |
const |
|
inline |
Returns the zero-based index of the second atom.
- Returns
- The second atom index.
◆ getForceConstant()
| double CDPL::ForceField::ElasticPotential::getForceConstant |
( |
| ) |
const |
|
inline |
Returns the force constant of the potential.
- Returns
- The force constant k.
◆ getReferenceLength()
| double CDPL::ForceField::ElasticPotential::getReferenceLength |
( |
| ) |
const |
|
inline |
Returns the reference length of the potential.
- Returns
- The reference length \( r_0 \).
◆ setReferenceLength()
| void CDPL::ForceField::ElasticPotential::setReferenceLength |
( |
double |
length | ) |
|
|
inline |
Sets the reference length of the potential.
- Parameters
-
| length | The new reference length \( r_0 \). |
The documentation for this class was generated from the following file: