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

colvarmodule::rotation Class Reference

\brief A rotation between two sets of coordinates (for the moment a wrapper for colvarmodule::quaternion). More...

#include <colvartypes.h>

List of all members.

Public Methods

void request_group1_gradients (size_t n)
 Allocate space for the derivatives of the rotation. More...

void request_group2_gradients (size_t n)
 Allocate space for the derivatives of the rotation. More...

void calc_optimal_rotation (std::vector< atom_pos > const &pos1, std::vector< atom_pos > const &pos2)
 \brief Calculate the optimal rotation and store the corresponding eigenvalue and eigenvector in the arguments l0 and q0; if the gradients have been previously requested, calculate them as well The method to derive the optimal rotation is defined in: Coutsias EA, Seok C, Dill KA. Using quaternions to calculate RMSD. J Comput Chem. 25(15):1849-57 (2004) DOI: 10.1002/jcc.20110 PubMed: 15376254. More...

int init ()
 Initialize member data. More...

 rotation ()
 Default constructor. More...

 rotation (cvm::quaternion const &qi)
 Constructor after a quaternion. More...

 rotation (cvm::real angle, cvm::rvector const &axis)
 Constructor after an axis of rotation and an angle (in radians). More...

 ~rotation ()
 Destructor. More...

cvm::rvector rotate (cvm::rvector const &v) const
 Return the rotated vector. More...

cvm::rotation inverse () const
 Return the inverse of this rotation. More...

cvm::rmatrix matrix () const
 Return the associated 3x3 matrix. More...

cvm::real spin_angle (cvm::rvector const &axis) const
 \brief Return the spin angle (in degrees) with respect to the provided axis (which MUST be normalized). More...

cvm::quaternion dspin_angle_dq (cvm::rvector const &axis) const
 \brief Return the derivative of the spin angle with respect to the quaternion. More...

cvm::real cos_theta (cvm::rvector const &axis) const
 \brief Return the projection of the orientation vector onto a predefined axis. More...

cvm::quaternion dcos_theta_dq (cvm::rvector const &axis) const
 Return the derivative of the tilt wrt the quaternion. More...


Public Attributes

cvm::quaternion q
 \brief The rotation itself (implemented as a quaternion). More...

cvm::real lambda
 \brief Eigenvalue corresponding to the optimal rotation. More...

bool b_debug_gradients
 \brief Perform gradient tests. More...

cvm::rmatrix C
 Correlation matrix C (3, 3). More...

cvm::matrix2d< cvm::realS
 Overlap matrix S (4, 4). More...

cvm::vector1d< cvm::realS_eigval
 Eigenvalues of S. More...

cvm::matrix2d< cvm::realS_eigvec
 Eigenvectors of S. More...

cvm::matrix2d< cvm::realS_backup
 Used for debugging gradients. More...

std::vector< cvm::matrix2d<
cvm::rvector > > 
dS_1
 Derivatives of S. More...

std::vector< cvm::matrix2d<
cvm::rvector > > 
dS_2
 Derivatives of S. More...

std::vector< cvm::rvector > dL0_1
 Derivatives of leading eigenvalue. More...

std::vector< cvm::rvector > dL0_2
 Derivatives of leading eigenvalue. More...

std::vector< cvm::vector1d<
cvm::rvector > > 
dQ0_1
 Derivatives of leading eigenvector. More...

std::vector< cvm::vector1d<
cvm::rvector > > 
dQ0_2
 Derivatives of leading eigenvector. More...


Static Public Attributes

bool monitor_crossings = false
 \brief Whether to test for eigenvalue crossing. More...

cvm::real crossing_threshold = 1.0E-02
 \brief Threshold for the eigenvalue crossing test. More...


Protected Methods

void build_correlation_matrix (std::vector< cvm::atom_pos > const &pos1, std::vector< cvm::atom_pos > const &pos2)
 Build the correlation matrix C (used by calc_optimal_rotation()). More...

void compute_overlap_matrix ()
 Compute the overlap matrix S (used by calc_optimal_rotation()). More...


