Atomtype not found even though I #included the itp file

GROMACS version: 2022
GROMACS modification: No

Hello!
I am trying to build a topology that includes a protein, water, ions, and a custom urea molecule with parameters specified in an itp file that I #included in forcefield.itp. pdb2gmx builts topol.top just fine, but when I try to grompp it, it complains that one of the urea atom types is missing, even though the itp file with the atom is included AND I have added the urea atoms to the atomtypes.atp file and I have added the atom types to the aminoacids.rtp file. I am using AMBER ff14sb_OL15 for the protein and TIP3P water. If I try to #include the urea itp file before including the rest of the stuff in the forcefield.itp file, it complains that the [ molecule type ] directive is out of order. I’m not sure how to resolve this problem. Please help! The urea itp file is below just in case, and it comes from the Smith group via Joan-Emma Shea’s group (in the SI of a paper).

Thank you,
Dan

; .itp file for Urea Smith

[ moleculetype ]

; Name nrexcl
UR 3

[ atoms ]
; nr type resnr residu atom cgnr charge mass
1 CUR 1 UR C 1 0.921 12.0107
2 OUR 1 UR O 1 -0.675 15.99940
3 NUR 1 UR N1 1 -0.693 14.0067
4 HUR 1 UR H1 1 0.285 1.008
5 HUR 1 UR H2 1 0.285 1.008
6 NUR 1 UR N2 1 -0.693 14.0067
7 HUR 1 UR H3 1 0.285 1.008
8 HUR 1 UR H4 1 0.285 1.008

[ bonds ]
; ai aj funct b0 kb
1 2 1 0.1265 1.3100e+07
1 3 1 0.135 1.0300e+07
1 6 1 0.135 1.0300e+07
3 4 1 0.100 1.8700e+07
3 5 1 0.100 1.8700e+07
6 7 1 0.100 1.8700e+07
6 8 1 0.100 1.8700e+07

[ angles ]
; ai aj ak funct theta kb
1 3 4 1 120.0 390.0
1 3 5 1 120.0 390.0
1 6 7 1 120.0 390.0
1 6 8 1 120.0 390.0
4 3 5 1 120.0 445.0
7 6 8 1 120.0 445.0
3 1 6 1 117.2 670.0
2 1 3 1 121.4 730.0
2 1 6 1 121.4 730.0

[ dihedrals ]
; ai aj ak al funct phi cp mult
2 1 3 4 1 180.0 33.5 2
2 1 3 5 1 180.0 33.5 2
2 1 6 7 1 180.0 33.5 2
2 1 6 8 1 180.0 33.5 2
4 3 1 6 1 180.0 33.5 2
5 3 1 6 1 180.0 33.5 2
7 6 1 3 1 180.0 33.5 2
8 6 1 3 1 180.0 33.5 2

[ dihedrals ]
; ai aj ak al funct phi cp mult
3 4 5 1 2 0.0 167.4
6 7 8 1 2 0.0 167.4
1 3 6 2 2 0.0 167.4

You’ll need to supply us with the actual system topology (.top) file, and the file that contains the associated parameters for urea. The .itp file of urea itself does not provide anything useful, and .atp and .rtp files are irrelevant once processed by pdb2gmx.

Oh ok, no problem. Here is the topology: (the urea_smith.itp file is #included in forcefield.itp). I don’t know what you mean by “file that contains the associated parameters for urea” - that IS the itp file as far as I understand…The itp file was all the authors provided so it’s all I have.

;
; File ‘topol.top’ was generated
; By user: dk758 (15224)
; On host: grace2.grace.hpc.yale.internal
; At date: Tue May 31 12:25:17 2022
;
; This is a standalone topology file
;
; Created by:
; :-) GROMACS - gmx pdb2gmx, 2022.1 (-:
;
; Executable: /gpfs/loomis/project/hammes_schiffer/as3586/shslocal/apps/gromacs/bin/gmx
; Data prefix: /gpfs/loomis/project/hammes_schiffer/as3586/shslocal/apps/gromacs
; Working dir: /gpfs/loomis/project/hammes_schiffer/dk758/ureaTMAO
; Command line:
; gmx pdb2gmx -f LK7B_8MUrea_tip3p_1nm.pdb
; Force field was read from the standard GROMACS share directory.
;

; Include forcefield parameters
#include “amber14sb_OL15.ff/forcefield.itp”

; Include chain topologies
#include “topol_Ion_chain_A.itp”
#include “topol_Other_chain_C.itp”
#include “topol_Protein_chain_A2.itp”

; Include water topology
#include “amber14sb_OL15.ff/tip3p.itp”

#ifdef POSRES_WATER
; Position restraint for each water oxygen
[ position_restraints ]
; i funct fcx fcy fcz
1 1 1000 1000 1000
#endif

; Include topology for ions
#include “amber14sb_OL15.ff/ions.itp”

[ system ]
; Name
Protein

[ molecules ]
; Compound #mols
Ion_chain_A 1
Other_chain_C 1
Protein_chain_A2 1
SOL 997

There are parameters defined in the urea .itp file. The atom types CUR, OUR, NUR, and HUR had to be added to the .atp file, as you said above, which means that they are not standard in the force field (this is your first clue that something was going to be wrong later on). They must therefore be defined in [atomtypes] in ffnonbonded.itp and the relevant bonded parameters must be added to ffbonded.itp since none are explicitly given in the molecule’s .itp file. If this is all the authors provided, it is nonfunctional, and they were likely using some custom force field for which those necessary parameters were already built in.

So if I add the parameters from the itp file to ffnonbonded.itp and ffbonded.itp, the topology will build/work? Is it possible to do this successfully? The itp file has bonded, angle, and dihedral params…

Sorry, started talking too generally there and got a bit derailed - your bonded parameters are fine and you don’t need to do anything, but you need to define the new atom types within a suitable [atomtypes] directive somewhere. If you don’t have that, grompp will always fail.

I added the atoms to the atomtypes.atp and that doesn’t seem to be enough. Where else do I need to add them? I added them to the [atomtypes] directive in ffnonbonded.itp, but now I get errors like “ERROR 5304 [file topol_Other_chain_C.itp, line 9098]:
No default Proper Dih. types”. even though the dihedral info is in urea_smith.itp and that is included…

Right, because the .atp file has no parameters, it is simply mapping masses to the corresponding atom types so pdb2gmx can write a topology. The actual [atomtypes] directive belongs to ffnonbonded.itp (although it can be provided in a molecule .itp file, if #included correctly in the topology) and has actual LJ parameters.

The contents of this file are irrelevant if you’re recreating the topology with pdb2gmx, which apparently does not have the parameters written to it. If you already have the urea topology, there’s really no need to even use pdb2gmx, honestly. If you go the pdb2gmx route, then you need to add all the necessary bonded parameters into ffbonded.itp - they are not going to be read from the molecule .itp file that you have.

Hi, I have encountered a similar error of “atomtype not found” but it is quite unusual since it reported the first atom, NH3 of my protein molecule. Could you have a look at my post and give some advice? Thanks a lot!