Fatal error: Syntax error - File ffnonbonded.itp, line 5 Last line read: '[ atomtypes ]' Invalid ord

GROMACS version: 2023.1-Ubuntu_2023.1_2ubuntu1
GROMACS modification: Yes
Here post your question ;

This force field generated by charmm2gmx.py from
; multiple charmm parameter files
; and multiple charmm topology files
#define _FF_CHARMM

; This GROMACS version was created from:
; CHARMM parameters: multiple files
; CHARMM topology: multiple files
; Please see forcefield.doc for files and references

#include “ffnonbonded.itp”
#include “ffbonded.itp”
#include “gb.itp”

; Allow the user to specify CHARMM36 parameters, instead
; Default behavior is to use CHARMM36m
#ifdef USE_OLD_C36
#include “old_c36_cmap.itp”
#else
#include “cmap.itp”
#endif

#include “nbfix.itp”
#include “silcs.itp”

ffnonbonded.itp:
; This force field generated by charmm2gmx.py from
; multiple charmm parameter files
; and multiple charmm topology files

[ atomtypes ]
;type atnum mass charge ptype sigma epsilon
AG 47 107.868200 0.000 A 0.263260571210 19.07904
AL 13 26.981540 0.000 A 0.391995435982 2.71960
ALG1 13 26.981540 0.000 A 0.356359487256 2.71960
AU 79 196.966500 0.000 A 0.262904211723 22.13336
BAR 56 137.327000 0.000 A 0.336759715457 0.62760
BG201 5 10.811000 0.000 A 0.454358346252 0.15899
BRGA1 35 79.904000 0.000 A 0.351014094947 2.00832
BRGA2 35 79.904000 0.000 A 0.365268474438 2.21752
BRGA3 35 79.904000 0.000 A 0.356359487256 2.25936
BRGR1 35 79.904000 0.000 A 0.352795892384 1.33888
C 6 12.011000 0.000 A 0.356359487256 0.46024
C3 6 12.011000 0.000 A 0.405358916754 0.08368
CA 6 12.011000 0.000 A 0.355005321205 0.29288
CAD 48 112.411000 0.000 A 0.241789912103 0.50208
CAI 6 12.011000 0.000 A 0.354577689820 0.30543


Program: gmx grompp, version 2023.1-Ubuntu_2023.1_2ubuntu1
Source file: src/gromacs/gmxpreprocess/topio.cpp (line 577)

Fatal error:
Syntax error - File ffnonbonded.itp, line 5
Last line read:
‘[ atomtypes ]’
Invalid order for directive atomtypes

For more information and tips for troubleshooting, please check the GROMACS
website at Common Errors — GROMACS webpage https://www.gromacs.org documentation


MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.

why this error showing up again and again i used cgenff for parametrize while used there feature convert to gromacs foramat…

Did you follow the link? More specifically to Common errors when using GROMACS - GROMACS 2024.3 documentation. This is explained a bit more in a recent thread: No default Improper Dih. types - #2 by MagnusL.

yes @MagnusL I followed the link But the error with the protein-ligand complex Because I have both protein forcefield.itp & ligand forcefield.itp, my .top file look like this
; Force field was read from current directory or a relative path - path added.
;

; Include forcefield parameters
#include “./charmm36-jul2022.ff/forcefield.itp”

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

[ moleculetype ]
; Name nrexcl
Protein_chain_A 3

& if i am adding [ defaults ] in both .itp its giving me this error
“Found a second defaults directive.”
or if i am removing [ default ] from one .itp it giving me this error
“‘[ atomtypes ]’
Invalid order for directive atomtypes”
please can you explain how to resolve this issue

You should not include two forcefield.itp files. In most cases you would only get the required parameters for your ligand in a separate itp file.

You will need to break out what you need from “./charmm36.ff/forcefield.itp” into a separate file, e.g., “ligand_types.itp”. The sections I would recommend are [ atomtypes ], [ bondtypes ], [ angletypes ] and [ dihedraltypes ]. I would recommend only including the parameters that are needed for the ligand, but are not already present in “./charmm36-jul2022.ff/forcefield.itp”.

Then I would recommend making another new file, e.g., “ligand.itp” (possibly named the same as your ligand) starting with a [ moleculetype ] section and then then the [ atoms ], [ bonds ], [ angles ] … sections.

Then you can put

; Include forcefield parameters
#include “./charmm36-jul2022.ff/forcefield.itp”
; Include forcefield parameters required for the ligand
#include "ligand_parameters.itp"
; Include the topology specification of the ligand
#include "ligand.itp"

in your topology file.

Excluding 3 bonded neighbours molecule type ‘Other’

ERROR 1 [file tip3p.itp, line 4]:
moleculetype SOL is redefined

There was 1 NOTE


Program: gmx grompp, version 2023.1-Ubuntu_2023.1_2ubuntu1
Source file: src/gromacs/gmxpreprocess/toppush.cpp (line 1518)

Fatal error:
There was 1 error in input file(s)

You shouldn’t copy any molecule types except your ligand into “ligand.itp”.