# Atomtype not found even though I #included the itp file

**URL:** <https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241>\
**Category:** User discussions\
**Created:** [May 31, 2022, 4:34pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241 "2022-05-31T16:34:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkonstan](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dkonstan](https://gromacs.bioexcel.eu/u/dkonstan)\
**Post date:** [May 31, 2022, 4:34pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/1 "2022-05-31T16:34:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [May 31, 2022, 6:32pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/2 "2022-05-31T18:32:24Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![dkonstan](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dkonstan](https://gromacs.bioexcel.eu/u/dkonstan)\
**Post date:** [May 31, 2022, 6:57pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/3 "2022-05-31T18:57:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [May 31, 2022, 7:10pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/4 "2022-05-31T19:10:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dkonstan](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dkonstan](https://gromacs.bioexcel.eu/u/dkonstan)\
**Post date:** [May 31, 2022, 7:15pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/5 "2022-05-31T19:15:02Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [May 31, 2022, 7:26pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/6 "2022-05-31T19:26:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dkonstan](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dkonstan](https://gromacs.bioexcel.eu/u/dkonstan)\
**Post date:** [May 31, 2022, 7:29pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/7 "2022-05-31T19:29:32Z")

</div>

> [@jalemkul](#):
>
> [atomtypes]

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…

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [June 1, 2022, 2:01am UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/8 "2022-06-01T02:01:13Z")

</div>

> [@dkonstan](#):
>
> I added the atoms to the atomtypes.atp and that doesn’t seem to be enough.

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.

> [@dkonstan](#):
>
> No default Proper Dih. types”. even though the dihedral info is in urea\_smith.itp and that is included…

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.

---

<div class="post-metadata">

**Author:** ![Wang](https://avatars.discourse-cdn.com/v4/letter/w/edb3f5/32.png) [@Wang](https://gromacs.bioexcel.eu/u/Wang)\
**Post date:** [December 15, 2023, 7:25am UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-even-though-i-included-the-itp-file/4241/9 "2023-12-15T07:25:45Z")

</div>

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!
