30#include "system/Leaf.hpp"
60 auto_shift = Utils::int_pow<6>(
sig /
cut) - Utils::int_pow<12>(
sig /
cut);
95 double lam,
double delta,
97 double e1,
double e2,
double b1,
double b2);
245 double mu,
double nu);
272 double tr_c,
int twf) {
295#ifdef LENNARD_JONES_GENERIC
358 std::vector<std::shared_ptr<IA_parameters>> m_nonbonded_ia_params{};
360 int max_seen_particle_type = -1;
362 void realloc_ia_params(
int type) {
364 auto const old_size = m_nonbonded_ia_params.size();
366 auto const new_size = m_nonbonded_ia_params.size();
367 if (new_size > old_size) {
368 for (
auto &data : m_nonbonded_ia_params) {
369 if (data ==
nullptr) {
370 data = std::make_shared<IA_parameters>();
390 if (type > max_seen_particle_type) {
391 realloc_ia_params(type);
392 max_seen_particle_type = type;
397 assert(i >= 0 and i <= max_seen_particle_type);
398 assert(j >= 0 and j <= max_seen_particle_type);
399 auto const key =
static_cast<unsigned int>(
401 assert(key < m_nonbonded_ia_params.size());
428 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.
This file contains the defaults for ESPResSo.
T lower_triangular(T i, T j)
Linear index into a lower triangular matrix.
constexpr double INACTIVE_CUTOFF
Cutoff for deactivated interactions.
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