#include <colvarproxy.h>
Inheritance diagram for colvarproxy_atoms:
Public Methods | |||||||||||
colvarproxy_atoms () | |||||||||||
Constructor. More... | |||||||||||
virtual | ~colvarproxy_atoms () | ||||||||||
Destructor. More... | |||||||||||
virtual int | init_atom (int atom_number) | ||||||||||
Prepare this atom for collective variables calculation, selecting it by numeric index (1-based). More... | |||||||||||
virtual int | check_atom_id (int atom_number) | ||||||||||
Check that this atom number is valid, but do not initialize the corresponding atom yet. More... | |||||||||||
virtual int | init_atom (cvm::residue_id const &residue, std::string const &atom_name, std::string const &segment_id) | ||||||||||
Select this atom for collective variables calculation, using name and residue number. Not all programs support this: leave this function as is in those cases. More... | |||||||||||
virtual int | check_atom_id (cvm::residue_id const &residue, std::string const &atom_name, std::string const &segment_id) | ||||||||||
Check that this atom is valid, but do not initialize it yet. More... | |||||||||||
virtual void | clear_atom (int index) | ||||||||||
\brief Used by the atom class destructor: rather than deleting the array slot (costly) set the corresponding atoms_refcount to zero. More... | |||||||||||
virtual int | load_atoms (char const *filename, cvm::atom_group &atoms, std::string const &pdb_field, double pdb_field_value=0.0) | ||||||||||
\brief Select atom IDs from a file (usually PDB)
| |||||||||||
virtual int | load_coords (char const *filename, std::vector< cvm::atom_pos > &pos, std::vector< int > const &sorted_ids, std::string const &pdb_field, double pdb_field_value=0.0) | ||||||||||
\brief Load a set of coordinates from a file (usually PDB); if "pos" is already allocated, the number of its elements must match the number of entries in "filename"
| |||||||||||
int | reset () | ||||||||||
Clear atomic data. More... | |||||||||||
int | get_atom_id (int index) const | ||||||||||
Get the numeric ID of the given atom
| |||||||||||
cvm::real | get_atom_mass (int index) const | ||||||||||
Get the mass of the given atom
| |||||||||||
void | increase_refcount (int index) | ||||||||||
Increase the reference count of the given atom
| |||||||||||
cvm::real | get_atom_charge (int index) const | ||||||||||
Get the charge of the given atom
| |||||||||||
cvm::rvector | get_atom_position (int index) const | ||||||||||
Read the current position of the given atom
| |||||||||||
cvm::rvector | get_atom_total_force (int index) const | ||||||||||
Read the current total force of the given atom
| |||||||||||
void | apply_atom_force (int index, cvm::rvector const &new_force) | ||||||||||
Request that this force is applied to the given atom
| |||||||||||
cvm::rvector | get_atom_velocity (int) | ||||||||||
Read the current velocity of the given atom. More... | |||||||||||
std::vector< int > const * | get_atom_ids () const | ||||||||||
size_t | get_num_active_atoms () const | ||||||||||
Return number of atoms with positive reference count. More... | |||||||||||
std::vector< cvm::real > const * | get_atom_masses () const | ||||||||||
std::vector< cvm::real > * | modify_atom_masses () | ||||||||||
std::vector< cvm::real > const * | get_atom_charges () | ||||||||||
std::vector< cvm::real > * | modify_atom_charges () | ||||||||||
std::vector< cvm::rvector > const * | get_atom_positions () const | ||||||||||
std::vector< cvm::rvector > * | modify_atom_positions () | ||||||||||
std::vector< cvm::rvector > const * | get_atom_total_forces () const | ||||||||||
std::vector< cvm::rvector > * | modify_atom_total_forces () | ||||||||||
std::vector< cvm::rvector > const * | get_atom_applied_forces () const | ||||||||||
std::vector< cvm::rvector > * | modify_atom_applied_forces () | ||||||||||
void | compute_rms_atoms_applied_force () | ||||||||||
Compute the root-mean-square of the applied forces. More... | |||||||||||
void | compute_max_atoms_applied_force () | ||||||||||
Compute the maximum norm among all applied forces. More... | |||||||||||
cvm::real | rms_atoms_applied_force () const | ||||||||||
Get the root-mean-square of the applied forces. More... | |||||||||||
cvm::real | max_atoms_applied_force () const | ||||||||||
Get the maximum norm among all applied forces. More... | |||||||||||
int | max_atoms_applied_force_id () const | ||||||||||
Get the atom ID with the largest applied force. More... | |||||||||||
bool | updated_masses () const | ||||||||||
Record whether masses have been updated. More... | |||||||||||
bool | updated_charges () const | ||||||||||
Record whether masses have been updated. More... | |||||||||||
Protected Methods | |||||||||||
int | add_atom_slot (int atom_id) | ||||||||||
Used by all init_atom() functions: create a slot for an atom not requested yet; returns the index in the arrays. More... | |||||||||||
Protected Attributes | |||||||||||
std::vector< int > | atoms_ids | ||||||||||
\brief Array of 0-based integers used to uniquely associate atoms within the host program. More... | |||||||||||
std::vector< size_t > | atoms_refcount | ||||||||||
\brief Keep track of how many times each atom is used by a separate colvar object. More... | |||||||||||
std::vector< cvm::real > | atoms_masses | ||||||||||
\brief Masses of the atoms (allow redefinition during a run, as done e.g. in LAMMPS). More... | |||||||||||
std::vector< cvm::real > | atoms_charges | ||||||||||
\brief Charges of the atoms (allow redefinition during a run, as done e.g. in LAMMPS). More... | |||||||||||
std::vector< cvm::rvector > | atoms_positions | ||||||||||
\brief Current three-dimensional positions of the atoms. More... | |||||||||||
std::vector< cvm::rvector > | atoms_total_forces | ||||||||||
\brief Most recent total forces on each atom. More... | |||||||||||
std::vector< cvm::rvector > | atoms_new_colvar_forces | ||||||||||
\brief Forces applied from colvars, to be communicated to the MD integrator. More... | |||||||||||
cvm::real | atoms_rms_applied_force_ | ||||||||||
Root-mean-square of the applied forces. More... | |||||||||||
cvm::real | atoms_max_applied_force_ | ||||||||||
Maximum norm among all applied forces. More... | |||||||||||
int | atoms_max_applied_force_id_ | ||||||||||
ID of the atom with the maximum norm among all applied forces. More... | |||||||||||
bool | updated_masses_ | ||||||||||
Whether the masses and charges have been updated from the host code. More... | |||||||||||
bool | updated_charges_ | ||||||||||
Whether the masses and charges have been updated from the host code. More... |
Definition at line 41 of file colvarproxy.h.
|
Constructor.
Definition at line 22 of file colvarproxy.C. References atoms_max_applied_force_, atoms_max_applied_force_id_, atoms_rms_applied_force_, updated_charges_, and updated_masses_. |
|
Destructor.
Definition at line 30 of file colvarproxy.C. References reset. |
|
Used by all init_atom() functions: create a slot for an atom not requested yet; returns the index in the arrays.
Definition at line 49 of file colvarproxy.C. References atoms_charges, atoms_ids, atoms_masses, atoms_new_colvar_forces, atoms_positions, atoms_refcount, and atoms_total_forces. Referenced by colvarproxy_vmd::init_atom. |
|
Request that this force is applied to the given atom
Definition at line 148 of file colvarproxy.h. References atoms_new_colvar_forces. |
|
Check that this atom is valid, but do not initialize it yet.
Reimplemented in colvarproxy_vmd. Definition at line 84 of file colvarproxy.C. References COLVARS_NOT_IMPLEMENTED, and init_atom. |
|
Check that this atom number is valid, but do not initialize the corresponding atom yet.
Reimplemented in colvarproxy_vmd. Definition at line 68 of file colvarproxy.C. References COLVARS_NOT_IMPLEMENTED. |
|
\brief Used by the atom class destructor: rather than deleting the array slot (costly) set the corresponding atoms_refcount to zero.
Definition at line 93 of file colvarproxy.C. References atoms_ids, atoms_refcount, COLVARS_INPUT_ERROR, and colvarmodule::error. |
|
Compute the maximum norm among all applied forces.
Definition at line 145 of file colvarproxy.C. References atoms_ids, atoms_max_applied_force_, atoms_max_applied_force_id_, and atoms_new_colvar_forces. Referenced by colvarproxy::end_of_step. |
|
Compute the root-mean-square of the applied forces.
Definition at line 138 of file colvarproxy.C. References atoms_rms_applied_force_. Referenced by colvarproxy::end_of_step. |
|
Definition at line 214 of file colvarproxy.h. References atoms_new_colvar_forces. |
|
Get the charge of the given atom
Definition at line 126 of file colvarproxy.h. References atoms_charges. Referenced by colvarmodule::atom::update_charge. |
|
Definition at line 182 of file colvarproxy.h. References atoms_charges. |
|
Get the numeric ID of the given atom
Definition at line 105 of file colvarproxy.h. References atoms_ids. |
|
Definition at line 162 of file colvarproxy.h. References atoms_ids. |
|
Get the mass of the given atom
Definition at line 112 of file colvarproxy.h. References atoms_masses. Referenced by colvarmodule::atom::update_mass. |
|
Definition at line 170 of file colvarproxy.h. References atoms_masses. |
|
Read the current position of the given atom
Definition at line 133 of file colvarproxy.h. References atoms_positions. |
|
Definition at line 194 of file colvarproxy.h. References atoms_positions. |
|
Read the current total force of the given atom
Definition at line 140 of file colvarproxy.h. References atoms_total_forces. |
|
Definition at line 204 of file colvarproxy.h. References atoms_total_forces. |
|
Read the current velocity of the given atom.
Definition at line 154 of file colvarproxy.h. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Return number of atoms with positive reference count.
Definition at line 105 of file colvarproxy.C. References atoms_refcount, and result. |
|
Increase the reference count of the given atom
Definition at line 119 of file colvarproxy.h. References atoms_refcount. |
|
Select this atom for collective variables calculation, using name and residue number. Not all programs support this: leave this function as is in those cases.
Reimplemented in colvarproxy_vmd. Definition at line 74 of file colvarproxy.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Prepare this atom for collective variables calculation, selecting it by numeric index (1-based).
Reimplemented in colvarproxy_vmd. Definition at line 62 of file colvarproxy.C. References COLVARS_NOT_IMPLEMENTED. Referenced by check_atom_id. |
|
\brief Select atom IDs from a file (usually PDB)
Reimplemented in colvarproxy_vmd. Definition at line 115 of file colvarproxy.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
\brief Load a set of coordinates from a file (usually PDB); if "pos" is already allocated, the number of its elements must match the number of entries in "filename"
Definition at line 126 of file colvarproxy.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Get the maximum norm among all applied forces.
Definition at line 237 of file colvarproxy.h. References atoms_max_applied_force_. |
|
Get the atom ID with the largest applied force.
Definition at line 243 of file colvarproxy.h. References atoms_max_applied_force_id_. |
|
Definition at line 219 of file colvarproxy.h. References atoms_new_colvar_forces. |
|
Definition at line 187 of file colvarproxy.h. References atoms_charges, and updated_charges_. |
|
Definition at line 175 of file colvarproxy.h. References atoms_masses, and updated_masses_. |
|
Definition at line 199 of file colvarproxy.h. References atoms_positions. |
|
Definition at line 209 of file colvarproxy.h. References atoms_total_forces. |
|
Clear atomic data.
Reimplemented in colvarproxy. Definition at line 36 of file colvarproxy.C. References atoms_charges, atoms_ids, atoms_masses, atoms_new_colvar_forces, atoms_positions, atoms_refcount, and atoms_total_forces. Referenced by colvarproxy::reset, and ~colvarproxy_atoms. |
|
Get the root-mean-square of the applied forces.
Definition at line 231 of file colvarproxy.h. References atoms_rms_applied_force_. |
|
Record whether masses have been updated.
Definition at line 255 of file colvarproxy.h. References updated_charges_. |
|
Record whether masses have been updated.
Definition at line 249 of file colvarproxy.h. References updated_masses_. |
|
\brief Charges of the atoms (allow redefinition during a run, as done e.g. in LAMMPS).
Definition at line 270 of file colvarproxy.h. Referenced by add_atom_slot, get_atom_charge, get_atom_charges, colvarproxy_vmd::init_atom, modify_atom_charges, colvarproxy::print_input_atomic_data, reset, and colvarproxy_vmd::update_atomic_properties. |
|
\brief Array of 0-based integers used to uniquely associate atoms within the host program.
Definition at line 264 of file colvarproxy.h. Referenced by add_atom_slot, clear_atom, compute_max_atoms_applied_force, get_atom_id, get_atom_ids, colvarproxy_vmd::init_atom, colvarproxy::print_input_atomic_data, reset, colvarproxy_vmd::update_atomic_properties, and colvarproxy_vmd::update_input. |
|
\brief Masses of the atoms (allow redefinition during a run, as done e.g. in LAMMPS).
Definition at line 268 of file colvarproxy.h. Referenced by add_atom_slot, get_atom_mass, get_atom_masses, colvarproxy_vmd::init_atom, modify_atom_masses, colvarproxy::print_input_atomic_data, reset, and colvarproxy_vmd::update_atomic_properties. |
|
Maximum norm among all applied forces.
Definition at line 282 of file colvarproxy.h. Referenced by colvarproxy_atoms, compute_max_atoms_applied_force, and max_atoms_applied_force. |
|
ID of the atom with the maximum norm among all applied forces.
Definition at line 285 of file colvarproxy.h. Referenced by colvarproxy_atoms, compute_max_atoms_applied_force, and max_atoms_applied_force_id. |
|
\brief Forces applied from colvars, to be communicated to the MD integrator.
Definition at line 276 of file colvarproxy.h. Referenced by add_atom_slot, apply_atom_force, compute_max_atoms_applied_force, get_atom_applied_forces, modify_atom_applied_forces, colvarproxy::print_output_atomic_data, reset, and colvarproxy_vmd::update_input. |
|
\brief Current three-dimensional positions of the atoms.
Definition at line 272 of file colvarproxy.h. Referenced by add_atom_slot, get_atom_position, get_atom_positions, modify_atom_positions, colvarproxy::print_input_atomic_data, reset, and colvarproxy_vmd::update_input. |
|
\brief Keep track of how many times each atom is used by a separate colvar object.
Definition at line 266 of file colvarproxy.h. Referenced by add_atom_slot, clear_atom, get_num_active_atoms, increase_refcount, colvarproxy_vmd::init_atom, colvarproxy::print_input_atomic_data, and reset. |
|
Root-mean-square of the applied forces.
Definition at line 279 of file colvarproxy.h. Referenced by colvarproxy_atoms, compute_rms_atoms_applied_force, and rms_atoms_applied_force. |
|
\brief Most recent total forces on each atom.
Definition at line 274 of file colvarproxy.h. Referenced by add_atom_slot, get_atom_total_force, get_atom_total_forces, modify_atom_total_forces, colvarproxy::print_input_atomic_data, and reset. |
|
Whether the masses and charges have been updated from the host code.
Definition at line 288 of file colvarproxy.h. Referenced by colvarproxy_atoms, colvarproxy_vmd::colvarproxy_vmd, colvarproxy::end_of_step, modify_atom_charges, and updated_charges. |
|
Whether the masses and charges have been updated from the host code.
Definition at line 288 of file colvarproxy.h. Referenced by colvarproxy_atoms, colvarproxy_vmd::colvarproxy_vmd, colvarproxy::end_of_step, modify_atom_masses, and updated_masses. |