msm.h

Go to the documentation of this file.
00001 /* msm.h */
00002 
00003 #ifndef NL_MSM_H
00004 #define NL_MSM_H
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 
00010 
00012   struct NL_Msm_t;
00013   typedef struct NL_Msm_t NL_Msm;
00014 
00016   NL_Msm *NL_msm_create(void);
00017 
00019   void NL_msm_destroy(NL_Msm *);
00020 
00032   int NL_msm_setup(
00033       NL_Msm *msm,         
00034       double cutoff,       
00035       double cellvec1[3],  
00036       double cellvec2[3],  
00037       double cellvec3[3],  
00038       double cellcenter[3],
00039       int msmflags         
00040       );
00041 
00043   enum {
00044     NL_MSM_PERIODIC_NONE     = 0x000,  
00045     NL_MSM_PERIODIC_VEC1     = 0x001,  
00046     NL_MSM_PERIODIC_VEC2     = 0x002,  
00047     NL_MSM_PERIODIC_VEC3     = 0x004,  
00048     NL_MSM_PERIODIC_ALL      = 0x007,  
00050     NL_MSM_COMPUTE_SHORT_RANGE
00051                              = 0x008,  
00052     NL_MSM_COMPUTE_LONG_RANGE
00053                              = 0x010,  
00054     NL_MSM_COMPUTE_ALL       = 0x018,  
00056     NL_MSM_COMPUTE_SPREC     = 0x020,  
00057     NL_MSM_COMPUTE_1AWAY     = 0x040,  
00058     NL_MSM_COMPUTE_NONFACTORED
00059                              = 0x080,  
00062     NL_MSM_REPORT_TIMINGS    = 0x100,  
00064     NL_MSM_COMPUTE_CUDA_FALL_BACK
00065                              = 0x200,  
00067     NL_MSM_COMPUTE_CUDA_GRID_CUTOFF
00068                              = 0x400,  
00069     NL_MSM_COMPUTE_CUDA_SHORT_RANGE
00070                              = 0x800,  
00071     NL_MSM_COMPUTE_CUDA      = 0xE00,  
00073     NL_MSM_ALL_FLAGS         = 0xFFF   
00074   };
00075 
00077   enum {
00078     NL_MSM_SUCCESS = 0,    
00079     NL_MSM_ERROR_MALLOC,   
00080     NL_MSM_ERROR_PARAM,    
00081     NL_MSM_ERROR_RANGE,    
00082     NL_MSM_ERROR_SUPPORT,  
00083     NL_MSM_ERROR_CUDA,     
00084     NL_MSM_ERROR_END       
00085   };
00086 
00103   int NL_msm_configure(
00104       NL_Msm *msm,         
00105       double gridspacing,  
00106       int approx,          
00107       int split,           
00108       int nlevels          
00109       );
00110 
00115   int NL_msm_compute_force(
00116       NL_Msm *msm,         
00117       double *felec,       
00118       double *uelec,       
00119       const double *atom,  
00120       int natoms           
00121       );
00122 
00125   int NL_msm_compute_force_sprec(
00126       NL_Msm *msm,         
00127       float *felec,        
00128       float *uelec,        
00129       const float *atom,   
00130       int natoms           
00131       );
00132 
00133 #if 0
00134 
00139   int NL_msm_compute_epotmap(
00140       NL_Msm *msm,         
00141       double *epotmap,     
00142       int mx,              
00143       int my,              
00144       int mz,              
00145       double maplen[3],    
00146       double mapcenter[3], 
00147       const double *atom,  
00148       int natoms           
00149       );
00150 #endif
00151 
00153   enum {
00154     NL_MSM_APPROX_CUBIC = 0, 
00155     NL_MSM_APPROX_QUINTIC,   
00156     NL_MSM_APPROX_QUINTIC2,  
00157     NL_MSM_APPROX_SEPTIC,    
00158     NL_MSM_APPROX_SEPTIC3,   
00159     NL_MSM_APPROX_NONIC,     
00160     NL_MSM_APPROX_NONIC4,    
00161     NL_MSM_APPROX_BSPLINE,   
00162     NL_MSM_APPROX_END        
00163   };
00164 
00187   enum {
00188     NL_MSM_SPLIT_TAYLOR2 = 0,  
00189     NL_MSM_SPLIT_TAYLOR3,      
00190     NL_MSM_SPLIT_TAYLOR4,      
00191     NL_MSM_SPLIT_TAYLOR5,      
00192     NL_MSM_SPLIT_TAYLOR6,      
00193     NL_MSM_SPLIT_TAYLOR7,      
00194     NL_MSM_SPLIT_TAYLOR8,      
00195     NL_MSM_SPLIT_TAYLOR1,      
00197     NL_MSM_SPLIT_SIGMA2_3,     
00198     NL_MSM_SPLIT_SIGMA3_5,     
00199     NL_MSM_SPLIT_SIGMA4_6,     
00200     NL_MSM_SPLIT_SIGMA4_7,     
00201     NL_MSM_SPLIT_SIGMA5_8,     
00202     NL_MSM_SPLIT_SIGMA5_9,     
00203     NL_MSM_SPLIT_SIGMA6_9,     
00204     NL_MSM_SPLIT_SIGMA6_10,    
00205     NL_MSM_SPLIT_SIGMA6_11,    
00206     NL_MSM_SPLIT_SIGMA7_11,    
00207     NL_MSM_SPLIT_SIGMA7_12,    
00208     NL_MSM_SPLIT_SIGMA7_13,    
00209     NL_MSM_SPLIT_SIGMA8_12,    
00210     NL_MSM_SPLIT_SIGMA8_13,    
00211     NL_MSM_SPLIT_SIGMA8_14,    
00212     NL_MSM_SPLIT_SIGMA8_15,    
00214     NL_MSM_SPLIT_SIGMA2_6,     
00217     NL_MSM_SPLIT_SWITCH1_2,    
00218     NL_MSM_SPLIT_SWITCH3_4,    
00219     NL_MSM_SPLIT_SWITCH7_8,    
00221     NL_MSM_SPLIT_END           
00222   };
00223 
00225   int NL_msm_approx(const char *name);
00226 
00228   int NL_msm_split(const char *name);
00229 
00231   const char *NL_msm_approx_name(int approx);
00232 
00234   const char *NL_msm_split_name(int split);
00235 
00236 
00237 #ifdef __cplusplus
00238 }
00239 #endif
00240 
00241 #endif /* MSM_H */

Generated on Tue Nov 21 01:17:14 2017 for NAMD by  doxygen 1.4.7