# Error in generating .tpr file

**URL:** <https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912>\
**Category:** User discussions\
**Tags:** mdp-parameters, grompp\
**Created:** [April 18, 2024, 5:41am UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912 "2024-04-18T05:41:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![samta](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samta](https://gromacs.bioexcel.eu/u/samta)\
**Post date:** [April 18, 2024, 5:41am UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/1 "2024-04-18T05:41:57Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
I have used AMber forcefield and tip3p water model to generate protein topology and acpype srver to generate the ligand topoogy, while generating ions.tpr file I am getting error in the .prm file rearding dihedrals : -  
Command line:  
gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr

Ignoring obsolete mdp entry ‘title’  
Ignoring obsolete mdp entry ‘ns\_type’

NOTE 1 [file ions.mdp]:  
With Verlet lists the optimal nstlist is \>= 10, with GPUs \>= 20. Note  
that with the Verlet scheme, nstlist has no effect on the accuracy of  
your simulation.

Setting the LD random seed to -273125991

ERROR 1 [file iso\_obj\_CHARMM.prm, line 1]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 2 [file iso\_obj\_CHARMM.prm, line 2]:  
Incorrect number of atomtypes for dihedral (0 instead of 2 or 4)

ERROR 3 [file iso\_obj\_CHARMM.prm, line 4]:  
Incorrect number of atomtypes for dihedral (0 instead of 2 or 4)

ERROR 4 [file iso\_obj\_CHARMM.prm, line 5]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 5 [file iso\_obj\_CHARMM.prm, line 6]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 6 [file iso\_obj\_CHARMM.prm, line 7]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 7 [file iso\_obj\_CHARMM.prm, line 8]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 8 [file iso\_obj\_CHARMM.prm, line 9]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 9 [file iso\_obj\_CHARMM.prm, line 10]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 10 [file iso\_obj\_CHARMM.prm, line 11]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 11 [file iso\_obj\_CHARMM.prm, line 12]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 12 [file iso\_obj\_CHARMM.prm, line 13]:  
Incorrect number of atomtypes for dihedral (3 instead of 2 or 4)

ERROR 13 [file iso\_obj\_CHARMM.prm, line 15]:  
Incorrect number of atomtypes for dihedral (0 instead of 2 or 4)

ERROR 14 [file iso\_obj\_CHARMM.prm, line 16]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 15 [file iso\_obj\_CHARMM.prm, line 17]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 16 [file iso\_obj\_CHARMM.prm, line 18]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 17 [file iso\_obj\_CHARMM.prm, line 19]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 18 [file iso\_obj\_CHARMM.prm, line 20]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 19 [file iso\_obj\_CHARMM.prm, line 21]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 20 [file iso\_obj\_CHARMM.prm, line 22]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 21 [file iso\_obj\_CHARMM.prm, line 23]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 22 [file iso\_obj\_CHARMM.prm, line 24]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 23 [file iso\_obj\_CHARMM.prm, line 25]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 24 [file iso\_obj\_CHARMM.prm, line 26]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 25 [file iso\_obj\_CHARMM.prm, line 27]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 26 [file iso\_obj\_CHARMM.prm, line 28]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 27 [file iso\_obj\_CHARMM.prm, line 29]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 28 [file iso\_obj\_CHARMM.prm, line 30]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 29 [file iso\_obj\_CHARMM.prm, line 31]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 30 [file iso\_obj\_CHARMM.prm, line 32]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 31 [file iso\_obj\_CHARMM.prm, line 33]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 32 [file iso\_obj\_CHARMM.prm, line 35]:  
Incorrect number of atomtypes for dihedral (0 instead of 2 or 4)

ERROR 33 [file iso\_obj\_CHARMM.prm, line 36]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 34 [file iso\_obj\_CHARMM.prm, line 37]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 35 [file iso\_obj\_CHARMM.prm, line 38]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 36 [file iso\_obj\_CHARMM.prm, line 39]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 37 [file iso\_obj\_CHARMM.prm, line 40]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 38 [file iso\_obj\_CHARMM.prm, line 41]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 39 [file iso\_obj\_CHARMM.prm, line 42]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 40 [file iso\_obj\_CHARMM.prm, line 43]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 41 [file iso\_obj\_CHARMM.prm, line 44]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 42 [file iso\_obj\_CHARMM.prm, line 45]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 43 [file iso\_obj\_CHARMM.prm, line 46]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 44 [file iso\_obj\_CHARMM.prm, line 47]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 45 [file iso\_obj\_CHARMM.prm, line 48]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 46 [file iso\_obj\_CHARMM.prm, line 49]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 47 [file iso\_obj\_CHARMM.prm, line 50]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 48 [file iso\_obj\_CHARMM.prm, line 51]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 49 [file iso\_obj\_CHARMM.prm, line 52]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 50 [file iso\_obj\_CHARMM.prm, line 53]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 51 [file iso\_obj\_CHARMM.prm, line 54]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 52 [file iso\_obj\_CHARMM.prm, line 55]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 53 [file iso\_obj\_CHARMM.prm, line 56]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 54 [file iso\_obj\_CHARMM.prm, line 57]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 55 [file iso\_obj\_CHARMM.prm, line 58]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 56 [file iso\_obj\_CHARMM.prm, line 59]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 57 [file iso\_obj\_CHARMM.prm, line 60]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 58 [file iso\_obj\_CHARMM.prm, line 62]:  
Incorrect number of atomtypes for dihedral (0 instead of 2 or 4)

ERROR 59 [file iso\_obj\_CHARMM.prm, line 63]:  
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 60 [file iso\_obj\_CHARMM.prm, line 65]:  
Not enough parameters

ERROR 61 [file iso\_obj\_CHARMM.prm, line 65]:  
Unknown bond\_atomtype NONBONDED

There was 1 note

* * *

Program: gmx grompp, version 2021.4-Ubuntu-2021.4-2  
Source file: src/gromacs/gmxpreprocess/toppush.cpp (line 1008)

Fatal error:  
There were 61 errors in input file(s)

How to correct the dihedrals

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [April 18, 2024, 6:57am UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/2 "2024-04-18T06:57:12Z")

</div>

I think you should have a close look at your `topol.top` file. You say that you are using an AMBER force field, but the error message indicates that you are including CHARMM parameters in your topology. Make sure that you haven’t included parts of a topology from a previous simulation.

---

<div class="post-metadata">

**Author:** ![samta](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samta](https://gromacs.bioexcel.eu/u/samta)\
**Post date:** [April 18, 2024, 9:52am UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/3 "2024-04-18T09:52:19Z")

</div>

I have created ligand topology file using ACPYPE server, and it give these files in the image

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/3/3b25781f7302d072beae54fcee4a31824c5ea5da.png)  
and .top file genrate for ligand has this content

; iso\_obj.pdb.mol2\_GMX\_OPLS.top created by acpype (v: 2022.7.21) on Wed Apr 17 11:49:50 2024

; Include forcefield parameters  
#include “ffoplsaa.itp”

; Include iso\_obj.pdb.mol2\_GMX.itp topology  
#include “iso\_obj.pdb.mol2\_GMX.itp”

; Ligand position restraints  
#ifdef POSRES\_LIG  
#include “posre\_iso\_obj.pdb.mol2.itp”  
#endif

[system]  
iso\_obj.pdb.mol2

[molecules]  
; Compound nmols  
iso\_obj.pdb.mol2 1

is it possible that parameter file generated using CHARMM forcefield in acpype server ?

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [April 18, 2024, 10:35am UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/4 "2024-04-18T10:35:38Z")

</div>

I don’t know. Have you checked that `content.log` file? What does your `topol.top` file look like? Are you only including what you should?

It seems like the file you showed (iso\_obj.pdb.mol2\_GMX\_OPLS.top) is for OPLS, so that should probably not be used together with Amber either.

You can probably search for which of these files include `file iso_obj_CHARMM.prm` to get a deeper understanding.

I would recommend that you take a step back and look closer at what these tools are generating for you. Have a look at the documentation etc. It’s very handy to use tools for generating parameters, but you have to be careful so that you are not using them (or the output) in a wrong way.

---

<div class="post-metadata">

**Author:** ![samta](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samta](https://gromacs.bioexcel.eu/u/samta)\
**Post date:** [April 18, 2024, 4:18pm UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/5 "2024-04-18T16:18:53Z")

</div>

[INFO] (file 1/19) - Processing file type ‘em\_mdp’ with filename ‘em.mdp’  
[INFO] (file 1/19) - Writing content of file type ‘em\_mdp’ with filename ‘em.mdp’ inside ‘em.mdp’  
[INFO] (file 2/19) - Processing file type ‘AC\_frcmod’ with filename ‘\_AC.frcmod’  
[INFO] (file 2/19) - Writing content of file type ‘AC\_frcmod’ with filename ‘\_AC.frcmod’ inside ‘iso\_obj\_AC.frcmod’  
[INFO] (file 3/19) - Processing file type ‘AC\_inpcrd’ with filename ‘\_AC.inpcrd’  
[INFO] (file 3/19) - Writing content of file type ‘AC\_inpcrd’ with filename ‘\_AC.inpcrd’ inside ‘iso\_obj\_AC.inpcrd’  
[INFO] (file 4/19) - Processing file type ‘AC\_lib’ with filename ‘\_AC.lib’  
[INFO] (file 4/19) - Writing content of file type ‘AC\_lib’ with filename ‘\_AC.lib’ inside ‘iso\_obj\_AC.lib’  
[INFO] (file 5/19) - Processing file type ‘AC\_prmtop’ with filename ‘\_AC.prmtop’  
[INFO] (file 5/19) - Writing content of file type ‘AC\_prmtop’ with filename ‘\_AC.prmtop’ inside ‘iso\_obj\_AC.prmtop’  
[INFO] (file 6/19) - Processing file type ‘mol2’ with filename ‘.mol2’  
[INFO] (file 6/19) - Writing content of file type ‘mol2’ with filename ‘.mol2’ inside ‘iso\_obj.mol2’  
[INFO] (file 7/19) - Processing file type ‘CHARMM\_inp’ with filename ‘\_CHARMM.inp’  
[INFO] (file 7/19) - Writing content of file type ‘CHARMM\_inp’ with filename ‘\_CHARMM.inp’ inside ‘iso\_obj\_CHARMM.inp’  
[INFO] (file 8/19) - Processing file type ‘CHARMM\_prm’ with filename ‘\_CHARMM.prm’  
[INFO] (file 8/19) - Writing content of file type ‘CHARMM\_prm’ with filename ‘\_CHARMM.prm’ inside ‘iso\_obj\_CHARMM.prm’  
[INFO] (file 9/19) - Processing file type ‘CHARMM\_rtf’ with filename ‘\_CHARMM.rtf’  
[INFO] (file 9/19) - Writing content of file type ‘CHARMM\_rtf’ with filename ‘\_CHARMM.rtf’ inside ‘iso\_obj\_CHARMM.rtf’  
[INFO] (file 10/19) - Processing file type ‘CNS\_inp’ with filename ‘\_CNS.inp’  
[INFO] (file 10/19) - Writing content of file type ‘CNS\_inp’ with filename ‘\_CNS.inp’ inside ‘iso\_obj\_CNS.inp’  
[INFO] (file 11/19) - Processing file type ‘CNS\_par’ with filename ‘\_CNS.par’  
[INFO] (file 11/19) - Writing content of file type ‘CNS\_par’ with filename ‘\_CNS.par’ inside ‘iso\_obj\_CNS.par’  
[INFO] (file 12/19) - Processing file type ‘CNS\_top’ with filename ‘\_CNS.top’  
[INFO] (file 12/19) - Writing content of file type ‘CNS\_top’ with filename ‘\_CNS.top’ inside ‘iso\_obj\_CNS.top’  
[INFO] (file 13/19) - Processing file type ‘GMX\_OPLS\_itp’ with filename ‘\_GMX\_OPLS.itp’  
[INFO] (file 13/19) - Writing content of file type ‘GMX\_OPLS\_itp’ with filename ‘\_GMX\_OPLS.itp’ inside ‘iso\_obj\_GMX\_OPLS.itp’  
[INFO] (file 14/19) - Processing file type ‘GMX\_OPLS\_top’ with filename ‘\_GMX\_OPLS.top’  
[INFO] (file 14/19) - Writing content of file type ‘GMX\_OPLS\_top’ with filename ‘\_GMX\_OPLS.top’ inside ‘iso\_obj\_GMX\_OPLS.top’  
[INFO] (file 15/19) - Processing file type ‘GMX\_gro’ with filename ‘\_GMX.gro’  
[INFO] (file 15/19) - Writing content of file type ‘GMX\_gro’ with filename ‘\_GMX.gro’ inside ‘iso\_obj\_GMX.gro’  
[INFO] (file 16/19) - Processing file type ‘GMX\_itp’ with filename ‘\_GMX.itp’  
[INFO] (file 16/19) - Writing content of file type ‘GMX\_itp’ with filename ‘\_GMX.itp’ inside ‘iso\_obj\_GMX.itp’  
[INFO] (file 17/19) - Processing file type ‘GMX\_top’ with filename ‘\_GMX.top’  
[INFO] (file 17/19) - Writing content of file type ‘GMX\_top’ with filename ‘\_GMX.top’ inside ‘iso\_obj\_GMX.top’  
[INFO] (file 18/19) - Processing file type ‘NEW\_pdb’ with filename ‘\_NEW.pdb’  
[INFO] (file 18/19) - Writing content of file type ‘NEW\_pdb’ with filename ‘\_NEW.pdb’ inside ‘iso\_obj\_NEW.pdb’  
[INFO] (file 19/19) - Processing file type ‘md\_mdp’ with filename ‘md.mdp’  
[INFO] (file 19/19) - Writing content of file type ‘md\_mdp’ with filename ‘md.mdp’ inside ‘md.mdp’  
[INFO] All the file types were processed. Files processed with success=19; files skipped=0  
This is content.log file

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [April 18, 2024, 4:20pm UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/6 "2024-04-18T16:20:53Z")

</div>

OK. And your `topol.top`?

---

<div class="post-metadata">

**Author:** ![samta](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samta](https://gromacs.bioexcel.eu/u/samta)\
**Post date:** [April 18, 2024, 4:36pm UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/7 "2024-04-18T16:36:06Z")

</div>

; Command line:  
; gmx pdb2gmx -f 3cp\_clean.pdb -o 3cp\_processed.gro -ter  
; Force field was read from the standard GROMACS share directory.  
;

; Include forcefield parameters  
#include “amber99sb-ildn.ff/forcefield.itp”

; Include ligand parameters  
#include “iso\_obj\_CHARMM.prm”

## [moleculetype] ; Name nrexcl Protein\_chain\_A 3

* * *

* * *

; Include Position restraint file  
#ifdef POSRES  
#include “posre.itp”  
#endif

; Include ligand topology  
#include “iso\_obj\_GMX\_OPLS.itp”

; Include water topology  
#include “amber99sb-ildn.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 “amber99sb-ildn.ff/ions.itp”

[system]  
; Name  
Protein

[molecules]  
; Compound #mols  
Protein\_chain\_A 1  
MOL 1

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [April 18, 2024, 7:26pm UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/8 "2024-04-18T19:26:48Z")

</div>

Thanks. The line "#include “iso\_obj\_CHARMM.prm” is an indication why you have loaded CHARMM parameters (or at least have errors related to CHARMM parameters). In general, loading a .prm file is not a good idea (in GROMACS).  
The combination of  
"#include “amber99sb-ildn.ff/forcefield.itp” (AMBER)  
"#include “iso\_obj\_CHARMM.prm” (CHARMM)  
and  
"#include “iso\_obj\_GMX\_OPLS.itp” (OPLS)  
is bound to give you problems. You should decide which force field to use.

---

<div class="post-metadata">

**Author:** ![samta](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samta](https://gromacs.bioexcel.eu/u/samta)\
**Post date:** [April 21, 2024, 5:49pm UTC](https://gromacs.bioexcel.eu/t/error-in-generating-tpr-file/8912/9 "2024-04-21T17:49:21Z")

</div>

thank you, It worked when i removed the parameter file from the topol.top
