#include <colvartypes.h>
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::real > | S |
Overlap matrix S (4, 4). More... | |
cvm::vector1d< cvm::real > | S_eigval |
Eigenvalues of S. More... | |
cvm::matrix2d< cvm::real > | S_eigvec |
Eigenvectors of S. More... | |
cvm::matrix2d< cvm::real > | S_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... |
Definition at line 1284 of file colvartypes.h.
|
Default constructor.
Definition at line 235 of file colvartypes.C. |
|
Constructor after a quaternion.
Definition at line 246 of file colvartypes.C. |
|
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. |
|
Destructor.
Definition at line 273 of file colvartypes.C. |
|
Build the correlation matrix C (used by calc_optimal_rotation()).
Definition at line 284 of file colvartypes.C. References C. |
|
\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.
|
|
Compute the overlap matrix S (used by calc_optimal_rotation()).
Definition at line 304 of file colvartypes.C. |
|
\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. |
|
Return the derivative of the tilt wrt the quaternion.
Definition at line 1433 of file colvartypes.h. References colvarmodule::cos. |
|
\brief Return the derivative of the spin angle with respect to the quaternion.
Definition at line 1394 of file colvartypes.h. References PI. |
|
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. |
|
Return the inverse of this rotation.
Definition at line 1370 of file colvartypes.h. |
|
Return the associated 3x3 matrix.
Definition at line 1376 of file colvartypes.h. |
|
Allocate space for the derivatives of the rotation.
Definition at line 1320 of file colvartypes.h. References n. |
|
Allocate space for the derivatives of the rotation.
Definition at line 1328 of file colvartypes.h. References n. |
|
Return the rotated vector.
Definition at line 1364 of file colvartypes.h. |
|
\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. |
|
\brief Perform gradient tests.
Definition at line 1295 of file colvartypes.h. Referenced by init. |
|
Correlation matrix C (3, 3).
Definition at line 1298 of file colvartypes.h. Referenced by build_correlation_matrix, and compute_overlap_matrix. |
|
\brief Threshold for the eigenvalue crossing test.
Definition at line 27 of file colvartypes.C. Referenced by colvarmodule::colvarmodule, and colvarmodule::parse_global_params. |
|
Derivatives of leading eigenvalue.
Definition at line 1315 of file colvartypes.h. |
|
Derivatives of leading eigenvalue.
Definition at line 1315 of file colvartypes.h. |
|
Derivatives of leading eigenvector.
Definition at line 1317 of file colvartypes.h. |
|
Derivatives of leading eigenvector.
Definition at line 1317 of file colvartypes.h. |
|
Derivatives of S.
Definition at line 1313 of file colvartypes.h. |
|
Derivatives of S.
Definition at line 1313 of file colvartypes.h. |
|
Pointer to instance of Jacobi solver.
Definition at line 1486 of file colvartypes.h. Referenced by rotation. |
|
\brief Eigenvalue corresponding to the optimal rotation.
Definition at line 1292 of file colvartypes.h. Referenced by init. |
|
\brief Whether to test for eigenvalue crossing.
Definition at line 26 of file colvartypes.C. Referenced by colvarmodule::colvarmodule, and colvarmodule::parse_global_params. |
|
\brief The rotation itself (implemented as a quaternion).
Definition at line 1289 of file colvartypes.h. Referenced by rotation. |
|
\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. |
|
Overlap matrix S (4, 4).
Definition at line 1301 of file colvartypes.h. Referenced by compute_overlap_matrix. |
|
Used for debugging gradients.
Definition at line 1310 of file colvartypes.h. |
|
Eigenvalues of S.
Definition at line 1304 of file colvartypes.h. |
|
Eigenvectors of S.
Definition at line 1307 of file colvartypes.h. |