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_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::ShortRangeEnergyKernel::kernel_type const *coulomb_kernel)
 Calculate non-bonded energies between a pair of particles.
 
void add_non_bonded_pair_energy (Particle const &p1, Particle const &p2, Utils::Vector3d const &d, double const dist, double const dist2, IA_parameters const &ia_params, BondedInteractionsMap const &bonded_ias, Coulomb::ShortRangeEnergyKernel::kernel_type const *coulomb_kernel, Dipoles::ShortRangeEnergyKernel::kernel_type const *dipoles_kernel, Observable_stat &obs_energy)
 Add non-bonded and short-range Coulomb energies between a pair of particles to the energy observable.
 
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.
 
double calc_kinetic_energy (Particle const &p)
 Calculate kinetic energies for one particle.
 

Detailed Description

Energy calculation.

Definition in file energy_inline.hpp.

Function Documentation

◆ add_non_bonded_pair_energy()

void add_non_bonded_pair_energy ( Particle const &  p1,
Particle const &  p2,
Utils::Vector3d const &  d,
double const  dist,
double const  dist2,
IA_parameters const &  ia_params,
BondedInteractionsMap const &  bonded_ias,
Coulomb::ShortRangeEnergyKernel::kernel_type const *  coulomb_kernel,
Dipoles::ShortRangeEnergyKernel::kernel_type const *  dipoles_kernel,
Observable_stat obs_energy 
)
inline

Add non-bonded and short-range Coulomb energies between a pair of particles to the energy observable.

Parameters
[in]p1particle 1.
[in]p2particle 2.
[in]dvector between p1 and p2.
[in]distdistance between p1 and p2.
[in]dist2distance squared between p1 and p2.
[in]ia_paramsnon-bonded interaction kernels.
[in]bonded_iasbonded interaction kernels.
[in]coulomb_kernelCoulomb energy kernel.
[in]dipoles_kernelDipolar energy kernel.
[in,out]obs_energyenergy observable.

Definition at line 181 of file energy_inline.hpp.

References Observable_stat::add_non_bonded_contribution(), calc_non_bonded_pair_energy(), Observable_stat::coulomb, Observable_stat::dipolar, do_nonbonded(), Particle::mol_id(), Particle::q(), and Particle::type().

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

◆ 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_kinetic_energy()

double calc_kinetic_energy ( Particle const &  p)
inline

Calculate kinetic energies for one particle.

Parameters
pparticle for which to calculate energies

Definition at line 326 of file energy_inline.hpp.

References rotational_kinetic_energy(), and translational_kinetic_energy().

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

◆ 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::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.
coulomb_kernelCoulomb energy kernel.
Returns
the short-range interaction energy between the two particles

Definition at line 76 of file energy_inline.hpp.

References BMHTF_pair_energy(), buck_pair_energy(), gaussian_pair_energy(), gb_pair_energy(), hat_pair_energy(), hertzian_pair_energy(), lj_pair_energy(), ljcos2_pair_energy(), ljcos_pair_energy(), ljgen_pair_energy(), morse_pair_energy(), Particle::quat(), SmSt_pair_energy(), soft_pair_energy(), tabulated_pair_energy(), thole_pair_energy(), and wca_pair_energy().

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

◆ 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 313 of file energy_inline.hpp.

References Particle::can_rotate(), Particle::is_virtual(), Particle::omega(), and Particle::rinertia().

Referenced by calc_kinetic_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 306 of file energy_inline.hpp.

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

Referenced by calc_kinetic_energy().