#include <colvartypes.h>
Public Member Functions | |
| void | request_group1_gradients (size_t const &n) |
| Allocate space for the derivatives of the rotation. | |
| void | request_group2_gradients (size_t const &n) |
| void | calc_optimal_rotation (std::vector< atom_pos > const &pos1, std::vector< atom_pos > const &pos2) |
| 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. | |
| rotation () | |
| Default constructor. | |
| rotation (cvm::quaternion const &qi) | |
| Constructor after a quaternion. | |
| rotation (cvm::real const &angle, cvm::rvector const &axis) | |
| Constructor after an axis of rotation and an angle (in radians). | |
| ~rotation () | |
| Destructor. | |
| cvm::rvector | rotate (cvm::rvector const &v) const |
| Return the rotated vector. | |
| cvm::rotation | inverse () const |
| Return the inverse of this rotation. | |
| cvm::rmatrix | matrix () const |
| Return the associated 3x3 matrix. | |
Public Attributes | |
| cvm::quaternion | q |
| The rotation itself (implemented as a quaternion). | |
| cvm::real | lambda |
| Eigenvalue corresponding to the optimal rotation. | |
| bool | b_debug_gradients |
| Perform gradient tests. | |
| std::vector< cvm::atom_pos > | pos1 |
| Positions to superimpose: the rotation should brings pos1 into pos2. | |
| std::vector< cvm::atom_pos > | pos2 |
| Positions to superimpose: the rotation should brings pos1 into pos2. | |
| std::vector< cvm::matrix2d< cvm::rvector, 4, 4 > > | dS_1 |
| Derivatives of S. | |
| std::vector< cvm::matrix2d< cvm::rvector, 4, 4 > > | dS_2 |
| Derivatives of S. | |
| std::vector< cvm::rvector > | dL0_1 |
| Derivatives of leading eigenvalue. | |
| std::vector< cvm::rvector > | dL0_2 |
| Derivatives of leading eigenvalue. | |
| std::vector< cvm::vector1d< cvm::rvector, 4 > > | dQ0_1 |
| Derivatives of leading eigenvector. | |
| std::vector< cvm::vector1d< cvm::rvector, 4 > > | dQ0_2 |
| Derivatives of leading eigenvector. | |
Static Public Attributes | |
| cvm::real | crossing_threshold = 1.0E-04 |
| Threshold for the eigenvalue crossing test. | |
Protected Member Functions | |
| void | build_matrix (std::vector< cvm::atom_pos > const &pos1, std::vector< cvm::atom_pos > const &pos2, cvm::matrix2d< real, 4, 4 > &S) |
| Build the overlap matrix S (used by calc_optimal_rotation()). | |
| void | diagonalize_matrix (cvm::matrix2d< cvm::real, 4, 4 > &S, cvm::real S_eigval[4], cvm::matrix2d< cvm::real, 4, 4 > &S_eigvec) |
| Diagonalize the overlap matrix S (used by calc_optimal_rotation()). | |
Protected Attributes | |
| cvm::quaternion | q_old |
| 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 884 of file colvartypes.h.
|
|
Default constructor.
Definition at line 937 of file colvartypes.h. 00938 : b_debug_gradients (false) 00939 {}
|
|
|
Constructor after a quaternion.
Definition at line 942 of file colvartypes.h. 00943 : b_debug_gradients (false) 00944 { 00945 q = qi; 00946 }
|
|
||||||||||||
|
Constructor after an axis of rotation and an angle (in radians).
Definition at line 949 of file colvartypes.h. References colvarmodule::rvector::unit(), colvarmodule::rvector::x, colvarmodule::rvector::y, and colvarmodule::rvector::z. 00950 : b_debug_gradients (false) 00951 { 00952 cvm::rvector const axis_n = axis.unit(); 00953 cvm::real const sina = ::sin (angle/2.0); 00954 q = cvm::quaternion (::cos (angle/2.0), 00955 sina * axis_n.x, sina * axis_n.y, sina * axis_n.z); 00956 }
|
|
|
Destructor.
Definition at line 959 of file colvartypes.h. 00960 {}
|
|
||||||||||||||||
|
Build the overlap matrix S (used by calc_optimal_rotation()).
|
|
||||||||||||
|
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 Referenced by colvar::orientation_angle::calc_value(), colvar::orientation::calc_value(), colvar::logmsd::calc_value(), colvar::rmsd::calc_value(), and colvarmodule::atom_group::read_positions(). |
|
||||||||||||||||
|
Diagonalize the overlap matrix S (used by calc_optimal_rotation()).
|
|
|
Return the inverse of this rotation.
Definition at line 969 of file colvartypes.h. Referenced by colvarmodule::atom_group::apply_colvar_force(), colvarmodule::atom_group::apply_force(), and colvarmodule::atom_group::apply_forces(). 00970 {
00971 return cvm::rotation (this->q.conjugate());
00972 }
|
|
|
Return the associated 3x3 matrix.
Definition at line 975 of file colvartypes.h. References colvarmodule::quaternion::rotation_matrix(). 00976 {
00977 return q.rotation_matrix();
00978 }
|
|
|
Allocate space for the derivatives of the rotation.
Definition at line 909 of file colvartypes.h. Referenced by colvar::eigenvector::eigenvector(). 00910 {
00911 dS_1.resize (n, cvm::matrix2d<cvm::rvector, 4, 4>());
00912 dL0_1.resize (n, cvm::rvector (0.0, 0.0, 0.0));
00913 dQ0_1.resize (n, cvm::vector1d<cvm::rvector, 4>());
00914 }
|
|
|
Definition at line 916 of file colvartypes.h. Referenced by colvar::eigenvector::eigenvector(), and colvar::orientation::orientation(). 00917 {
00918 dS_2.resize (n, cvm::matrix2d<cvm::rvector, 4, 4>());
00919 dL0_2.resize (n, cvm::rvector (0.0, 0.0, 0.0));
00920 dQ0_2.resize (n, cvm::vector1d<cvm::rvector, 4>());
00921 }
|
|
|
Return the rotated vector.
Definition at line 963 of file colvartypes.h. References colvarmodule::quaternion::rotate(). Referenced by colvarmodule::atom_group::apply_colvar_force(), colvarmodule::atom_group::apply_force(), colvarmodule::atom_group::apply_forces(), colvarmodule::atom_group::apply_rotation(), colvarmodule::atom_group::read_positions(), colvarmodule::atom_group::read_system_forces(), and colvarmodule::atom_group::read_velocities().
|
|
|
Perform gradient tests.
Definition at line 895 of file colvartypes.h. Referenced by colvar::orientation::orientation(). |
|
|
Threshold for the eigenvalue crossing test.
Definition at line 715 of file colvarmodule.C. |
|
|
Derivatives of leading eigenvalue.
Definition at line 904 of file colvartypes.h. |
|
|
Derivatives of leading eigenvalue.
Definition at line 904 of file colvartypes.h. Referenced by colvar::logmsd::calc_gradients(). |
|
|
Derivatives of leading eigenvector.
Definition at line 906 of file colvartypes.h. Referenced by colvar::eigenvector::calc_Jacobian_derivative(). |
|
|
Derivatives of leading eigenvector.
Definition at line 906 of file colvartypes.h. Referenced by colvar::orientation::apply_force(), colvar::orientation_angle::calc_gradients(), colvar::logmsd::calc_Jacobian_derivative(), and colvar::rmsd::calc_Jacobian_derivative(). |
|
|
Derivatives of S.
Definition at line 902 of file colvartypes.h. |
|
|
Derivatives of S.
Definition at line 902 of file colvartypes.h. |
|
|
Eigenvalue corresponding to the optimal rotation.
Definition at line 892 of file colvartypes.h. Referenced by colvar::logmsd::calc_value(), and colvar::rmsd::calc_value(). |
|
|
Positions to superimpose: the rotation should brings pos1 into pos2.
Definition at line 899 of file colvartypes.h. |
|
|
Positions to superimpose: the rotation should brings pos1 into pos2.
Definition at line 899 of file colvartypes.h. |
|
|
The rotation itself (implemented as a quaternion).
Definition at line 889 of file colvartypes.h. Referenced by colvar::orientation_angle::calc_gradients(), colvar::rmsd::calc_gradients(), colvar::eigenvector::calc_Jacobian_derivative(), colvar::logmsd::calc_Jacobian_derivative(), colvar::rmsd::calc_Jacobian_derivative(), colvar::orientation_angle::calc_value(), and colvar::orientation::calc_value(). |
|
|
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 988 of file colvartypes.h. |
1.3.9.1