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) {
283#ifdef ESPRESSO_LENNARD_JONES
291#ifdef ESPRESSO_LENNARD_JONES_GENERIC
295#ifdef ESPRESSO_SMOOTH_STEP
299#ifdef ESPRESSO_HERTZIAN
303#ifdef ESPRESSO_GAUSSIAN
307#ifdef ESPRESSO_BMHTF_NACL
315#ifdef ESPRESSO_BUCKINGHAM
319#ifdef ESPRESSO_SOFT_SPHERE
331#ifdef ESPRESSO_LJCOS2
335#ifdef ESPRESSO_GAY_BERNE
339#ifdef ESPRESSO_TABULATED
354 std::vector<std::shared_ptr<IA_parameters>> m_nonbonded_ia_params{};
356 int max_seen_particle_type = -1;
358 void realloc_ia_params(
int type) {
360 auto const old_size = m_nonbonded_ia_params.size();
362 auto const new_size = m_nonbonded_ia_params.size();
363 if (new_size > old_size) {
364 for (
auto &data : m_nonbonded_ia_params) {
365 if (data ==
nullptr) {
366 data = std::make_shared<IA_parameters>();
386 if (type > max_seen_particle_type) {
387 realloc_ia_params(type);
388 max_seen_particle_type = type;
393 assert(i >= 0 and i <= max_seen_particle_type);
394 assert(j >= 0 and j <= max_seen_particle_type);
395 auto const key =
static_cast<unsigned int>(
397 assert(key < m_nonbonded_ia_params.size());
424 void set_ia_param(
int i,
int j, std::shared_ptr<IA_parameters>
const &ia) {
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 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.
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
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