Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

colvarproxy_atom_groups Class Reference

\brief Container of atom group data (allow collection of aggregated atomic data). More...

#include <colvarproxy.h>

Inheritance diagram for colvarproxy_atom_groups:

colvarproxy colvarproxy_vmd List of all members.

Public Methods

 colvarproxy_atom_groups ()
 Constructor. More...

virtual ~colvarproxy_atom_groups ()
 Destructor. More...

int reset ()
 Clear atom group data. More...

virtual int scalable_group_coms ()
 \brief Whether this proxy implementation has capability for scalable groups. More...

virtual int init_atom_group (std::vector< int > const &atoms_ids)
 Prepare this group for collective variables calculation, selecting atoms by internal ids (0-based). More...

virtual void clear_atom_group (int index)
 \brief Used by the atom_group class destructor. More...

int get_atom_group_id (int index) const
 Get the numeric ID of the given atom group (for the MD program). More...

cvm::real get_atom_group_mass (int index) const
 Get the mass of the given atom group. More...

cvm::real get_atom_group_charge (int index) const
 Get the charge of the given atom group. More...

cvm::rvector get_atom_group_com (int index) const
 Read the current position of the center of mass given atom group. More...

cvm::rvector get_atom_group_total_force (int index) const
 Read the current total force of the given atom group. More...

void apply_atom_group_force (int index, cvm::rvector const &new_force)
 Request that this force is applied to the given atom group. More...

cvm::rvector get_atom_group_velocity (int)
 Read the current velocity of the given atom group. More...

std::vector< int > const * get_atom_group_ids () const
size_t get_num_active_atom_groups () const
 Return number of atom groups with positive reference count. More...

std::vector< cvm::real > * modify_atom_group_masses ()
std::vector< cvm::real > * modify_atom_group_charges ()
std::vector< cvm::rvector > * modify_atom_group_positions ()
std::vector< cvm::rvector > * modify_atom_group_total_forces ()
std::vector< cvm::rvector > * modify_atom_group_applied_forces ()
void compute_rms_atom_groups_applied_force ()
 Compute the root-mean-square of the applied forces. More...

void compute_max_atom_groups_applied_force ()
 Compute the maximum norm among all applied forces. More...

cvm::real rms_atom_groups_applied_force () const
 Get the root-mean-square of the applied forces. More...

cvm::real max_atom_groups_applied_force () const
 Get the maximum norm among all applied forces. More...


Protected Methods

int add_atom_group_slot (int atom_group_id)
 Used by all init_atom_group() functions: create a slot for an atom group not requested yet. More...


Protected Attributes

std::vector< int > atom_groups_ids
 \brief Array of 0-based integers used to uniquely associate atom groups within the host program. More...

std::vector< size_t > atom_groups_refcount
 \brief Keep track of how many times each group is used by a separate cvc. More...

std::vector< cvm::realatom_groups_masses
 \brief Total masses of the atom groups. More...

std::vector< cvm::realatom_groups_charges
 \brief Total charges of the atom groups (allow redefinition during a run, as done e.g. in LAMMPS). More...

std::vector< cvm::rvector > atom_groups_coms
 \brief Current centers of mass of the atom groups. More...

std::vector< cvm::rvector > atom_groups_total_forces
 \brief Most recently updated total forces on the com of each group. More...

std::vector< cvm::rvector > atom_groups_new_colvar_forces
 \brief Forces applied from colvars, to be communicated to the MD integrator. More...

cvm::real atom_groups_rms_applied_force_
 Root-mean-square of the applied group forces. More...

cvm::real atom_groups_max_applied_force_
 Maximum norm among all applied group forces. More...


Detailed Description

\brief Container of atom group data (allow collection of aggregated atomic data).

Definition at line 299 of file colvarproxy.h.


Constructor & Destructor Documentation

colvarproxy_atom_groups::colvarproxy_atom_groups  
 

Constructor.

Definition at line 167 of file colvarproxy.C.

References atom_groups_max_applied_force_, and atom_groups_rms_applied_force_.

colvarproxy_atom_groups::~colvarproxy_atom_groups   [virtual]
 

Destructor.

Definition at line 173 of file colvarproxy.C.

References reset.


Member Function Documentation

int colvarproxy_atom_groups::add_atom_group_slot int    atom_group_id [protected]
 

Used by all init_atom_group() functions: create a slot for an atom group not requested yet.

