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

colvar::angle Class Reference

\brief Colvar component: angle between the centers of mass of three groups (colvarvalue::type_scalar type, range [0:PI]). More...

#include <colvarcomp.h>

Inheritance diagram for colvar::angle:

colvar::cvc colvarparse colvardeps colvarparams List of all members.

Public Methods

 angle (std::string const &conf)
 Initialize by parsing the configuration. More...

 angle (cvm::atom const &a1, cvm::atom const &a2, cvm::atom const &a3)
 \brief Initialize the three groups after three atoms. More...

virtual ~angle ()
virtual void calc_value ()
 \brief Calculate the variable. More...

virtual void calc_gradients ()
 \brief Calculate the atomic gradients, to be reused later in order to apply forces. More...

virtual void calc_force_invgrads ()
 \brief Calculate the total force from the system using the inverse atomic gradients. More...

virtual void calc_Jacobian_derivative ()
 \brief Calculate the divergence of the inverse atomic gradients. More...

virtual void apply_force (colvarvalue const &force)
 \brief Apply the collective variable force, by communicating the atomic forces to the simulation program (Note: the ft member is not altered by this function) Note: multiple calls to this function within the same simulation step will add the forces altogether
Parameters:
cvforce  The collective variable force, usually coming from the biases and eventually manipulated by the parent colvar object.
More...


virtual cvm::real dist2 (colvarvalue const &x1, colvarvalue const &x2) const
 \brief Square distance between x1 and x2 (can be redefined to transparently implement constraints, symmetries and periodicities) colvar::cvc::dist2() and the related functions are declared as "const" functions, but not "static", because additional parameters defining the metrics (e.g. the periodicity) may be specific to each colvar::cvc object. If symmetries or periodicities are present, the colvar::cvc::dist2() should be redefined to return the "closest distance" value and colvar::cvc::dist2_lgrad(), colvar::cvc::dist2_rgrad() to return its gradients. If constraints are present (and not already implemented by any of the colvarvalue types), the colvar::cvc::dist2_lgrad() and colvar::cvc::dist2_rgrad() functions should be redefined to provide a gradient which is compatible with the constraint, i.e. already deprived of its component normal to the constraint hypersurface. Finally, another useful application, if you are performing very many operations with these functions, could be to override the colvarvalue member functions and access directly its member data. For instance: to define dist2(x1,x2) as (x2.real_value-x1.real_value)*(x2.real_value-x1.real_value) in case of a scalar colvarvalue type. More...

virtual colvarvalue dist2_lgrad (colvarvalue const &x1, colvarvalue const &x2) const
 \brief Gradient(with respect to x1) of the square distance (can be redefined to transparently implement constraints, symmetries and periodicities). More...

virtual colvarvalue dist2_rgrad (colvarvalue const &x1, colvarvalue const &x2) const
 \brief Gradient(with respect to x2) of the square distance (can be redefined to transparently implement constraints, symmetries and periodicities). More...


Protected Attributes

cvm::atom_group * group1
 Atom group. More...

cvm::atom_group * group2
 Atom group. More...

cvm::atom_group * group3
 Atom group. More...

cvm::rvector r21
 Inter site vectors. More...

cvm::rvector r23
 Inter site vectors. More...

cvm::real r21l
 Inter site vector norms. More...

cvm::real r23l
 Inter site vector norms. More...

cvm::rvector dxdr1
 Derivatives wrt group centers of mass. More...

cvm::rvector dxdr3
 Derivatives wrt group centers of mass. More...

bool b_1site_force
 Compute total force on first site only to avoid unwanted coupling to other colvars (see e.g. Ciccotti et al., 2005) (or to allow dummy atoms). More...


Detailed Description

\brief Colvar component: angle between the centers of mass of three groups (colvarvalue::type_scalar type, range [0:PI]).

Definition at line 751 of file colvarcomp.h.


Constructor & Destructor Documentation

colvar::angle::angle std::string const &    conf
 

Initialize by parsing the configuration.

Definition at line 15 of file colvarcomp_angles.C.

References conf, colvardeps::enable, colvardeps::f_cvc_com_based, colvardeps::f_cvc_inv_gradient, colvardeps::f_cvc_Jacobian, group1, group2, group3, colvar::cvc::init_as_angle, colvar::cvc::init_total_force_params, colvar::cvc::parse_group, colvardeps::provide, and colvar::cvc::set_function_type.

colvar::angle::angle cvm::atom const &    a1,
cvm::atom const &    a2,
cvm::atom const &    a3
 

\brief Initialize the three groups after three atoms.

Definition at line 33 of file colvarcomp_angles.C.

References colvarmodule::atom_group, colvardeps::enable, colvardeps::f_cvc_com_based, colvardeps::f_cvc_inv_gradient, colvardeps::f_cvc_Jacobian, group1, group2, group3, colvar::cvc::init_as_angle, colvardeps::provide, colvar::cvc::register_atom_group, and colvar::cvc::set_function_type.

virtual colvar::angle::~angle   [inline, virtual]
 

Definition at line 780 of file colvarcomp.h.


Member Function Documentation

void colvar::angle::apply_force colvarvalue const &    force [virtual]
 

\brief Apply the collective variable force, by communicating the atomic forces to the simulation program (Note: the ft member is not altered by this function) Note: multiple calls to this function within the same simulation step will add the forces altogether

Parameters:
cvforce  The collective variable force, usually coming from the biases and eventually manipulated by the parent colvar object.

Implements colvar::cvc.

Definition at line 123 of file colvarcomp_angles.C.

