LJTable.h

Go to the documentation of this file.
00001 
00007 #ifndef LJTABLE_H
00008 #define LJTABLE_H
00009 
00010 #include "common.h"
00011 #include "ProcessorPrivate.h"
00012 
00013 class LJTable
00014 {
00015 public:
00016   struct TableEntry
00017   {
00018     // BigReal exclcut2;
00019 #ifdef NAMD_KNL
00020     float A,B;
00021 #else
00022     BigReal A;
00023     BigReal B;
00024 #endif
00025   };
00026 
00027   LJTable(void);
00028 
00029   ~LJTable(void);
00030 
00031   const TableEntry *table_row(unsigned int i) const {
00032     return table + 2 * (i * table_dim);
00033   }
00034 
00035   const TableEntry *table_val(unsigned int i, unsigned int j) const {
00036     return table + 2 * (i * table_dim + j);
00037   }
00038 
00039   const TableEntry *table_val_scale14(unsigned int i, unsigned int j) const {
00040     return table + 2 * (i * table_dim + j) + 1;
00041   }
00042 
00043   const TableEntry *get_table() const { return table; }
00044   int get_table_dim() const { return table_dim; }
00045 
00046 private:
00047 
00048   void compute_vdw_params(int i, int j, 
00049                           TableEntry *cur, TableEntry *cur_scaled);
00050 
00051   char *table_alloc;
00052   TableEntry *table;
00053   unsigned int table_dim;
00054 
00055 };
00056 
00057 #endif
00058 

Generated on Sun Nov 19 01:17:13 2017 for NAMD by  doxygen 1.4.7