计算化学公社

 找回密码 Forget password
 注册 Register
Views: 16957|回复 Reply: 10
打印 Print 上一主题 Last thread 下一主题 Next thread

[GROMACS] [已解决]使用packmol建立的模型,在mdrun的时候,因能量太大而无法继续

[复制链接 Copy URL]

1480

帖子

0

威望

4550

eV
积分
6030

Level 6 (一方通行)

本帖最后由 牧生 于 2021-1-25 16:34 编辑

使用讲义中的水和尿素两相体系进行md过程,是没有报错的,证明我的操作基本是行得通的。

自己使用表面活性剂,如CTABinsert-molecules的方式向盒子中加入分子,再进行MD,整个过程是行得通的,结果中也观察得到了球形胶束。。

但自己进行表面活性剂,使用packmol建模后进行操作,就出现了错误。具体如下:

①        以MS画出了CTAB的分子式,存为pdb格式,
②        上传http://bio2byte.be/acpype/,手动设为电荷为1,获得top,gro,itp文件
③        将MS得到的CTAB.pdb,使用packmol建立一个圆柱状的模型,其中CTAB不是很致密,
tolerance 2.0                        
add_box_sides 1.2
output mix.pdb
structure CTAB.pdb
  number 100
  inside cylinder 0. 0. 0. 100. 0. 0. 30. 100.
end structure

得到圆柱的pdb文件如图所示,

④        加入水
gmx solvate -cp mix.pdb -cs tip4p.gro -p CTAB_GMX.top -o CTAB_solv.gro

修改top文件中的CTAB为100
引入力场
#include "oplsaa.ff/forcefield.itp"
#include "CTAB_GMX.itp"
#include "oplsaa.ff/tip4p.itp"   

⑤能量最小                     #初步觉得能量最小这一步有问题,但是看起来,自己又看不出问题
define =
integrator = steep
emtol = 100.0
emstep = 0.01
nsteps = 10000
; output frequency
nstxout = 5000
nstvout = 5000
nstfout = 5000
nstlog = 5000
nstenergy = 5000
nstxtcout =5000
xtc_grps = system
nstlist = 10
pbc = xyz
rlist = 1.2
cutoff-scheme = Verlet   
coulombtype = PME
rcoulomb = 1.2
vdwtype = cut-off
rvdw = 1.2
DispCorr = EnerPres
constraints = none
constraint_algorithm = LINCS
implicit_solvent = no
E_x =
E_y =
E_z =

gmx grompp -f em.mdp -c CTAB_solv.gro -p CTAB_GMX.top -o CTAB.tpr -maxwarn 2
gmx mdrun -deffnm CTAB -v

⑥加入离子,使电荷平衡
gmx genion -s CTAB.tpr -o CTAB-b4em.gro -neutral -p CTAB_GMX.top

再向top里面加入
#include "oplsaa.ff/ions.itp"

再进行能量最小
gmx grompp -f em.mdp -c CTAB-b4em.gro -p CTAB_GMX.top -o em-sol.tpr
gmx mdrun -deffnm em-sol –v


得到potential

⑦  进行nvt预平衡
;define=
cutoff-scheme= Verlet
integrator= md
dt = 0.001
nsteps = 50000
nstxout= 500
nstvout= 500
nstenergy= 500
nstlog= 500
energygrps =system
nstlist= 10
ns_type = grid
pbc= xyz
rlist= 1.0
coulombtype= PME
pme_order= 4
fourierspacing= 0.16
rcoulomb= 1.0
vdw-type= Cut-off
rvdw= 1.0
tcoupl = v-rescale
tc-grps= system
tau_t= 0.1
ref_t= 300
DispCorr= EnerPres
pcoupl = no
gen_vel = no
gen_temp = 300
gen_seed  = -1   
constraints = hbonds
continuation= no
constraint_algorithm= lincs
lincs_iter = 1
lincs_order= 4



出现错误
Step 0, time 0 (ps)  LINCS WARNING
relative constraint deviation after LINCS:
rms 0.080675, max 3.668313 (between atoms 8436 and 8461)
bonds that rotated more than 30 degrees:
atom 1 atom 2  angle  previous, current, constraint length

