TupleTypesCUDA.h

Go to the documentation of this file.
00001 //
00002 // Tuple types that enable fast evaluation on GPU
00003 //
00004 #ifndef TUPLETYPESCUDA_H
00005 #define TUPLETYPESCUDA_H
00006 
00007 #ifdef NAMD_CUDA
00008 #include <cuda_runtime.h>  // float3
00009 
00010 struct CudaBond {
00011   int i, j, itype;
00012   // int ivir;
00013   float scale;
00014   float3 ioffsetXYZ;
00015 };
00016 
00017 struct CudaAngle {
00018   int i, j, k, itype;
00019   // int ivir, kvir;
00020   float scale;
00021   float3 ioffsetXYZ;
00022   float3 koffsetXYZ;
00023 };
00024 
00025 struct CudaDihedral {
00026   int i, j, k, l, itype;
00027   // int ivir, jvir, lvir;
00028   float scale;
00029   float3 ioffsetXYZ;
00030   float3 joffsetXYZ;
00031   float3 loffsetXYZ;
00032 };
00033 
00034 struct CudaExclusion {
00035   int i, j, vdwtypei, vdwtypej;
00036   // int ivir;
00037   float3 ioffsetXYZ;
00038 };
00039 
00040 struct CudaCrossterm {
00041   int i1, i2, i3, i4, i5, i6, i7, i8, itype;
00042   float scale;
00043   float3 offset12XYZ;
00044   float3 offset23XYZ;
00045   float3 offset34XYZ;
00046   float3 offset56XYZ;
00047   float3 offset67XYZ;
00048   float3 offset78XYZ;
00049 };
00050 
00051 struct CudaBondValue {
00052   float k;   //  Force constant for the bond
00053   float x0;  //  Rest distance for the bond
00054 };
00055 
00056 struct CudaAngleValue {
00057   float k;   //  Force constant for angle
00058   float theta0;  //  Rest angle for angle
00059   float k_ub;  //  Urey-Bradley force constant
00060   float r_ub;  //  Urey-Bradley distance
00061   int normal; // Whether we use harmonic (0) or cos-based (1) angle terms
00062 };
00063 
00064 struct CudaDihedralValue {
00065   float k;     //  Force constant
00066   float delta; //  Phase shift
00067   int n;       //  Periodicity*2, if n low bit is set to 0, this is the last in multiplicity
00068 };
00069 
00070 // struct CudaCrosstermData { float d00,d01,d10,d11; };
00071 
00072 struct CudaCrosstermValue {
00073   enum {dim=24};
00074   float4 c[dim][dim][4]; // bicubic interpolation coefficients
00075 };
00076 
00077 #endif
00078 
00079 #endif // TUPLETYPESCUDA_H

Generated on Tue Sep 19 01:17:14 2017 for NAMD by  doxygen 1.4.7