# Mis match bwtween the topol.top and solv.gro file

**URL:** <https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832>\
**Category:** User discussions\
**Tags:** forcefield, grompp, mdrun, installation-error, simulation-setup\
**Created:** [February 18, 2023, 11:27am UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832 "2023-02-18T11:27:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![anahhas](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anahhas](https://gromacs.bioexcel.eu/u/anahhas)\
**Post date:** [February 18, 2023, 11:27am UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/1 "2023-02-18T11:27:58Z")

</div>

GROMACS version:2021  
GROMACS modification: Yes/No  
Here post your question I got extra number in the topol.top file than solv.gro and this have when I just add solv step. how can i solved it.  
Thanks,  
Alaa

---

<div class="post-metadata">

**Author:** ![anahhas](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anahhas](https://gromacs.bioexcel.eu/u/anahhas)\
**Post date:** [February 18, 2023, 9:21pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/2 "2023-02-18T21:21:08Z")

</div>

Fatal error:  
number of coordinates in coordinate file (protein\_ligand\_solv.gro, 61506)  
does not match topology (topol.top, 80980)

---

<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:** [February 19, 2023, 6:15pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/3 "2023-02-19T18:15:44Z")

</div>

The error means you haven’t properly kept track of the contents of the system. Almost all bookkeeping can be done automatically (water and ions), but if you have a ligand as you appear to, you have to make careful manual adjustments to the coordinate and topology files. If one changes, so too must the other.

It is not possible to diagnose the origin of this problem without a complete listing of the commands issued to this point and a detailed description of any other manual modifications you have made. Otherwise, it is simply “you haven’t kept track of things properly.”

---

<div class="post-metadata">

**Author:** ![anahhas](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anahhas](https://gromacs.bioexcel.eu/u/anahhas)\
**Post date:** [February 19, 2023, 10:41pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/4 "2023-02-19T22:41:03Z")

</div>

The steps as following  
Parmchk2 –i ligand\_gaff.mol2 –f mol2 –o ligand.frcmod  
Vi commands.in  
source leaprc.gaff  
loadamberparams ligand.frcmod  
MOL=loadmol2 ligand\_gaff.mol2  
check MOL  
saveamberparm MOL ligand.prmtop ligand.inpcrd  
Savepdb MOL ligand\_amber.pdb  
quit  
tleap -f commands.in  
acpype -p ligand.prmtop -x ligand.inpcrd -b ligand  
gmx pdb2gmx -f protein.pdb -o protein.gro -ignh -ter -p protein.top  
I used OPLS-AA/L  
I used NH3 and COO-  
water model: I used #1 that is recommended  
cat protein.gro ligand\_GMX.gro \> protein\_ligand.gro  
Vi protein\_ligand.gro and add the number manually of the protein and ligand  
cp ligand\_GMX.top ligand.itp  
take the atomtypes from ligand.itp and add it to topol.top under forcfield  
take the last line of ligand.itp and delete the section of system and ligand  
add it to topol.top  
gmx editconf -f protein\_ligand.gro -o protein\_ligand\_box.gro -bt cubic -d 1.0 -c  
gmx solvate -cp protein\_ligand\_box.gro -cs spc216.gro -p topol.top -o protein\_ligand\_solv.gro  
download the ions.mdp  
gmx grompp -f ions.mdp -c protein\_ligand\_solv.gro -p topol.top -o protein\_ligand\_ions.tpr

after that the error message appears

---

<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:** [February 20, 2023, 2:59pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/5 "2023-02-20T14:59:02Z")

</div>

I cannot identify the source of such a massive disparity; something else must have happened (i.e. you repeated a step somewhere or mismanaged files). I would suggest simply starting over, and at every step, after each command you enter or modification you make, you verify that the topology and coordinates are in sync.

Also note that it is inappropriate to generate an AMBER topology for a ligand and try to mix it with the OPLS-AA force field for the protein. You need to use a self-consistent force field for everything, otherwise the results (if you can even get past the syntactical issues) will be nonsensical.

---

<div class="post-metadata">

**Author:** ![anahhas](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anahhas](https://gromacs.bioexcel.eu/u/anahhas)\
**Post date:** [February 20, 2023, 4:13pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/6 "2023-02-20T16:13:02Z")

</div>

What is the the commands to generate topology for a ligand using OPLS-AA force field.  
In case of AMBER forcefield, I used Parmchk2 –i ligand\_gaff.mol2 –f mol2 –o ligand.frcmod  
Thanks

---

<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:** [February 22, 2023, 4:59pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/7 "2023-02-22T16:59:40Z")

</div>

[http://zarbi.chem.yale.edu/ligpargen/](http://zarbi.chem.yale.edu/ligpargen/)

---

<div class="post-metadata">

**Author:** ![anahhas](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anahhas](https://gromacs.bioexcel.eu/u/anahhas)\
**Post date:** [February 27, 2023, 12:00am UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/8 "2023-02-27T00:00:29Z")

</div>

Thank you  
Still I cann’t solve the proble. I use amber force field and everything goes well until i reach to the add ions  
The command is gmx grompp -f ions.mdp -c protein\_ligand\_solv.gro -p topol.top -o ions.tpr  
and the error message is WARNING 17 [file topol.top, line 42]:  
Atomtype H4 was defined previously (e.g. in the forcefield files), and  
has now been defined again. This could happen e.g. if you would use a  
self-contained molecule .itp file that duplicates or replaces the  
contents of the standard force-field files. You should check the contents  
of your files and remove such repetition. If you know you should override  
the previous definition, then you could choose to suppress this warning  
with -maxwarn.  
I also attach the topol.top and itp files

 ![itp](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/0/05ceb4f52ae5b4bfa02e6150e3d0d9005651f38b.png)  
[topol.top](https://gromacs.bioexcel.eu/uploads/short-url/48c06uu3LGIobv3mSTdjJMARtbo.top) (833.6 KB)

---

<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:** [March 2, 2023, 2:55pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/9 "2023-03-02T14:55:39Z")

</div>

This is your problem:

```auto
[atomtypes]
;name bond_type mass charge ptype sigma epsilon Amb
 N3 N3 0.00000 0.00000 A 3.25000e-01 7.11280e-01 ; 1.82 0.1700
 CX CX 0.00000 0.00000 A 3.39967e-01 4.57730e-01 ; 1.91 0.1094
 C C 0.00000 0.00000 A 3.39967e-01 3.59824e-01 ; 1.91 0.0860
 O O 0.00000 0.00000 A 2.95992e-01 8.78640e-01 ; 1.66 0.2100
 CT CT 0.00000 0.00000 A 3.39967e-01 4.57730e-01 ; 1.91 0.1094
 CA CA 0.00000 0.00000 A 3.39967e-01 3.59824e-01 ; 1.91 0.0860
 H H 0.00000 0.00000 A 1.06908e-01 6.56888e-02 ; 0.60 0.0157
 HP HP 0.00000 0.00000 A 1.06908e-01 6.56888e-02 ; 0.60 0.0157
 HC HC 0.00000 0.00000 A 2.64953e-01 6.56888e-02 ; 1.49 0.0157
 HA HA 0.00000 0.00000 A 2.59964e-01 6.27600e-02 ; 1.46 0.0150
 N N 0.00000 0.00000 A 3.25000e-01 7.11280e-01 ; 1.82 0.1700
 H1 H1 0.00000 0.00000 A 2.47135e-01 6.56888e-02 ; 1.39 0.0157
 NA NA 0.00000 0.00000 A 3.25000e-01 7.11280e-01 ; 1.82 0.1700
 CW CW 0.00000 0.00000 A 3.39967e-01 3.59824e-01 ; 1.91 0.0860
 CB CB 0.00000 0.00000 A 3.39967e-01 3.59824e-01 ; 1.91 0.0860
 CN CN 0.00000 0.00000 A 3.39967e-01 3.59824e-01 ; 1.91 0.0860
 C* C* 0.00000 0.00000 A 3.39967e-01 3.59824e-01 ; 1.91 0.0860
 H4 H4 0.00000 0.00000 A 2.51055e-01 6.27600e-02 ; 1.41 0.0150
 O2 O2 0.00000 0.00000 A 2.95992e-01 8.78640e-01 ; 1.66 0.2100

```

You are redefining atom types that already exist in the force field. The simple solution is - don’t. If the ligand already uses known atom types, you don’t need to add them in again.

---

<div class="post-metadata">

**Author:** ![anahhas](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anahhas](https://gromacs.bioexcel.eu/u/anahhas)\
**Post date:** [March 5, 2023, 5:39pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/10 "2023-03-05T17:39:25Z")

</div>

Thank you. Also, is there any way to make the MD simulation faster since it took 3 days and my computer is on and the work didn’t complete yet

---

<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:** [March 5, 2023, 6:00pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/11 "2023-03-05T18:00:43Z")

</div>

MD simulations are computationally expensive. Common laptop or desktop hardware are not suited for running them. You need high-performance computing clusters or specially designed GPU workstations to reasonably run most MD. GROMACS _can_ run on a laptop, but generally speaking, it _shouldn’t_.

---

<div class="post-metadata">

**Author:** ![anahhas](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anahhas](https://gromacs.bioexcel.eu/u/anahhas)\
**Post date:** [March 18, 2023, 9:36pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/12 "2023-03-18T21:36:22Z")

</div>

Hello,  
I transferred all of my files to super computer and I am traying to run the production using this command: gmx\_mpi mdrun -deffnm receptor\_ligand\_prod &  
Howeverver there is an error message: -bash: gmx\_mpi: command not found  
How can I solved? Please let me know.  
Thanks

---

<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:** [March 19, 2023, 2:02am UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/13 "2023-03-19T02:02:15Z")

</div>

You need to speak to your system administrator to understand how to configure your environment. Simply put, the `gmx_mpi` binary is not in your environment’s `$PATH`. How you rectify that depends on the cluster itself, and that’s something an admin can tell you.

---

<div class="post-metadata">

**Author:** ![anahhas](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anahhas](https://gromacs.bioexcel.eu/u/anahhas)\
**Post date:** [March 19, 2023, 10:20pm UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/14 "2023-03-19T22:20:40Z")

</div>

Ok. Will ask them. Thanks a lot

---

<div class="post-metadata">

**Author:** ![ishika](https://avatars.discourse-cdn.com/v4/letter/i/c37758/32.png) [@ishika](https://gromacs.bioexcel.eu/u/ishika)\
**Post date:** [June 11, 2023, 11:50am UTC](https://gromacs.bioexcel.eu/t/mis-match-bwtween-the-topol-top-and-solv-gro-file/5832/15 "2023-06-11T11:50:21Z")

</div>

Sir, I have used swissparam to generate the ligand topology file and I am also facing the same issue.  
[topol.top](https://gromacs.bioexcel.eu/uploads/short-url/s3VptPPM2L2MDbSwJO6s8AonutD.top) (1.5 KB)