Back Off! I just backed up step0b.pdb to ./#step0b.pdb.1#

Back Off! I just backed up step0c.pdb to ./#step0c.pdb.1#
Wrote pdb files with previous and current coordinates
starting mdrun 'CTABMS in water'
50000 steps,     50.0 ps.

WARNING: Listed nonbonded interaction between particles 8314 and 8317
at distance 2.225 which is larger than the table limit 2.098 nm.

This is likely either a 1,4 interaction, or a listed interaction inside
a smaller molecule you are decoupling during a free energy calculation.
Since interactions at distances beyond the table cannot be computed,
they are skipped until they are inside the table limit again. You will
only see this message once, even if it occurs for several interactions.

IMPORTANT: This should not happen in a stable simulation, so there is
probably something wrong with your system. Only change the table-extension
distance in the mdp file if you are really sure that is the reason.



WARNING: Listed nonbonded interaction between particles 6651 and 6654
at distance 2.126 which is larger than the table limit 2.098 nm.

This is likely either a 1,4 interaction, or a listed interaction inside
a smaller molecule you are decoupling during a free energy calculation.
Since interactions at distances beyond the table cannot be computed,
they are skipped until they are inside the table limit again. You will
only see this message once, even if it occurs for several interactions.

IMPORTANT: This should not happen in a stable simulation, so there is
probably something wrong with your system. Only change the table-extension
distance in the mdp file if you are really sure that is the reason.



WARNING: Listed nonbonded interaction between particles 7999 and 8030
at distance 2.285 which is larger than the table limit 2.098 nm.

This is likely either a 1,4 interaction, or a listed interaction inside
a smaller molecule you are decoupling during a free energy calculation.
Since interactions at distances beyond the table cannot be computed,
they are skipped until they are inside the table limit again. You will
only see this message once, even if it occurs for several interactions.

IMPORTANT: This should not happen in a stable simulation, so there is
probably something wrong with your system. Only change the table-extension
distance in the mdp file if you are really sure that is the reason.



-------------------------------------------------------
Program:     gmx mdrun, version 2019.6
Source file: src\gromacs\mdlib\sim_util.cpp (line 752)

Fatal error:
Step 0: The total potential energy is 3.16378e+17, which is extremely high.                      
The LJ and electrostatic contributions to the energy are 3.1618e+17 and
-447610, respectively. A very high potential energy can be caused by
overlapping interactions in bonded interactions or very large coordinate
values. Usually this is caused by a badly- or non-equilibrated initial
configuration, incorrect interactions or parameters in the topology.                           #我知道是结构不合理导致的能量太大,但自己又不会手动去排除不合理的地方。

For more information and tips for troubleshooting, please check the GROMACS
-------------------------------------------------------

初步觉得是建立的模型有错,或者加水的时候,溶剂和溶质分子靠的太近,但是看起来没有什么明显错误,请教如何去排除不合理的地方





解决办法:在win下建立的模型,比centos下建立的模型更容易出错。相同的参数设置,在win下由于能量太大无法进行,但在centos下进行建模,就可能顺利进行。
另外,如果建立模型中分子数太多,双精度gromacs可以解决,在使用双精度能量最小化以后,再改用单精度版本进行mdrun是可行的。


又菜又爱玩

308

帖子

2

威望

3557

eV
积分
3905

Level 5 (御坂)

2#
发表于 Post on 2021-1-24 17:47:39 | 只看该作者 Only view this author
acpype是专门服务于amber系力场的,你这top中都引用了opls力场属实一大失误。

6万

帖子

99

威望

5万

eV
积分
120159

管理员

公社社长

