NAMD
TupleTypesCUDA.h
Go to the documentation of this file.
1 //
2 // Tuple types that enable fast evaluation on GPU
3 //
4 #ifndef TUPLETYPESCUDA_H
5 #define TUPLETYPESCUDA_H
6 
7 #ifdef NAMD_CUDA
8 #include <cuda_runtime.h> // float3
9 
10 struct CudaBond {
11  int i, j, itype;
12  // int ivir;
13  float scale;
14  float3 ioffsetXYZ;
15 };
16 
17 struct CudaAngle {
18  int i, j, k, itype;
19  // int ivir, kvir;
20  float scale;
21  float3 ioffsetXYZ;
22  float3 koffsetXYZ;
23 };
24 
25 struct CudaDihedral {
26  int i, j, k, l, itype;
27  // int ivir, jvir, lvir;
28  float scale;
29  float3 ioffsetXYZ;
30  float3 joffsetXYZ;
31  float3 loffsetXYZ;
32 };
33 
34 struct CudaExclusion {
35  int i, j, vdwtypei, vdwtypej;
36  // int ivir;
37  float3 ioffsetXYZ;
38 };
39 
40 struct CudaCrossterm {
41  int i1, i2, i3, i4, i5, i6, i7, i8, itype;
42  float scale;
43  float3 offset12XYZ;
44  float3 offset23XYZ;
45  float3 offset34XYZ;
46  float3 offset56XYZ;
47  float3 offset67XYZ;
48  float3 offset78XYZ;
49 };
50 
51 struct CudaBondValue {
52  float k; // Force constant for the bond
53  float x0; // Rest distance for the bond
54  float x1; // Upper wall for harmonic wall potential (with x0 lower wall)
55 };
56 
58  float k; // Force constant for angle
59  float theta0; // Rest angle for angle
60  float k_ub; // Urey-Bradley force constant
61  float r_ub; // Urey-Bradley distance
62  int normal; // Whether we use harmonic (0) or cos-based (1) angle terms
63 };
64 
66  float k; // Force constant
67  float delta; // Phase shift
68  int n; // Periodicity*2, if n low bit is set to 0, this is the last in multiplicity
69 };
70 
71 // struct CudaCrosstermData { float d00,d01,d10,d11; };
72 
74  enum {dim=24};
75  float4 c[dim][dim][4]; // bicubic interpolation coefficients
76 };
77 
78 #endif
79 
80 #endif // TUPLETYPESCUDA_H
float scale
float3 offset12XYZ
float3 ioffsetXYZ
float3 offset78XYZ
float3 joffsetXYZ
float3 offset67XYZ
float3 offset23XYZ
float3 koffsetXYZ
float3 ioffsetXYZ
float3 offset56XYZ
float4 c[dim][dim][4]
float3 ioffsetXYZ
float3 loffsetXYZ
float3 offset34XYZ