|
体系是上层为溶液,下层基底为固体,利用LAMMPS想要计算溶液中离子自运行100wstep后的MSD,因此lammps中的输入文件为运行100w步后的restart.文件,LAMMPS manual关于msd命令说是“The displacement of an atom is from its reference position. This is normally the original position at the time the compute command was issued, unless the average keyword is set to yes. ”将命令发出时刻的原子位置作为起始参考位置,所以MSD应该起始时刻应该是0,但我计算后的结果起始时刻的MSD不为零,并且此时的MSD数值对应的是把最初0step时的位置作为起始参考位置所得到的值,而不是把我输入的100wstep文件作为起始位置,想问下大家是什么原因呢?
以下是我的lammps code,我是将溶液中的离子按照距离表面的距离分到了不同的group里分别计算MSD,最后再附上其中一个group的MSD计算结果图:
- #Basic setup
- units real
- boundary p p p
- atom_style full
- bond_style harmonic
- angle_style harmonic
- pair_style lj/cut/coul/long 12.5
- timestep 1
- neighbor 2 bin
- neigh_modify every 2 delay 0 check yes one 3000
- #Structure
- read_restart restart.1000000
- pair_modify mix arithmetic
- kspace_style ewald 1.0e-4
- #Solution atom group
- group Na type 5
- group O* type 7
- group h* type 8
- group Cu type 10
- group Cl type 9
- #N-A-S-H group
- group Al type 2
- group Si type 1
- group O type 3 4
- group H type 6
- group Geopolymer union Al Si O H Na
- group Solution subtract all Geopolymer
- #divide the system into surface and solution part
- region surface_part block INF INF INF INF 22 30 units box
- group Surface_atom region surface_part
- region solution_part_1 block INF INF INF INF 30 35 units box
- group Solution_atom_1 region solution_part_1
- region solution_part_2 block INF INF INF INF 35 40 units box
- group Solution_atom_2 region solution_part_2
- region solution_part_3 block INF INF INF INF 40 45 units box
- group Solution_atom_3 region solution_part_3
- region solution_part_4 block INF INF INF INF 45 50 units box
- group Solution_atom_4 region solution_part_4
- #puts the Cu atoms into different part
- group Cu_surface intersect Surface_atom Cu
- group Cu_solution_1 intersect Solution_atom_1 Cu
- group Cu_solution_2 intersect Solution_atom_2 Cu
- group Cu_solution_3 intersect Solution_atom_3 Cu
- group Cu_solution_4 intersect Solution_atom_4 Cu
- #initial temperature
- velocity all create 300 39849 mom yes rot yes dist gaussian
- #Thermo outputs
- thermo 100
- thermo_style custom step temp pe ke
- #rising temperature
- fix 1 all nvt temp 300 300 1
- #计算Cu离子的surface part MSD
- #modified code
- compute MSD1 Cu_surface msd com yes
- fix 2 Cu_surface ave/time 100 5 500 c_MSD1[1] c_MSD1[2] c_MSD1[3] c_MSD1[4] file Cu_msd_surface.data mode scalar
- #计算Cu离子的solution part MSD
- compute MSD2 Cu_solution_1 msd com yes
- fix 3 Cu_solution_1 ave/time 100 5 500 c_MSD2[1] c_MSD2[2] c_MSD2[3] c_MSD2[4] file Cu_msd_solution_1.data mode scalar
- #计算Cu离子的solution part MSD
- compute MSD3 Cu_solution_2 msd com yes
- fix 4 Cu_solution_2 ave/time 100 5 500 c_MSD3[1] c_MSD3[2] c_MSD3[3] c_MSD3[4] file Cu_msd_solution_2.data mode scalar
- #计算Cu离子的solution part MSD
- compute MSD4 Cu_solution_3 msd com yes
- fix 5 Cu_solution_3 ave/time 100 5 500 c_MSD4[1] c_MSD4[2] c_MSD4[3] c_MSD4[4] file Cu_msd_solution_3.data mode scalar
- #计算Cu离子的solution part MSD
- compute MSD5 Cu_solution_4 msd com yes
- fix 6 Cu_solution_4 ave/time 100 5 500 c_MSD5[1] c_MSD5[2] c_MSD5[3] c_MSD5[4] file Cu_msd_solution_4.data mode scalar
- #dump
- dump 1 all custom 100000 A1.sputter id type x y z
- run 1000000
- write_restart restart.2000000
复制代码
|
|