ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
energy_inline.hpp File Reference

Energy calculation. More...

+ Include dependency graph for energy_inline.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double calc_central_radial_energy (IA_parameters const &ia_params, double const dist)
 
double calc_non_bonded_pair_energy (Particle const &p1, Particle const &p2, IA_parameters const &ia_params, Utils::Vector3d const &d, double const dist, BondedInteractionsMap const &bonded_ias, Coulomb::Solver const &coulomb, Coulomb::ShortRangeEnergyKernel::kernel_type const *coulomb_kernel)
 Calculate non-bonded energies between a pair of particles.
 
std::optional< double > calc_pair_bonded_energy (Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &dx, Utils::Vector3d const &pos1, Utils::Vector3d const &pos2, double q1q2, Coulomb::ShortRangeEnergyKernel::kernel_type const *kernel)
 
std::optional< double > calc_angle_bonded_energy (Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &vec1, Utils::Vector3d const &vec2)
 
std::optional< double > calc_dihedral_bonded_energy (Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &v12, Utils::Vector3d const &v23, Utils::Vector3d const &v34)
 
std::optional< double > calc_bonded_energy (Bonded_IA_Parameters const &iaparams, Particle const &p1, std::span< Particle * > partners, BoxGeometry const &box_geo, Coulomb::ShortRangeEnergyKernel::kernel_type const *kernel)
 
double translational_kinetic_energy (Particle const &p)
 Calculate kinetic energies from translation for one particle.
 
double rotational_kinetic_energy (Particle const &p)
 Calculate kinetic energies from rotation for one particle.
 

Detailed Description

Energy calculation.

Definition in file energy_inline.hpp.

Function Documentation

◆ calc_angle_bonded_energy()

std::optional< double > calc_angle_bonded_energy ( Bonded_IA_Parameters const &  iaparams,
Utils::Vector3d const &  vec1,
Utils::Vector3d const &  vec2 
)
inline

Definition at line 219 of file energy_inline.hpp.

References runtimeWarningMsg.

Referenced by calc_bonded_energy(), and AngleBondsEnergyKernel::operator()().

◆ calc_bonded_energy()

std::optional< double > calc_bonded_energy ( Bonded_IA_Parameters const &  iaparams,
Particle const &  p1,
std::span< Particle * >  partners,
BoxGeometry const &  box_geo,
Coulomb::ShortRangeEnergyKernel::kernel_type const *  kernel 
)
inline

◆ calc_central_radial_energy()

◆ calc_dihedral_bonded_energy()

std::optional< double > calc_dihedral_bonded_energy ( Bonded_IA_Parameters const &  iaparams,
Utils::Vector3d const &  v12,
Utils::Vector3d const &  v23,
Utils::Vector3d const &  v34 
)
inline

Definition at line 243 of file energy_inline.hpp.

References runtimeWarningMsg.

Referenced by calc_bonded_energy(), and DihedralBondsEnergyKernel::operator()().

◆ calc_non_bonded_pair_energy()

double calc_non_bonded_pair_energy ( Particle const &  p1,
Particle const &  p2,
IA_parameters const &  ia_params,
Utils::Vector3d const &  d,
double const  dist,
BondedInteractionsMap const &  bonded_ias,
Coulomb::Solver const &  coulomb,
Coulomb::ShortRangeEnergyKernel::kernel_type const *  coulomb_kernel 
)
inline

Calculate non-bonded energies between a pair of particles.

Parameters
p1particle 1.
p2particle 2.
ia_paramsthe interaction parameters between the two particles
dvector between p1 and p2.
distdistance between p1 and p2.
bonded_iasbonded interaction kernels.
coulombElectrostatics solver.
coulomb_kernelCoulomb energy kernel.
Returns
the short-range interaction energy between the two particles

Definition at line 154 of file energy_inline.hpp.

References calc_central_radial_energy(), gb_pair_energy(), Particle::quat(), and thole_pair_energy().

Referenced by Constraints::ShapeBasedConstraint::add_energy(), PairCriteria::EnergyCriterion::decide(), and System::System::particle_short_range_energy_contribution().

◆ calc_pair_bonded_energy()

std::optional< double > calc_pair_bonded_energy ( Bonded_IA_Parameters const &  iaparams,
Utils::Vector3d const &  dx,
Utils::Vector3d const &  pos1,
Utils::Vector3d const &  pos2,
double  q1q2,
Coulomb::ShortRangeEnergyKernel::kernel_type const *  kernel 
)
inline

Definition at line 180 of file energy_inline.hpp.

Referenced by calc_bonded_energy(), and PairBondsEnergyKernel::operator()().

◆ rotational_kinetic_energy()

double rotational_kinetic_energy ( Particle const &  p)
inline

Calculate kinetic energies from rotation for one particle.

Parameters
pparticle for which to calculate energies

Definition at line 310 of file energy_inline.hpp.

Referenced by System::System::calculate_energy().

◆ translational_kinetic_energy()

double translational_kinetic_energy ( Particle const &  p)
inline

Calculate kinetic energies from translation for one particle.

Parameters
pparticle for which to calculate energies

Definition at line 303 of file energy_inline.hpp.

References Particle::is_virtual(), Particle::mass(), and Particle::v().

Referenced by System::System::calculate_energy().