# Problem in creating the input of a protein with 2 chains

**URL:** <https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354>\
**Category:** User discussions\
**Created:** [June 11, 2024, 12:31pm UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354 "2024-06-11T12:31:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@victor](https://gromacs.bioexcel.eu/u/victor)\
**Post date:** [June 11, 2024, 12:31pm UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354/1 "2024-06-11T12:31:15Z")

</div>

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

I’m trying to do a simulation with a protein (2 chains), but I’m having a problem putting in the command.

gmx pdb2gmx -f protein.pdb -the protein.gro

-Using the Charmm36 force field.

Inside the folder, the files “Posre\_Protein\_chain\_A. ITP", ‘Prosre\_Protein\_chain\_b.itp’, ‘Topol\_Protein\_chain\_a.itp’, ‘Topol\_Protein\_Chain\_B.itp’, ‘Protein.gro’ and ‘Topol.Top’ are created, but the most relevant information is not included in the topology file ‘topol.top’, what would be the correct way to work with this protein?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [June 11, 2024, 1:01pm UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354/2 "2024-06-11T13:01:12Z")

</div>

> [@victor](#):
>
> but the most relevant information is not included in the topology file ‘topol.top’, what would be the correct way to work with this protein?

What information do you think is missing? Multi-chain proteins are written to a `topol.top` file that simply `#includes` the chain topologies.

---

<div class="post-metadata">

**Author:** ![victor](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@victor](https://gromacs.bioexcel.eu/u/victor)\
**Post date:** [June 11, 2024, 2:25pm UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354/3 "2024-06-11T14:25:42Z")

</div>

Dear Prof. @jalemkul ,

When I place the command on a protein with just 1 chain, instead of the files “topol\_Protein\_chain\_A.itp” and “posre\_Protein\_chain\_A.itp” being within the initial folder of the simulation, their information is inserted within the Topol.top file, and so following the calculations in a normal way.

But when the simulation is carried out with 2 chains or more, instead of this information being inserted in the Topol.top file, this information is only inside the main folder, I have already tried to insert it manually inside the topol.top file, but the simulation does not occur correctly. The Topol.top file looks like this:

; Created by:  
; :-) GROMACS - gmx pdb2gmx, 2024.2-Homebrew (-:  
;   
; Executable: /usr/local/bin/…/Cellar/gromacs/2024.2/bin/gmx  
; Data prefix: /usr/local/bin/…/Cellar/gromacs/2024.2  
; Working dir: /Users/victormoreira/Documents/forum  
; Command line:  
; gmx pdb2gmx -f 4ey6.pdb -o protein.gro  
; Force field was read from the standard GROMACS share directory.  
;

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

; Include chain topologies  
#include “topol\_Protein\_chain\_A.itp”  
#include “topol\_Protein\_chain\_B.itp”

; Include water topology  
#include “amber03.ff/tip3p.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 “amber03.ff/ions.itp”

[system]  
; Name  
Protein

[molecules]  
; Compound #mols  
Protein\_chain\_A 1  
Protein\_chain\_B 1

Unfortunately the #Include present in Topol.top does not have the desired effect, thank you for any help.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [June 11, 2024, 3:56pm UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354/4 "2024-06-11T15:56:38Z")

</div>

> [@victor](#):
>
> Unfortunately the #Include present in Topol.top does not have the desired effect, thank you for any help.

Please explain what this means. You’ve shown an entirely normal multi-chain topology. If you’re getting an error, please tell us exactly what the problem is. A single-chain topology will be written directly to `topol.top`. Multi-chain topologies are written exactly as shown. Position restraints for each chain should have their `#include` statements within their respective chain topology files.

---

<div class="post-metadata">

**Author:** ![victor](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@victor](https://gromacs.bioexcel.eu/u/victor)\
**Post date:** [June 11, 2024, 6:52pm UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354/5 "2024-06-11T18:52:29Z")

</div>

Dear Prof. @jalemkul ,

Using the tutorial available on the Internet ([Protein-Ligand Complex](http://www.mdtutorials.com/gmx/complex/index.html)), all the initial steps were performed correctly, but when you arrive at the stage of adding ions through the command:

gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr

The following error month appears:

Program: gmx grompp, version 2024.2-Homebrew  
Source file: src/gromacs/gmxpreprocess/grompp.cpp (line 706)

**Fatal error:**  
number of coordinates in coordinate file (solv.gro, 453249)  
does not match topology (topol.top, 16380)

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [June 12, 2024, 3:02am UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354/6 "2024-06-12T03:02:51Z")

</div>

Likely you have forgotten to update the topology in the `solvate` and `genion` steps with the `-p` option.

---

<div class="post-metadata">

**Author:** ![victor](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@victor](https://gromacs.bioexcel.eu/u/victor)\
**Post date:** [June 12, 2024, 11:11am UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354/7 "2024-06-12T11:11:41Z")

</div>

Thank you teacher @jalemkul ,

In the solvate stage the following commands were used:

**gmx editconf -f complex.gro -o newbox.gro -bt dodecahedron -d 1.0**

**gmx solvate -cp newbox.gro -cs spc216.gro -p topol.top -o solv.gro**

But the same error remains.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [June 12, 2024, 12:53pm UTC](https://gromacs.bioexcel.eu/t/problem-in-creating-the-input-of-a-protein-with-2-chains/9354/8 "2024-06-12T12:53:19Z")

</div>

Please copy and paste the `[molecules]` section of `topol.top` exactly as it appears.
