00001 /* 00002 ljbond.h 00003 by Wei Cai caiwei@mit.edu 00004 Last Modified : Fri Feb 16 09:59:52 2007 00005 00006 FUNCTION : Two component Lennard-Jones potential, depending on group ID 00007 */ 00008 00009 #ifndef _LJBOND_H 00010 #define _LJBOND_H 00011 00012 #include "mdparallel.h" 00013 00014 //All physical constants starts with P_ 00015 #define P_KB 1.380662e-23 // (kg*m^2/s^2/K) Boltzmann constant 00016 #define P_E 1.6021892e-19 // (C) electron charge 00017 00018 #define LJ_ENERGY (119.8*P_KB/P_E) // argon energy (sigma) 00019 #define LJ_LENGTH 3.405 // argon length (epsilon) 00020 //#define LJ_RC (2.37343077641*LJ_LENGTH) //4 neighbor 00021 00022 /* In principle, MAXSP can be the same as MAXSPECIES defined in md.h 00023 * here we make MAXSP smaller than MAXSPECIES to save memory 00024 */ 00025 #define MAXSP 4 00026 #define MAXNUMBOND 3 00027 class LJBONDFrame : public MDPARALLELFrame /* Si with Stillinger-Weber potential */ 00028 { 00029 public: 00030 /* Lennard-Jones parameters */ 00031 double _ALJ[MAXSP][MAXSP]; 00032 double _BLJ[MAXSP][MAXSP]; 00033 double ALJ[MAXSP][MAXSP]; 00034 double BLJ[MAXSP][MAXSP]; 00035 double Uc[MAXSP][MAXSP]; 00036 double DUDRc[MAXSP][MAXSP]; 00037 double LJ_RC; 00038 double BOND_R0, BOND_K; 00039 00040 int *num_bonds; 00041 int *bond_index; 00042 00043 LJBONDFrame(){}; 00044 void lennard_jones_bond(); 00045 virtual void potential(); 00046 virtual void initvars(); 00047 00048 virtual void initparser(); 00049 virtual int exec(char *name); 00050 virtual void calcprop(); 00051 00052 virtual void Alloc(); 00053 00054 void initLJ(); 00055 void makelipids(); 00056 void linklipids(); 00057 00058 }; 00059 00060 00061 00062 #endif // _LJBOND_H 00063
1.5.7.1