24#include "system/System.hpp"
35 auto constexpr visitor = [](
auto const &
bond) {
return bond.cutoff(); };
36 return std::max(max_cut, std::visit(
visitor, *kv.second));
40 auto const any_dihedrals = std::ranges::any_of(*
this, [](
auto const &kv) {
41 return (std::holds_alternative<DihedralBond>(*kv.second)
or
42 std::holds_alternative<TabulatedDihedralBond>(*kv.second));
51 n_thermalized_bonds = 0;
52#ifdef ESPRESSO_BOND_CONSTRAINT
55 for (
auto const &
bond : std::views::elements<1>(*
this)) {
56 if (std::holds_alternative<ThermalizedBond>(*
bond)) {
57 ++n_thermalized_bonds;
59#ifdef ESPRESSO_BOND_CONSTRAINT
60 if (std::holds_alternative<RigidBond>(*
bond)) {
66 system->on_short_range_ia_change();
67 system->on_thermostat_param_change();
73 if (
auto bond = std::get_if<ThermalizedBond>(ptr.get())) {
76 if (
auto bond = std::get_if<IBMVolCons>(ptr.get())) {
77 system.immersed_boundaries->register_softID(*
bond);
79 if (
auto bond = std::get_if<IBMTriel>(ptr.get())) {
82 if (
auto bond = std::get_if<IBMTribend>(ptr.get())) {
88 if (
auto bond = std::get_if<ThermalizedBond>(ptr.get())) {
89 bond->unset_thermostat_view();
90 n_thermalized_bonds = -1;
92 if (
auto bond = std::get_if<IBMVolCons>(ptr.get())) {
93 bond->unset_volumes_view();
95#ifdef ESPRESSO_BOND_CONSTRAINT
96 if (std::get_if<RigidBond>(ptr.get())) {
Data structures for bonded interactions.
virtual void activate_bond(mapped_type const &ptr)
virtual void deactivate_bond(mapped_type const &ptr)
double maximal_cutoff() const
Calculate the maximal cutoff of bonded interactions, required to determine the cell size for communic...
container_type::mapped_type mapped_type
std::weak_ptr< System > m_system
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
constexpr double bonded_inactive_cutoff
Special cutoff value for an inactive bond.
Definition of the rigid bond data type for the Rattle algorithm.
Routines to thermalize the center of mass and distance of a particle pair.