Collective Variables Module - Developer Documentation
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
colvarproxy_atom_groups Class Reference

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

#include <colvarproxy.h>

Inheritance diagram for colvarproxy_atom_groups:
Inheritance graph
[legend]

Public Member Functions

 colvarproxy_atom_groups ()
 Constructor.
 
virtual ~colvarproxy_atom_groups ()
 Destructor.
 
int reset ()
 Clear atom group data.
 
virtual int scalable_group_coms ()
 Whether this proxy implementation has capability for scalable groups.
 
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)
 
virtual void clear_atom_group (int index)
 Used by the atom_group class destructor.
 
int get_atom_group_id (int index) const
 Get the numeric ID of the given atom group (for the MD program)
 
cvm::real get_atom_group_mass (int index) const
 Get the mass of the given atom group.
 
cvm::real get_atom_group_charge (int index) const
 Get the charge of the given atom group.
 
cvm::rvector get_atom_group_com (int index) const
 Read the current position of the center of mass given atom group.
 
cvm::rvector get_atom_group_total_force (int index) const
 Read the current total force of the given atom group.
 
void apply_atom_group_force (int index, cvm::rvector const &new_force)
 Request that this force is applied to the given atom group.
 
cvm::rvector get_atom_group_velocity (int)
 Read the current velocity of the given atom group.
 
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.
 
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.
 
void compute_max_atom_groups_applied_force ()
 Compute the maximum norm among all applied forces.
 
cvm::real rms_atom_groups_applied_force () const
 Get the root-mean-square of the applied forces.
 
cvm::real max_atom_groups_applied_force () const
 Get the maximum norm among all applied forces.
 

Protected Member Functions

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.
 

Protected Attributes

std::vector< int > atom_groups_ids
 Array of 0-based integers used to uniquely associate atom groups within the host program.
 
std::vector< size_t > atom_groups_refcount
 Keep track of how many times each group is used by a separate cvc.
 
std::vector< cvm::realatom_groups_masses
 Total masses of the atom groups.
 
std::vector< cvm::realatom_groups_charges
 Total charges of the atom groups (allow redefinition during a run, as done e.g. in LAMMPS)
 
std::vector< cvm::rvectoratom_groups_coms
 Current centers of mass of the atom groups.
 
std::vector< cvm::rvectoratom_groups_total_forces
 Most recently updated total forces on the com of each group.
 
std::vector< cvm::rvectoratom_groups_new_colvar_forces
 Forces applied from colvars, to be communicated to the MD integrator.
 
cvm::real atom_groups_rms_applied_force_
 Root-mean-square of the applied group forces.
 
cvm::real atom_groups_max_applied_force_
 Maximum norm among all applied group forces.
 

Detailed Description

Container of atom group data (allow collection of aggregated atomic data)


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