Definition at line 192 of file colvarproxy.C.

References atom_groups_charges, atom_groups_coms, atom_groups_ids, atom_groups_masses, atom_groups_new_colvar_forces, atom_groups_refcount, and atom_groups_total_forces.

void colvarproxy_atom_groups::apply_atom_group_force int    index,
cvm::rvector const &    new_force
[inline]
 

Request that this force is applied to the given atom group.

Definition at line 352 of file colvarproxy.h.

References atom_groups_new_colvar_forces.

void colvarproxy_atom_groups::clear_atom_group int    index [virtual]
 

\brief Used by the atom_group class destructor.

Definition at line 220 of file colvarproxy.C.

References atom_groups_ids, atom_groups_refcount, COLVARS_INPUT_ERROR, and colvarmodule::error.

void colvarproxy_atom_groups::compute_max_atom_groups_applied_force  
 

Compute the maximum norm among all applied forces.

Definition at line 250 of file colvarproxy.C.

References atom_groups_max_applied_force_.

Referenced by colvarproxy::end_of_step.

void colvarproxy_atom_groups::compute_rms_atom_groups_applied_force  
 

Compute the root-mean-square of the applied forces.

Definition at line 243 of file colvarproxy.C.

References atom_groups_rms_applied_force_.

Referenced by colvarproxy::end_of_step.

cvm::real colvarproxy_atom_groups::get_atom_group_charge int    index const [inline]
 

Get the charge of the given atom group.

Definition at line 334 of file colvarproxy.h.

References atom_groups_charges.

cvm::rvector colvarproxy_atom_groups::get_atom_group_com int    index const [inline]
 

Read the current position of the center of mass given atom group.

Definition at line 340 of file colvarproxy.h.

References atom_groups_coms.

int colvarproxy_atom_groups::get_atom_group_id int    index const [inline]
 

Get the numeric ID of the given atom group (for the MD program).

Definition at line 322 of file colvarproxy.h.

References atom_groups_ids.

std::vector<int> const* colvarproxy_atom_groups::get_atom_group_ids   const [inline]
 

Definition at line 365 of file colvarproxy.h.

References atom_groups_ids.

cvm::real colvarproxy_atom_groups::get_atom_group_mass int    index const [inline]
 

Get the mass of the given atom group.

Definition at line 328 of file colvarproxy.h.

References atom_groups_masses.

cvm::rvector colvarproxy_atom_groups::get_atom_group_total_force int    index const [inline]
 

Read the current total force of the given atom group.

Definition at line 346 of file colvarproxy.h.

References atom_groups_total_forces.

cvm::rvector colvarproxy_atom_groups::get_atom_group_velocity int    [inline]
 

Read the current velocity of the given atom group.

Definition at line 358 of file colvarproxy.h.

References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error.

size_t colvarproxy_atom_groups::get_num_active_atom_groups   const
 

Return number of atom groups with positive reference count.

Definition at line 233 of file colvarproxy.C.

References atom_groups_refcount, and result.

int colvarproxy_atom_groups::init_atom_group std::vector< int > const &    atoms_ids [virtual]
 

Prepare this group for collective variables calculation, selecting atoms by internal ids (0-based).

Definition at line 211 of file colvarproxy.C.

References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error.

cvm::real colvarproxy_atom_groups::max_atom_groups_applied_force   const [inline]
 

Get the maximum norm among all applied forces.

Definition at line 413 of file colvarproxy.h.

References atom_groups_max_applied_force_.

std::vector<cvm::rvector>* colvarproxy_atom_groups::modify_atom_group_applied_forces   [inline]
 

Definition at line 395 of file colvarproxy.h.

References atom_groups_new_colvar_forces.

std::vector<cvm::real>* colvarproxy_atom_groups::modify_atom_group_charges   [inline]
 

Definition at line 379 of file colvarproxy.h.

References atom_groups_charges.

std::vector<cvm::real>* colvarproxy_atom_groups::modify_atom_group_masses   [inline]
 

Definition at line 373 of file colvarproxy.h.

References atom_groups_masses.

std::vector<cvm::rvector>* colvarproxy_atom_groups::modify_atom_group_positions   [inline]
 

Definition at line 385 of file colvarproxy.h.

References atom_groups_coms.

std::vector<cvm::rvector>* colvarproxy_atom_groups::modify_atom_group_total_forces   [inline]
 

