4. 批量提任务
1.只有不同温度
#需要修改的地方:扩胞方式、时间步长、运行总时间、等等,只是把不同温度的计算简化了
for i in 600 700 800 900 1000
do
mkdir $i
cd $i
cat > in.lmp << liz
variable x index 5
variable y index 5
variable z index 5
variable ss equal 0.001
variable tdamp equal "v_ss*100"
units metal
atom_style atomic
boundary p p p
read_data ./data.1GPa
mass 1 22.99
mass 2 88.906
mass 3 28.086
mass 4 16.000
replicate \$x \$y \$z
pair_style nnp SingleModel ./inv2 emap "1:Na,2:Y,3:Si,4:O"
pair_coeff * *
thermo 1
thermo_style custom step time temp pe lx ly lz
thermo_modify format 4 %20.15g
dump 1 all custom 100 A.lammpstrj id type xu yu zu fx fy fz
velocity all create $i 87287
timestep \${ss}
fix 1 all nvt temp $i $i \${tdamp}
run 100000
liz
cd ..
cp inv2 model-1000000 data.1GPa 1.sh $i
cd $i
sbatch 1.sh
cd ..
done
2. 包括了不同尺寸和温度
for m in 1 3 5 6 8 10
do
mkdir $m
cp inv2 model-1000000 data.pos sub.sh $m
cd $m
for i in 600 700 800 900 1000
do
mkdir $i
cp inv2 model-1000000 data.pos sub.sh $i
cd $i
cat > in.lmp << liz
variable x index $m
variable y index $m
variable z index $m
variable ss equal 0.001
variable tdamp equal "v_ss*100"
units metal
atom_style atomic
boundary p p p
read_data ./data.pos
mass 1 22.99
mass 2 175.00
mass 3 28.086
mass 4 16.000
replicate \$x \$y \$z
pair_style nnp SingleModel ./inv2 emap "1:Na,2:Lu,3:Si,4:O"
pair_coeff * *
thermo 1
thermo_style custom step time temp pe lx ly lz
thermo_modify format 4 %20.15g
dump 1 all custom 100 A.lammpstrj id type xu yu zu fx fy fz
velocity all create $i 87287
timestep \${ss}
fix 1 all nvt temp $i $i \${tdamp}
run 500000
liz
dsub -s sub.sh
cd ..
done
cd ..
done
3. 新的脚本,和2相似,改动了一些参数
for m in 10
do
mkdir $m
cp inv2 data.KYSO sub-md.sh $m
cd $m
for i in 600 700 800 900 1000
do
mkdir $i
cp inv2 data.KYSO sub-md.sh $i
cd $i
for j in 1 2 3 4 5
do mkdir $j
cp inv2 data.KYSO sub-md.sh $j
cd $j
cat > in.lmp << liz
variable x index $m
variable y index $m
variable z index $m
variable ss equal 0.002
variable tdamp equal "v_ss*100"
variable dmsdx equal c_1[1]
variable dmsdy equal c_1[2]
variable dmsdz equal c_1[3]
variable dmsd equal c_1[4]
variable istep equal step
variable msdx format dmsdx %16.8e
variable msdy format dmsdy %16.8e
variable msdz format dmsdz %16.8e
variable msd format dmsd %16.8e
#variable sstep format istep %-10g
units metal
atom_style atomic
boundary p p p
read_data ./data.KYSO
mass 1 39.09
mass 2 88.91
mass 3 28.084
mass 4 15.999
replicate \$x \$y \$z
pair_style nnp inv2 emap "1:K,2:Y,3:Si,4:O"
pair_coeff * *
thermo 1
thermo_style custom step time temp press pe lx ly lz
thermo_modify format 5 %20.15g
compute 1 all msd com yes
dump out all custom 100 A.lammpstrj id element xu yu zu fx fy fz
dump_modify out element K Y Si O
dump_modify out format 1 %4d
dump_modify out format 2 %4s
dump_modify out format float %16.8f
velocity all create $i $j
timestep \${ss}
fix 1 all nvt temp $i $i \${tdamp}
fix 2 all print 1 "\${istep} \${msdx} \${msdy} \${msdz} \${msd}" screen no file msd.dat
run 100000
liz
sbatch sub-md.sh
cd ..
done
cd ..
done
cd ..
done
转载请注明来源 有问题可通过github提交issue