Merging force-filed from charmm-gui and Cgenff

GROMACS version: 2022.2
GROMACS modification: Yes/No
Here post your question

I am working on drug permeation on membranes. Generated the membrane using Charmm-Gui and the force field parameter for small molecule was generated using Cgenff. I have downloaded the ff parameter from Cgennff website: charmm36-jul2021.ff
My question is how to merge two force-field.
This is my topology field:

;;
;; Generated by CHARMM-GUI FF-Converter
;;
;; Correspondance:
;; jul316@lehigh.edu or wonpil@lehigh.edu
;;
;; The main GROMACS topology file
;;

; Include forcefield parameters
#include “toppar/forcefield.itp”
#include “toppar/POPG.itp”
#include “toppar//POPE.itp”
#include “toppar//POT.itp”
#include “toppar/CLA.itp”
#include “toppar//TIP3.itp”
#include “lig.prm”
#include “lig.itp”

[ system ]
; Name
Title

[ molecules ]
; Compound #mols
POPG 74
POPE 26
POT 80
CLA 6
TIP3 2503
LIG 1

While generating the .tpr file I got this error.

Fatal error:
Syntax error - File POPG.itp, line 11
Last line read:
‘[ moleculetype ]’
Invalid order for directive moleculetype

This is hoe POPG.itp looks like:
;;
;; Generated by CHARMM-GUI FF-Converter
;;
;; Correspondance:
;; jul316@lehigh.edu or wonpil@lehigh.edu
;;
;; GROMACS topology file for POPG
;;

[ moleculetype ]
; name nrexcl
POPG 3

;;
;; Generated by CHARMM-GUI FF-Converter
;;
;; Correspondance:
;; jul316@lehigh.edu or wonpil@lehigh.edu
;;
;; GROMACS topology file for POPG
;;
[ moleculetype ]
; name nrexcl
POPG 3
[ atoms ]
; nr type resnr residu atom cgnr charge mass
1 CTL2 1 POPG C13 1 0.050000 12.0110 ; qtot 0.050
2 HAL2 1 POPG H13A 2 0.090000 1.0080 ; qtot 0.140
3 HAL2 1 POPG H13B 3 0.090000 1.0080 ; qtot 0.230
4 OHL 1 POPG OC3 4 -0.650000 15.9994 ; qtot -0.420
and so on.

Is it due to inconsistency in the difference force field? Where should I include the lig.prm? Here I have included it on topol.top file along with other FF.

Thank you

Hi,
POPG.itp has two directive moleculetype of after the other. This is causing the error.
Here you can see the directive order as expected by the program
https://manual.gromacs.org/current/reference-manual/topologies/topology-file-formats.html
Since the two directive

are idential. You can try to remove one of the two.

Kind regards
Alessandra