计算化学公社

标题: 计算乙烯在ZIF-8的无限稀释时检查无报错,但平衡和产品为什么不能完整跑完呢 [打印本页]

作者
Author:
笨笨鸟    时间: 2025-6-20 11:23
标题: 计算乙烯在ZIF-8的无限稀释时检查无报错,但平衡和产品为什么不能完整跑完呢
用gromacs515跑乙烯在ZIF-8的无限稀时平衡打算跑10ns,产品跑60ns,仅在top文件中修改了乙烯间的epsilon为0,平衡时有eql.xtc、eql.tpr、eql.edr文件生成,但只跑了几百皮秒就终止了,没有.gro和.cpt生成。用gmx mdrun -deffnm eql -ntmpi 8 -ntomp 2 -npme 2 -cpi eql.cpt -noappend -v强制生成,但产品文件也会遇到相同的问题。检查输出slurm-17987.out为step 217400, will finish Fri Jun 20 10:59:21 2025/var/spool/slurm/slurmd/job17987/slurm_script: line 21: 3568748 Segmentation fault      (core dumped) gmx mdrun -deffnm eql -ntmpi 8 -ntomp 2 -npme 2 -cpi eql.cpt -noappend -v,轨迹没有问题,请问这是什么原因呢,内存分配太少了吗?
eql.mdp文件如下:integrator               = md
tinit                    = 0
dt                       = 0.001
nsteps                   = 10000000  ; 10ns

nstxout                  = 0
nstvout                  = 0
nstfout                  = 0
nstlog                   = 50000
nstenergy                = 1000
nstxout-compressed       = 10000
compressed-x-grps        = system

cutoff-scheme            = Verlet   
pbc                      = xyz
rlist                    = 1.4  

coulombtype              = PME
rcoulomb                 = 1.4  

vdw-type                 = cut-off   
rvdw-switch              = 1.0   
rvdw                     = 1.4
DispCorr                 = EnerPres

tcoupl                   = v-rescale
tc-grps                  = MOL  C2H4
tau_t                    = 0.2 0.2
ref_t                    = 308 308

constraints              = hbonds
constraint_algorithm     = lincs

freezegrps    = Zn
freezedim     = Y  Y  Y

periodic-molecules       = yes   

gmx.slurm文件如下:
#!/bin/bash
#SBATCH -N 1
#SBATCH -n 16
#SBATCH -p cpu
#SBATCH -J nvt_50
#SBATCH --exclude=compute-0-13
##Environment setting for Gromacs

# cd $SLURM_SUBMIT_DIR

set -e

# source /home/public/apps/intel/18/compilers_and_libraries_2018.5.274/linux/bin/iccvars.sh intel64
# scl enable devtoolset-9 bash
source /home/public/apps/gromacs515/run_env

export GMX_CUDA_GRAPH=1

#检查当前目录下是否存在 em、eql 和 prd 三个目录。如果某个目录不存在,则创建该目录
if [ ! -d "./em" ];then
    mkdir ./em
fi
if [ ! -d "./eql" ];then
    mkdir ./eql
fi
if [ ! -d "./prd" ];then
    mkdir ./prd
fi

gmx grompp -f mdp/em.mdp -c top/ZIF-8-C2H4.gro -p top/ZIF-8_C2H4.top -o em/em -maxwarn 1 -n top/ZIF-8.ndx
cd em
gmx mdrun -deffnm em -nt 16
cd ..
rm -rf mdout.mdp

gmx grompp -f mdp/eql.mdp -c em/em.gro -t em/em.trr -p top/ZIF-8_C2H4.top -o eql/eql -maxwarn 1 -n top/ZIF-8.ndx
cd eql
gmx mdrun -deffnm eql -nt 16
cd ..
rm -rf mdout.mdp

gmx grompp -f mdp/prd.mdp -c eql/eql.gro -t eql/eql -p top/ZIF-8_C2H4.top -o prd/prd -maxwarn 1 -n top/ZIF-8.ndx
cd prd
gmx mdrun -deffnm prd -nt 16
cd ..
rm -rf mdout.mdp


top文件中将乙烯间的epsilon为0这行注释,模拟可正常运行,若在eql.mdp文件末尾加上energygrps=C2H4
energygrp-excl=C2H4 C2H4会有如下警告:
WARNING 1 [file mdp/eql.mdp]:
Can not exclude the lattice Coulomb energy between energy groups
WARNING 2 [file mdp/eql.mdp]:
The sum of the two largest charge group radii (3.368419)is larger than
rlist(1.400000)
接着 删除energygrp-excl = C2H4 C2H4后报错
Fatal error:
There is no domain decomposition for 16 ranks that is compatible with the given box and a minimum cell size of 0.87525nm
Change the number ofranks or mdrun option -rdd or -dds
Look in the log file for details on the domain decomposition
核数减小为4后报错
Program gmx mdrun,VERSION 5.1.5
Source code file: /home/public/all/gro/gromacs-5.1.5/src/gromacs/ewald/pme-redistribute.cpp, line: 276
Fatal error:
1 particles communicated to PME rank 1 are more than 2/3 times the cut-off out of the domain decomposition cell of
stheir charge group in dimension y.
This usually means that your system is not well equilibrated.
请问各位大佬,我的脚本里是哪些参数不合理吗,应该怎样修改呢?

作者
Author:
sobereva    时间: 2025-6-22 07:18
这种事99.9%的概率是动力学模拟崩溃,其中又有99.9%的概率是拓扑文件不当所致。跟内存不够没关系,本来gromacs就不怎么耗内存
参考http://sobereva.com/soft/Sobtop#FAQ8仔细检查拓扑文件
作者
Author:
笨笨鸟    时间: 2025-6-22 09:17
sobereva 发表于 2025-6-22 07:18
这种事99.9%的概率是动力学模拟崩溃,其中又有99.9%的概率是拓扑文件不当所致。跟内存不够没关系,本来grom ...

社长,我把top文件中的非键参数一行注释即不改epsilon,是可以正常运行的。但无限稀需要消除分子间作用力,epsilon必须为0,而改了之后模拟又会崩溃,请问跑无限稀有没有其他推荐的方法呢?
作者
Author:
sobereva    时间: 2025-6-23 05:47
笨笨鸟 发表于 2025-6-22 09:17
社长,我把top文件中的非键参数一行注释即不改epsilon,是可以正常运行的。但无限稀需要消除分子间作用力 ...

无限稀不是靠改这个来体现的,而是模型上体现的。可以不同浓度下计算,做外推得到无限稀的结果




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