计算化学公社
标题: [已解决]使用packmol建立的模型,在mdrun的时候,因能量太大而无法继续 [打印本页]
作者Author: 牧生 时间: 2021-1-24 17:06
标题: [已解决]使用packmol建立的模型,在mdrun的时候,因能量太大而无法继续
本帖最后由 牧生 于 2021-1-25 16:34 编辑
使用讲义中的水和尿素两相体系进行md过程,是没有报错的,证明我的操作基本是行得通的。
自己使用表面活性剂,如CTAB以insert-molecules的方式向盒子中加入分子,再进行MD,整个过程是行得通的,结果中也观察得到了球形胶束。。
但自己进行表面活性剂,使用packmol建模后进行操作,就出现了错误。具体如下:
① 以MS画出了CTAB的分子式,存为pdb格式,
③ 将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文件如图所示,
(, 下载次数 Times of downloads: 51)
④ 加入水
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
(, 下载次数 Times of downloads: 33)
⑦ 进行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是可行的。
作者Author: lyj714 时间: 2021-1-24 17:47
acpype是专门服务于amber系力场的,你这top中都引用了opls力场属实一大失误。
作者Author: sobereva 时间: 2021-1-24 18:11
acpype也同时产生OPLS-AA力场的拓扑文件,不是光用于GAFF的。只不过用acpype的人通常都用其产生的GAFF的拓扑文件,产生OPLS-AA拓扑文件另有其它诸多选择
但如果CTAB_GMX.itp对应的是GAFF的,肯定不能引OPLS-AA的相关itp
作者Author: 牧生 时间: 2021-1-24 18:31
重新来了一遍,引用的是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
-------------------------------------------------------
作者Author: wuzhiyi 时间: 2021-1-25 05:27
你试试用双精度版本的gmx来优化
作者Author: 牧生 时间: 2021-1-25 16:35
双精度解决了这个问题了。
作者Author: sun666 时间: 2021-1-28 21:59
您好 我也有这个情况,请教您双精度是什么意思,该怎么操作呢
作者Author: 牧生 时间: 2021-1-29 06:15
本帖最后由 牧生 于 2021-1-29 07:11 编辑
http://sobereva.com/457
注3:编译双精度版本 一般计算只需要按照前述编译单精度版本就够了,但如果模拟刚开始就崩溃,有时候用双精度版本可解决,但计算比单精度版慢将近一倍、trr/edr等文件体积大一倍。另外,做正则振动分析时在能量极小化和对角化Hessian矩阵的时候一般也需要用双精度版以确保数值精度。注意,编译双精度版本时不支持GPU加速。
要编译双精度版本的话,先按照前文方式编译一遍单精度版本,毕竟这之后在研究中肯定也得用。然后再重复一遍编译过程,但是在编译FFTW时去掉--enable-float,并且在使用cmake3命令时额外加上-DGMX_DOUBLE=ON选项。双精度版本的GROMACS可执行文件是gmx_d,而单精度是gmx,因此单精度和双精度的可执行文件可以同时存在于同一目录,互不冲突。
作者Author: tiny 时间: 2023-4-15 18:42
您好,请教您一个问题,请问可以在单精度版本的基础上编译双精度版本吗
作者Author: 牧生 时间: 2023-4-15 19:22
编译一次单精度,再编译一次双精度。这是两个独立的过程。不存在“在单精度版本的基础上编译双精度版本”
作者Author: tiny 时间: 2023-4-16 09:35
好的 谢谢老师解答
欢迎光临 计算化学公社 (http://ccc.keinsci.com/) |
Powered by Discuz! X3.3 |