31#include "system/Leaf.hpp"
56 auto_shift = Utils::int_pow<6>(
sig /
cut) - Utils::int_pow<12>(
sig /
cut);
90#ifdef ESPRESSO_LJGEN_SOFTCORE
91 double lam,
double delta,
93 double e1,
double e2,
double b1,
double b2);
241 double mu,
double nu);
268 double tr_c,
int twf) {
306 return 1u <<
static_cast<unsigned>(p);
322#ifdef ESPRESSO_LENNARD_JONES
330#ifdef ESPRESSO_LENNARD_JONES_GENERIC
334#ifdef ESPRESSO_SMOOTH_STEP
338#ifdef ESPRESSO_HERTZIAN
342#ifdef ESPRESSO_GAUSSIAN
346#ifdef ESPRESSO_BMHTF_NACL
354#ifdef ESPRESSO_BUCKINGHAM
358#ifdef ESPRESSO_SOFT_SPHERE
370#ifdef ESPRESSO_LJCOS2
374#ifdef ESPRESSO_GAY_BERNE
378#ifdef ESPRESSO_TABULATED
393 std::vector<std::shared_ptr<IA_parameters>> m_nonbonded_ia_params{};
395 int max_seen_particle_type = -1;
397 void realloc_ia_params(
int type) {
399 auto const old_size = m_nonbonded_ia_params.size();
401 auto const new_size = m_nonbonded_ia_params.size();
402 if (new_size > old_size) {
403 for (
auto &data : m_nonbonded_ia_params) {
404 if (data ==
nullptr) {
405 data = std::make_shared<IA_parameters>();
425 if (type > max_seen_particle_type) {
426 realloc_ia_params(type);
427 max_seen_particle_type = type;
432 assert(i >= 0 and i <= max_seen_particle_type);
433 assert(j >= 0 and j <= max_seen_particle_type);
434 auto const key =
static_cast<unsigned int>(
436 assert(key < m_nonbonded_ia_params.size());
463 void set_ia_param(
int i,
int j, std::shared_ptr<IA_parameters>
const &ia) {
479 void dpd_init(
double kT,
double time_step);
auto get_ia_param_ref_counted(int i, int j) const
auto get_ia_param_key(int i, int j) const
void set_ia_param(int i, int j, std::shared_ptr< IA_parameters > const &ia)
auto const & get_ia_param(int i, int j) const
void dpd_init(double kT, double time_step)
void recalc_maximal_cutoffs()
Recalculate cutoff of each interaction struct.
void on_non_bonded_ia_change() const
Notify system that non-bonded interactions changed.
double maximal_cutoff() const
Get maximal cutoff.
auto & get_ia_param(int i, int j)
Get interaction parameters between particle types i and j.
void make_particle_type_exist(int type)
Make sure the interaction parameter list is large enough to cover interactions for this particle type...
auto get_max_seen_particle_type() const
Abstract class that represents a component of the system.
constexpr double inactive_cutoff
Special cutoff value for an inactive interaction.
T lower_triangular(T i, T j)
Linear index into a lower triangular matrix.
PairPotential
Bit positions in IA_parameters::active_pair_mask.
constexpr unsigned pair_potential_bit(PairPotential p)
Bitmask for a pair potential.
BMHTF_Parameters()=default
double max_cutoff() const
Buckingham_Parameters()=default
double max_cutoff() const
double max_cutoff() const
DPD_Parameters(double gamma, double k, double r_c, int wf, double tgamma, double tr_c, int twf)
Gaussian_Parameters()=default
double max_cutoff() const
double max_cutoff() const
GayBerne_Parameters()=default
double max_cutoff() const
double max_cutoff() const
Hertzian_Parameters()=default
Parameters for non-bonded interactions.
Gaussian_Parameters gaussian
double max_cut
maximal cutoff for this pair of particle types.
GayBerne_Parameters gay_berne
SoftSphere_Parameters soft_sphere
SmoothStep_Parameters smooth_step
unsigned active_pair_mask
Bitmask of pair potentials active for this type pair.
Hertzian_Parameters hertzian
Buckingham_Parameters buckingham
Generic Lennard-Jones with shift.
double get_auto_shift() const
LJGen_Parameters()=default
double max_cutoff() const
Lennard-Jones with shift.
double min_cutoff() const
double max_cutoff() const
double get_auto_shift() const
Lennard-Jones with a different Cos potential.
LJcos2_Parameters()=default
double max_cutoff() const
Lennard-Jones+Cos potential.
double max_cutoff() const
LJcos_Parameters()=default
double max_cutoff() const
Morse_Parameters()=default
SmoothStep_Parameters()=default
double max_cutoff() const
SoftSphere_Parameters()=default
double max_cutoff() const
Evaluate forces and energies using a custom potential profile.
Thole_Parameters()=default
Thole_Parameters(double scaling_coeff, double q1q2)
double max_cutoff() const