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 = typename container_type::key_type
 
using mapped_type = typename container_type::mapped_type
 
using value_type = typename container_type::value_type
 
using iterator = typename container_type::iterator
 
using const_iterator = typename 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 at (key_type const &key) const
 
auto count (key_type const &key) const
 
bool contains (key_type const &key) const
 
bool empty () const
 
auto size () const
 
auto get_next_key () const
 
auto get_zero_based_type (int bond_id) const
 
auto get_n_thermalized_bonds () const
 
auto get_n_rigid_bonds () const
 
std::optional< key_typefind_bond_id (mapped_type const &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)
 

Additional Inherited Members

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

Detailed Description

container for bonded interactions.

Definition at line 99 of file bonded_interaction_data.hpp.

Member Typedef Documentation

◆ const_iterator

using BondedInteractionsMap::const_iterator = typename container_type::const_iterator

Definition at line 108 of file bonded_interaction_data.hpp.

◆ iterator

using BondedInteractionsMap::iterator = typename container_type::iterator

Definition at line 107 of file bonded_interaction_data.hpp.

◆ key_type

using BondedInteractionsMap::key_type = typename container_type::key_type

Definition at line 104 of file bonded_interaction_data.hpp.

◆ mapped_type

using BondedInteractionsMap::mapped_type = typename container_type::mapped_type

Definition at line 105 of file bonded_interaction_data.hpp.

◆ value_type

using BondedInteractionsMap::value_type = typename container_type::value_type

Definition at line 106 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 82 of file bonded_interaction_data.cpp.

References System::Leaf< BondedInteractionsMap >::get_system().

Referenced by insert(), and insert().

◆ at()

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

◆ begin() [1/2]

iterator BondedInteractionsMap::begin ( )
inline

Definition at line 113 of file bonded_interaction_data.hpp.

Referenced by maximal_cutoff().

◆ begin() [2/2]

const_iterator BondedInteractionsMap::begin ( ) const
inline

Definition at line 115 of file bonded_interaction_data.hpp.

◆ contains()

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

Definition at line 146 of file bonded_interaction_data.hpp.

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

◆ count()

auto BondedInteractionsMap::count ( key_type const &  key) const
inline

Definition at line 145 of file bonded_interaction_data.hpp.

◆ deactivate_bond()

void BondedInteractionsMap::deactivate_bond ( mapped_type const &  ptr)
virtual

Definition at line 98 of file bonded_interaction_data.cpp.

Referenced by erase(), and insert().

◆ empty()

bool BondedInteractionsMap::empty ( ) const
inline

Definition at line 147 of file bonded_interaction_data.hpp.

◆ end() [1/2]

iterator BondedInteractionsMap::end ( )
inline

Definition at line 114 of file bonded_interaction_data.hpp.

Referenced by maximal_cutoff().

◆ end() [2/2]

const_iterator BondedInteractionsMap::end ( ) const
inline

Definition at line 116 of file bonded_interaction_data.hpp.

◆ erase()

auto BondedInteractionsMap::erase ( key_type const &  key)
inline

Definition at line 134 of file bonded_interaction_data.hpp.

References deactivate_bond(), and on_ia_change().

◆ find_bond_id()

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

Definition at line 157 of file bonded_interaction_data.hpp.

◆ get_n_rigid_bonds()

auto BondedInteractionsMap::get_n_rigid_bonds ( ) const
inline

Definition at line 155 of file bonded_interaction_data.hpp.

◆ get_n_thermalized_bonds()

auto BondedInteractionsMap::get_n_thermalized_bonds ( ) const
inline

Definition at line 153 of file bonded_interaction_data.hpp.

◆ get_next_key()

auto BondedInteractionsMap::get_next_key ( ) const
inline

Definition at line 149 of file bonded_interaction_data.hpp.

Referenced by Mpiio::dump_info().

◆ get_zero_based_type()

auto BondedInteractionsMap::get_zero_based_type ( int  bond_id) const
inline

Definition at line 150 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

Definition at line 118 of file bonded_interaction_data.hpp.

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

◆ insert() [2/2]

key_type BondedInteractionsMap::insert ( mapped_type const &  ptr)
inline

Definition at line 127 of file bonded_interaction_data.hpp.

References activate_bond(), and on_ia_change().

◆ 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 43 of file bonded_interaction_data.cpp.

References begin(), BONDED_INACTIVE_CUTOFF, and end().

◆ on_ia_change()

void BondedInteractionsMap::on_ia_change ( )

Definition at line 61 of file bonded_interaction_data.cpp.

References System::Leaf< BondedInteractionsMap >::m_system.

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 209 of file bonded_interaction_data.hpp.

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 190 of file bonded_interaction_data.hpp.

References Particle::bonds(), and Particle::id().

◆ size()

auto BondedInteractionsMap::size ( ) const
inline

Definition at line 148 of file bonded_interaction_data.hpp.

Referenced by Mpiio::dump_info().


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