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

Parameters for four-body angular potential (dihedral-angle potentials). More...

#include <dihedral.hpp>

Public Member Functions

double cutoff () const
 
 DihedralBond (int mult, double bend, double phase)
 
boost::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > forces (Utils::Vector3d const &v12, Utils::Vector3d const &v23, Utils::Vector3d const &v34) const
 Compute the four-body dihedral interaction force.
 
boost::optional< double > energy (Utils::Vector3d const &v12, Utils::Vector3d const &v23, Utils::Vector3d const &v34) const
 Compute the four-body dihedral interaction energy.
 

Public Attributes

double mult
 
double bend
 
double phase
 

Static Public Attributes

static constexpr int num = 3
 

Detailed Description

Parameters for four-body angular potential (dihedral-angle potentials).

Definition at line 42 of file dihedral.hpp.

Constructor & Destructor Documentation

◆ DihedralBond()

DihedralBond::DihedralBond ( int  mult,
double  bend,
double  phase 
)
inline

Definition at line 51 of file dihedral.hpp.

References bend, mult, and phase.

Member Function Documentation

◆ cutoff()

double DihedralBond::cutoff ( ) const
inline

Definition at line 47 of file dihedral.hpp.

◆ energy()

boost::optional< double > DihedralBond::energy ( Utils::Vector3d const &  v12,
Utils::Vector3d const &  v23,
Utils::Vector3d const &  v34 
) const
inline

Compute the four-body dihedral interaction energy.

The energy doesn't have any singularity if the angle phi is well-defined.

Parameters
[in]v12Vector from p1 to p2
[in]v23Vector from p2 to p3
[in]v34Vector from p3 to p4

Definition at line 197 of file dihedral.hpp.

References bend, calc_dihedral_angle(), mult, and phase.

◆ forces()

boost::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > DihedralBond::forces ( Utils::Vector3d const &  v12,
Utils::Vector3d const &  v23,
Utils::Vector3d const &  v34 
) const
inline

Compute the four-body dihedral interaction force.

The forces have a singularity at \( \phi = 0 \) and \( \phi = \pi \) (see [41] page 592).

Parameters
[in]v12Vector from p1 to p2
[in]v23Vector from p2 to p3
[in]v34Vector from p3 to p4
Returns
the forces on p2, p1, p3

Definition at line 144 of file dihedral.hpp.

References bend, calc_dihedral_angle(), mult, phase, TINY_SIN_VALUE, and vector_product().

Member Data Documentation

◆ bend

double DihedralBond::bend

Definition at line 44 of file dihedral.hpp.

Referenced by DihedralBond(), energy(), and forces().

◆ mult

double DihedralBond::mult

Definition at line 43 of file dihedral.hpp.

Referenced by DihedralBond(), energy(), and forces().

◆ num

constexpr int DihedralBond::num = 3
staticconstexpr

Definition at line 49 of file dihedral.hpp.

◆ phase

double DihedralBond::phase

Definition at line 45 of file dihedral.hpp.

Referenced by DihedralBond(), energy(), and forces().


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