References force, group1, group2, group3, and colvarvalue::real_value.

void colvar::angle::calc_force_invgrads   [virtual]
 

\brief Calculate the total force from the system using the inverse atomic gradients.

Reimplemented from colvar::cvc.

Definition at line 91 of file colvarcomp_angles.C.

References dxdr1, dxdr3, colvardeps::f_cvc_one_site_total_force, colvar::cvc::ft, group1, group3, colvardeps::is_enabled, and colvarvalue::real_value.

void colvar::angle::calc_gradients   [virtual]
 

\brief Calculate the atomic gradients, to be reused later in order to apply forces.

Reimplemented from colvar::cvc.

Definition at line 74 of file colvarcomp_angles.C.

References dxdr1, dxdr3, group1, group2, group3, PI, r21, r21l, r23, r23l, and colvarmodule::sqrt.

void colvar::angle::calc_Jacobian_derivative   [virtual]
 

\brief Calculate the divergence of the inverse atomic gradients.

Reimplemented from colvar::cvc.

Definition at line 114 of file colvarcomp_angles.C.

References colvarmodule::cos, colvar::cvc::jd, PI, colvarvalue::real_value, colvarmodule::sin, and colvar::cvc::x.

void colvar::angle::calc_value   [virtual]
 

\brief Calculate the variable.

Implements colvar::cvc.

Definition at line 53 of file colvarcomp_angles.C.

References colvarmodule::acos, colvardeps::f_cvc_pbc_minimum_image, group1, group2, group3, colvardeps::is_enabled, PI, colvarmodule::position_distance, r21, r21l, r23, r23l, colvarvalue::real_value, and colvar::cvc::x.

virtual cvm::real colvar::angle::dist2 colvarvalue const &    x1,
colvarvalue const &    x2
const [virtual]
 

\brief Square distance between x1 and x2 (can be redefined to transparently implement constraints, symmetries and periodicities) colvar::cvc::dist2() and the related functions are declared as "const" functions, but not "static", because additional parameters defining the metrics (e.g. the periodicity) may be specific to each colvar::cvc object. If symmetries or periodicities are present, the colvar::cvc::dist2() should be redefined to return the "closest distance" value and colvar::cvc::dist2_lgrad(), colvar::cvc::dist2_rgrad() to return its gradients. If constraints are present (and not already implemented by any of the colvarvalue types), the colvar::cvc::dist2_lgrad() and colvar::cvc::dist2_rgrad() functions should be redefined to provide a gradient which is compatible with the constraint, i.e. already deprived of its component normal to the constraint hypersurface. Finally, another useful application, if you are performing very many operations with these functions, could be to override the colvarvalue member functions and access directly its member data. For instance: to define dist2(x1,x2) as (x2.real_value-x1.real_value)*(x2.real_value-x1.real_value) in case of a scalar colvarvalue type.

Reimplemented from colvar::cvc.

virtual colvarvalue colvar::angle::dist2_lgrad colvarvalue const &    x1,
colvarvalue const &    x2
const [virtual]
 

\brief Gradient(with respect to x1) of the square distance (can be redefined to transparently implement constraints, symmetries and periodicities).

Reimplemented from colvar::cvc.

virtual colvarvalue colvar::angle::dist2_rgrad colvarvalue const &    x1,
colvarvalue const &    x2
const [virtual]
 

\brief Gradient(with respect to x2) of the square distance (can be redefined to transparently implement constraints, symmetries and periodicities).

Reimplemented from colvar::cvc.


Member Data Documentation

bool colvar::angle::b_1site_force [protected]
 

Compute total force on first site only to avoid unwanted coupling to other colvars (see e.g. Ciccotti et al., 2005) (or to allow dummy atoms).

Definition at line 773 of file colvarcomp.h.

cvm::rvector colvar::angle::dxdr1 [protected]
 

Derivatives wrt group centers of mass.

Definition at line 768 of file colvarcomp.h.

Referenced by calc_force_invgrads, and calc_gradients.

cvm::rvector colvar::angle::dxdr3 [protected]
 

Derivatives wrt group centers of mass.

Definition at line 768 of file colvarcomp.h.

Referenced by calc_force_invgrads, and calc_gradients.

cvm::atom_group* colvar::angle::group1 [protected]
 

Atom group.

Definition at line 757 of file colvarcomp.h.

Referenced by angle, apply_force, calc_force_invgrads, calc_gradients, and calc_value.

cvm::atom_group* colvar::angle::group2 [protected]
 

Atom group.

Definition at line 759 of file colvarcomp.h.

Referenced by angle, apply_force, calc_gradients, and calc_value.

cvm::atom_group* colvar::angle::group3 [protected]
 

Atom group.

Definition at line 761 of file colvarcomp.h.

Referenced by angle, apply_force, calc_force_invgrads, calc_gradients, and calc_value.

cvm::rvector colvar::angle::r21 [protected]
 

Inter site vectors.

Definition at line 764 of file colvarcomp.h.

Referenced by calc_gradients, and calc_value.

cvm::real colvar::angle::r21l [protected]
 

Inter site vector norms.

Definition at line 766 of file colvarcomp.h.

Referenced by calc_gradients, and calc_value.

cvm::rvector colvar::angle::r23 [protected]
 

Inter site vectors.

Definition at line 764 of file colvarcomp.h.

Referenced by calc_gradients, and calc_value.

cvm::real colvar::angle::r23l [protected]
 

Inter site vector norms.

Definition at line 766 of file colvarcomp.h.

Referenced by calc_gradients, and calc_value.


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