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

Force calculation. More...

#include "config/config.hpp"
#include "forces.hpp"
#include "BoxGeometry.hpp"
#include "actor/visitors.hpp"
#include "bond_breakage/bond_breakage.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "bonded_interactions/thermalized_bond_kernel.hpp"
#include "electrostatics/coulomb_inline.hpp"
#include "immersed_boundary/ibm_tribend.hpp"
#include "immersed_boundary/ibm_triel.hpp"
#include "magnetostatics/dipoles_inline.hpp"
#include "nonbonded_interactions/bmhtf-nacl.hpp"
#include "nonbonded_interactions/buckingham.hpp"
#include "nonbonded_interactions/gaussian.hpp"
#include "nonbonded_interactions/gay_berne.hpp"
#include "nonbonded_interactions/hat.hpp"
#include "nonbonded_interactions/hertzian.hpp"
#include "nonbonded_interactions/lj.hpp"
#include "nonbonded_interactions/ljcos.hpp"
#include "nonbonded_interactions/ljcos2.hpp"
#include "nonbonded_interactions/ljgen.hpp"
#include "nonbonded_interactions/morse.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
#include "nonbonded_interactions/nonbonded_tab.hpp"
#include "nonbonded_interactions/smooth_step.hpp"
#include "nonbonded_interactions/soft_sphere.hpp"
#include "nonbonded_interactions/thole.hpp"
#include "nonbonded_interactions/wca.hpp"
#include "object-in-fluid/oif_global_forces.hpp"
#include "object-in-fluid/oif_local_forces.hpp"
#include "dpd.hpp"
#include "Particle.hpp"
#include "bond_error.hpp"
#include "errorhandling.hpp"
#include "exclusions.hpp"
#include "thermostat.hpp"
#include <utils/Vector.hpp>
#include <boost/variant.hpp>
#include <optional>
#include <span>
#include <tuple>
+ Include dependency graph for forces_inline.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ParticleForce calc_central_radial_force (IA_parameters const &ia_params, Utils::Vector3d const &d, double const dist)
 
ParticleForce calc_non_central_force (Particle const &p1, Particle const &p2, IA_parameters const &ia_params, Utils::Vector3d const &d, double const dist)
 
ParticleForce calc_opposing_force (ParticleForce const &pf, Utils::Vector3d const &d)
 
void add_non_bonded_pair_force (Particle &p1, Particle &p2, Utils::Vector3d const &d, double dist, double dist2, IA_parameters const &ia_params, Thermostat::Thermostat const &thermostat, BoxGeometry const &box_geo, BondedInteractionsMap const &bonded_ias, Coulomb::ShortRangeForceKernel::kernel_type const *coulomb_kernel, Dipoles::ShortRangeForceKernel::kernel_type const *dipoles_kernel, Coulomb::ShortRangeForceCorrectionsKernel::kernel_type const *elc_kernel)
 Calculate non-bonded forces between a pair of particles and update their forces and torques.
 
std::optional< Utils::Vector3dcalc_bond_pair_force (Particle const &p1, Particle const &p2, Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &dx, Coulomb::ShortRangeForceKernel::kernel_type const *kernel)
 Compute the bonded interaction force between particle pairs.
 
bool add_bonded_two_body_force (Bonded_IA_Parameters const &iaparams, Particle &p1, Particle &p2, BoxGeometry const &box_geo, Coulomb::ShortRangeForceKernel::kernel_type const *kernel)
 
std::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > calc_bonded_three_body_force (Bonded_IA_Parameters const &iaparams, BoxGeometry const &box_geo, Particle const &p1, Particle const &p2, Particle const &p3)
 
bool add_bonded_three_body_force (Bonded_IA_Parameters const &iaparams, BoxGeometry const &box_geo, Particle &p1, Particle &p2, Particle &p3)
 
std::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > calc_bonded_four_body_force (Bonded_IA_Parameters const &iaparams, BoxGeometry const &box_geo, Particle const &p1, Particle const &p2, Particle const &p3, Particle const &p4)
 
bool add_bonded_four_body_force (Bonded_IA_Parameters const &iaparams, BoxGeometry const &box_geo, Particle &p1, Particle &p2, Particle &p3, Particle &p4)
 
bool add_bonded_force (Particle &p1, int bond_id, std::span< Particle * > partners, BondedInteractionsMap const &bonded_ia_params, BondBreakage::BondBreakage &bond_breakage, BoxGeometry const &box_geo, Coulomb::ShortRangeForceKernel::kernel_type const *kernel)
 

Detailed Description

Force calculation.

Definition in file forces_inline.hpp.

Function Documentation

◆ add_bonded_force()

