想用lammps模拟水在聚乙烯表面的润湿
基底PE;力场是OPLSAA
水的力场用SPC/E
基底和水之间为12-6 L-J
xy为周期性边界,Z方向非周期性
在聚合物基底建模时遇到了问题
问题1
按照以下过程建模,在lammps中压缩聚合物时报错“bond missing”
- 先在MS中建立的PE链,并构建了盒子
- 根据这个帖子https://blog.csdn.net/qq_43689832/article/details/127913687的方法更改了 C 和 H 的力场为oplsaa中"81"和"85“
- 根据“https://zhuanlan.zhihu.com/p/625294161”的方法,去掉了盒子后导出的 .car,用msi2lmp转换成了data文件
./msi2lmp.exe PE -i -class 1 -frc cvff > data.P
- 利用ltemplify.py,由data文件生成lt文件
./ltemplify.py -name "Mol inherits OPLSAA" -ignore-angles -ignore-bond-types -ignore-coeffs PE.data >> PE.lt
- 在上面的 PE.lt中添加oplsaa力场后,构建system.lt,并运行moltemplate.sh生成和新的data文件
import "PE.lt"
write_once ("Data Boundary") {
xlo xhi
ylo yhi
zlo zhi
}
molecules = new Mol
运行
moltemplate.sh system.lt
cleanup_moltemplate.sh
得到的system.data中没有improper信息,我自己手动添加的
- 仍然根据“https://zhuanlan.zhihu.com/p/625294161”提到的教程,将边界条件设置成ppf(因为在lammps中使用oplsaa力场需要设置kspace,因此必须用周期性边界),然后在z方向使用wall/reflet压缩聚合物,运行几步就报错“bond missing”
in 文件
- 仍然根据“https://zhuanlan.zhihu.com/p/625294161”提到的教程,将边界条件设置成ppf(因为在lammps中使用oplsaa力场需要设置kspace,因此必须用周期性边界),然后在z方向使用wall/reflet压缩聚合物,运行几步就报错“bond missing”
dimension 3
boundary p p f
atom_style full
units real
neighbor 0.2 bin
bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style harmonic
pair_style lj/cut/coul/long 11.0 11.0
pair_modify mix geometric
special_bonds lj/coul 0.0 0.0 0.5
kspace_style ewald 0.0001
kspace_modify slab 3.0
read_data "system.data"
mass 1 12.011 # 81_b013_a013_d013_i013
mass 2 1.008 # 85_b046_a046_d046_i046
set type 1 charge -0.12
set type 2 charge 0.06
pair_coeff 1 1 0.066 3.5
pair_coeff 2 2 0.03 2.5
pair_coeff 1 2 0.0445 2.96
bond_coeff 1 268.0 1.529
bond_coeff 2 340.0 1.09
angle_coeff 1 58.35 112.7
angle_coeff 2 33.0 107.8
angle_coeff 3 37.5 110.7
dihedral_coeff 1 1.3 -0.05 0.2 0.0
dihedral_coeff 2 0.0 0.0 0.3 0.0
dihedral_coeff 3 0.0 0.0 0.3 0.0
improper_coeff 1 10.5 180.0
min_style cg
minimize 1.0e-8 1.0e-8 1000000 1000000
velocity all create 1 4928459 dist gaussian
variable linear equal vdisplace(12,-0.01)
fix 1 all wall/reflect zhi v_linear
timestep 1 #1fs=1e-6ns
thermo 100
thermo_style custom step temp vol lx ly lz
velocity all create 1 4928459 dist gaussian
dump mydump all atom 100 dump.xyz
fix 2 all nve/limit 0.1
run 1000000 #1ns
write_data after.data
问题2
文献中(Molecular Dynamics Investigation of Nanoscale Hydrophobicity of Polymer Surfaces: What Makes Water Wet?)提到”two repulsive walls are positioned at the boundaries of the simulation cell in the z-direction, and the top repulsive wall is moved at constant velocity in the z-direction until the density of the polymer between the two repulsive walls is equal to the bulk density of the polymer; the velocity is chosen such that compression occurs over 10 ns“
我的理解是在聚合物初始建模时,在链状聚合物上下各添加一层板,导入到lammps之后用着两块板压缩聚合物,我的问题是
- 上下板的建模方式。如果还用链状的,如最上面的图,是不适合做为墙壁进行压缩吧?而且我看网上的教程一般用来做压缩的墙壁原子都是整齐排列的。所用应该如何建模呢?
- 上下板子必须要用聚乙烯吗,用别的会不会影响效果(文章中提到墙壁和聚合物之间只有排斥作用)
下图为PVC的过程(PE同理)
请问有人做过这种建模吗?可否帮忙解答一下,或者提供有偿答疑?