ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Parameters for harmonic bond Potential. More...
#include <harmonic.hpp>
Public Member Functions | |
double | cutoff () const |
HarmonicBond (double k, double r, double r_cut) | |
std::optional< Utils::Vector3d > | force (Utils::Vector3d const &dx) const |
Compute the harmonic bond force. | |
std::optional< double > | energy (Utils::Vector3d const &dx) const |
Compute the harmonic bond energy. | |
Public Attributes | |
double | k |
spring constant | |
double | r |
equilibrium bond length | |
double | r_cut |
cutoff length | |
Static Public Attributes | |
static constexpr int | num = 1 |
Parameters for harmonic bond Potential.
Definition at line 37 of file harmonic.hpp.
|
inline |
Definition at line 49 of file harmonic.hpp.
|
inline |
Definition at line 45 of file harmonic.hpp.
References r_cut.
|
inline |
Compute the harmonic bond energy.
[in] | dx | Distance between the particles. |
Definition at line 87 of file harmonic.hpp.
References k, Utils::Vector< T, N >::norm(), r, r_cut, and Utils::sqr().
|
inline |
Compute the harmonic bond force.
[in] | dx | Distance between the particles. |
Definition at line 63 of file harmonic.hpp.
References k, Utils::Vector< T, N >::norm(), r, r_cut, ROUND_ERROR_PREC, and runtimeErrorMsg.
double HarmonicBond::k |
spring constant
Definition at line 39 of file harmonic.hpp.
Referenced by energy(), force(), and HarmonicBond().
|
staticconstexpr |
Definition at line 47 of file harmonic.hpp.
double HarmonicBond::r |
equilibrium bond length
Definition at line 41 of file harmonic.hpp.
Referenced by energy(), force(), and HarmonicBond().
double HarmonicBond::r_cut |
cutoff length
Definition at line 43 of file harmonic.hpp.
Referenced by cutoff(), energy(), force(), and HarmonicBond().