# Atomtype not found but it is defined in forcefield files

**URL:** https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798
**Category:** User discussions
**Tags:** forcefield, simulation-setup
**Created:** [December 5, 2023, 1:57pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798 "2023-12-05T13:57:48Z")
**Posts on this page:** 8
**Page:** 1

<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 5, 2023, 1:57pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798/1 "2023-12-05T13:57:49Z")

</div>

GROMACS version: 2019.4  
GROMACS modification: Yes  
Hi,

I was trying to add ions to a protein mixture system using grompp but got an error concerning the top file stating that atomtype NH3 (referring to the first residue of the protein) was not found.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/e/ef8600f0ca9df195babbb36106a8d5758b03f7d3.png)

However, NH3 as an atomtype is indeed found in all the relevant forcefield files which are included in my top file. In addition, I employed a standard forcefield package of CHARMM36m (although I added some parameters into the forcefield files to include a new molecule) and I believe NH3 as an atomtype is inherently included by CHARMM36m.

I have read some early topics of similar error but does not find them helpful to my situation, which makes me very confused by this error. I have attached my top file for reference and I would highly appreciate it if anyone can help me debug it.  
[topol.top](https://gromacs.bioexcel.eu/uploads/short-url/7pfKQreIxRVJPFXGGp49fa42QJD.top) (3.2 MB)

Kind regards,  
Yiwei

---

<div class="post-metadata">

### Author: ![FarzaneJP](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/farzanejp/32/1211_2.png) [@FarzaneJP](https://gromacs.bioexcel.eu/u/FarzaneJP)
#### Post date: [December 6, 2023, 1:24pm UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798/2 "2023-12-06T13:24:56Z")

</div>

Please go through [1](https://tutorials.gromacs.org/md-intro-tutorial.html) and [2](https://tutorials.gromacs.org/membrane-protein.html) tutorials which explains the structure of each GROMACS file (including topol.top) in detail, and modify your files accordingly. Let me know if you still have errors.

Structure of a topology file could be:  
;; The main GROMACS topology file  
;;

; Include forcefield parameters  
#include “toppar/forcefield.itp”  
#include “toppar/PROA.itp” #chains of a protein  
#include “toppar/PROB.itp”  
#include “toppar/PROC.itp”  
#include “toppar/SOD.itp” #ions  
#include “toppar/CLA.itp”  
#include “toppar/TIP3.itp” #water

[system]  
; Name  
Title

[molecules]  
; Compound #mols  
PROA 1  
PROB 1  
PROC 1  
POPC 277  
SOD 131  
CLA 74  
TIP3 27204

---

<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:17am UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798/3 "2023-12-15T07:17:45Z")

</div>

Unfortunately I did not find the tutorials helpful as my top file was generated using pdb2gmx and the error is concerned with the first atom of protein, which is different from common errors referring to the unusual molecule added. I have made sure the reported missing atomtype is indeed included in the forcefield itp files (since it is just a very common atomtype for protein) Could you please have a look at my top file? I think this error is quite strange.

---

<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: [December 15, 2023, 7:33am UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798/4 "2023-12-15T07:33:33Z")

</div>

Which force field files did you edit, and what did you change about them? Do the unmodified force field files produce the same error?

---

<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:57am UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798/5 "2023-12-15T07:57:41Z")

</div>

I edited the ffbonded.itp and ffnonbonded.itp files of CHARMM36m to include the parameters for PEG, for example, in this manner:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/8/815b69d78f94315294410d68b2a6d4031c4a40eb.png)

And I have also made some changes to the group and atom names for PEG in the merged.rtp file according to the errors reported previously to make PEG recognized, like this:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/a/a27358ac27595a9309630ac63f265702660510c1.png)

But I have never made any change to the parameters for protein where the present error occurred. I have used the unmodified forcefield files to firstly equilibrate the protein alone and it never produced the same error.

---

<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: [December 15, 2023, 10:23am UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798/6 "2023-12-15T10:23:52Z")

</div>

If the unmodified files are fine, then it is your changes that lead to the problem. You need to make sure you only ever edit such files with a plain text editor most graphical editors are not. You have likely broken the force field files due to incorrect parsing.

You should not have to add any parameters to any force field files to account for PEG. The bonded interactions and atom types are core CGenFF and are already in the CHARMM36 port.

---

<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 19, 2023, 8:03am UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798/7 "2023-12-19T08:03:45Z")

</div>

The error indeed came from the force field files and I have solved it, thanks for your guidance!

---

<div class="post-metadata">

### Author: ![Pratibha\_mani](https://avatars.discourse-cdn.com/v4/letter/p/71e660/32.png) [@Pratibha\_mani](https://gromacs.bioexcel.eu/u/Pratibha_mani)
#### Post date: [July 18, 2024, 6:40am UTC](https://gromacs.bioexcel.eu/t/atomtype-not-found-but-it-is-defined-in-forcefield-files/7798/8 "2024-07-18T06:40:19Z")

</div>

hi, I am also facing the same issue.
