ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
BondedInteractionsMap Class Reference

container for bonded interactions. More...

#include <bonded_interaction_data.hpp>

+ Inheritance diagram for BondedInteractionsMap:
+ Collaboration diagram for BondedInteractionsMap:

Public Types

using key_type = container_type::key_type
 
using mapped_type = container_type::mapped_type
 
using value_type = container_type::value_type
 
using iterator = container_type::iterator
 
using const_iterator = container_type::const_iterator
 

Public Member Functions

 BondedInteractionsMap ()=default
 
virtual ~BondedInteractionsMap ()=default
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
void insert (key_type const &key, mapped_type const &ptr)
 
key_type insert (mapped_type const &ptr)
 
auto erase (key_type const &key)
 
virtual void activate_bond (mapped_type const &ptr)
 
virtual void deactivate_bond (mapped_type const &ptr)
 
mapped_type constat (key_type const &key) const
 
bool contains (key_type const &key) const
 
bool empty () const
 
auto size () const
 
DEVICE_QUALIFIER auto get_next_key () const
 
auto get_zero_based_type (int bond_id) const
 
DEVICE_QUALIFIER auto get_n_thermalized_bonds () const
 
DEVICE_QUALIFIER auto get_n_rigid_bonds () const
 
std::optional< key_typefind_bond_id (mapped_type const &target_bond) const
 
double maximal_cutoff () const
 Calculate the maximal cutoff of bonded interactions, required to determine the cell size for communication.
 
template<typename BondType >
bool pair_bond_exists_on (Particle const &p, Particle const &p_partner) const
 Checks both particles for a specific bond, even on ghost particles.
 
template<typename BondType >
bool pair_bond_exists_between (Particle const &p1, Particle const &p2) const
 Checks both particles for a specific bond, even on ghost particles.
 
void on_ia_change ()
 
- Public Member Functions inherited from System::Leaf< BondedInteractionsMap >
void bind_system (std::shared_ptr< System > const &system)
 
void detach_system (std::shared_ptr< System > const &system)
 

Public Attributes

std::vector< Utils::Vector9drigid_bond_virial
 Per-bond-type RATTLE constraint virial.
 

Additional Inherited Members

- Protected Member Functions inherited from System::Leaf< BondedInteractionsMap >
autoget_system ()
 
autoget_system () const
 
- Protected Attributes inherited from System::Leaf< BondedInteractionsMap >
std::weak_ptr< Systemm_system
 

Detailed Description

container for bonded interactions.

Definition at line 89 of file bonded_interaction_data.hpp.

Member Typedef Documentation

◆ const_iterator

using BondedInteractionsMap::const_iterator = container_type::const_iterator

Definition at line 98 of file bonded_interaction_data.hpp.

◆ iterator

using BondedInteractionsMap::iterator = container_type::iterator

Definition at line 97 of file bonded_interaction_data.hpp.

◆ key_type

using BondedInteractionsMap::key_type = container_type::key_type

Definition at line 94 of file bonded_interaction_data.hpp.

◆ mapped_type

using BondedInteractionsMap::mapped_type = container_type::mapped_type

Definition at line 95 of file bonded_interaction_data.hpp.

◆ value_type

using BondedInteractionsMap::value_type = container_type::value_type

Definition at line 96 of file bonded_interaction_data.hpp.

Constructor & Destructor Documentation

◆ BondedInteractionsMap()

BondedInteractionsMap::BondedInteractionsMap ( )
default

◆ ~BondedInteractionsMap()

virtual BondedInteractionsMap::~BondedInteractionsMap ( )
virtualdefault

Member Function Documentation

◆ activate_bond()

void BondedInteractionsMap::activate_bond ( mapped_type const ptr)
virtual

Definition at line 71 of file bonded_interaction_data.cpp.

References System::Leaf< BondedInteractionsMap >::get_system(), and stream.

Referenced by insert(), and insert().

◆ at()

mapped_type const & BondedInteractionsMap::at ( key_type const key) const
inline

◆ begin() [1/2]

iterator BondedInteractionsMap::begin ( )
inline

Definition at line 103 of file bonded_interaction_data.hpp.

Referenced by maximal_cutoff().

◆ begin() [2/2]

const_iterator BondedInteractionsMap::begin ( ) const
inline

Definition at line 105 of file bonded_interaction_data.hpp.

◆ contains()

bool BondedInteractionsMap::contains ( key_type const key) const
inline

Definition at line 135 of file bonded_interaction_data.hpp.

References stream.

Referenced by Mpiio::dump_info(), and get_zero_based_type().

◆ deactivate_bond()

void BondedInteractionsMap::deactivate_bond ( mapped_type const ptr)
virtual

Definition at line 87 of file bonded_interaction_data.cpp.

References stream.

Referenced by erase(), and insert().

◆ empty()

bool BondedInteractionsMap::empty ( ) const
inline

Definition at line 136 of file bonded_interaction_data.hpp.

Referenced by create_kokkos_bonds_kernel_data().

