|
LAMMPS讲解65-回转半径和扩散模拟使用LAMMPS模拟了十六烷在npt系综下的扩散系数和回转半径随时间的变化。十六烷采用OPLSAA联合原子力场。十六烷的扩散系数通过均方位移得到。在计算高分子的扩散系数是有两种方法,第一种直接计算所有原子的均方位移并对于所有原子取平均即g_1,第二种计算每个分子质心的均方位移并对所有分子取平均,即g_3。本算例对比了两种计算方法,从下图中可以看出两种计算方法在初始阶段差别很大,在足够长时间后才会重合,因此计算高分子的扩散系数或均方位移需要计算足够长时间才行。回转半径是计算每个分子的回转半径然后对所有分子取平均。算例中还输出了用于计算分子端对端距离的dump文件,通过编程可方便计算分子的端对端距离随时间的变化。端对端距离和回转半径都是描述分子所占空间大小的方法。 以下是in文件内容 # ----------------- Init Section -----------------
units real boundary p p p neighbor 3.0 bin neigh_modify every 1 delay 0 check yes atom_style full bond_style harmonic angle_style harmonic dihedral_style opls pair_style lj/cut 10.0 pair_modify mix geometric special_bonds lj/coul 0.0 0.0 0.5
# ----------------- Atom Definition Section -----------------
read_data "system.data"
# ----------------- Settings Section -----------------
pair_coeff 1 1 0.175 3.905 pair_coeff 2 2 0.118 3.905 bond_coeff 1 260.0 1.526 bond_coeff 2 260.0 1.526 angle_coeff 1 63.0 112.4 angle_coeff 2 63.0 112.4 dihedral_coeff 1 -3.4 1.25 3.1 0.0 dihedral_coeff 2 -3.4 1.25 3.1 0.0
# ----------------- Run Section -----------------
minimize 1.0e-5 1.0e-7 1000 10000 timestep 1.0 velocity all create 400 372748 rot yes loop local dist gaussian dump 1 all custom 10000 dump.lammpstrj id mol type x y z fix fxnpt all npt temp 400.0 400.0 100.0 iso 1.0 1.0 1000.0
group start id 15:36863:16 dump start start custom 200 start id mol xu yu zu dump_modify start sort id
group end id 16:36864:16 dump end end custom 200 end id mol xu yu zu dump_modify end sort id
compute cc1 all chunk/atom molecule compute gy all gyration/chunk cc1 variable gy equal ave(c_gy)
thermo 200 thermo_style custom step v_gy thermo_modify flush yes
run 500000
compute g1 all msd
compute g3 all msd/chunk cc1 variable g3 equal ave(c_g3[4])
thermo 200 thermo_style custom step c_g1[4] v_g3 v_gy thermo_modify flush yes
run 1000000
感谢鲍路瑶老师的分享,内容来自于鲍老师分享出来的资料 如有需要添加微信:lmp_zhushou 进入微信群,帮助他人,共建社区 获取完整版lammps讲义可以加微信lmp_zhushou或加入QQ群994359511 |