计算化学公社

标题: 求助Gromacs联合使用Nose-Hoover和Parrinello-Rahman [打印本页]

作者
Author:
北京的大猫    时间: 2020-7-2 20:33
标题: 求助Gromacs联合使用Nose-Hoover和Parrinello-Rahman
各位前辈好!

       我打算用gmx(version:2020.2)模拟离子液体,在能量最小化之后使用Nose-Hoover热浴和PR压浴来进行NPT模拟得到平衡构型,但是一直报错:

       “100000 steps,    100.0 ps.
        step 0Segmentation fault (core dumped)”
       我分别采用了steep和cg方法来完成最小化过程,以及emtol <1 (<0.1)这几种情况都试过,但是均无例外,全都报错,我看到了相关的帖子(http://bbs.keinsci.com/thread-15008-1-1.html)和(http://bbs.keinsci.com/thread-11759-1-1.html)为此进行了以下尝试:
       注释掉PR压浴,采用NH热浴跑NVT,不报错;
       采用PR压浴,采用Vrescale方法跑NPT,不报错;
     我想请问一下大家遇到过在gromacs中使用NH和PR联用的情况吗?我想知道这种情况的原因是什么,该怎样解决?下面是我的.mdp文件:

    ; Run parameters
integrator  = md-vv      ;velocity verlet method
nsteps      = 1000000    ;= ns
dt          = 0.001      ; 1 fs
; Output control
nstxout     = 1000       ; save coordinates every 1.0 ps
nstvout     = 1000       ; save velocities every 1.0 ps
nstenergy   = 1000       ; save energies every 1.0 ps
nstlog      = 1000       ; update log file every 1.0 ps
; Bond parameters
continuation            = no        ; non-restart
constraint_algorithm    = lincs     ; holonomic constraints
lincs_iter              = 1         ; accuracy of LINCS
lincs_order             = 4         ; also related to accuracy
; Neighborsearching
cutoff-scheme   = Verlet
ns_type         = grid      ; search neighboring grid cells
nstlist         = 10        ;
rcoulomb        = 1.2       ; short-range electrostatic cutoff (in nm)
rvdw            = 1.2       ; short-range van der Waals cutoff (in nm)
; Electrostatics
coulombtype     = P3M-AD       ; Particle Mesh Ewald for long-range electrostatics
fourierspacing  = 0.16      ; grid spacing for FFT
; Temperature coupling is on
tcoupl      = nose-hoover  ;
tc-grps     = system
tau_t       = 2.5           ; time constant, in ps
ref_t       = 1000          ; reference temperature, one for each group, in K
nsttcouple  = 100
; Pressure coupling is on
;pcoupl              = Parrinello-Rahman    ; Pressure coupling on in NPT
;pcoupltype          = isotropic             ; uniform scaling of box vectors
;tau_p               = 5.0                   ; time constant, in ps
;ref_p               = 1.0                   ; reference pressure, in bar
;compressibility     = 4.5e-5                ; isothermal compressibility of water, bar^-1
;nstpcouple          = 1
; Periodic boundary conditions
pbc     = xyz       ; 3-D PBC
; Dispersion correction
DispCorr    = EnerPres  ; account for cut-off vdW scheme
; Velocity generation
;gen_vel      = yes       ; Velocity generation is on
;gen_temp    = 1000
;gen_seed    = -1

另外,还经常遇到这种情况:
Note:The optimal PME mesh load for parallel simulations is below 0.5
  and for highly parallel simulations between 0.25 and 0.33,
  for higher performance, increase the cut-off and the PME grid spacing.


不知道怎么消除这个note,新手上路,还请多多指教。
真诚地谢谢各位老师!


作者
Author:
sobereva    时间: 2020-7-2 22:32
模拟初期、体系还没稳定的时候不应当使用PR压浴和NH热浴,这是基本常识。此阶段要用就用berendsen压浴 + V-rescale热浴
当前1 fs步长根本没必要用LINCS约束
没特殊情况甭用md-vv,又没特殊好处,功能又有限制

作者
Author:
北京的大猫    时间: 2020-7-3 12:30
sobereva 发表于 2020-7-2 22:32
模拟初期、体系还没稳定的时候不应当使用PR压浴和NH热浴,这是基本常识。此阶段要用就用berendsen压浴 + V- ...

非常感谢sob老师的回复,但是还有几个问题还需请教:
1.我把md-vv改成md(gmx迭代除了Velocity verlet算法,就只剩蛙跳算法了),并把lincs那部分去掉之后就可以运行了,但是得到了一个note,“leapfrog does not yet support Nose-Hoover chains, nhchainlength reset to 1”,这个意思就是说我用的是Nose-Hoover热浴而不是Nose-Hoover chain对吧?
2.您的意思是先用berendsen压浴 + V-rescale热浴跑到平衡,然后换到NH和PR上面来?
      
作者
Author:
sobereva    时间: 2020-7-4 05:40
北京的大猫 发表于 2020-7-3 12:30
非常感谢sob老师的回复,但是还有几个问题还需请教:
1.我把md-vv改成md(gmx迭代除了Velocity verlet算 ...

1 一般都用leap-frog算法,没特殊情况不要用别的。这个note完全不用管

2 是。但v-rescale完全可以一直用,完全没必要非得刻意切换到NH上。berendsen压浴对于一般问题其实也并不体现出什么问题,切换成PR压浴也不是绝对必要的。
作者
Author:
北京的大猫    时间: 2020-7-4 09:51
sobereva 发表于 2020-7-4 05:40
1 一般都用leap-frog算法,没特殊情况不要用别的。这个note完全不用管

2 是。但v-rescale完全可以一直 ...

谢谢sob老师耐心的解答!
作者
Author:
北京的大猫    时间: 2020-7-14 14:01
本帖最后由 北京的大猫 于 2020-7-14 14:07 编辑
sobereva 发表于 2020-7-4 05:40
1 一般都用leap-frog算法,没特殊情况不要用别的。这个note完全不用管

2 是。但v-rescale完全可以一直 ...

sob老师:
      我采用v-rescale和Berendsen压浴跑20ns得到的体系的密度和文献很接近,然后在此基础上采用NH和PR压浴体系,.mdp文件情况为:时间步长为1fs, nsttcouple=100(文献里控温0.1ps),参考温度600k,tau-t=2 PR控压,nstpcouple=1000(文献里控压间隔1.0ps),tau-p=20, 此时得到的体系会散开,调整NH和PR的参数如下:tau_t       = 2.0           ; time constant, in ps
ref_t       = 600          ; reference temperature, one for each group, in K
nsttcouple  = 100
nh-chain-length = 1         ; set 1 default
; Pressure coupling is on
pcoupl              = Parrinello-Rahman    ; Pressure coupling on in NPT
pcoupltype          = isotropic             ; uniform scaling of box vectors
tau_p               = 5.0                   ; time constant, in ps
ref_p               = 1.013                 ; reference pressure, in bar
compressibility     = 4.5e-5                ; isothermal compressibility of water, bar^-1
nstpcouple          = 1
此时得到的体系密度接近文献值,请问sob老师,出现这种情况原因是什么?还想问下分子动力学模拟培训班是啥时候?

作者
Author:
sobereva    时间: 2020-7-15 09:32
北京的大猫 发表于 2020-7-14 14:01
sob老师:
      我采用v-rescale和Berendsen压浴跑20ns得到的体系的密度和文献很接近,然后在此基础上采 ...

文献里用的tau-p本来就不合适,一般都是用2.5 ps左右。若无特殊情况,没必要改默认的nstpcouple

论坛首页公告栏已经明确写了,8月
有任何关于培训时间的问题,看科音首页
作者
Author:
北京的大猫    时间: 2020-7-15 10:15
sobereva 发表于 2020-7-15 09:32
文献里用的tau-p本来就不合适,一般都是用2.5 ps左右。若无特殊情况,没必要改默认的nstpcouple

论坛 ...

非常感谢您!
作者
Author:
肥力丝    时间: 2024-5-22 14:48
sobereva 发表于 2020-7-15 09:32
文献里用的tau-p本来就不合适,一般都是用2.5 ps左右。若无特殊情况,没必要改默认的nstpcouple

论坛 ...

请问老师,我在NPT模拟时提示  For proper integration of the Parrinello-Rahman barostat, tau-p (5)
  should be at least 20 times larger than nstpcouple*dt (0.4)
我的设置是dt=2fs,tau-P=5,我可以将tau-P改成8吗?
还是应该修改其他的参数设置?
这会对模拟结果有什么影响吗,可以忽略这个警告?
诚盼老师的解答!
作者
Author:
sobereva    时间: 2024-5-23 04:36
肥力丝 发表于 2024-5-22 14:48
请问老师,我在NPT模拟时提示  For proper integration of the Parrinello-Rahman barostat, tau-p (5)
...

不建议用那么大的tau-p
可以适度减小nstpcouple以满足提示里的要求,或者用更先进的c-rescale压浴



作者
Author:
肥力丝    时间: 2024-5-23 10:32
sobereva 发表于 2024-5-23 04:36
不建议用那么大的tau-p
可以适度减小nstpcouple以满足提示里的要求,或者用更先进的c-rescale压浴

谢谢老师的解答,请问老师nstpcouple是取的越大计算结果越合理吗?在原来不合理参数设置中没有设置nstpcouple,是默认值。在满足现在的参数下,dt=2fs,tau-P=5,nstpcouple应该取125,请问老师这样设置合理吗
作者
Author:
sobereva    时间: 2024-5-24 04:18
肥力丝 发表于 2024-5-23 10:32
谢谢老师的解答,请问老师nstpcouple是取的越大计算结果越合理吗?在原来不合理参数设置中没有设置nstpco ...

越小控压越频繁,原理上控压越准确,但耗时会越高
作者
Author:
ljh123    时间: 2025-12-13 00:47
sobereva 发表于 2024-5-24 04:18
越小控压越频繁,原理上控压越准确,但耗时会越高

sob老师,我一般NVT都是用CSVR热浴,而我最近的工作不仅涉及NVT还涉及了NPT。现在遇到的问题是,由于lammps中P-R压浴和N-H热浴集成在一起了,我可以对于NVT的体系(界面)用CSVR热浴,对于NPT的体系(溶液)用N-H热浴吗?这是否会被质疑呢?(没有考虑使用berendsen压浴,因为最近发现这个体系会严重高估水密度,我还没找到原因)
作者
Author:
sobereva    时间: 2025-12-13 03:52
ljh123 发表于 2025-12-13 00:47
sob老师,我一般NVT都是用CSVR热浴,而我最近的工作不仅涉及NVT还涉及了NPT。现在遇到的问题是,由于lamm ...

这种做法莫名其妙
Berendsen压浴本身原理上并不会高估水的密度,至少GROMACS里没这个问题

作者
Author:
ljh123    时间: 2025-12-13 11:22
sobereva 发表于 2025-12-13 03:52
这种做法莫名其妙
Berendsen压浴本身原理上并不会高估水的密度,至少GROMACS里没这个问题

谢谢sob老师,那我统一下做法。我也不明白berendsen怎么回事。时间耦合常数设置在1-10ps输出文件坐标都是-nan。设置在100ps能正常运行,但是水密度会达到1.3。但是改用P-R压浴就正常了。。。




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