GROMACS version: 2023.2
GROMACS modification: No
I have a membrane-protein system and during the pre-equilibration I’m applying different values of positional restraints for lipids (6 different species) and the protein.
In my mdp, I included:
define = -DPOSRES_PT
And in my topology, for each lipid, I created the following ifdef structure:
#include “./ITPs/martini_v3.0.0_phospholipids_PS_v2_openbeta.itp”
#ifdef POSRES_PT
#include “posre_POPS.itp”
#endif
#include “./ITPs/martini_v3.0.0_phospholipids_PI_v2_openbeta.itp”
#ifdef POSRES_PT
#include “posre_POP2.itp”
#endif
each posre_**.*itp file (created with gmx genrest) file has the following structure:
; position restraints for POP2.
; i funct fcx fcy fcz
1 1 200 200 200
2 1 200 200 200
3 1 200 200 200
4 1 200 200 200
5 1 200 200 200
6 1 200 200 200
7 1 200 200 200
8 1 200 200 200
9 1 200 200 200
10 1 200 200 200
11 1 200 200 200
12 1 200 200 200
13 1 200 200 200
14 1 200 200 200
15 1 200 200 200
16 1 200 200 200
17 1 200 200 200
Basically, when I execute gmx grompp (gmx grompp -f full-pr-md.mdp -c min.gro -r min.gro -p teste_update.top -n index.ndx -o pr_md.tpr), I always got the same error for the second if statement in my topology file.
ERROR 1 [file posre_POP2.itp, line 13]:
Atom index (9) in position_restraints out of bounds (1-8).
This probably means that you have inserted topology section
“position_restraints”
in a part belonging to a different molecule than you intended to.
In that case move the “position_restraints” section to the right
molecule.
Could someone help me to understand what I’m doing wrong? I’m able to create the tpr file without the position restraints sections.
Thanks in advance,
Fred