52 static constexpr int num = 1;
60 this->drmax2i = 1. / this->
drmax2;
70inline std::optional<Utils::Vector3d>
72 auto const len = dx.
norm();
73 auto const dr = len -
r0;
79 auto fac = -
k * dr / (1.0 - dr * dr *
drmax2i);
85 "This is most likely an error in the system setup.";
97 double const dr = dx.
norm() -
r0;
Vector implementation and trait types for boost qvm interoperability.
This file contains the defaults for ESPResSo.
#define ROUND_ERROR_PREC
Precision for capture of round off errors.
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
#define runtimeErrorMsg()
DEVICE_QUALIFIER constexpr T sqr(T x)
Calculates the SQuaRe of x.
Parameters for FENE bond Potential.
double drmax2i
inverse square of drmax (internal parameter)
double drmax
maximal bond stretching
FeneBond(double k, double drmax, double r0)
double drmax2
square of drmax (internal parameter)
double r0
equilibrium bond length
std::optional< double > energy(Utils::Vector3d const &dx) const
Compute the FENE bond energy.
std::optional< Utils::Vector3d > force(Utils::Vector3d const &dx) const
Compute the FENE bond force.