计算化学公社

标题: 求助在水溶液中进行表面活性剂CTAB自组装模拟 [打印本页]

作者
Author:
牧生    时间: 2020-8-24 22:17
标题: 求助在水溶液中进行表面活性剂CTAB自组装模拟
新手求助,在水溶液中进行CTAB自组装模拟,步骤如下:
第一步:
通过acpype在线建立了CTAB的模型,复制如下文件为CTAB_GMX.top,CTAB_GMX.gro,CTAB_GMX.itp到一个目录下面,并复制tip4p.itp文件到该目录下,

第二步:
然后建立盒子并插入CTAB离子10个   

gmx insert-molecules -ci CTAB_GMX.gro -nmol 10 -box 5 5 5 -o CTAB_GMX-box.gro      

得到含有10个ctab离子的盒子CTAB_GMX-box.gro   ,
此处有另一个疑问,使用insert 命令指定向CTAB_GMX-box.gro的盒子里面再继续插入10个的分子,命令是怎么写的?
或者如何做到同时向一个空盒子插入两种不同的分子。
我目前只会上面这个建立空盒子并插入一种分子。

第二步:
使用水进行填充

gmx solvate -cp CTAB_GMX-box.gro -cs tip4p.gro -p CTAB_GMX.top -o CTAB_solv.gro



得到CTAB的水盒子如图
(, 下载次数 Times of downloads: 20)

第四步:
下一步进行能量最小化

建立em.mdp
内容如下:
define          = -DFLEXIBLE


integrator      = steep
emtol           = 250.0
nsteps          = 5000
nstenergy       = 1
energygrps      = System


nstlist         = 10
ns_type         = grid
coulombtype     = PME
rlist           = 1.0
rcoulomb        = 1.0
rvdw            = 1.0
constraints     = none
pbc             = xyz
cutoff-scheme= Verlet




第五步然后运行
gmx grompp -f em.mdp -c CTAB_solv.gro -p CTAB_GMX.top -o ion.tpr
报错为
Setting the LD random seed to 303945959
Generated 10 of the 10 non-bonded parameter combinations
Generating 1-4 interactions: fudge = 0.5
Generated 10 of the 10 1-4 parameter combinations
Excluding 3 bonded neighbours molecule type 'CTAB'

ERROR 1 [file CTAB_GMX.top, line 16]:
  No such moleculetype SOL    #这里报错,看起来原因是CTAB_GMX.top中没有定义水分子,   


第七步
如下为修改后的top文件;

; CTAB_GMX.top created by acpype (v: 2019-07-10T18:04:00UTC) on Fri Aug 14 06:29:50 2020

[ defaults ]
; nbfunc        comb-rule       gen-pairs       fudgeLJ fudgeQQ
1               2               yes             0.5     0.8333

; Include CTAB_GMX.itp topology
#include "CTAB_GMX.itp"
#include "tip4p.itp"  
#include "tip4p.itp"               #修改top文件,在这里加上了#include "tip4p.itp"
[ system ]
CTAB in water

[ molecules ]
; Compound        nmols
CTAB             1     
SOL              3923



重新运行gmx grompp -f em.mdp -c CTAB_solv.gro -p CTAB_GMX.top -o ion.tpr仍然报错

  gmx grompp -f em.mdp -c CTAB_solv.gro -p CTAB_GMX.top -o ion.tpr


Setting the LD random seed to -550305329
Generated 10 of the 10 non-bonded parameter combinations
Generating 1-4 interactions: fudge = 0.5
Generated 10 of the 10 1-4 parameter combinations


ERROR 1 [file tip4p.itp, line 10]:
  Atomtype OWT4 not foundAtomtype OWT4 not found                      #看起来仍然是引用水是有问题的,但是include我没觉得有什么问题啊,tip4p.itp也在同一个文件夹下面。



己网上搜索以及摸索的解决方法:;

; CTAB_GMX.top created by acpype (v: 2019-07-10T18:04:00UTC) on Fri Aug 14 06:29:50 2020

[ defaults ]
; nbfunc        comb-rule       gen-pairs       fudgeLJ fudgeQQ
1               2               yes             0.5     0.8333
此处应该加上[ atomtypes ],但是这里的参数从哪里找啊(似乎从CTAB_GMX.top直接复制过来是不对的)。附上我的那个文件夹,请帮忙看一下;
; Include CTAB_GMX.itp topology
#include "CTAB_GMX.itp"
#include "tip4p.itp"
[ system ]
CTAB in water

[ molecules ]
; Compound        nmols
CTAB             1     
SOL              3927


(, 下载次数 Times of downloads: 203)





