Collective Variables Module - Developer Documentation
|
The temporary AoS interface to modify cvm::atom_group
.
More...
#include <colvaratoms.h>
Public Types | |
using | atom_iter = decltype(m_atoms)::iterator |
using | const_atom_iter = decltype(m_atoms)::const_iterator |
Public Member Functions | |
atom_modifier (cvm::atom_group *ag) | |
Construct from cvm::atom_group . More... | |
~atom_modifier () | |
Destructor. More... | |
int | remove_atom (atom_iter ai) |
Remove an atom object from this group. | |
STL-style iterators and accessors | |
simple_atom & | operator[] (size_t const i) |
simple_atom const & | operator[] (size_t const i) const |
atom_iter | begin () |
const_atom_iter | begin () const |
atom_iter | end () |
const_atom_iter | end () const |
size_t | size () const |
Add atom(s) to the atom group | |
int | add_atom (simple_atom const &a) |
int | add_atom_numbers (std::string const &numbers_conf) |
int | add_atoms_of_group (const atom_group *ag) |
int | add_index_group (std::string const &index_group_name, bool silent=false) |
int | add_atom_numbers_range (std::string const &range_conf) |
int | add_atom_name_residue_range (std::string const &psf_segid, std::string const &range_conf) |
int | add_atom_id (int aid) |
Private Member Functions | |
void | update_from_soa () |
Populate this temporary AoS object with the atoms from m_ag . | |
void | sync_to_soa () const |
Synchronize the atoms from this temporary AoS object to m_ag . | |
Private Attributes | |
cvm::atom_group * | m_ag |
Pointer to the SoA atom group to be modified. | |
std::vector< int > | m_atoms_ids |
Internal atom IDs (populated during initialization) | |
std::vector< simple_atom > | m_atoms |
AoS layout of the atoms. | |
std::unordered_map< int, int > | m_atoms_ids_count |
A map to avoid doubly counting atoms. | |
cvm::real | m_total_mass |
Total mass of the atom group. | |
cvm::real | m_total_charge |
Total charge of the atom group. | |
The temporary AoS interface to modify cvm::atom_group
.
cvm::atom_group::atom_modifier::atom_modifier | ( | cvm::atom_group * | ag | ) |
Construct from cvm::atom_group
.
cvm::atom_group::atom_modifier::update_from_soa()
cvm::atom_group::atom_modifier::~atom_modifier | ( | ) |
Destructor.
cvm::atom_group::atom_modifier::sync_to_soa()