Collective Variables Module - Developer Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
src
colvar_gpu_calc.h
1
#ifndef COLVAR_GPU_CALC_H
2
#define COLVAR_GPU_CALC_H
3
4
#include "colvar_gpu_support.h"
5
#include "
colvarmodule.h
"
6
#include "colvar.h"
7
8
namespace
colvars_gpu {
9
#if defined (COLVARS_CUDA) || defined (COLVARS_HIP)
10
class
colvarcomp_gpu_graph {
11
public
:
12
colvarcomp_gpu_graph(
colvar::cvc
* cvc_in,
colvarmodule
* cvmodule_in): cvc(cvc_in), cvmodule(cvmodule_in) {}
13
virtual
~colvarcomp_gpu_graph() {}
14
int
reset_graphs();
15
int
calc_value_gpu(
bool
requires_lattice);
16
int
calc_gradients_gpu(
bool
requires_lattice);
17
int
calc_force_invgrads_gpu(
bool
requires_lattice);
18
int
calc_Jacobian_derivative_gpu(
bool
requires_lattice);
19
protected
:
20
gpu_graph_t
graph_total_force;
21
gpu_graph_t
graph_calc_value;
22
gpu_graph_t
graph_calc_gradients;
23
gpu_graph_t
graph_calc_Jacobian_derivative;
24
colvar::cvc
* cvc;
25
colvarmodule
* cvmodule;
27
virtual
int
add_calc_value_node
() {
return
COLVARS_NOT_IMPLEMENTED; }
28
31
virtual
int
add_calc_gradients_node
() {
return
COLVARS_NOT_IMPLEMENTED; }
32
35
virtual
int
add_calc_force_invgrads_node
() {
return
COLVARS_NOT_IMPLEMENTED; }
36
38
virtual
int
add_calc_Jacobian_derivative_node
() {
return
COLVARS_NOT_IMPLEMENTED; }
39
};
40
#endif
41
}
42
43
#endif
// COLVAR_GPU_CALC_H
colvar::cvc
Colvar component (base class for collective variables).
Definition
colvarcomp.h:71
colvarmodule
Collective variables module (main class).
Definition
colvarmodule.h:72
colvars_gpu::colvarcomp_gpu_graph::add_calc_force_invgrads_node
virtual int add_calc_force_invgrads_node()
Calculate the total force from the system using the inverse atomic gradients on GPU.
Definition
colvar_gpu_calc.h:35
colvars_gpu::colvarcomp_gpu_graph::add_calc_value_node
virtual int add_calc_value_node()
Calculate the variable on GPU.
Definition
colvar_gpu_calc.h:27
colvars_gpu::colvarcomp_gpu_graph::add_calc_Jacobian_derivative_node
virtual int add_calc_Jacobian_derivative_node()
Calculate the divergence of the inverse atomic gradients on GPU.
Definition
colvar_gpu_calc.h:38
colvars_gpu::colvarcomp_gpu_graph::add_calc_gradients_node
virtual int add_calc_gradients_node()
Calculate the atomic gradients, to be reused later in order to apply forces on GPU.
Definition
colvar_gpu_calc.h:31
colvars_gpu::gpu_graph_t
A struct for holding a CUDA graph and its execution object.
Definition
colvar_gpu_support.h:419
colvarmodule.h
Collective variables main module.
Generated on
for Collective Variables Module - Developer Documentation by
1.18.0