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
00019 BigReal A;
00020 BigReal B;
00021 };
00022
00023 LJTable(void);
00024
00025 ~LJTable(void);
00026
00027 const TableEntry *table_row(unsigned int i) const {
00028 return table + 2 * (i * table_dim);
00029 }
00030
00031 const TableEntry *table_val(unsigned int i, unsigned int j) const {
00032 return table + 2 * (i * table_dim + j);
00033 }
00034
00035 const TableEntry *table_val_scale14(unsigned int i, unsigned int j) const {
00036 return table + 2 * (i * table_dim + j) + 1;
00037 }
00038
00039 const TableEntry *get_table() const { return table; }
00040 int get_table_dim() const { return table_dim; }
00041
00042 private:
00043
00044 void compute_vdw_params(int i, int j,
00045 TableEntry *cur, TableEntry *cur_scaled);
00046
00047 char *table_alloc;
00048 TableEntry *table;
00049 unsigned int table_dim;
00050
00051 };
00052
00053 #endif
00054