3#
发表于 Post on 2021-1-24 18:11:33 | 只看该作者 Only view this author
acpype也同时产生OPLS-AA力场的拓扑文件,不是光用于GAFF的。只不过用acpype的人通常都用其产生的GAFF的拓扑文件,产生OPLS-AA拓扑文件另有其它诸多选择
但如果CTAB_GMX.itp对应的是GAFF的,肯定不能引OPLS-AA的相关itp
北京科音自然科学研究中心http://www.keinsci.com)致力于计算化学的发展和传播,长期开办极高质量的各种计算化学类培训:初级量子化学培训班中级量子化学培训班高级量子化学培训班量子化学波函数分析与Multiwfn程序培训班分子动力学与GROMACS培训班CP2K第一性原理计算培训班,内容介绍以及往届资料购买请点击相应链接查看。这些培训是计算化学从零快速入门以及进一步全面系统性提升研究水平的高速路!培训各种常见问题见《北京科音办的培训班FAQ》
欢迎加入北京科音微信公众号获取北京科音培训的最新消息,并避免错过网上有价值的计算化学文章!
欢迎加入人气极高、专业性特别强的理论与计算化学综合交流群思想家公社QQ群(群号见此链接),合计达一万多人。北京科音培训班的学员在群中可申请VIP头衔,提问将得到群主Sobereva的最优先解答。
思想家公社的门口Blog:http://sobereva.com(发布大量原创计算化学相关博文)
Multiwfn主页:http://sobereva.com/multiwfn(十分强大、极为流行的量子化学波函数分析程序)
Google Scholar:https://scholar.google.com/citations?user=tiKE0qkAAAAJ
ResearchGate:https://www.researchgate.net/profile/Tian_Lu

1480

帖子

0

威望

4550

eV
积分
6030

Level 6 (一方通行)

4#
 楼主 Author| 发表于 Post on 2021-1-24 18:31:23 | 只看该作者 Only view this author
重新来了一遍,引用的是amber99sb.ff力场,但是在预平衡的时候,仍然出错,仍然是由于能量太大。


1 GPU selected for this run.
Mapping of GPU IDs to the 2 GPU tasks in the 1 rank on this node:
  PP:0,PME:0
PP tasks will do (non-perturbed) short-ranged interactions on the GPU
PME tasks will do all aspects on the GPU

Step 0, time 0 (ps)  LINCS WARNING
relative constraint deviation after LINCS:
rms 0.080675, max 3.668313 (between atoms 8436 and 8461)
bonds that rotated more than 30 degrees:
atom 1 atom 2  angle  previous, current, constraint length
Wrote pdb files with previous and current coordinates
starting mdrun 'CTABMS in water'
50000 steps,     50.0 ps.

WARNING: Listed nonbonded interaction between particles 8314 and 8317
at distance 2.225 which is larger than the table limit 2.098 nm.

This is likely either a 1,4 interaction, or a listed interaction inside
a smaller molecule you are decoupling during a free energy calculation.
Since interactions at distances beyond the table cannot be computed,
they are skipped until they are inside the table limit again. You will
only see this message once, even if it occurs for several interactions.

IMPORTANT: This should not happen in a stable simulation, so there is
probably something wrong with your system. Only change the table-extension
distance in the mdp file if you are really sure that is the reason.



WARNING: Listed nonbonded interaction between particles 6651 and 6654
at distance 2.126 which is larger than the table limit 2.098 nm.

This is likely either a 1,4 interaction, or a listed interaction inside
a smaller molecule you are decoupling during a free energy calculation.
Since interactions at distances beyond the table cannot be computed,
they are skipped until they are inside the table limit again. You will
only see this message once, even if it occurs for several interactions.

IMPORTANT: This should not happen in a stable simulation, so there is
probably something wrong with your system. Only change the table-extension
distance in the mdp file if you are really sure that is the reason.



WARNING: Listed nonbonded interaction between particles 7999 and 8030
at distance 2.285 which is larger than the table limit 2.098 nm.

This is likely either a 1,4 interaction, or a listed interaction inside
a smaller molecule you are decoupling during a free energy calculation.
Since interactions at distances beyond the table cannot be computed,
they are skipped until they are inside the table limit again. You will
only see this message once, even if it occurs for several interactions.

IMPORTANT: This should not happen in a stable simulation, so there is
probably something wrong with your system. Only change the table-extension
distance in the mdp file if you are really sure that is the reason.



