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

colvarmodule::atom Class Reference

\brief Stores numeric id, mass and all mutable data for an atom, mostly used by a colvar::cvc This class may be used to keep atomic data such as id, mass, position and collective variable derivatives) altogether. There may be multiple instances with identical numeric id, all acting independently: forces communicated through these instances will be summed together. More...

#include <colvaratoms.h>

List of all members.

Public Methods

 atom ()
 \brief Default constructor (sets index and id both to -1). More...

 atom (int atom_number)
 \brief Initialize an atom for collective variable calculation and get its internal identifier
Parameters:
atom_number  Atom index in the system topology (1-based).
More...


 atom (cvm::residue_id const &residue, std::string const &atom_name, std::string const &segment_id)
 \brief Initialize an atom for collective variable calculation and get its internal identifier
Parameters:
residue  Residue number
atom_name  Name of the atom in the residue
segment_id  For PSF topologies, the segment identifier; for other type of topologies, may not be required.
More...


 atom (atom const &a)
 Copy constructor. More...

 ~atom ()
 Destructor. More...

atom & operator= (atom const &a)
 Assignment operator (added to appease LGTM). More...

void reset_data ()
 Set mutable data (everything except id and mass) to zero. More...

void update_mass ()
 Get the latest value of the mass. More...

void update_charge ()
 Get the latest value of the charge. More...

void read_position ()
 Get the current position. More...

void read_velocity ()
 Get the current velocity. More...

void read_total_force ()
 Get the total force. More...

void apply_force (cvm::rvector const &new_force) const
 \brief Apply a force to the atom Note: the force is not applied instantly, but will be used later by the MD integrator (the colvars module does not integrate equations of motion. Multiple calls to this function by either the same atom object or different objects with identical id will all be added together. More...


Public Attributes

int id
 Identifier for the MD program (0-based). More...

cvm::real mass
 Mass. More...

cvm::real charge
 Charge. More...

cvm::atom_pos pos
 \brief Current position (copied from the program, can be modified if necessary). More...

cvm::rvector vel
 \brief Current velocity (copied from the program, can be modified if necessary). More...

cvm::rvector total_force
 \brief System force at the previous step (copied from the program, can be modified if necessary). More...

cvm::rvector grad
 \brief Gradient of a scalar collective variable with respect to this atom This can only handle a scalar collective variable (i.e. when the colvarvalue::real_value member is used from the colvarvalue class), which is also the most frequent case. For more complex types of colvarvalue objects, atomic gradients should be defined within the specific colvar::cvc implementation. More...


Protected Attributes

int index
 Index in the colvarproxy arrays (NOT in the global topology!). More...


Detailed Description

\brief Stores numeric id, mass and all mutable data for an atom, mostly used by a colvar::cvc This class may be used to keep atomic data such as id, mass, position and collective variable derivatives) altogether. There may be multiple instances with identical numeric id, all acting independently: forces communicated through these instances will be summed together.

Definition at line 28 of file colvaratoms.h.


Constructor & Destructor Documentation

atom::atom  
 

\brief Default constructor (sets index and id both to -1).

atom::atom int    atom_number
 

\brief Initialize an atom for collective variable calculation and get its internal identifier

Parameters:
atom_number  Atom index in the system topology (1-based).

atom::atom cvm::residue_id const &    residue,
std::string const &    atom_name,
std::string const &    segment_id
 

\brief Initialize an atom for collective variable calculation and get its internal identifier

Parameters:
residue  Residue number
atom_name  Name of the atom in the residue
segment_id  For PSF topologies, the segment identifier; for other type of topologies, may not be required.

atom::atom atom const &    a
 

Copy constructor.

atom::~atom  
 

Destructor.


Member Function Documentation

void atom::apply_force cvm::rvector const &    new_force const [inline]
 

\brief Apply a force to the atom Note: the force is not applied instantly, but will be used later by the MD integrator (the colvars module does not integrate equations of motion. Multiple calls to this function by either the same atom object or different objects with identical id will all be added together.

Definition at line 144 of file colvaratoms.h.

atom& atom::operator= atom const &    a
 

Assignment operator (added to appease LGTM).

void atom::read_position   [inline]
 

Get the current position.

Definition at line 118 of file colvaratoms.h.

void atom::read_total_force   [inline]
 

Get the total force.

Definition at line 130 of file colvaratoms.h.

void atom::read_velocity   [inline]
 

Get the current velocity.

Definition at line 124 of file colvaratoms.h.

void atom::reset_data   [inline]
 

Set mutable data (everything except id and mass) to zero.

Definition at line 97 of file colvaratoms.h.

References colvarmodule::atom_pos.

void atom::update_charge   [inline]
 

Get the latest value of the charge.

Definition at line 111 of file colvaratoms.h.

References colvarproxy_atoms::get_atom_charge.

void atom::update_mass   [inline]
 

Get the latest value of the mass.

Definition at line 104 of file colvaratoms.h.

References colvarproxy_atoms::get_atom_mass.


Member Data Documentation

cvm::real colvarmodule::atom::charge
 

Charge.

Definition at line 44 of file colvaratoms.h.

cvm::rvector colvarmodule::atom::grad
 

\brief Gradient of a scalar collective variable with respect to this atom This can only handle a scalar collective variable (i.e. when the colvarvalue::real_value member is used from the colvarvalue class), which is also the most frequent case. For more complex types of colvarvalue objects, atomic gradients should be defined within the specific colvar::cvc implementation.

Definition at line 68 of file colvaratoms.h.

int colvarmodule::atom::id
 

Identifier for the MD program (0-based).

Definition at line 38 of file colvaratoms.h.

int colvarmodule::atom::index [protected]
 

Index in the colvarproxy arrays (NOT in the global topology!).

Definition at line 33 of file colvaratoms.h.

cvm::real colvarmodule::atom::mass
 

Mass.

Definition at line 41 of file colvaratoms.h.

cvm::atom_pos colvarmodule::atom::pos
 

\brief Current position (copied from the program, can be modified if necessary).

Definition at line 48 of file colvaratoms.h.

cvm::rvector colvarmodule::atom::total_force
 

\brief System force at the previous step (copied from the program, can be modified if necessary).

Definition at line 56 of file colvaratoms.h.

cvm::rvector colvarmodule::atom::vel
 

\brief Current velocity (copied from the program, can be modified if necessary).

Definition at line 52 of file colvaratoms.h.


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