◆ end() [1/2]

iterator BondedInteractionsMap::end ( )
inline

Definition at line 104 of file bonded_interaction_data.hpp.

Referenced by maximal_cutoff().

◆ end() [2/2]

const_iterator BondedInteractionsMap::end ( ) const
inline

Definition at line 106 of file bonded_interaction_data.hpp.

◆ erase()

auto BondedInteractionsMap::erase ( key_type const key)
inline

Definition at line 124 of file bonded_interaction_data.hpp.

References deactivate_bond(), on_ia_change(), and stream.

◆ find_bond_id()

std::optional< key_type > BondedInteractionsMap::find_bond_id ( mapped_type const target_bond) const
inline

Definition at line 166 of file bonded_interaction_data.hpp.

References stream.

◆ get_n_rigid_bonds()

DEVICE_QUALIFIER auto BondedInteractionsMap::get_n_rigid_bonds ( ) const
inline

Definition at line 150 of file bonded_interaction_data.hpp.

References stream.

◆ get_n_thermalized_bonds()

DEVICE_QUALIFIER auto BondedInteractionsMap::get_n_thermalized_bonds ( ) const
inline

Definition at line 144 of file bonded_interaction_data.hpp.

References stream.

◆ get_next_key()

DEVICE_QUALIFIER auto BondedInteractionsMap::get_next_key ( ) const
inline

Definition at line 139 of file bonded_interaction_data.hpp.

Referenced by correct_position_shake(), and Mpiio::dump_info().

◆ get_zero_based_type()

auto BondedInteractionsMap::get_zero_based_type ( int  bond_id) const
inline

Definition at line 140 of file bonded_interaction_data.hpp.

References at(), and contains().

◆ insert() [1/2]

void BondedInteractionsMap::insert ( key_type const key,
mapped_type const ptr 
)
inline

◆ insert() [2/2]

key_type BondedInteractionsMap::insert ( mapped_type const ptr)
inline

Definition at line 117 of file bonded_interaction_data.hpp.

References activate_bond(), on_ia_change(), and stream.

◆ maximal_cutoff()

double BondedInteractionsMap::maximal_cutoff ( ) const

Calculate the maximal cutoff of bonded interactions, required to determine the cell size for communication.

Bond angle and dihedral potentials do not contain a cutoff intrinsically. The cutoff for these potentials depends on the bond length potentials (it is assumed that particles participating in a bond angle or dihedral potential are bound to each other by some bond length potential). For bond angle potentials nothing has to be done. For dihedral potentials the cutoff is set to twice the maximal cutoff because the particle in which the bond is stored is only bonded to the first two partners, one of which has an additional bond to the third partner.

Definition at line 32 of file bonded_interaction_data.cpp.

References begin(), bonded_inactive_cutoff, end(), and stream.

Referenced by create_cabana_neighbor_kernel().

◆ on_ia_change()

void BondedInteractionsMap::on_ia_change ( )

Definition at line 50 of file bonded_interaction_data.cpp.

References System::Leaf< BondedInteractionsMap >::m_system, and stream.

Referenced by erase(), insert(), and insert().

◆ pair_bond_exists_between()

template<typename BondType >
bool BondedInteractionsMap::pair_bond_exists_between ( Particle const p1,
Particle const p2 
) const
inline

Checks both particles for a specific bond, even on ghost particles.

Parameters
p1particle on which the bond may be stored
p2particle on which the bond may be stored
Template Parameters
BondTypeBond type to check for.

Definition at line 218 of file bonded_interaction_data.hpp.

References stream.

Referenced by thole_pair_energy(), and thole_pair_force().

◆ pair_bond_exists_on()

template<typename BondType >
bool BondedInteractionsMap::pair_bond_exists_on ( Particle const p,
Particle const p_partner 
) const
inline

Checks both particles for a specific bond, even on ghost particles.

Parameters
pparticle to check for the bond
p_partnerpossible bond partner
Template Parameters
BondTypeBond type to check for. Must be of one of the types in Bonded_IA_Parameters.

Definition at line 199 of file bonded_interaction_data.hpp.

References Particle::bonds(), and stream.

◆ size()

auto BondedInteractionsMap::size ( ) const
inline

Definition at line 137 of file bonded_interaction_data.hpp.

Referenced by Mpiio::dump_info().

Member Data Documentation

◆ rigid_bond_virial

std::vector<Utils::Vector9d> BondedInteractionsMap::rigid_bond_virial

Per-bond-type RATTLE constraint virial.

Accumulated bond-by-bond inside correct_position_shake() (indexed by bond id, same convention as Observable_stat::bonded_contribution()), where the pairwise correction/mass/bond-vector are all unambiguous, regardless of how many rigid bonds a particle participates in. Reset at the start of every SHAKE call; consumed by System::System::calculate_pressure().

Definition at line 164 of file bonded_interaction_data.hpp.

Referenced by correct_position_shake().


The documentation for this class was generated from the following files: