LHB_SCZ 2023-09-08 15:03 采纳率: 20%
浏览 44
已结题

在lammps中采用oplsaa力场制备聚合物基底遇到的问题?

想用lammps模拟水在聚乙烯表面的润湿
基底PE;力场是OPLSAA
水的力场用SPC/E
基底和水之间为12-6 L-J
xy为周期性边界,Z方向非周期性
在聚合物基底建模时遇到了问题
问题1
按照以下过程建模,在lammps中压缩聚合物时报错“bond missing”

    1. 先在MS中建立的PE链,并构建了盒子

img

    1. 根据这个帖子https://blog.csdn.net/qq_43689832/article/details/127913687的方法更改了 C 和 H 的力场为oplsaa中"81"和"85“
    1. 根据“https://zhuanlan.zhihu.com/p/625294161”的方法,去掉了盒子后导出的 .car,用msi2lmp转换成了data文件

./msi2lmp.exe PE -i -class 1 -frc cvff > data.P
    1. 利用ltemplify.py,由data文件生成lt文件
./ltemplify.py -name "Mol inherits OPLSAA" -ignore-angles -ignore-bond-types -ignore-coeffs PE.data >> PE.lt

    1. 在上面的 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信息,我自己手动添加的

    1. 仍然根据“https://zhuanlan.zhihu.com/p/625294161”提到的教程,将边界条件设置成ppf(因为在lammps中使用oplsaa力场需要设置kspace,因此必须用周期性边界),然后在z方向使用wall/reflet压缩聚合物,运行几步就报错“bond missing”
      in 文件
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同理)

img

请问有人做过这种建模吗?可否帮忙解答一下,或者提供有偿答疑?

  • 写回答

13条回答 默认 最新

  • Leodong. 2023-09-08 16:57
    关注
    获得0.60元问题酬金

    该回答通过自己思路及引用到GPTᴼᴾᴱᴺᴬᴵ搜索,得到内容具体如下:
    【问题1解答】:在构建system.lt时,可以尝试将聚合物的链状结构修改为周期性边界条件。具体操作如下:
    1、 首先,需要在聚合物链的两端添加周期性边界条件。可以通过在原子类型中添加ppf关键字来实现。例如,可以将原子类型设置为:

    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
    

    2、 然后,需要修改system.lt文件中的力场定义。在定义oplsaa力场时,需要指定周期性边界条件。例如,可以将oplsaa力场定义为:

    {
                                                                                                
    "force":{
            "
        "interaction\":", "lj", "
      "kspace\":", "ewald", "
    ">>>>>>>>>>>>>>>>>>", "ppf", "
    &&&&&&&&&&&&&&&&&", "p", "
    &&&&&&&&", "p", "
    •••••", "f", "
    "},
        
    "pair":{...}
    }
    

    其中,kspace部分需要指定周期性边界条件为ppf。这样,在运行moltemplate.sh生成新的data文件后,应该可以解决“bond missing”的问题。

    【问题2解答】:
    关于上下板的建模方式,可以尝试将聚合物链的两端添加周期性边界条件,然后在z方向上使用wall/reflect压缩聚合物。具体操作可以参考问题1的解答。

    至于墙壁材料的选择,聚乙烯是一种常用的聚合物材料,但是使用其他材料(如PVC)也是可以的。只要确保所选材料的物理和化学性质与实际应用场景相符即可。


    如果以上回答对您有所帮助,点击一下采纳该答案~谢谢

    评论 编辑记录

报告相同问题?

问题事件

  • 系统已结题 9月16日
  • 修改了问题 9月8日
  • 创建了问题 9月8日

悬赏问题

  • ¥15 C++识别堆叠物体异常
  • ¥15 音量自动减小啦!日历自动翻页
  • ¥15 微软硬件驱动认证账号申请
  • ¥15 有人知道怎么在R语言里下载Git上的miceco这个包吗
  • ¥15 GPT写作提示指令词
  • ¥20 根据动态演化博弈支付矩阵完成复制动态方程求解和演化相图分析等
  • ¥20 关于DAC输出1.000V对分辨率和精度的要求
  • ¥15 华为超融合部署环境下RedHat虚拟机分区扩容问题
  • ¥15 哪位能做百度地图导航触点播报?
  • ¥15 请问GPT语言模型怎么训练?