Atomtype not found but it is defined in forcefield files

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.

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 (3.2 MB)

Kind regards,
Yiwei

Please go through 1 and 2 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

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.

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

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

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:

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.

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.

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

hi, I am also facing the same issue.