作者
Author:
Lacrimosa    时间: 2020-8-25 11:53
打开Amberff中的ffnonbonded.itp文件,然后打开itp4p.itp文件,找出对应的原子类型,然后放到CTAB_GMX.ITP文件中相应的位置即可。
作者
Author:
liuyuje714    时间: 2020-8-25 12:22
(, 下载次数 Times of downloads: 32)

作者
Author:
牧生    时间: 2020-8-25 13:18
liuyuje714 发表于 2020-8-25 12:22

将amber99sb-ildn.ff目录下的forcefield.itp和tip4p.itp拷到当前目录下,修改top文件为如下内容,


; CTAB_GMX.top created by acpype (v: 2019-07-10T18:04:00UTC) on Fri Aug 14 06:29:50 2020

[ defaults ]
; nbfunc        comb-rule       gen-pairs       fudgeLJ fudgeQQ
1               2               yes             0.5     0.8333

#include "forcefield.itp"

; Include CTAB_GMX.itp topology
#include "CTAB_GMX.itp"
#include "tip4p.itp"  

[ system ]
CTAB in water

[ molecules ]
; Compound        nmols
CTAB             10     
SOL              3923


结果还是报错


  gmx grompp -f em.mdp -c CTAB_solv.gro -p CTAB_GMX.top -o ion.tpr

Setting the LD random seed to 2113258257

-------------------------------------------------------
Program:     gmx grompp, version 2019.3
Source file: src\gromacs\gmxpreprocess\topio.cpp (line 641)

Fatal error:
Syntax error - File forcefield.itp, line 1                     
Last line read:
'********************************************************************'              

Found a second defaults directive.





作者
Author:
liuyuje714    时间: 2020-8-25 13:20
本帖最后由 liuyuje714 于 2020-8-25 13:28 编辑
牧生 发表于 2020-8-25 13:18
将amber99sb-ildn.ff目录下的forcefield.itp和tip4p.itp拷到当前目录下,修改top文件为如下内容,

我那几个横线每一个都不是白画的,你要认真看区别。还有我可没让你复制这些文件到当前目录,你又不改这些文件,不要画蛇添足。
作者
Author:
牧生    时间: 2020-8-25 14:07
本帖最后由 牧生 于 2020-8-25 14:10 编辑
liuyuje714 发表于 2020-8-25 13:20
我那几个横线每一个都不是白画的,你要认真看区别。还有我可没让你复制这些文件到当前目录,你又不改这些 ...

首先感谢你的回复。
现在的操作以及我的理解如下:

; CTAB_GMX.top created by acpype (v: 2019-07-10T18:04:00UTC) on Fri Aug 14 06:29:50 2020

[ defaults ]
; nbfunc        comb-rule       gen-pairs       fudgeLJ fudgeQQ
;1               2               yes             0.5     0.8333           我的理解是,注释这一行

#include "amber99sb-ildn.ff/forcefield.itp"     我的理解是,添加这一行

; Include CTAB_GMX.itp topology
#include "CTAB_GMX.itp"
#include "amber99sb-ildn.ff/tip4p.itp"    我的理解是,添加这一行

[ system ]
CTAB in water

[ molecules ]
; Compound        nmols
CTAB             10                      ctab应该是10个
SOL              3923

得到的结果是

Program:     gmx grompp, version 2019.3
Source file: src\gromacs\gmxpreprocess\topio.cpp (line 641)

Fatal error:
Syntax error - File forcefield.itp, line 2
Last line read:
'* The original ffamber ports were written by Eric J. Sorin,        *'
Found a second defaults directive.
                          无论是win还是centos下,都是相同的语法错误。
作者
Author:
liuyuje714    时间: 2020-8-25 14:12
牧生 发表于 2020-8-25 14:07
首先感谢你的回复。
现在的操作以及我的理解如下:

defaults你还是没注释掉。
作者
Author:
牧生    时间: 2020-8-25 14:35
liuyuje714 发表于 2020-8-25 14:12
defaults你还是没注释掉。

万分感谢。。
作者
Author:
yangqian    时间: 2024-7-13 14:55
你好楼主,最近我正在尝试带一个负电荷的60个表面活性剂sds分子在水中自组装模拟,盒子大小为8nm3。我根据查阅文件用gromos54a7立场进行,在ATB上下载带一个负电荷 sds的全原子pdb和itp文件后利用gmx editconf -f sds.pdb -o sds.gro成功得到了gro文件,并且自己写了一个top文件。后续根据你这条帖子的操作成功顺利进行了电荷中和、em、nvt、npt和mdrun 100ns。但是结果不尽人意,跑出来的结果总是几个小型无规则聚集体而无法聚集成一整个胶束。我目前能分析的原因可能是mdp文件参数设定的问题,以下是我em、nvt、npt、md的mdp文件内容和模拟100ns后的图,请教一下参数应该如何修改?非常感谢




欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3