26#include "system/System.hpp"
28#include "thermostat.hpp"
38 auto constexpr visitor = [](
auto const &
bond) {
return bond.cutoff(); };
39 return std::max(max_cut, std::visit(
visitor, *kv.second));
43 auto const any_dihedrals = std::ranges::any_of(*
this, [](
auto const &kv) {
44 return (std::holds_alternative<DihedralBond>(*kv.second)
or
45 std::holds_alternative<TabulatedDihedralBond>(*kv.second));
54 n_thermalized_bonds = 0;
55#ifdef ESPRESSO_BOND_CONSTRAINT
58 for (
auto const &
bond : std::views::elements<1>(*
this)) {
59 if (std::holds_alternative<ThermalizedBond>(*
bond)) {
60 ++n_thermalized_bonds;
62#ifdef ESPRESSO_BOND_CONSTRAINT
63 if (std::holds_alternative<RigidBond>(*
bond)) {
69 system->on_short_range_ia_change();
70 system->on_thermostat_param_change();
76 if (
auto bond = std::get_if<ThermalizedBond>(ptr.get())) {
79 if (
auto bond = std::get_if<IBMVolCons>(ptr.get())) {
80 system.immersed_boundaries->register_softID(*
bond);
82 if (
auto bond = std::get_if<IBMTriel>(ptr.get())) {
85 if (
auto bond = std::get_if<IBMTribend>(ptr.get())) {
91 if (
auto bond = std::get_if<ThermalizedBond>(ptr.get())) {
92 bond->unset_thermostat_view();
93 n_thermalized_bonds = -1;
95 if (
auto bond = std::get_if<IBMVolCons>(ptr.get())) {
96 bond->unset_volumes_view();
98#ifdef ESPRESSO_BOND_CONSTRAINT
99 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.