ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
forces_inline.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
4 * Max-Planck-Institute for Polymer Research, Theory Group
5 *
6 * This file is part of ESPResSo.
7 *
8 * ESPResSo is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * ESPResSo is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24/** \file
25 * Force calculation.
26 */
27
28#include "config/config.hpp"
29
30#include "forces.hpp"
31
32#include "BoxGeometry.hpp"
33#include "actor/visitors.hpp"
60
61#ifdef DPD
62#include "dpd.hpp"
63#endif
64
65#include "Particle.hpp"
66#include "bond_error.hpp"
67#include "errorhandling.hpp"
68#include "exclusions.hpp"
69#include "thermostat.hpp"
70
71#include <utils/Vector.hpp>
72
73#include <boost/variant.hpp>
74
75#include <optional>
76#include <span>
77#include <tuple>
78
80 Utils::Vector3d const &d,
81 double const dist) {
82
83 ParticleForce pf{};
84 auto force_factor = 0.;
85/* Lennard-Jones */
86#ifdef LENNARD_JONES
87 force_factor += lj_pair_force_factor(ia_params, dist);
88#endif
89/* WCA */
90#ifdef WCA
91 force_factor += wca_pair_force_factor(ia_params, dist);
92#endif
93/* Lennard-Jones generic */
94#ifdef LENNARD_JONES_GENERIC
95 force_factor += ljgen_pair_force_factor(ia_params, dist);
96#endif
97/* smooth step */
98#ifdef SMOOTH_STEP
99 force_factor += SmSt_pair_force_factor(ia_params, dist);
100#endif
101/* Hertzian force */
102#ifdef HERTZIAN
103 force_factor += hertzian_pair_force_factor(ia_params, dist);
104#endif
105/* Gaussian force */
106#ifdef GAUSSIAN
107 force_factor += gaussian_pair_force_factor(ia_params, dist);
108#endif
109/* BMHTF NaCl */
110#ifdef BMHTF_NACL
111 force_factor += BMHTF_pair_force_factor(ia_params, dist);
112#endif
113/* Buckingham*/
114#ifdef BUCKINGHAM
115 force_factor += buck_pair_force_factor(ia_params, dist);
116#endif
117/* Morse*/
118#ifdef MORSE
119 force_factor += morse_pair_force_factor(ia_params, dist);
120#endif
121/*soft-sphere potential*/
122#ifdef SOFT_SPHERE
123 force_factor += soft_pair_force_factor(ia_params, dist);
124#endif
125/*hat potential*/
126#ifdef HAT
127 force_factor += hat_pair_force_factor(ia_params, dist);
128#endif
129/* Lennard-Jones cosine */
130#ifdef LJCOS
131 force_factor += ljcos_pair_force_factor(ia_params, dist);
132#endif
133/* Lennard-Jones cosine */
134#ifdef LJCOS2
135 force_factor += ljcos2_pair_force_factor(ia_params, dist);
136#endif
137/* tabulated */
138#ifdef TABULATED
139 force_factor += tabulated_pair_force_factor(ia_params, dist);
140#endif
141 pf.f += force_factor * d;
142 return pf;
143}
144
146 Particle const &p2,
147 IA_parameters const &ia_params,
148 Utils::Vector3d const &d,
149 double const dist) {
150
151 ParticleForce pf{};
152/* Gay-Berne */
153#ifdef GAY_BERNE
154 pf += gb_pair_force(p1.quat(), p2.quat(), ia_params, d, dist);
155#endif
156 return pf;
157}
158
160 Utils::Vector3d const &d) {
161 ParticleForce out{-pf.f};
162#ifdef ROTATION
163 // if torque is a null vector, the opposing torque is a null vector too
164 // (this check guards from returning a small yet non-null opposing
165 // torque due to numerical imprecision)
166 if (pf.torque[0] != 0. || pf.torque[1] != 0. || pf.torque[2] != 0.) {
167 out.torque = -(pf.torque + vector_product(d, pf.f));
168 }
169#endif
170 return out;
171}
172
173/** Calculate non-bonded forces between a pair of particles and update their
174 * forces and torques.
175 * @param[in,out] p1 particle 1.
176 * @param[in,out] p2 particle 2.
177 * @param[in] d vector between @p p1 and @p p2.
178 * @param[in] dist distance between @p p1 and @p p2.
179 * @param[in] dist2 distance squared between @p p1 and @p p2.
180 * @param[in] ia_params non-bonded interaction kernels.
181 * @param[in] thermostat thermostat.
182 * @param[in] box_geo box geometry.
183 * @param[in] bonded_ias bonded interaction kernels.
184 * @param[in] coulomb_kernel Coulomb force kernel.
185 * @param[in] dipoles_kernel Dipolar force kernel.
186 * @param[in] elc_kernel ELC force correction kernel.
187 */
189 Particle &p1, Particle &p2, Utils::Vector3d const &d, double dist,
190 double dist2, IA_parameters const &ia_params,
191 Thermostat::Thermostat const &thermostat, BoxGeometry const &box_geo,
192 [[maybe_unused]] BondedInteractionsMap const &bonded_ias,
196
197 ParticleForce pf{};
198
199 /***********************************************/
200 /* non-bonded pair potentials */
201 /***********************************************/
202
203 if (dist < ia_params.max_cut) {
204#ifdef EXCLUSIONS
205 if (do_nonbonded(p1, p2)) {
206#endif
207 pf += calc_central_radial_force(ia_params, d, dist);
208#ifdef THOLE
209 pf.f += thole_pair_force(p1, p2, ia_params, d, dist, bonded_ias,
210 coulomb_kernel);
211#endif
212 pf += calc_non_central_force(p1, p2, ia_params, d, dist);
213#ifdef EXCLUSIONS
214 }
215#endif
216 }
217
218 /***********************************************/
219 /* short-range electrostatics */
220 /***********************************************/
221
222#ifdef ELECTROSTATICS
223 // real-space electrostatic charge-charge interaction
224 auto const q1q2 = p1.q() * p2.q();
225 if (q1q2 != 0. and coulomb_kernel != nullptr) {
226 pf.f += (*coulomb_kernel)(q1q2, d, dist);
227#ifdef P3M
228 if (elc_kernel)
229 (*elc_kernel)(p1, p2, q1q2);
230#endif // P3M
231 }
232#endif // ELECTROSTATICS
233
234 /*********************************************************************/
235 /* everything before this contributes to the virial pressure in NpT, */
236 /* but nothing afterwards */
237 /*********************************************************************/
238#ifdef NPT
240#endif
241
242 /***********************************************/
243 /* thermostat */
244 /***********************************************/
245
246 /* The inter dpd force should not be part of the virial */
247#ifdef DPD
248 if (thermostat.thermo_switch & THERMO_DPD) {
249 auto const force = dpd_pair_force(p1, p2, *thermostat.dpd, box_geo,
250 ia_params, d, dist, dist2);
251 p1.force() += force;
252 p2.force() -= force;
253 }
254#endif
255
256 /***********************************************/
257 /* short-range magnetostatics */
258 /***********************************************/
259
260#ifdef DIPOLES
261 // real-space magnetic dipole-dipole
262 if (dipoles_kernel) {
263 pf += (*dipoles_kernel)(p1, p2, d, dist, dist2);
264 }
265#endif
266
267 /***********************************************/
268 /* add total non-bonded forces to particles */
269 /***********************************************/
270
271 p1.force_and_torque() += pf;
273}
274
275/** Compute the bonded interaction force between particle pairs.
276 *
277 * @param[in] p1 First particle.
278 * @param[in] p2 Second particle.
279 * @param[in] iaparams Bonded parameters for the interaction.
280 * @param[in] dx Vector between @p p1 and @p p2.
281 * @param[in] kernel Coulomb force kernel.
282 */
283inline std::optional<Utils::Vector3d> calc_bond_pair_force(
284 Particle const &p1, Particle const &p2,
285 Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &dx,
287 if (auto const *iap = boost::get<FeneBond>(&iaparams)) {
288 return iap->force(dx);
289 }
290 if (auto const *iap = boost::get<HarmonicBond>(&iaparams)) {
291 return iap->force(dx);
292 }
293 if (auto const *iap = boost::get<QuarticBond>(&iaparams)) {
294 return iap->force(dx);
295 }
296#ifdef ELECTROSTATICS
297 if (auto const *iap = boost::get<BondedCoulomb>(&iaparams)) {
298 return iap->force(p1.q() * p2.q(), dx);
299 }
300 if (auto const *iap = boost::get<BondedCoulombSR>(&iaparams)) {
301 return iap->force(dx, *kernel);
302 }
303#endif
304#ifdef BOND_CONSTRAINT
305 if (boost::get<RigidBond>(&iaparams)) {
306 return Utils::Vector3d{};
307 }
308#endif
309#ifdef TABULATED
310 if (auto const *iap = boost::get<TabulatedDistanceBond>(&iaparams)) {
311 return iap->force(dx);
312 }
313#endif
314 if (boost::get<VirtualBond>(&iaparams)) {
315 return Utils::Vector3d{};
316 }
317 throw BondUnknownTypeError();
318}
319
321 Bonded_IA_Parameters const &iaparams, Particle &p1, Particle &p2,
322 BoxGeometry const &box_geo,
324 auto const dx = box_geo.get_mi_vector(p1.pos(), p2.pos());
325
326 if (auto const *iap = boost::get<ThermalizedBond>(&iaparams)) {
327 auto result = iap->forces(p1, p2, dx);
328 if (result) {
329 auto const &forces = result.value();
330
331 p1.force() += std::get<0>(forces);
332 p2.force() += std::get<1>(forces);
333
334 return false;
335 }
336 } else {
337 auto result = calc_bond_pair_force(p1, p2, iaparams, dx, kernel);
338 if (result) {
339 p1.force() += result.value();
340 p2.force() -= result.value();
341
342#ifdef NPT
343 npt_add_virial_force_contribution(result.value(), dx);
344#endif
345 return false;
346 }
347 }
348 return true;
349}
350
351inline std::optional<
352 std::tuple<Utils::Vector3d, Utils::Vector3d, Utils::Vector3d>>
354 BoxGeometry const &box_geo, Particle const &p1,
355 Particle const &p2, Particle const &p3) {
356 auto const vec1 = box_geo.get_mi_vector(p2.pos(), p1.pos());
357 auto const vec2 = box_geo.get_mi_vector(p3.pos(), p1.pos());
358 if (auto const *iap = boost::get<AngleHarmonicBond>(&iaparams)) {
359 return iap->forces(vec1, vec2);
360 }
361 if (auto const *iap = boost::get<AngleCosineBond>(&iaparams)) {
362 return iap->forces(vec1, vec2);
363 }
364 if (auto const *iap = boost::get<AngleCossquareBond>(&iaparams)) {
365 return iap->forces(vec1, vec2);
366 }
367#ifdef TABULATED
368 if (auto const *iap = boost::get<TabulatedAngleBond>(&iaparams)) {
369 return iap->forces(vec1, vec2);
370 }
371#endif
372 if (auto const *iap = boost::get<IBMTriel>(&iaparams)) {
373 return iap->calc_forces(vec1, vec2);
374 }
375 throw BondUnknownTypeError();
376}
377
379 BoxGeometry const &box_geo,
380 Particle &p1, Particle &p2,
381 Particle &p3) {
382 if (boost::get<OifGlobalForcesBond>(&iaparams)) {
383 return false;
384 }
385 auto const result =
386 calc_bonded_three_body_force(iaparams, box_geo, p1, p2, p3);
387 if (result) {
388 auto const &forces = result.value();
389
390 p1.force() += std::get<0>(forces);
391 p2.force() += std::get<1>(forces);
392 p3.force() += std::get<2>(forces);
393
394 return false;
395 }
396 return true;
397}
398
399inline std::optional<std::tuple<Utils::Vector3d, Utils::Vector3d,
402 BoxGeometry const &box_geo, Particle const &p1,
403 Particle const &p2, Particle const &p3,
404 Particle const &p4) {
405 if (auto const *iap = boost::get<OifLocalForcesBond>(&iaparams)) {
406 return iap->calc_forces(box_geo, p1, p2, p3, p4);
407 }
408 if (auto const *iap = boost::get<IBMTribend>(&iaparams)) {
409 return iap->calc_forces(box_geo, p1, p2, p3, p4);
410 }
411 // note: particles in a dihedral bond are ordered as p2-p1-p3-p4
412 auto const v12 = box_geo.get_mi_vector(p1.pos(), p2.pos());
413 auto const v23 = box_geo.get_mi_vector(p3.pos(), p1.pos());
414 auto const v34 = box_geo.get_mi_vector(p4.pos(), p3.pos());
415 if (auto const *iap = boost::get<DihedralBond>(&iaparams)) {
416 return iap->forces(v12, v23, v34);
417 }
418#ifdef TABULATED
419 if (auto const *iap = boost::get<TabulatedDihedralBond>(&iaparams)) {
420 return iap->forces(v12, v23, v34);
421 }
422#endif
423 throw BondUnknownTypeError();
424}
425
427 BoxGeometry const &box_geo, Particle &p1,
428 Particle &p2, Particle &p3,
429 Particle &p4) {
430 auto const result =
431 calc_bonded_four_body_force(iaparams, box_geo, p1, p2, p3, p4);
432 if (result) {
433 auto const &forces = result.value();
434
435 p1.force() += std::get<0>(forces);
436 p2.force() += std::get<1>(forces);
437 p3.force() += std::get<2>(forces);
438 p4.force() += std::get<3>(forces);
439
440 return false;
441 }
442
443 return true;
444}
445
446inline bool
447add_bonded_force(Particle &p1, int bond_id, std::span<Particle *> partners,
448 BondedInteractionsMap const &bonded_ia_params,
449 BondBreakage::BondBreakage &bond_breakage,
450 BoxGeometry const &box_geo,
452
453 // Consider for bond breakage
454 if (partners.size() == 1u) { // pair bonds
455 auto d = box_geo.get_mi_vector(p1.pos(), partners[0]->pos()).norm();
456 if (bond_breakage.check_and_handle_breakage(
457 p1.id(), {{partners[0]->id(), std::nullopt}}, bond_id, d)) {
458 return false;
459 }
460 }
461 if (partners.size() == 2u) { // angle bond
462 auto d =
463 box_geo.get_mi_vector(partners[0]->pos(), partners[1]->pos()).norm();
464 if (bond_breakage.check_and_handle_breakage(
465 p1.id(), {{partners[0]->id(), partners[1]->id()}}, bond_id, d)) {
466 return false;
467 }
468 }
469
470 auto const &iaparams = *bonded_ia_params.at(bond_id);
471
472 switch (number_of_partners(iaparams)) {
473 case 0:
474 return false;
475 case 1:
476 return add_bonded_two_body_force(iaparams, p1, *partners[0], box_geo,
477 kernel);
478 case 2:
479 return add_bonded_three_body_force(iaparams, box_geo, p1, *partners[0],
480 *partners[1]);
481 case 3:
482 return add_bonded_four_body_force(iaparams, box_geo, p1, *partners[0],
483 *partners[1], *partners[2]);
484 default:
486 }
487}
@ THERMO_DPD
Vector implementation and trait types for boost qvm interoperability.
Routines to calculate the Born-Meyer-Huggins-Tosi-Fumi potential between particle pairs.
double BMHTF_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate BMHTF force factor.
Data structures for bonded interactions.
int number_of_partners(Bonded_IA_Parameters const &iaparams)
Get the number of bonded partners for the specified bond.
boost::variant< NoneBond, FeneBond, HarmonicBond, QuarticBond, BondedCoulomb, BondedCoulombSR, AngleHarmonicBond, AngleCosineBond, AngleCossquareBond, DihedralBond, TabulatedDistanceBond, TabulatedAngleBond, TabulatedDihedralBond, ThermalizedBond, RigidBond, IBMTriel, IBMVolCons, IBMTribend, OifGlobalForcesBond, OifLocalForcesBond, VirtualBond > Bonded_IA_Parameters
Variant in which to store the parameters of an individual bonded interaction.
Routines to calculate the Buckingham potential between particle pairs.
double buck_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate Buckingham force factor.
bool check_and_handle_breakage(int particle_id, BondPartners const &bond_partners, int bond_type, double distance)
Check if the bond between the particles should break, if yes, queue it.
container for bonded interactions.
Utils::Vector< T, 3 > get_mi_vector(const Utils::Vector< T, 3 > &a, const Utils::Vector< T, 3 > &b) const
Get the minimum-image vector between two coordinates.
std::shared_ptr< DPDThermostat > dpd
int thermo_switch
Bitmask of currently active thermostats.
This file contains the defaults for ESPResSo.
Routines to calculate the Gaussian potential between particle pairs.
double gaussian_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate Gaussian force factor.
__device__ void vector_product(float const *a, float const *b, float *out)
Utils::Vector3d dpd_pair_force(DPDParameters const &params, Utils::Vector3d const &v, double dist, Utils::Vector3d const &noise)
Definition dpd.cpp:85
Routines to use DPD as thermostat or pair force .
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
bool do_nonbonded(Particle const &p1, Particle const &p2)
Determine if the non-bonded interactions between p1 and p2 should be calculated.
void npt_add_virial_force_contribution(const Utils::Vector3d &force, const Utils::Vector3d &d)
Update the NpT virial.
Definition forces.cpp:268
Force calculation.
ParticleForce calc_central_radial_force(IA_parameters const &ia_params, Utils::Vector3d const &d, double const dist)
ParticleForce calc_opposing_force(ParticleForce const &pf, Utils::Vector3d const &d)
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_two_body_force(Bonded_IA_Parameters const &iaparams, Particle &p1, Particle &p2, BoxGeometry const &box_geo, Coulomb::ShortRangeForceKernel::kernel_type const *kernel)
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.
bool add_bonded_three_body_force(Bonded_IA_Parameters const &iaparams, BoxGeometry const &box_geo, Particle &p1, Particle &p2, Particle &p3)
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)
Compute the bonded interaction force between particle pairs.
bool add_bonded_four_body_force(Bonded_IA_Parameters const &iaparams, BoxGeometry const &box_geo, Particle &p1, Particle &p2, Particle &p3, Particle &p4)
ParticleForce calc_non_central_force(Particle const &p1, Particle const &p2, IA_parameters const &ia_params, Utils::Vector3d const &d, double const dist)
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_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)
Routines to calculate the Gay-Berne potential between particle pairs.
ParticleForce gb_pair_force(Utils::Quaternion< double > const &qi, Utils::Quaternion< double > const &qj, IA_parameters const &ia_params, Utils::Vector3d const &d, double dist)
Calculate Gay-Berne force and torques.
Definition gay_berne.hpp:49
Routines to calculate the hat potential between particle pairs.
double hat_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate hat force factor.
Definition hat.hpp:37
Routines to calculate the Hertzian potential between particle pairs.
double hertzian_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate Hertzian force factor.
Definition hertzian.hpp:39
Routines to calculate the Lennard-Jones potential between particle pairs.
double lj_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate Lennard-Jones force factor.
Definition lj.hpp:41
Routines to calculate the Lennard-Jones with cosine tail potential between particle pairs.
double ljcos2_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate Lennard-Jones cosine squared force factor.
Definition ljcos2.hpp:46
Routines to calculate the Lennard-Jones+cosine potential between particle pairs.
double ljcos_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate Lennard-Jones cosine force factor.
Definition ljcos.hpp:42
Routines to calculate the generalized Lennard-Jones potential between particle pairs.
double ljgen_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate Lennard-Jones force factor.
Definition ljgen.hpp:51
Routines to calculate the Morse potential between particle pairs.
double morse_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate Morse force factor.
Definition morse.hpp:41
VectorXd< 3 > Vector3d
Definition Vector.hpp:164
Various procedures concerning interactions between particles.
Routines to calculate the energy and/or force for particle pairs via interpolation of lookup tables.
double tabulated_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate a non-bonded pair force factor by linear interpolation from a table.
Routines to calculate the OIF global forces for a particle triple (triangle from mesh).
Routines to calculate the OIF local forces for a particle quadruple (two neighboring triangles with c...
Routines to calculate the smooth step potential between particle pairs.
double SmSt_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate smooth step force factor.
Routines to calculate the soft-sphere potential between particle pairs.
double soft_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate soft-sphere force factor.
Exception indicating that a bond with an unexpected number of partners was encountered.
Exception indicating that a bond type was unknown.
Solver::ShortRangeForceCorrectionsKernel kernel_type
Solver::ShortRangeForceKernel kernel_type
Solver::ShortRangeForceKernel kernel_type
Parameters for non-bonded interactions.
double max_cut
maximal cutoff for this pair of particle types.
Force information on a particle.
Definition Particle.hpp:290
Utils::Vector3d torque
torque.
Definition Particle.hpp:320
Utils::Vector3d f
force.
Definition Particle.hpp:316
Struct holding all information for one particle.
Definition Particle.hpp:395
auto const & quat() const
Definition Particle.hpp:477
auto const & q() const
Definition Particle.hpp:508
auto const & force_and_torque() const
Definition Particle.hpp:437
auto const & pos() const
Definition Particle.hpp:431
auto const & force() const
Definition Particle.hpp:435
auto const & id() const
Definition Particle.hpp:414
Routines to calculate the Thole damping potential between particle pairs.
Utils::Vector3d thole_pair_force(Particle const &p1, Particle const &p2, IA_parameters const &ia_params, Utils::Vector3d const &d, double dist, BondedInteractionsMap const &bonded_ias, Coulomb::ShortRangeForceKernel::kernel_type const *kernel)
Calculate Thole force.
Definition thole.hpp:44
Routines to calculate the Weeks-Chandler-Andersen potential between particle pairs.
double wca_pair_force_factor(IA_parameters const &ia_params, double dist)
Calculate WCA force factor.
Definition wca.hpp:39