'[ atomtypes ]' Invalid order for directive atomtypes

GROMACS version: 2019.4
GROMACS modification: No

Hi. I get the itp file for my polymer (containing 305 atoms) using the PolyParGen (http://polypargen.com), as follows:

; GENERATED BY PolyParGen 2022/11/29 12:31:04UTC
; Automatic parameter generation tool:LigParGen
;

[ atomtypes ]
ppg_AAA H0 1.0080 0.000 A 2.50000E-01 1.25520E-01
ppg_AAB C1 12.0110 0.000 A 3.50000E-01 2.76144E-01
ppg_AAC O2 15.9990 0.000 A 2.90000E-01 5.85760E-01
ppg_AAD O3 15.9990 0.000 A 3.12000E-01 7.11280E-01
ppg_AAE H4 1.0080 0.000 A 0.00000E+00 0.00000E+00
ppg_AAF H5 1.0080 0.000 A 2.50000E-01 1.25520E-01
ppg_AAG C6 12.0110 0.000 A 3.50000E-01 2.76144E-01
ppg_AAH O7 15.9990 0.000 A 2.90000E-01 5.85760E-01
ppg_AAI C8 12.0110 0.000 A 3.55000E-01 2.92880E-01
ppg_AAJ O9 15.9990 0.000 A 2.96000E-01 8.78640E-01
ppg_AAK O10 15.9990 0.000 A 3.12000E-01 7.11280E-01
ppg_AAL H11 1.0080 0.000 A 0.00000E+00 0.00000E+00

[ moleculetype ]
; Name nrexcl
LIG 3

[ atoms ]
; nr type resnr residue atom cgnr charge mass
1 ppg_AAB 1 LIG C004 1 -0.2390 12.0110
2 ppg_AAA 1 LIG H003 1 0.0895 1.0080
3 ppg_AAA 1 LIG H002 1 0.0896 1.0080
4 ppg_AAA 1 LIG H001 1 0.0895 1.0080
5 ppg_AAB 1 LIG C003 1 -0.1713 12.0110
6 ppg_AAA 1 LIG H005 1 0.1197 1.0080
7 ppg_AAA 1 LIG H004 1 0.1198 1.0080
8 ppg_AAB 1 LIG C002 1 0.4357 12.0110
9 ppg_AAC 1 LIG O000 1 -0.4147 15.9990
10 ppg_AAB 1 LIG C001 1 0.0259 12.0110
11 ppg_AAA 1 LIG H00Q 1 0.1045 1.0080
12 ppg_AAA 1 LIG H00P 1 0.1045 1.0080
13 ppg_AAB 1 LIG C000 1 -0.0078 12.0110
14 ppg_AAA 1 LIG H00R 1 0.0873 1.0080
15 ppg_AAA 1 LIG H000 1 0.0871 1.0080
16 ppg_AAC 1 LIG O007 1 -0.3810 15.9990
17 ppg_AAB 1 LIG C00G 1 0.0101 12.0110
18 ppg_AAA 1 LIG H00T 1 0.0973 1.0080
19 ppg_AAA 1 LIG H00S 1 0.0972 1.0080
20 ppg_AAB 1 LIG C00H 1 0.0043 12.0110
21 ppg_AAA 1 LIG H00V 1 0.0897 1.0080
.
.
.
.
.
.

Then, I manually created a topology file as follows:

;
#include “lig.itp”

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

[ system ]
; Name
Polymer

[ molecules ]
; Compound #mols
LIG 1

When I used the command:
gmx_mpi grompp -f min_vac.mdp -c box.gro -p topol.top -o min_vac.tpr

I encountered with the following error:

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

How to resolve this issue?

You need to #include a parent force field first, or manually define a [defaults] directive. You cannot being a topology with [atomtypes].