Definition at line 390 of file colvarproxy.h.

References atom_groups_total_forces.

int colvarproxy_atom_groups::reset  
 

Clear atom group data.

Reimplemented in colvarproxy.

Definition at line 179 of file colvarproxy.C.

References atom_groups_charges, atom_groups_coms, atom_groups_ids, atom_groups_masses, atom_groups_new_colvar_forces, atom_groups_refcount, and atom_groups_total_forces.

Referenced by colvarproxy::reset, and ~colvarproxy_atom_groups.

cvm::real colvarproxy_atom_groups::rms_atom_groups_applied_force   const [inline]
 

Get the root-mean-square of the applied forces.

Definition at line 407 of file colvarproxy.h.

References atom_groups_rms_applied_force_.

int colvarproxy_atom_groups::scalable_group_coms   [virtual]
 

\brief Whether this proxy implementation has capability for scalable groups.

Definition at line 205 of file colvarproxy.C.

References COLVARS_NOT_IMPLEMENTED.


Member Data Documentation

std::vector<cvm::real> colvarproxy_atom_groups::atom_groups_charges [protected]
 

\brief Total charges of the atom groups (allow redefinition during a run, as done e.g. in LAMMPS).

Definition at line 428 of file colvarproxy.h.

Referenced by add_atom_group_slot, get_atom_group_charge, modify_atom_group_charges, colvarproxy::print_input_atomic_data, and reset.

std::vector<cvm::rvector> colvarproxy_atom_groups::atom_groups_coms [protected]
 

\brief Current centers of mass of the atom groups.

Definition at line 430 of file colvarproxy.h.

Referenced by add_atom_group_slot, get_atom_group_com, modify_atom_group_positions, colvarproxy::print_input_atomic_data, and reset.

std::vector<int> colvarproxy_atom_groups::atom_groups_ids [protected]
 

\brief Array of 0-based integers used to uniquely associate atom groups within the host program.

Definition at line 422 of file colvarproxy.h.

Referenced by add_atom_group_slot, clear_atom_group, get_atom_group_id, get_atom_group_ids, colvarproxy::print_input_atomic_data, and reset.

std::vector<cvm::real> colvarproxy_atom_groups::atom_groups_masses [protected]
 

\brief Total masses of the atom groups.

Definition at line 426 of file colvarproxy.h.

Referenced by add_atom_group_slot, get_atom_group_mass, modify_atom_group_masses, colvarproxy::print_input_atomic_data, and reset.

cvm::real colvarproxy_atom_groups::atom_groups_max_applied_force_ [protected]
 

Maximum norm among all applied group forces.

Definition at line 440 of file colvarproxy.h.

Referenced by colvarproxy_atom_groups, compute_max_atom_groups_applied_force, and max_atom_groups_applied_force.

std::vector<cvm::rvector> colvarproxy_atom_groups::atom_groups_new_colvar_forces [protected]
 

\brief Forces applied from colvars, to be communicated to the MD integrator.

Definition at line 434 of file colvarproxy.h.

Referenced by add_atom_group_slot, apply_atom_group_force, modify_atom_group_applied_forces, colvarproxy::print_output_atomic_data, and reset.

std::vector<size_t> colvarproxy_atom_groups::atom_groups_refcount [protected]
 

\brief Keep track of how many times each group is used by a separate cvc.

Definition at line 424 of file colvarproxy.h.

Referenced by add_atom_group_slot, clear_atom_group, get_num_active_atom_groups, colvarproxy::print_input_atomic_data, and reset.

cvm::real colvarproxy_atom_groups::atom_groups_rms_applied_force_ [protected]
 

Root-mean-square of the applied group forces.

Definition at line 437 of file colvarproxy.h.

Referenced by colvarproxy_atom_groups, compute_rms_atom_groups_applied_force, and rms_atom_groups_applied_force.

std::vector<cvm::rvector> colvarproxy_atom_groups::atom_groups_total_forces [protected]
 

\brief Most recently updated total forces on the com of each group.

Definition at line 432 of file colvarproxy.h.

Referenced by add_atom_group_slot, get_atom_group_total_force, modify_atom_group_total_forces, colvarproxy::print_input_atomic_data, and reset.


The documentation for this class was generated from the following files:
Generated on Fri Apr 19 02:46:42 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002