Problem for merging two proteins and membrane in the same box

GROMACS version: 2020.1-1
GROMACS modification: No
Here post your question

Dear GROMACS experts
Thanks for the tutorial and question&answers in the forum, I succeed to simulate peptide in DPPC membrane
Now I tried to run 2 peptides in DPPC membrane.

However, when I tried to use ‘grompp’ commend,
; gmx grompp -f minim_inflategro.mdp -c system_inflated.gro -p topol.top -r system_inflated.gro -o system_inflated_em.tpr

an error message appeared.
;
ERROR 1 [file strong_posre.itp, line 212]:
Atom index (208) in position_restraints out of bounds (1-207).
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.

According to the manual, this error appeared when placing position restraint files for multiple molecules out of order.
https://manual.gromacs.org/current/user-guide/run-time-errors.html

So I modified topol.top files from

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

; Include chain topologies
#include “topol_Protein_chain_A.itp”
#include “topol_Protein_chain_B.itp”

; Strong position restraints for InflateGRO
#ifdef STRONG_POSRES
#include “strong_posre.itp”
#endif

; Include DPPC chain topology
#include “dppc.itp”

; Include water topology
#include “gromos53a6_lipid.ff/spc.itp”

#ifdef POSRES_WATER
; Position restraint for each water oxygen
[ position_restraints ]
; i funct fcx fcy fcz
1 1 1000 1000 1000
#endif

; Include topology for ions
#include “gromos53a6.ff/ions.itp”

to

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

; Include chain topologies
#include “topol_Protein_chain_A.itp”
#ifdef POSRES
#include “posre_Protein_chain_A.itp”
#endif

#include “topol_Protein_chain_B.itp”
#ifdef POSRES
#include “posre_Protein_chain_B.itp”
#endif

; Strong position restraints for InflateGRO
#ifdef STRONG_POSRES
#include “strong_posre.itp”
#endif

; Include DPPC chain topology
#include “dppc.itp”

; Include water topology
#include “gromos53a6_lipid.ff/spc.itp”

#ifdef POSRES_WATER
; Position restraint for each water oxygen
[ position_restraints ]
; i funct fcx fcy fcz
1 1 1000 1000 1000
#endif

; Include topology for ions
#include “gromos53a6.ff/ions.itp”

But same error message still is appearing, and I cannot find what I’m missing.
Could you spare me some advice?
Thanks for spare time and attention.

If you have multiple chains, you have to generate multiple restraint topologies, one for each. Note how the standard posre.itp files are set up in the topology. You can’t have a single restraint topology for multiple [moleculetype] definitions.

Thank you for your kind answer jalemkul.
However, sorry. I still cannot understand it.

Yes. I have to generate multiple restraint topologies, one for each of ‘topol_Protein_chain_A.itp’ and ‘topol_Protein_chain_B.itp’

It is why I changed

; Include chain topologies
#include “topol_Protein_chain_A.itp”
#include “topol_Protein_chain_B.itp”

to

; Include chain topologies
#include “topol_Protein_chain_A.itp”
#ifdef POSRES
#include “posre_Protein_chain_A.itp”
#endif

#include “topol_Protein_chain_B.itp”
#ifdef POSRES
#include “posre_Protein_chain_B.itp”
#endif

Isn’t what I did is same as what you advised…?

ps. When I tried to use ‘grompp’ commend to the 2 peptides without membrane, It normally worked.
Does it mean that I should have defined posre to ‘dppc.itp’? But topol.top of KALP3 tutorial worked well without specific posre definition to ‘dppc.itp’…

topol file of 2 peptides without membrane.top (1.1 KB)

This is the problem?

What pdb2gmx wrote for you is fine. But you can’t have another restraint topology that tries to apply to both of the chains. You need to change what is done in the tutorial (which is a very simple system) and generate two new “strong” restraint files and #include them the same way as the “standard” restraints. Valid atom numbers in each restraint topology are from 1…N, where N is the number of atoms in a given [moleculetype] - you cannot use genrestr to generate restraints for multiple molecules (as its help description warns).

Sorry for the late report. I needed time to try what I understood through your advice…
But my trials are failed.

