How to use the .top file generated by acpype to set up the simulation system?

GROMACS version: 2019.2
GROMACS modification: No
Here post your question

Dear all,

I am doing MD simulation of a ligand-protein complex. The ligand is named OS1.
I generated the OS1.gesp file with guassian software and then obtained the OS1.prmtop and OS1.inpcrd with antechamber, parmchk2 and tleap consequently. Finally I got the “MOL_GMX.gro” and “MOL_GMX.top” files with ACPYPE.

Then I replaced the residue name 'MOL" with “OS1” in the MOL_GMX.gro and MOL_GMX.top files and began setting up the simulation system. After using pdb2gmx to convert the protein pdb file to gro file, combining the gro files of the protein and the ligand, adding water, I began adding ions. Then I encounter problems.

As I understand, a parameter file and a topology file for the ligand should be added to the topol.top file. At first, I treated the original MOL_GMX.top (can be download from https://drive.google.com/file/d/1cjZW-4V2vGg706VRdEex4OyeVoXhj2jp/view?usp=sharing) file as the a parameter file, and saved a copy of the MOL_GMX.top as MOL_GMX.itp and treated it as the topology file. I added the following lines to the topol.top file (can be downloaded from https://drive.google.com/file/d/1hGVArW9jvfDgACOJ5r33xXFNHt2hM1zc/view?usp=sharing):

; Include ligand parameters
#include “OS1_GMX.top”

; Include ligand topologies

#include “OS1_GMX.itp”

When running the command:
gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr
I got the following error:
Fatal error:
Syntax error - File MOL_GMX.top, line 5
Last line read:
‘1 2 yes 0.5 0.8333’
Found a second defaults directive.

So I commented out line 5 in the MOL_GMX.top file and run the grompp command again. This time I got the following error:
Fatal error:
Syntax error - File MOL_GMX.itp, line 3
Last line read:
‘[ defaults ]’
Invalid order for directive defaults

So I commented out line 3 in the MOL_GMX.itp file and run the grompp command again. This time I got the following error:
Fatal error:
Syntax error - File MOL_GMX.itp, line 7
Last line read:
‘[ atomtypes ]’
Invalid order for directive atomtypes

I comment all the ‘[ atomtypes ]’ section (Line 7-20) in the MOL_GMX.itp file and run the grompp command again. This time I got the following error:
ERROR 1 [file MOL_GMX.itp, line 24]:
moleculetype OS1 is redefined

So I commented out Line 24 in the MOL_GMX.itp file and run the grompp command again. This time I got the following error:
ERROR 1 [file MOL_GMX.itp, line 28]:
Atoms in the .top are not numbered consecutively from 1 (rather, atomnr =
1, while at->nr = 1)

Then I get totally stuck and there seems nothing left for me to do.

Could anyone know how to correctly format the .top file and fill it in the topol.top file so that gromacs can correctly read it?

I will appreciate any help very much!

Thank you and best regards.

Yeping Sun

Your original error is due to #including the ligand .itp file twice, and an incorrect adjustment of its format.

The ligand .itp should only define the relevant [moleculetype] and any new parameters it requires. As such, you can #include it once, after the parent force field and before any other species (e.g. protein) in the .top file. See the logic behind this at http://www.mdtutorials.com/gmx/complex/index.html

The link you provided to the ligand topology does not work so I can’t comment on any aspect of it, but the subsequent errors you’re getting suggest incorrect edits that break the file syntax.

Hello Jalemkul,

Thank you. The problem solved.
I just need to divide the MOL_GMX.top file generated by ACPYPE into two files, say, lig.top and lig.itp. The lig.top only contains only [ atomtypes ] directive, while the lig.itp contains other directives such as “[ oleculetype]“、“[atoms]“、”[bonds]“、”[pairs]“、”[angles]、“[ dihedrals ] ; propers“ 和“[ dihedrals ]”; impropers“. Then include them after the parent force field and protein chain itp respectively. And then, things get through.