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)
 
std::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.
 
std::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 101 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 106 of file bonded_tab.hpp.

References TabulatedBond::pot, and ROUND_ERROR_PREC.

Member Function Documentation

◆ cutoff()

double TabulatedDihedralBond::cutoff ( ) const
inline

Definition at line 102 of file bonded_tab.hpp.

◆ energy()

std::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 258 of file bonded_tab.hpp.

References calc_dihedral_angle(), and TabulatedBond::pot.

◆ forces()

std::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 [40] 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 214 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 104 of file bonded_tab.hpp.


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