1#ifndef COLVARATOMS_KERNEL_H
2#define COLVARATOMS_KERNEL_H
4#include "colvar_rotation_derivative.h"
7#include "colvartypes.h"
9#if defined(COLVARS_CUDA) || defined(COLVARS_HIP)
11namespace colvars_gpu {
13int atoms_pos_from_proxy(
14 const int* atoms_proxy_index,
17 unsigned int num_atoms,
18 unsigned int proxy_stride,
19 cudaGraphNode_t& node,
21 const std::vector<cudaGraphNode_t>& dependencies);
24int atoms_pos_from_proxy(
25 const int* atoms_proxy_index,
28 unsigned int num_atoms,
29 unsigned int proxy_stride,
32int change_one_coordinate(
34 size_t atom_id_in_group,
int xyz,
36 unsigned int num_atoms,
39int atoms_calc_cog_com(
42 unsigned int num_atoms,
51 unsigned int* tbcount,
52 cudaGraphNode_t& node,
54 const std::vector<cudaGraphNode_t>& dependencies);
58 unsigned int num_atoms,
63 unsigned int* tbcount,
64 cudaGraphNode_t& node,
66 const std::vector<cudaGraphNode_t>& dependencies);
68int atoms_total_force_from_proxy(
69 const int* atoms_proxy_index,
74 unsigned int num_atoms,
75 unsigned int proxy_stride,
78int apply_main_colvar_force_to_proxy(
79 const int* atoms_proxy_index,
85 unsigned int num_atoms,
86 unsigned int proxy_stride,
87 cudaGraphNode_t& node,
89 const std::vector<cudaGraphNode_t>& dependencies);
91int apply_fitting_colvar_force_to_proxy(
92 const int* atoms_proxy_index,
96 unsigned int num_atoms,
97 unsigned int proxy_stride,
98 cudaGraphNode_t& node,
100 const std::vector<cudaGraphNode_t>& dependencies);
102int accumulate_cpu_force(
105 unsigned int num_atoms,
106 cudaGraphNode_t& node,
108 const std::vector<cudaGraphNode_t>& dependencies);
110int calc_fit_gradients_impl_loop1(
115 unsigned int num_atoms_main,
116 unsigned int num_atoms_fitting,
120 unsigned int* tbcount,
121 bool ag_center,
bool ag_rotate,
122 cudaGraphNode_t& node,
124 const std::vector<cudaGraphNode_t>& dependencies);
126int calc_fit_gradients_impl_loop2(
129 const double3* atom_grad,
131 unsigned int group_for_fit_size,
132 bool ag_center,
bool ag_rotate,
133 cudaGraphNode_t& node,
135 const std::vector<cudaGraphNode_t>& dependencies);
137int apply_translation(
141 unsigned int num_atoms,
142 cudaGraphNode_t& node,
144 const std::vector<cudaGraphNode_t>& dependencies);
146int rotate_with_quaternion(
149 unsigned int num_atoms,
150 cudaGraphNode_t& node,
152 const std::vector<cudaGraphNode_t>& dependencies);
154int apply_force_with_inverse_rotation(
157 const int* atoms_proxy_index,
159 unsigned int num_atoms,
160 unsigned int proxy_stride,
161 cudaGraphNode_t& node,
163 const std::vector<cudaGraphNode_t>& dependencies);
167 const int* atoms_proxy_index,
169 unsigned int num_atoms,
170 unsigned int proxy_stride,
171 cudaGraphNode_t& node,
173 const std::vector<cudaGraphNode_t>& dependencies);
175int calc_fit_forces_impl_loop1(
180 unsigned int num_atoms_main,
181 unsigned int num_atoms_fitting,
185 unsigned int* tbcount,
186 bool ag_center,
bool ag_rotate,
187 cudaGraphNode_t& node,
189 const std::vector<cudaGraphNode_t>& dependencies);
191int calc_fit_forces_impl_loop2(
193 const double3* atom_grad,
195 const int* atoms_proxy_index,
197 unsigned int group_for_fit_size,
198 unsigned int proxy_stride,
199 bool ag_center,
bool ag_rotate,
200 cudaGraphNode_t& node,
202 const std::vector<cudaGraphNode_t>& dependencies);
206#elif defined(COLVARS_SYCL)
1-dimensional vector of real numbers with four components and a quaternion algebra
Definition: colvartypes.h:978
2-dimensional array of real numbers with three components along each dimension (works with colvarmodu...
Definition: colvartypes.h:901
vector of real numbers with three components
Definition: colvartypes.h:726
double real
Defining an abstract real number allows to switch precision.
Definition: colvarmodule.h:98
Collective variables main module.
Definition: colvar_rotation_derivative.h:622