00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _LJ_H
00012 #define _LJ_H
00013
00014 #include "mdparallel.h"
00015
00016
00017 #define P_C 2.99792458e8 // (m/s) the speed of light (EXACT)
00018 #define P_HBAR 1.0545919e-34 // (kg*m^2/s) hbar plank constant
00019 #define P_KB 1.380662e-23 // (kg*m^2/s^2/K) Boltzmann constant
00020 #define P_E 1.6021892e-19 // (C) electron charge
00021 #define P_ME 9.109558e-31 // (kg) electron mass
00022 #define P_G 6.6732e-11 // (m^3/s^2/kg) Gravitational constant
00023 #define P_NA 6.022169e23 // (1/mol) Avogadro constant
00024 #define P_U 1.660531e-27 // (kg) atomic mass unit
00025 #define P_MU0 (4*M_PI*1e-7) // (C^2*s^4/kg/m^5)
00026 #define P_EPSILON0 (1/P_MU0/P_C/P_C) // (kg*m^3/C^2/s^2)
00027
00028
00029 #define LJ_ENERGY (119.8*P_KB/P_E) //argon energy
00030
00031 #define LJ_LENGTH 3.405 //argon length
00032 #define LJ_MASS 39.948 //argon mass
00033
00034 #define LJ_DT (2e-3/UTIME_IN_PS)
00035
00036 #define LJ_RC (2.37343077641*LJ_LENGTH) //4 neighbor
00037
00038 const double A=4*LJ_ENERGY*POW12(LJ_LENGTH);
00039 const double B=4*LJ_ENERGY*POW6(LJ_LENGTH);
00040 const double Uc=(A*POW6(1/LJ_RC)-B)*POW6(1/LJ_RC);
00041 const double DUDRc=-(12*A/POW6(LJ_RC)-6*B)/POW6(LJ_RC)/LJ_RC;
00042
00043
00044 class LJFrame: public MDPARALLELFrame
00045 {
00046 public:
00047 virtual void initvars();
00048 virtual void potential();
00049 void lennard_jones();
00050 };
00051
00052
00053
00054 #endif // _LJ_H
00055