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

colvar::orientation Class Reference

\brief Colvar component: orientation in space of an atom group, with respect to a set of reference coordinates (colvarvalue::type_quaternion type, range [-1:1]x[-1:1]x[-1:1]x[-1:1]). More...

#include <colvarcomp.h>

Inheritance diagram for colvar::orientation:

colvar::cvc colvarparse colvardeps colvarparams colvar::euler_phi colvar::euler_psi colvar::euler_theta colvar::orientation_angle colvar::orientation_proj colvar::spin_angle colvar::tilt List of all members.

Public Methods

 orientation (std::string const &conf)
 orientation ()
virtual int init (std::string const &conf)
 An init function should be defined for every class inheriting from cvc
Parameters:
conf  Contents of the configuration file pertaining to this cvc.
More...


virtual ~orientation ()
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 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 * atoms
 Atom group. More...

cvm::atom_pos atoms_cog
 Center of geometry of the group. More...

std::vector< cvm::atom_posref_pos
 Reference coordinates. More...

cvm::rotation rot
 Rotation object. More...

cvm::quaternion ref_quat
 \brief This is used to remove jumps in the sign of the quaternion, which may be annoying in the colvars trajectory. More...


Detailed Description

\brief Colvar component: orientation in space of an atom group, with respect to a set of reference coordinates (colvarvalue::type_quaternion type, range [-1:1]x[-1:1]x[-1:1]x[-1:1]).

Definition at line 1208 of file colvarcomp.h.


Constructor & Destructor Documentation

colvar::orientation::orientation std::string const &    conf
 

Definition at line 18 of file colvarcomp_rotations.C.

References conf, colvardeps::disable, colvardeps::f_cvc_explicit_gradient, init, colvar::cvc::set_function_type, colvarvalue::type, colvarvalue::type_quaternion, and colvar::cvc::x.

colvar::orientation::orientation  
 

Definition at line 96 of file colvarcomp_rotations.C.

References colvardeps::disable, colvardeps::f_cvc_explicit_gradient, colvar::cvc::set_function_type, colvarvalue::type, colvarvalue::type_quaternion, and colvar::cvc::x.

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

Definition at line 1233 of file colvarcomp.h.


Member Function Documentation

void colvar::orientation::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.

Reimplemented in colvar::orientation_angle.

Definition at line 129 of file colvarcomp_rotations.C.

References atoms, force, colvarvalue::quaternion_value, and rot.

void colvar::orientation::calc_gradients   [virtual]
 

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

Reimplemented from colvar::cvc.

Reimplemented in colvar::orientation_angle.

Definition at line 120 of file colvarcomp_rotations.C.

void colvar::orientation::calc_value   [virtual]
 

\brief Calculate the variable.

Implements colvar::cvc.

Reimplemented in colvar::orientation_angle.

Definition at line 105 of file colvarcomp_rotations.C.

References atoms, atoms_cog, colvardeps::f_cvc_debug_gradient, colvardeps::is_enabled, colvarvalue::quaternion_value, ref_pos, ref_quat, rot, and colvar::cvc::x.

cvm::real colvar::orientation::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.

Reimplemented in colvar::orientation_angle.

Definition at line 143 of file colvarcomp_rotations.C.

References colvarvalue::quaternion_value.

colvarvalue colvar::orientation::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.

Reimplemented in colvar::orientation_angle.

Definition at line 150 of file colvarcomp_rotations.C.

References colvarvalue::quaternion_value.

colvarvalue colvar::orientation::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.

Reimplemented in colvar::orientation_angle.

Definition at line 157 of file colvarcomp_rotations.C.

References colvarvalue::quaternion_value.

int colvar::orientation::init std::string const &    conf [virtual]
 

An init function should be defined for every class inheriting from cvc

Parameters:
conf  Contents of the configuration file pertaining to this cvc.

Reimplemented from colvar::cvc.

Reimplemented in colvar::orientation_angle.

Definition at line 28 of file colvarcomp_rotations.C.

References atoms, COLVARS_INPUT_ERROR, conf, colvarmodule::error, colvarparse::get_keyval, colvarmodule::load_coords, colvarmodule::log, colvar::cvc::parse_group, colvarmodule::real, ref_pos, ref_quat, and rot.

Referenced by orientation.


Member Data Documentation

cvm::atom_group* colvar::orientation::atoms [protected]
 

Atom group.

Definition at line 1214 of file colvarcomp.h.

Referenced by colvar::euler_theta::apply_force, colvar::euler_psi::apply_force, colvar::euler_phi::apply_force, colvar::spin_angle::apply_force, colvar::tilt::apply_force, colvar::orientation_proj::apply_force, colvar::orientation_angle::apply_force, apply_force, colvar::euler_theta::calc_gradients, colvar::euler_psi::calc_gradients, colvar::euler_phi::calc_gradients, colvar::spin_angle::calc_gradients, colvar::tilt::calc_gradients, colvar::orientation_proj::calc_gradients, colvar::orientation_angle::calc_gradients, colvar::euler_theta::calc_value, colvar::euler_psi::calc_value, colvar::euler_phi::calc_value, colvar::spin_angle::calc_value, colvar::tilt::calc_value, colvar::orientation_proj::calc_value, colvar::orientation_angle::calc_value, calc_value, and init.

cvm::atom_pos colvar::orientation::atoms_cog [protected]
 

Center of geometry of the group.

Definition at line 1216 of file colvarcomp.h.

Referenced by colvar::euler_theta::calc_value, colvar::euler_psi::calc_value, colvar::euler_phi::calc_value, colvar::spin_angle::calc_value, colvar::tilt::calc_value, colvar::orientation_proj::calc_value, colvar::orientation_angle::calc_value, and calc_value.

std::vector<cvm::atom_pos> colvar::orientation::ref_pos [protected]
 

Reference coordinates.

Definition at line 1219 of file colvarcomp.h.

Referenced by colvar::euler_theta::calc_value, colvar::euler_psi::calc_value, colvar::euler_phi::calc_value, colvar::spin_angle::calc_value, colvar::tilt::calc_value, colvar::orientation_proj::calc_value, colvar::orientation_angle::calc_value, calc_value, and init.

cvm::quaternion colvar::orientation::ref_quat [protected]
 

\brief This is used to remove jumps in the sign of the quaternion, which may be annoying in the colvars trajectory.

Definition at line 1226 of file colvarcomp.h.

Referenced by calc_value, and init.

cvm::rotation colvar::orientation::rot [protected]
 

Rotation object.

Definition at line 1222 of file colvarcomp.h.

Referenced by apply_force, colvar::euler_theta::calc_gradients, colvar::euler_psi::calc_gradients, colvar::euler_phi::calc_gradients, colvar::spin_angle::calc_gradients, colvar::tilt::calc_gradients, colvar::orientation_proj::calc_gradients, colvar::orientation_angle::calc_gradients, colvar::euler_theta::calc_value, colvar::euler_psi::calc_value, colvar::euler_phi::calc_value, colvar::spin_angle::calc_value, colvar::tilt::calc_value, colvar::orientation_proj::calc_value, colvar::orientation_angle::calc_value, calc_value, and init.


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