bool add_bonded_force ( Particle p1,
int  bond_id,
std::span< Particle * >  partners,
BondedInteractionsMap const &  bonded_ia_params,
BondBreakage::BondBreakage bond_breakage,
BoxGeometry const &  box_geo,
Coulomb::ShortRangeForceKernel::kernel_type const *  kernel 
)
inline

◆ add_bonded_four_body_force()

bool add_bonded_four_body_force ( Bonded_IA_Parameters const &  iaparams,
BoxGeometry const &  box_geo,
Particle p1,
Particle p2,
Particle p3,
Particle p4 
)
inline

Definition at line 426 of file forces_inline.hpp.

References calc_bonded_four_body_force(), and Particle::force().

◆ add_bonded_three_body_force()

bool add_bonded_three_body_force ( Bonded_IA_Parameters const &  iaparams,
BoxGeometry const &  box_geo,
Particle p1,
Particle p2,
Particle p3 
)
inline

Definition at line 378 of file forces_inline.hpp.

References calc_bonded_three_body_force(), and Particle::force().

◆ add_bonded_two_body_force()

bool add_bonded_two_body_force ( Bonded_IA_Parameters const &  iaparams,
Particle p1,
Particle p2,
BoxGeometry const &  box_geo,
Coulomb::ShortRangeForceKernel::kernel_type const *  kernel 
)
inline

◆ add_non_bonded_pair_force()

void add_non_bonded_pair_force ( Particle p1,
Particle p2,
Utils::Vector3d const &  d,
double  dist,
double  dist2,
IA_parameters const &  ia_params,
Thermostat::Thermostat const &  thermostat,
BoxGeometry const &  box_geo,
BondedInteractionsMap const &  bonded_ias,
Coulomb::ShortRangeForceKernel::kernel_type const *  coulomb_kernel,
Dipoles::ShortRangeForceKernel::kernel_type const *  dipoles_kernel,
Coulomb::ShortRangeForceCorrectionsKernel::kernel_type const *  elc_kernel 
)
inline

Calculate non-bonded forces between a pair of particles and update their forces and torques.

Parameters
[in,out]p1particle 1.
[in,out]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]thermostatthermostat.
[in]box_geobox geometry.
[in]bonded_iasbonded interaction kernels.
[in]coulomb_kernelCoulomb force kernel.
[in]dipoles_kernelDipolar force kernel.
[in]elc_kernelELC force correction kernel.

Definition at line 188 of file forces_inline.hpp.

References calc_central_radial_force(), calc_non_central_force(), calc_opposing_force(), do_nonbonded(), Thermostat::Thermostat::dpd, dpd_pair_force(), Particle::force(), Particle::force_and_torque(), IA_parameters::max_cut, npt_add_virial_force_contribution(), Particle::q(), THERMO_DPD, Thermostat::Thermostat::thermo_switch, and thole_pair_force().

Referenced by System::System::calculate_forces().

◆ calc_bond_pair_force()

std::optional< Utils::Vector3d > calc_bond_pair_force ( Particle const &  p1,
Particle const &  p2,
Bonded_IA_Parameters const &  iaparams,
Utils::Vector3d const &  dx,
Coulomb::ShortRangeForceKernel::kernel_type const *  kernel 
)
inline

Compute the bonded interaction force between particle pairs.

Parameters
[in]p1First particle.
[in]p2Second particle.
[in]iaparamsBonded parameters for the interaction.
[in]dxVector between p1 and p2.
[in]kernelCoulomb force kernel.

Definition at line 283 of file forces_inline.hpp.

References Particle::q().

Referenced by add_bonded_two_body_force(), and calc_bonded_virial_pressure_tensor().

◆ calc_bonded_four_body_force()

std::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > calc_bonded_four_body_force ( Bonded_IA_Parameters const &  iaparams,
BoxGeometry const &  box_geo,
Particle const &  p1,
Particle const &  p2,
Particle const &  p3,
Particle const &  p4 
)
inline

Definition at line 401 of file forces_inline.hpp.

References BoxGeometry::get_mi_vector(), and Particle::pos().

Referenced by add_bonded_four_body_force().

◆ calc_bonded_three_body_force()

std::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > calc_bonded_three_body_force ( Bonded_IA_Parameters const &  iaparams,
BoxGeometry const &  box_geo,
Particle const &  p1,
Particle const &  p2,
Particle const &  p3 
)
inline

◆ calc_central_radial_force()

◆ calc_non_central_force()

ParticleForce calc_non_central_force ( Particle const &  p1,
Particle const &  p2,
IA_parameters const &  ia_params,
Utils::Vector3d const &  d,
double const  dist 
)
inline

◆ calc_opposing_force()

ParticleForce calc_opposing_force ( ParticleForce const &  pf,
Utils::Vector3d const &  d 
)
inline