|
在常温(298K)下做完了体系平衡, 得到数据文件sys_after_nvt4.data. 后续为节省时间和计算量, 想做变温循环采样, 设置了四个时间索引, 但在实际运行过程中, 发现只在第一个时间索引有RDF输出, 其余的时间索引下均无RDF输出(traj, msd, data文件均有正常输出)
input_up_v4.lammps
(2.84 KB, 下载次数 Times of downloads: 2)
sys_after_nvt4.data
(3.04 MB, 下载次数 Times of downloads: 1)
system.in.init
(291 Bytes, 下载次数 Times of downloads: 1)
system.in.settings
(4.04 KB, 下载次数 Times of downloads: 1)
附上脚本文件如下:
include "system.in.init"
read_data "sys_after_nvt4.data"
include "system.in.settings"
group glion type 1
neigh_modify delay 0 every 1 check yes
neigh_modify one 5000
compute md1 glion msd com yes
compute myRDF2 all rdf 500 1 2 1 3 1 5 1 6 1 8 1 9 # need to modify the atom type
label loop_start # i: 1-5
variable i loop 51 # 1-51
# Equilibration is 298K so we should start from 298K
variable T equal 296+2*$i # 298 300 302 304 ... 398 K 2K/1ns
timestep 2
thermo 5000 # output thermodynamic data every 5000 steps(10ps)
# 采样10ns 2fs*5000000steps = 10ns 平衡1ns*2 2fs*500000steps*2 = 2ns
# total = (索引外 1ns*47 = 47ns) + (4*2ns) + (4*10ns) = 47ns + 8ns + 40ns = 95ns
if "(${T} == 298)" then &
"dump 1 all custom 50000 traj_nvt${T}.lammpstrj id mol type x y z ix iy iz" &
"dump 2 all custom 50000 dump.atom${T}.* id mol type x y z" &
"fix fxnvt all nvt temp ${T} ${T} 200" &
"fix msd1 glion ave/time 1 50000 50000 c_md1 file ${T}_msd.dat mode scalar" &
"fix 3 all ave/time 1 5000000 5000000 c_myRDF2 file ${T}_rdfK.dat mode vector" &
"run 5000000" &
"write_data str_nvt_${T}.data" &
"undump 1" &
"undump 2" &
"unfix fxnvt" &
"unfix msd1" &
"unfix 3" &
elif "(${T} == 338) || (${T} == 378) || (${T} == 398)" &
"fix fxnpt all npt temp ${T} ${T} 200.0 iso 1.0 1.0 1000" &
"run 500000" &
"unfix fxnpt" &
"dump eq all custom 5000 traj_nvt_equil${T}.lammpstrj id mol type x y z ix iy iz" &
"fix fxnvt2 all nvt temp ${T} ${T} 200" &
"run 500000" &
"write_data str_nvt_equil_${T}.data" &
"undump eq" &
"unfix fxnvt2" &
"dump 1 all custom 50000 traj_nvt${T}.lammpstrj id mol type x y z ix iy iz" &
"dump 2 all custom 50000 dump.atom${T}.* id mol type x y z" &
"fix fxnvt3 all nvt temp ${T} ${T} 200" &
"fix msd1 glion ave/time 1 50000 50000 c_md1 file ${T}_msd.dat mode scalar" &
"fix 3 all ave/time 1 5000000 5000000 c_myRDF2 file ${T}_rdfK.dat mode vector" &
"run 5000000" &
"write_data str_nvt_${T}.data" &
"undump 1" &
"undump 2" &
"unfix fxnvt3" &
"unfix msd1" &
"unfix 3" &
else &
"fix fxnpt2 all npt temp ${T} ${T} 200.0 iso 1.0 1.0 1000" &
"run 500000" &
"unfix fxnpt2" &
next i
jump SELF loop_start
|
|