-------------------------------------------------------
Program:     gmx mdrun, version 2019.6
Source file: src\gromacs\mdlib\sim_util.cpp (line 752)

Fatal error:
Step 0: The total potential energy is 3.86013e+17, which is extremely high.
The LJ and electrostatic contributions to the energy are 3.85815e+17 and
-448567, respectively. A very high potential energy can be caused by
overlapping interactions in bonded interactions or very large coordinate
values. Usually this is caused by a badly- or non-equilibrated initial
configuration, incorrect interactions or parameters in the topology.

For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
-------------------------------------------------------
又菜又爱玩

374

帖子

2

威望

1539

eV
积分
1953

Level 5 (御坂)

5#
发表于 Post on 2021-1-25 05:27:18 | 只看该作者 Only view this author
你试试用双精度版本的gmx来优化

1480

帖子

0

威望

4550

eV
积分
6030

Level 6 (一方通行)

6#
 楼主 Author| 发表于 Post on 2021-1-25 16:35:07 | 只看该作者 Only view this author
wuzhiyi 发表于 2021-1-25 05:27
你试试用双精度版本的gmx来优化

双精度解决了这个问题了。
又菜又爱玩

226

帖子

0

威望

878

eV
积分
1104

Level 4 (黑子)

7#
发表于 Post on 2021-1-28 21:59:10 | 只看该作者 Only view this author
牧生 发表于 2021-1-25 16:35
双精度解决了这个问题了。

您好 我也有这个情况,请教您双精度是什么意思,该怎么操作呢

1480

帖子

0

威望

4550

eV
积分
6030

Level 6 (一方通行)

8#
 楼主 Author| 发表于 Post on 2021-1-29 06:15:50 | 只看该作者 Only view this author
本帖最后由 牧生 于 2021-1-29 07:11 编辑
sun666 发表于 2021-1-28 21:59
您好 我也有这个情况,请教您双精度是什么意思,该怎么操作呢

http://sobereva.com/457


注3:编译双精度版本     一般计算只需要按照前述编译单精度版本就够了,但如果模拟刚开始就崩溃,有时候用双精度版本可解决,但计算比单精度版慢将近一倍、trr/edr等文件体积大一倍。另外,做正则振动分析时在能量极小化和对角化Hessian矩阵的时候一般也需要用双精度版以确保数值精度。注意,编译双精度版本时不支持GPU加速。
    要编译双精度版本的话,先按照前文方式编译一遍单精度版本,毕竟这之后在研究中肯定也得用。然后再重复一遍编译过程,但是在编译FFTW时去掉--enable-float,并且在使用cmake3命令时额外加上-DGMX_DOUBLE=ON选项。双精度版本的GROMACS可执行文件是gmx_d,而单精度是gmx,因此单精度和双精度的可执行文件可以同时存在于同一目录,互不冲突。




又菜又爱玩

6

帖子

0

威望

39

eV
积分
45

Level 2 能力者

9#
发表于 Post on 2023-4-15 18:42:32 | 只看该作者 Only view this author
您好,请教您一个问题,请问可以在单精度版本的基础上编译双精度版本吗

1480

帖子

0

威望

4550

eV
积分
6030

Level 6 (一方通行)

10#
 楼主 Author| 发表于 Post on 2023-4-15 19:22:51 | 只看该作者 Only view this author
tiny 发表于 2023-4-15 18:42
您好,请教您一个问题,请问可以在单精度版本的基础上编译双精度版本吗

编译一次单精度,再编译一次双精度。这是两个独立的过程。不存在“在单精度版本的基础上编译双精度版本
又菜又爱玩

6

帖子

0

威望

39

eV
积分
45

Level 2 能力者

11#
发表于 Post on 2023-4-16 09:35:05 | 只看该作者 Only view this author
牧生 发表于 2023-4-15 19:22
编译一次单精度,再编译一次双精度。这是两个独立的过程。不存在“在单精度版本的基础上编译双精度版本[/ ...

好的 谢谢老师解答

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2025-8-16 14:01 , Processed in 0.162501 second(s), 23 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list