Protected Attributes

cvm::quaternion q_old
 \brief Previous value of the rotation (used to warn the user when the structure changes too much, and there may be an eigenvalue crossing). More...

void * jacobi
 Pointer to instance of Jacobi solver. More...


Detailed Description

\brief A rotation between two sets of coordinates (for the moment a wrapper for colvarmodule::quaternion).

Definition at line 1284 of file colvartypes.h.


Constructor & Destructor Documentation

colvarmodule::rotation::rotation  
 

Default constructor.

Definition at line 235 of file colvartypes.C.

References init, jacobi, and NULL.

colvarmodule::rotation::rotation cvm::quaternion const &    qi
 

Constructor after a quaternion.

Definition at line 246 of file colvartypes.C.

References init, jacobi, and NULL.

colvarmodule::rotation::rotation cvm::real    angle,
cvm::rvector const &    axis
 

Constructor after an axis of rotation and an angle (in radians).

Definition at line 258 of file colvartypes.C.

References init, jacobi, NULL, q, and colvarmodule::sin.

colvarmodule::rotation::~rotation  
 

Destructor.

Definition at line 273 of file colvartypes.C.


Member Function Documentation

void colvarmodule::rotation::build_correlation_matrix std::vector< cvm::atom_pos > const &    pos1,
std::vector< cvm::atom_pos > const &    pos2
[protected]
 

Build the correlation matrix C (used by calc_optimal_rotation()).

Definition at line 284 of file colvartypes.C.

References C.

void colvarmodule::rotation::calc_optimal_rotation std::vector< atom_pos > const &    pos1,
std::vector< atom_pos > const &    pos2
 

\brief Calculate the optimal rotation and store the corresponding eigenvalue and eigenvector in the arguments l0 and q0; if the gradients have been previously requested, calculate them as well The method to derive the optimal rotation is defined in: Coutsias EA, Seok C, Dill KA. Using quaternions to calculate RMSD. J Comput Chem. 25(15):1849-57 (2004) DOI: 10.1002/jcc.20110 PubMed: 15376254.

void colvarmodule::rotation::compute_overlap_matrix   [protected]
 

Compute the overlap matrix S (used by calc_optimal_rotation()).

Definition at line 304 of file colvartypes.C.

References C, and S.

cvm::real colvarmodule::rotation::cos_theta cvm::rvector const &    axis const [inline]
 

\brief Return the projection of the orientation vector onto a predefined axis.

Definition at line 1418 of file colvartypes.h.

References colvarmodule::atan2, colvarmodule::cos, and PI.

cvm::quaternion colvarmodule::rotation::dcos_theta_dq cvm::rvector const &    axis const [inline]
 

Return the derivative of the tilt wrt the quaternion.

Definition at line 1433 of file colvartypes.h.

References colvarmodule::cos.

cvm::quaternion colvarmodule::rotation::dspin_angle_dq cvm::rvector const &    axis const [inline]
 

\brief Return the derivative of the spin angle with respect to the quaternion.

Definition at line 1394 of file colvartypes.h.

References PI.

int colvarmodule::rotation::init  
 

Initialize member data.

Definition at line 226 of file colvartypes.C.

References b_debug_gradients, colvarmodule::cite_feature, lambda, and colvarmodule::main.

Referenced by rotation.

cvm::rotation colvarmodule::rotation::inverse   const [inline]
 

Return the inverse of this rotation.

Definition at line 1370 of file colvartypes.h.

cvm::rmatrix colvarmodule::rotation::matrix   const [inline]
 

Return the associated 3x3 matrix.

Definition at line 1376 of file colvartypes.h.

void colvarmodule::rotation::request_group1_gradients size_t    n [inline]
 

Allocate space for the derivatives of the rotation.

Definition at line 1320 of file colvartypes.h.

References n.

void colvarmodule::rotation::request_group2_gradients size_t    n [inline]
 

Allocate space for the derivatives of the rotation.

Definition at line 1328 of file colvartypes.h.

