Collective Variables Module - Developer Documentation
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Friends | List of all members
colvars_gpu::rotation_gpu Class Reference
Collaboration diagram for colvars_gpu::rotation_gpu:
Collaboration graph
[legend]

Public Member Functions

 rotation_gpu ()
 Constructor.
 
 ~rotation_gpu ()
 Destructor.
 
bool initialized () const
 Check if the object is initialized.
 
int init ()
 Initialize member data.
 
int add_optimal_rotation_nodes (cvm::real *const d_pos1, cvm::real *const d_pos2, const size_t num_atoms_pos1, const size_t num_atoms_pos2, cudaGraph_t &graph, std::unordered_map< std::string, cudaGraphNode_t > &nodes_map)
 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. More...
 
void after_sync_check () const
 Checking after synchronization ( eigendecomposition iterations and max crossing)
 
cvm::realget_S () const
 
cvm::realget_eigenvectors () const
 
cvm::realget_eigenvalues () const
 
cvm::quaternionget_q () const
 
void to_cpu (cvm::rotation &rot) const
 

Private Attributes

cvm::reald_S
 Correlation matrix C (3, 3) More...
 
cvm::reald_S_eigval
 Eigenvalues of S.
 
cvm::reald_S_eigvec
 Eigenvectors of S. More...
 
unsigned int * tbcount
 Used for debugging gradients. More...
 
cvm::quaterniond_q
 The rotation itself (implemented as a quaternion)
 
cvm::quaterniond_q_old
 Crossing monitor.
 
int * discontinuous_rotation
 
int * max_iteration_reached
 Flag for checking if eigendecomposition is failed.
 
bool b_initialized
 Flag for checking if initialized.
 
cvm::rmatrixh_C
 Host data for compatibility with CPU buffers.
 
cvm::realh_S
 
cvm::realh_S_eigval
 
cvm::realh_S_eigvec
 

Friends

struct rotation_derivative_gpu
 

Member Function Documentation

◆ add_optimal_rotation_nodes()

int colvars_gpu::rotation_gpu::add_optimal_rotation_nodes ( cvm::real *const  d_pos1,
cvm::real *const  d_pos2,
const size_t  num_atoms_pos1,
const size_t  num_atoms_pos2,
cudaGraph_t &  graph,
std::unordered_map< std::string, cudaGraphNode_t > &  nodes_map 
)

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

Member Data Documentation

◆ d_S

cvm::real* colvars_gpu::rotation_gpu::d_S
private

Correlation matrix C (3, 3)

Overlap matrix S (4, 4)

◆ d_S_eigvec

cvm::real* colvars_gpu::rotation_gpu::d_S_eigvec
private

Eigenvectors of S.

Note
d_S_eigvec is in column-major order. To get j-th element of the i-th eigenvector, use d_S_eigvec[i*4+j]

◆ tbcount

unsigned int* colvars_gpu::rotation_gpu::tbcount
private

Used for debugging gradients.

Eigensolver Thread block atomic counter


The documentation for this class was generated from the following files: