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

colvar::spin_angle Class Reference

\brief Colvar component: angle of rotation around a predefined axis (colvarvalue::type_scalar type, range [-PI:PI]). More...

#include <colvarcomp.h>

Inheritance diagram for colvar::spin_angle:

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

Public Methods

 spin_angle (std::string const &conf)
 spin_angle ()
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 ~spin_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 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
 Redefined to handle the 2*PI periodicity. More...

virtual colvarvalue dist2_lgrad (colvarvalue const &x1, colvarvalue const &x2) const
 Redefined to handle the 2*PI periodicity. More...

virtual colvarvalue dist2_rgrad (colvarvalue const &x1, colvarvalue const &x2) const
 Redefined to handle the 2*PI periodicity. More...

virtual void wrap (colvarvalue &x_unwrapped) const
 Redefined to handle the 2*PI periodicity. More...


Protected Attributes

cvm::rvector axis

Detailed Description

\brief Colvar component: angle of rotation around a predefined axis (colvarvalue::type_scalar type, range [-PI:PI]).

Definition at line 1325 of file colvarcomp.h.


Constructor & Destructor Documentation

colvar::spin_angle::spin_angle std::string const &    conf
 

colvar::spin_angle::spin_angle  
 

Definition at line 360 of file colvarcomp_rotations.C.

References colvardeps::enable, colvardeps::f_cvc_explicit_gradient, colvardeps::f_cvc_periodic, colvar::cvc::period, colvar::cvc::set_function_type, colvarvalue::type, colvarvalue::type_scalar, and colvar::cvc::x.

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

Definition at line 1337 of file colvarcomp.h.


Member Function Documentation

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

Reimplemented from colvar::orientation.

Definition at line 395 of file colvarcomp_rotations.C.

References colvar::orientation::atoms, force, and colvarvalue::real_value.

void colvar::spin_angle::calc_gradients   [virtual]
 

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

Reimplemented from colvar::orientation.

Definition at line 382 of file colvarcomp_rotations.C.

References colvar::orientation::atoms, and colvar::orientation::rot.

void colvar::spin_angle::calc_value   [virtual]
 

\brief Calculate the variable.

Reimplemented from colvar::orientation.

Definition at line 371 of file colvarcomp_rotations.C.

References colvar::orientation::atoms, colvar::orientation::atoms_cog, colvarvalue::real_value, colvar::orientation::ref_pos, colvar::orientation::rot, wrap, and colvar::cvc::x.

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

Redefined to handle the 2*PI periodicity.

Reimplemented from colvar::orientation.

Definition at line 405 of file colvarcomp_rotations.C.

References colvarvalue::real_value.

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

Redefined to handle the 2*PI periodicity.

Reimplemented from colvar::orientation.

Definition at line 414 of file colvarcomp_rotations.C.

References colvarvalue::real_value.

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

Redefined to handle the 2*PI periodicity.

Reimplemented from colvar::orientation.

Definition at line 423 of file colvarcomp_rotations.C.

References colvarvalue::real_value.

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

Definition at line 344 of file colvarcomp_rotations.C.

References conf, colvarparse::get_keyval, and colvarmodule::log.

void colvar::spin_angle::wrap colvarvalue   x_unwrapped const [virtual]
 

Redefined to handle the 2*PI periodicity.

Reimplemented from colvar::cvc.

Definition at line 432 of file colvarcomp_rotations.C.

References colvarvalue::real_value, and colvar::cvc::wrap_center.

Referenced by calc_value.


Member Data Documentation

cvm::rvector colvar::spin_angle::axis [protected]
 

Definition at line 1330 of file colvarcomp.h.


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