# read restart files generated by in.forward, and run long equilibration simulations # set different lambda values variable NAME index ar log ${NAME}.log variable infile index data.${NAME} variable mytemp index 90 variable lambda equal 0.0 units real atom_style full pair_style hybrid/overlay lj/cut 10 coul/cut 10 gauss 10 kspace_style none #read_data ${infile} read_restart restart.0 pair_modify tail yes pair_coeff * * none pair_coeff 1 1 lj/cut 0.238122 3.405 pair_coeff 1 1 coul/cut 10 pair_coeff 1 2 gauss 1.0674 0.9 neighbor 2.0 bin neigh_modify delay 0 every 1 check yes page 1000000 one 20000 timestep 1 ## variables for TI #variable lambda equal ramp(0,1) variable m equal 1 variable n equal 2 variable eta equal 0.1 variable scale_vdw equal (1+v_lambda*(${eta}-1))^$m variable dscale_vdw equal (${eta}-1) ## for gauss variable lmd equal v_lambda variable gauss_scl equal v_lmd variable dgauss_scl equal 1 group mobile type <> 1 1 group stat type <> 2 2 velocity all zero linear units box fix 1 mobile nvt temp ${mytemp} ${mytemp} 100.0 dump 1 all custom 10000 ${NAME}.lammpstrj id type x y z ## TI fix 2 mobile adapt 1 pair lj/cut epsilon 1*1 1*1 v_scale_vdw scale yes compute 1 all ti lj/cut 1*1 v_scale_vdw v_dscale_vdw tail 1*1 v_scale_vdw v_dscale_vdw fix 6 all adapt 1 pair gauss a 1 2 v_gauss_scl scale yes compute 6 all ti gauss * v_gauss_scl v_dgauss_scl compute gauss all pair gauss variable occ equal c_gauss[1] variable com1 equal c_1 variable com2 equal c_6 thermo_style custom step vol temp press ke pe etotal enthalpy evdwl etail v_lambda v_scale_vdw v_dscale_vdw v_occ c_1 c_6 c_gauss lx ly lz thermo 200 fix TI_data all print 200 "${lambda} ${scale_vdw} ${gauss_scl} ${com1} ${com2}" file TI.txt restart 50000 restart.${NAME}.1 restart.${NAME}.2 run 2000000 write_restart restart.${NAME}