21#include "system/System.hpp"
24#include <boost/range/numeric.hpp>
25#include <boost/variant.hpp>
38 template <
typename T>
double operator()(T
const &bond)
const {
44 auto const max_cut_bonded = boost::accumulate(
46 [](
auto max_cut,
auto const &kv) {
47 return std::max(max_cut,
48 boost::apply_visitor(
BondCutoff(), *kv.second));
52 auto const any_dihedrals = std::any_of(
54 return (boost::get<DihedralBond>(&(*kv.second)) ||
55 boost::get<TabulatedDihedralBond>(&(*kv.second)));
60 return (any_dihedrals) ? 2 * max_cut_bonded : max_cut_bonded;
63void BondedInteractionsMap::on_ia_change() {
64 n_thermalized_bonds = 0;
68 for (
auto &kv : *this) {
69 if (boost::get<ThermalizedBond>(&(*kv.second)) !=
nullptr) {
70 ++n_thermalized_bonds;
73 if (boost::get<RigidBond>(&(*kv.second)) !=
nullptr) {
80 system.on_short_range_ia_change();
81 system.on_thermostat_param_change();
double maximal_cutoff_bonded()
Calculate the maximal cutoff of bonded interactions, required to determine the cell size for communic...
BondedInteractionsMap bonded_ia_params
Field containing the parameters of the bonded ia types.
Data structures for bonded interactions.
static constexpr double BONDED_INACTIVE_CUTOFF
Visitor to get the bond cutoff from the bond parameter variant.
double operator()(T const &bond) const
Definition of the rigid bond data type for the Rattle algorithm.
Routines to thermalize the center of mass and distance of a particle pair.