References n.

cvm::rvector colvarmodule::rotation::rotate cvm::rvector const &    v const [inline]
 

Return the rotated vector.

Definition at line 1364 of file colvartypes.h.

cvm::real colvarmodule::rotation::spin_angle cvm::rvector const &    axis const [inline]
 

\brief Return the spin angle (in degrees) with respect to the provided axis (which MUST be normalized).

Definition at line 1383 of file colvartypes.h.

References colvarmodule::atan2, and PI.


Member Data Documentation

bool colvarmodule::rotation::b_debug_gradients
 

\brief Perform gradient tests.

Definition at line 1295 of file colvartypes.h.

Referenced by init.

cvm::rmatrix colvarmodule::rotation::C
 

Correlation matrix C (3, 3).

Definition at line 1298 of file colvartypes.h.

Referenced by build_correlation_matrix, and compute_overlap_matrix.

cvm::real colvarmodule::rotation::crossing_threshold = 1.0E-02 [static]
 

\brief Threshold for the eigenvalue crossing test.

Definition at line 27 of file colvartypes.C.

Referenced by colvarmodule::colvarmodule, and colvarmodule::parse_global_params.

std::vector< cvm::rvector > colvarmodule::rotation::dL0_1
 

Derivatives of leading eigenvalue.

Definition at line 1315 of file colvartypes.h.

std::vector< cvm::rvector > colvarmodule::rotation::dL0_2
 

Derivatives of leading eigenvalue.

Definition at line 1315 of file colvartypes.h.

std::vector< cvm::vector1d<cvm::rvector> > colvarmodule::rotation::dQ0_1
 

Derivatives of leading eigenvector.

Definition at line 1317 of file colvartypes.h.

std::vector< cvm::vector1d<cvm::rvector> > colvarmodule::rotation::dQ0_2
 

Derivatives of leading eigenvector.

Definition at line 1317 of file colvartypes.h.

std::vector< cvm::matrix2d<cvm::rvector> > colvarmodule::rotation::dS_1
 

Derivatives of S.

Definition at line 1313 of file colvartypes.h.

std::vector< cvm::matrix2d<cvm::rvector> > colvarmodule::rotation::dS_2
 

Derivatives of S.

Definition at line 1313 of file colvartypes.h.

void* colvarmodule::rotation::jacobi [protected]
 

Pointer to instance of Jacobi solver.

Definition at line 1486 of file colvartypes.h.

Referenced by rotation.

cvm::real colvarmodule::rotation::lambda
 

\brief Eigenvalue corresponding to the optimal rotation.

Definition at line 1292 of file colvartypes.h.

Referenced by init.

bool colvarmodule::rotation::monitor_crossings = false [static]
 

\brief Whether to test for eigenvalue crossing.

Definition at line 26 of file colvartypes.C.

Referenced by colvarmodule::colvarmodule, and colvarmodule::parse_global_params.

cvm::quaternion colvarmodule::rotation::q
 

\brief The rotation itself (implemented as a quaternion).

Definition at line 1289 of file colvartypes.h.

Referenced by rotation.

cvm::quaternion colvarmodule::rotation::q_old [protected]
 

\brief Previous value of the rotation (used to warn the user when the structure changes too much, and there may be an eigenvalue crossing).

Definition at line 1476 of file colvartypes.h.

cvm::matrix2d<cvm::real> colvarmodule::rotation::S
 

Overlap matrix S (4, 4).

Definition at line 1301 of file colvartypes.h.

Referenced by compute_overlap_matrix.

cvm::matrix2d<cvm::real> colvarmodule::rotation::S_backup
 

Used for debugging gradients.

Definition at line 1310 of file colvartypes.h.

cvm::vector1d<cvm::real> colvarmodule::rotation::S_eigval
 

Eigenvalues of S.

Definition at line 1304 of file colvartypes.h.

cvm::matrix2d<cvm::real> colvarmodule::rotation::S_eigvec
 

Eigenvectors of S.

Definition at line 1307 of file colvartypes.h.


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