ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
QuarticBond Struct Reference

Parameters for quartic bond Potential. More...

#include <quartic.hpp>

Public Member Functions

double cutoff () const
 
 QuarticBond (double k0, double k1, double r, double r_cut)
 
std::optional< Utils::Vector3dforce (Utils::Vector3d const &dx) const
 Compute the quartic bond force.
 
std::optional< double > energy (Utils::Vector3d const &dx) const
 Compute the quartic bond energy.
 

Public Attributes

double k0
 
double k1
 
double r
 
double r_cut
 

Static Public Attributes

static constexpr int num = 1
 

Detailed Description

Parameters for quartic bond Potential.

Definition at line 36 of file quartic.hpp.

Constructor & Destructor Documentation

◆ QuarticBond()

QuarticBond::QuarticBond ( double  k0,
double  k1,
double  r,
double  r_cut 
)
inline

Definition at line 45 of file quartic.hpp.

References k0, k1, r, and r_cut.

Member Function Documentation

◆ cutoff()

double QuarticBond::cutoff ( ) const
inline

Definition at line 41 of file quartic.hpp.

References r_cut.

◆ energy()

std::optional< double > QuarticBond::energy ( Utils::Vector3d const &  dx) const
inline

Compute the quartic bond energy.

Parameters
[in]dxDistance between the particles.

Definition at line 85 of file quartic.hpp.

References k0, k1, Utils::Vector< T, N >::norm(), r, r_cut, and Utils::sqr().

◆ force()

std::optional< Utils::Vector3d > QuarticBond::force ( Utils::Vector3d const &  dx) const
inline

Compute the quartic bond force.

Parameters
[in]dxDistance between the particles.

Definition at line 60 of file quartic.hpp.

References k0, k1, Utils::Vector< T, N >::norm(), r, r_cut, ROUND_ERROR_PREC, and runtimeErrorMsg.

Member Data Documentation

◆ k0

double QuarticBond::k0

Definition at line 37 of file quartic.hpp.

Referenced by energy(), force(), and QuarticBond().

◆ k1

double QuarticBond::k1

Definition at line 37 of file quartic.hpp.

Referenced by energy(), force(), and QuarticBond().

◆ num

constexpr int QuarticBond::num = 1
staticconstexpr

Definition at line 43 of file quartic.hpp.

◆ r

double QuarticBond::r

Definition at line 38 of file quartic.hpp.

Referenced by energy(), force(), and QuarticBond().

◆ r_cut

double QuarticBond::r_cut

Definition at line 39 of file quartic.hpp.

Referenced by cutoff(), energy(), force(), and QuarticBond().


The documentation for this struct was generated from the following file: