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

Parameters for 4-body tabulated potential. More...

#include <bonded_tab.hpp>

+ Inheritance diagram for TabulatedDihedralBond:
+ Collaboration diagram for TabulatedDihedralBond:

Public Member Functions

double cutoff () const
 
 TabulatedDihedralBond (double min, double max, std::vector< double > const &energy, std::vector< double > const &force)
 
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 Member Functions inherited from TabulatedBond
 TabulatedBond (double min, double max, std::vector< double > const &energy, std::vector< double > const &force)
 Set the parameters of a bonded tabulated potential.
 

Static Public Attributes

static constexpr int num = 3
 

Additional Inherited Members

- Public Attributes inherited from TabulatedBond
std::shared_ptr< TabulatedPotentialpot
 

Detailed Description

Parameters for 4-body tabulated potential.

Definition at line 110 of file bonded_tab.hpp.

Constructor & Destructor Documentation

◆ TabulatedDihedralBond()

TabulatedDihedralBond::TabulatedDihedralBond ( double  min,
double  max,
std::vector< double > const &  energy,
std::vector< double > const &  force 
)
inline

Definition at line 115 of file bonded_tab.hpp.

References Utils::pi(), TabulatedBond::pot, and ROUND_ERROR_PREC.

Member Function Documentation

◆ cutoff()

double TabulatedDihedralBond::cutoff ( ) const
inline

Definition at line 111 of file bonded_tab.hpp.

◆ energy()

boost::optional< double > TabulatedDihedralBond::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 267 of file bonded_tab.hpp.

References calc_dihedral_angle(), and TabulatedBond::pot.

◆ forces()

boost::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > TabulatedDihedralBond::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 223 of file bonded_tab.hpp.

References calc_dihedral_angle(), TabulatedBond::pot, and vector_product().

Member Data Documentation

◆ num

constexpr int TabulatedDihedralBond::num = 3
staticconstexpr

Definition at line 113 of file bonded_tab.hpp.


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