I understand that your advice as…

  1. What I did to autonomously generate restraint file (which contains 2 chains restraint) through *.gro file (which contains 2 chain atom information) is wrong. I need to manually generate 2 strong restraint files because each restraint file needs for each chain.
  2. I need to properly include those strong restraint files in topol.top

However, I cannot find solutions for both problems.

  1. To generate strong restraint files, I need .gro files. But after pdb2gmx commend, only one .gro files could be generated. (because the original .pdb file consists of dimer.)
    Should I divide the original .pdb file to generate 2 *.gro files and 2 strong restraint files?
    In that case, I guess that I could do it.

  2. To properly include two strong constraints in topol.top, I tried to test most of the possible combinations of scripts.
    However, all trials resulted in errors.

ERROR 1 [file minim_inflategro.mdp, line 18]:
Parameter “define” doubly defined

or

ERROR 1 [file strong_posre.itp, line 212]:
Atom index (208) in position_restraints out of bounds (1-207).
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.

—example1—
; Include chain topologies
#include “topol_Protein_chain_A.itp”
#include “topol_Protein_chain_B.itp”

; Strong position restraints for InflateGRO
#ifdef STRONG_POSRES
#include “strong_posre.itp”
#endif

—example2—
; Include chain topologies
#include “topol_Protein_chain_A.itp”
#ifdef POSRES
#include “posre_Protein_chain_A.itp”
#endif

#include “topol_Protein_chain_B.itp”
#ifdef POSRES
#include “posre_Protein_chain_B.itp”
#endif

; Strong position restraints for InflateGRO
#ifdef STRONG_POSRES
#include “strong_posre.itp”
#endif

—example3—
; Include chain topologies
#include “topol_Protein_chain_A.itp”
#include “topol_Protein_chain_B.itp”

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

; Strong position restraints for InflateGRO
#ifdef STRONG_POSRES
#include “strong_posre_A.itp”
#include “strong_posre_B.itp”
#endif

—example4—
; Include chain topologies
#include “topol_Protein_chain_A.itp”
#ifdef STRONG_POSRES
#include “strong_posre_A.itp”
#endif

#include “topol_Protein_chain_B.itp”
#ifdef STRONG_POSRES
#include “strong_posre_B.itp”
#endif

—example5—
; Include chain topologies
#include “topol_Protein_chain_A.itp”
#ifdef POSRES
#include “posre_Protein_chain_A.itp”
#endif

#include “topol_Protein_chain_B.itp”
#ifdef POSRES
#include “posre_Protein_chain_B.itp”
#endif

—example6—
#include “topol_Protein_chain_A.itp”
#include “topol_Protein_chain_B.itp”
#endif

; Strong position restraints for InflateGRO
#ifdef STRONG_POSRES
#include “strong_posre_A.itp”
#endif

—example7—
; Include chain topologies
#include “topol_Protein_chain_A.itp”
#include “topol_Protein_chain_B.itp”

; Strong position restraints for InflateGRO
#include “strong_posre_A.itp”
#include “strong_posre_B.itp”
#endif

Sorry for the slow understanding.
But May I ask you to write an example of the solution to 2nd problem?
I think that I cannot find the solution to this problem with my novice understanding.

Thanks always for spare time and attention.

This is correct.

Below is the correctly formatted topology construct. Note that the strong restraints are simply #included identically to the standard restraints, under a different flag.

; Include chain topologies
#include “topol_Protein_chain_A.itp”
#ifdef POSRES
#include “posre_Protein_chain_A.itp”
#endif
; Strong position restraints for InflateGRO
#ifdef STRONG_POSRES
#include “strong_posre_chain_A.itp”
#endif

#include “topol_Protein_chain_B.itp”
#ifdef POSRES
#include “posre_Protein_chain_B.itp”
#endif
; Strong position restraints for InflateGRO
#ifdef STRONG_POSRES
#include “strong_posre_chain_B.itp”
#endif

It is hard to express my thanks to your enormous support with my English. Just thanks a lot!

If we cant merge different chain itp files into one file , why we have -merge function in pdb2gmx. I am getting confused about -merge function and it’s benefit. Because description says it is for merging multiple chains into one molecule.

Thanks in advance!

The -merge option is mostly useful when there are actual bonds between chains, e.g. intermolecular disulfides. In fact, it’s required in that case. It’s not required for anything else, though might be useful in these kinds of cases where custom restraints are needed.

1 Like