units real atom_style full read_data water1024 # Increase z edge to yield "Vacuum|Water|Vacuum" system: variable xLoNew equal -1.0*lx variable xHiNew equal 2.0*lx change_box all x final ${xLoNew} ${xHiNew} units box mass 1 1.008 # H mass 2 15.9994 # O pair_style lj/cut/tip4p/long 2 1 1 1 0.1546 13.0 13.0 pair_coeff 1 1 0.00000 0.000 pair_coeff 1 2 0.00000 0.000 pair_coeff 2 2 0.18521 3.1589 bond_style harmonic bond_coeff 1 0.0 0.9572 angle_style harmonic angle_coeff 1 0.0 104.52 pair_modify tail yes kspace_style ewald 1.0e-5 kspace_modify order 3 variable Text equal 300 group oxygen type 2 group hydrogen type 1 set type 2 charge -1.1128 set type 1 charge 0.5564 velocity all create ${Text} 1234 neighbor 2.0 bin neigh_modify every 1 delay 0 check yes timestep 1.0 fix bal all balance 1000 x 10 1.05 fix constrain all shake 1.0e-4 100 0 b 1 a 1 fix integrate all nvt temp ${Text} ${Text} 100 #iso 1.0 1.0 1000 variable A_in_m equal 1e-10 #Angstrom in meter variable atm_in_Pas equal 101325 #:1 Pas=1 N/m^2 variable N_in_mN equal 1e3 #Newton in millNewton variable convFac equal ${A_in_m}*${atm_in_Pas}*${N_in_mN} variable xPress equal c_thermo_press[1] variable yPress equal c_thermo_press[2] variable zPress equal c_thermo_press[3] variable sT equal 0.5*lx*(v_xPress-0.5*(v_yPress+v_zPress))*${convFac} fix sT all ave/time 1000 100 100000 v_sT file file_1000-100-100000 fix sT2 all ave/time 1000 1 1000 v_sT file file_1000-1-1000 thermo_style custom step temp press ke pe vol v_xPress v_yPress v_zPress v_sT thermo_modify flush yes thermo 100 dump trj all custom 5000 wat.lammpstrj id type x y z dump_modify trj sort id restart 1000000 x.rest run 5000000