计算化学公社

标题: 请问大家用gromacs进行加离子操作时报错./amber14sb.ff/forcefield.itp not found [打印本页]

作者
Author:
s2023    时间: 2023-2-17 20:00
标题: 请问大家用gromacs进行加离子操作时报错./amber14sb.ff/forcefield.itp not found
请问各位老师,我在用gromacs (力场:amber14sb.ff),进行添加离子的操作时:gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr出现如下错误:
Setting the LD random seed to -1919702279

-------------------------------------------------------
Program:     gmx grompp, version 2020.7-MODIFIED
Source file: src\gromacs\gmxpreprocess\gmxcpp.cpp (line 297)

Fatal error:
Topology include file "./amber14sb.ff/forcefield.itp" not found

For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
-------------------------------------------------------
但是我在安装力场时将其放在了gromacs的路径下:D:\MD_software\gromacs\amber14sb.ff
其中ions.mdp文件是www.mdtutorials.com/gmx/complex/Files/ions.mdp


作者
Author:
Lacrimosa    时间: 2023-2-17 20:07
最简单的解决办法就是把amber14sb.ff放到你topol.top文件所在的路径下。
作者
Author:
s2023    时间: 2023-2-17 20:12
Lacrimosa 发表于 2023-2-17 20:07
最简单的解决办法就是把amber14sb.ff放到你topol.top文件所在的路径下。

放了,但还是不行
作者
Author:
s2023    时间: 2023-2-17 20:35
解决了,重新更改了所有的路径
作者
Author:
sobereva    时间: 2023-2-18 06:15
通常力场包应当放在 gromacs主目录\share\gromacs\top\下面
作者
Author:
s2023    时间: 2023-2-18 10:52
sobereva 发表于 2023-2-18 06:15
通常力场包应当放在 gromacs主目录\share\gromacs\top\下面

好的,谢谢sob老师
作者
Author:
一条君    时间: 2024-2-29 22:17
本帖最后由 一条君 于 2024-2-29 22:51 编辑
sobereva 发表于 2023-2-18 06:15
通常力场包应当放在 gromacs主目录\share\gromacs\top\下面

老师,请问(1)把力场文件夹.ff复制到了当前文件夹(.top、mdp所在文件夹)里,新加或更改的原子类型也都在当前文件夹的.ff里ffnonbonded.itp改的,那么引用forcefield.itp时路径必须写绝对路径吗?
(2)如果没写绝对路径,仍是#include "xx.ff/forcefield.itp",会有错吗?(a 这样会重复引入两次还是只读取当前文件夹下forcefield.itp呢?,重复引入两次的话会是所有参数取并集且重复定义的用最后一次的还是只是原子类型呢?b 那软件默认先引用share文件夹的还是当前目录的呢)@Lacrimosa
作者
Author:
sobereva    时间: 2024-2-29 23:27
一条君 发表于 2024-2-29 22:17
老师,请问(1)把力场文件夹.ff复制到了当前文件夹(.top、mdp所在文件夹)里,新加或更改的原子类型也 ...

如果自己修改了力场,最好复制一份、换个名字,比如加个-mod后缀,省得引入的时候弄混
作者
Author:
一条君    时间: 2024-2-29 23:57
sobereva 发表于 2024-2-29 23:27
如果自己修改了力场,最好复制一份、换个名字,比如加个-mod后缀,省得引入的时候弄混

老师,仍是#include "xx.ff/forcefield.itp"已经做了些模拟了,想知道一下最终参数,所以不知道老师能否解答一下:a 这样会重复引入两次还是只读取当前文件夹下forcefield.itp呢?,重复引入两次的话会是所有参数取并集且重复定义的用最后一次的还是只是原子类型呢?b 那软件默认先引用share文件夹的还是当前目录的呢,谢谢~
作者
Author:
sobereva    时间: 2024-3-1 00:38
一条君 发表于 2024-2-29 23:57
老师,仍是#include "xx.ff/forcefield.itp"已经做了些模拟了,想知道一下最终参数,所以不知道老师能否 ...
先搜当前目录
重复定义的取最后一次定义的
作者
Author:
一条君    时间: 2024-3-1 00:45
本帖最后由 一条君 于 2024-3-1 00:51 编辑
sobereva 发表于 2024-2-29 23:27
如果自己修改了力场,最好复制一份、换个名字,比如加个-mod后缀,省得引入的时候弄混

老师,根据手册里写的5.8 力场的组织
通过$GMXLIB/share/share/gromacs/top子目录和/或工作目录中的<name>.ff目录检测力场。关于力场文件位置的信息由pdb2gmx打印,因此可以很容易地跟踪力场的版本,  in case you have made modifications in one location or another。
运行gmx pdb2gmx,提示
From current directory:
1: OPLS-AA/L all-atom force field (2001 aminoacid dihedrals)
From '/../gmx2018.8/share/gromacs/top':
...
16: OPLS-AA/L all-atom force field (2001 aminoacid dihedrals)
选16提示
Can only select the first of multiple force field entries with directory name 'oplsaa.ff' in the list. If you want to use the next entry, run pdb2gmx in a different directory, set GMXLIB to point to the desired force field first,
and/or rename or move the force field directory present in the current working directory.
由此是否可以得出把力场文件夹.ff复制到了当前文件夹,仍写#include "xx.ff/forcefield.itp",这样会只读取当前文件夹下forcefield.itp,谢谢~
作者
Author:
一条君    时间: 2024-3-1 01:14
本帖最后由 一条君 于 2024-3-1 01:30 编辑
sobereva 发表于 2024-3-1 00:38
先搜当前目录
重复定义的取最后一次定义的

打扰老师了,
做了一下对比,应该是可以得出只读取当前文件夹下forcefield.itp
1.在share文件夹内nonbond.itp放入必须的原子类型,而当前文件夹nonbond.itp缺失该类型,运行grompp,会提示Atomtype opls_800 not found,说明没有将share内的类型合并进来
拙见,请指正,谢谢老师

——————————
手册内容好像也说明了:  If you want to modify or add a residue types, you can copy the force field directory from the GROMACS library directory to your current working directory.

作者
Author:
Lacrimosa    时间: 2024-3-1 14:18
一条君 发表于 2024-2-29 23:57
老师,仍是#include "xx.ff/forcefield.itp"已经做了些模拟了,想知道一下最终参数,所以不知道老师能否 ...

原来论坛里还可以用@摇人啊。
grompp 里有个-pp topol.top选项可以直接打印出使用的拓扑文件里的全部内容,检查一下就知道了





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