# Error during the inclusion of ions

**URL:** <https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319>\
**Category:** User discussions\
**Created:** [December 23, 2020, 4:33am UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319 "2020-12-23T04:33:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 23, 2020, 4:33am UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/1 "2020-12-23T04:33:38Z")

</div>

GROMACS version: 2018.1  
GROMACS modification: Yes  
Here post your question

Dear Gromacs users,

I converted both topology and structure files of my system from the Amber package to the Gromacs one. Therefore, I have the com.gro and com.top files. The next step was the inclusion of solvent molecules using the following command line:

gmx solvate -cp newbox.gro -cs spc216.gro -o com\_solv.gro -p topol.top

The solvated structure and topology were successfully generated. However, I got an error during the inclusion of ions by using the following command line:

gmx grompp -f ions.mdp -c com\_solv.gro -p com\_solv.top -o ions.tpr

The error message was:

* * *

GROMACS: gmx grompp, version 2018.1  
Executable: /usr/bin/gmx  
Data prefix: /usr  
Working dir: /home/eduardo/Documents/Projeto\_Doutorado/Gromacs/Gromacs-cddp\_CNH/AlignZ  
Command line:  
gmx grompp -f ions.mdp -c com\_solv.gro -p com\_solv.top -o ions.tpr

Setting the LD random seed to 797119382  
Generated 171 of the 171 non-bonded parameter combinations  
Generating 1-4 interactions: fudge = 0.5  
Generated 171 of the 171 1-4 parameter combinations

ERROR 1 [file com\_solv.top, line 5337]:  
Atomtype OW not found

* * *

Program: gmx grompp, version 2018.1  
Source file: src/gromacs/gmxpreprocess/toppush.cpp (line 1390)

Fatal error:  
There was 1 error in input file(s)

For more information and tips for troubleshooting, please check the GROMACS

* * *

The ions.mdp file was:

=============================================================  
; ions.mdp - used as input into grompp to generate ions.tpr  
; Parameters describing what to do, when to stop and what to save  
integrator = steep ; Algorithm (steep = steepest descent minimization)  
emtol = 1000.0 ; Stop minimization when the maximum force \< 1000.0 kJ/mol/nm  
emstep = 0.01 ; Minimization step size  
nsteps = 50000 ; Maximum number of (minimization) steps to perform

# ; Parameters describing how to find the neighbors of each atom and how to calculate the interactions nstlist = 10 ; Frequency to update the neighbor list and long range forces cutoff-scheme = Verlet ; Buffered neighbor searching ns\_type = grid ; Method to determine neighbor list (simple, grid) coulombtype = cutoff ; Treatment of long range electrostatic interactions rcoulomb = 1.0 ; Short-range electrostatic cut-off rvdw = 1.0 ; Short-range Van der Waals cut-off pbc = xyz ; Periodic Boundary Conditions in all 3 dimensions

I verified that the OW type (oxygen atom of a SPC water molecule) was presented in both com\_solv.gro and com\_solv.top files.

I would like to know if anyone could help me with this error. If necessary, I can provide my input files (com\_solv.gro and com\_solv.top).

Sincerely,

Eduardo.

---

<div class="post-metadata">

**Author:** ![avilla](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@avilla](https://gromacs.bioexcel.eu/u/avilla)\
**Post date:** [December 23, 2020, 8:33am UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/2 "2020-12-23T08:33:59Z")

</div>

Hi,

> I converted both topology and structure files of my system from the Amber package to the Gromacs one. Therefore, I have the com.gro and com.top files. The next step was the inclusion of solvent molecules using the following command line:

> gmx solvate -cp newbox.gro -cs spc216.gro -o com\_solv.gro -p topol.top

As input to gmx solvate you have to provide the molecule in a box and the topology (in your case -p com.top) if you want that the command add water molecules in the coordinate file and in the topology file.

My guess is that you got an error when running

> gmx grompp -f ions.mdp -c com\_solv.gro -p com\_solv.top -o ions.tpr

since your topology does not contain water molecules. Note gmx solvate does not rename the \*.top file, but just add a line in the given \*.top

Best regards  
Alessandra

---

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 23, 2020, 12:41pm UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/3 "2020-12-23T12:41:04Z")

</div>

Dear Alessandra,

Thank you for your response. Actually, in order to include water molecules in the coordinate file (in a box) and in the topology file, I used:

gmx solvate -cp com\_vac1.gro -cs spc216.gro -o com\_solv.gro -p com\_vac.top

As you mentioned, I renamed the topology file:

com\_vac.top ---------\> com\_solv.top

After that, I tried to include ions:

gmx grompp -f ions.mdp -c com\_solv.gro -p com\_solv.top -o ions.tpr

Then, I got the error that I mentioned:

* * *

GROMACS: gmx grompp, version 2018.1  
Executable: /usr/bin/gmx  
Data prefix: /usr  
Working dir: /home/eduardo/Documents/Projeto\_Doutorado/Gromacs/Gromacs-cddp\_CNH/AlignZ  
Command line:  
gmx grompp -f ions.mdp -c com\_solv.gro -p com\_solv.top -o ions.tpr

Setting the LD random seed to 1673495039  
Generated 171 of the 171 non-bonded parameter combinations  
Generating 1-4 interactions: fudge = 0.5  
Generated 171 of the 171 1-4 parameter combinations  
Excluding 3 bonded neighbours molecule type ‘CI1’  
Excluding 3 bonded neighbours molecule type ‘CI2’  
Excluding 3 bonded neighbours molecule type ‘CI3’  
Excluding 3 bonded neighbours molecule type ‘CNH’

ERROR 1 [file com\_solv.top, line 5337]:  
No such moleculetype SOL

* * *

Program: gmx grompp, version 2018.1  
Source file: src/gromacs/gmxpreprocess/toppush.cpp (line 2439)

Fatal error:  
There was 1 error in input file(s)

* * *

I verified the com\_solv.top file and at the end of this file, I have:

[system]  
; Name  
Generic title in water

[molecules]  
; Compound #mols  
CI1 1  
CI2 1  
CI3 1  
CNH 1  
SOL 11105

* * *

Do you think I need to include a line in this file (com\_solv.top) indicating the specific force field for these water molecules? I am asking this question, since the only mention of solvent molecules in this topology file is the “SOL” indicating the number of water molecules. The other parameters presented in this file refer to the solute.

Sincerely,

Eduardo.

---

<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:** [December 23, 2020, 2:23pm UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/4 "2020-12-23T14:23:23Z")

</div>

A vacuum topology will not `#include` a water topology, so you cannot simply rename the file, you need to add a water model into it.

---

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 23, 2020, 2:45pm UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/5 "2020-12-23T14:45:18Z")

</div>

Dear jalemkul,

I did not just rename the vaccum topology. Firstly, I had the topology (com\_vac.top):

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*[system]  
; Name  
Generic title

[molecules]  
; Compound #mols  
CI1 1  
CI2 1  
CI3 1  
CNH 1

* * *

After that, I solvated this system with the command:

gmx solvate -cp com\_vac.gro -cs spc216.gro -o com\_solv.gro -p com\_vac.top

Now, this com\_vac.top includes the water molecules:

* * *

[system]  
; Name  
Generic title in water

[molecules]  
; Compound #mols  
CI1 1  
CI2 1  
CI3 1  
CNH 1  
SOL 11105

* * *

The SOL refers to the 11105 water molecules that were included in my topology file. This way, I renamed this file only for indicating a new solvated topology: com\_solv.top

Finally, I got an error during the inclusion of ions:

* * *

* * *

GROMACS: gmx grompp, version 2018.1  
Executable: /usr/bin/gmx  
Data prefix: /usr  
Working dir: /home/eduardo/Documents/Projeto\_Doutorado/Gromacs/Gromacs-cddp\_CNH/AlignZ  
Command line:  
gmx grompp -f ions.mdp -c com\_solv.gro -p com\_solv.top -o ions.tpr

Setting the LD random seed to 1673495039  
Generated 171 of the 171 non-bonded parameter combinations  
Generating 1-4 interactions: fudge = 0.5  
Generated 171 of the 171 1-4 parameter combinations  
Excluding 3 bonded neighbours molecule type ‘CI1’  
Excluding 3 bonded neighbours molecule type ‘CI2’  
Excluding 3 bonded neighbours molecule type ‘CI3’  
Excluding 3 bonded neighbours molecule type ‘CNH’

ERROR 1 [file com\_solv.top, line 5337]:  
No such moleculetype SOL

Program: gmx grompp, version 2018.1  
Source file: src/gromacs/gmxpreprocess/toppush.cpp (line 2439)

Fatal error:  
There was 1 error in input file(s)

* * *

This new topology includes the water molecules, but it seems that the SOL (solvent) is not recognized as solvent molecules.

---

<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:** [December 23, 2020, 3:05pm UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/6 "2020-12-23T15:05:31Z")

</div>

The new topology says that the associated coordinates now have water added, but it contains nothing to define the topology of those water molecules. That is your problem. Like I said, you need to manually `#include` a water topology into com\_sol.top, you can’t just copy it from the vacuum topology and use it as input into `gmx solvate`.

---

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 23, 2020, 3:12pm UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/7 "2020-12-23T15:12:30Z")

</div>

Dear jalemkul,

I will include a water topology into com\_sol.top. Thank you for your help.

Sincerely,

Eduardo.

---

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 23, 2020, 6:24pm UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/8 "2020-12-23T18:24:23Z")

</div>

Dear jalemkul,

## In order to define a water topology, I included the following line in com\_solv.top:

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

[system]  
; Name  
Generic title in water

## [molecules] ; Compound #mols CI1 1 CI2 1 CI3 1 CNH 1 SOL 11105

Should I explicitly included the water topology in this file? For example, by adding the lines:

* * *

[moleculetype]  
; molname nrexcl  
SOL 2

[atoms]  
; nr type resnr residue atom cgnr charge mass  
1 opls\_116 1 SOL OW 1 -0.82  
2 opls\_117 1 SOL HW1 1 0.41  
3 opls\_117 1 SOL HW2 1 0.41

#ifndef FLEXIBLE  
[settles]  
; OW funct doh dhh  
1 1 0.1 0.16330

[exclusions]  
1 2 3  
2 1 3  
3 1 2  
#else  
[bonds]  
; i j funct length force.c.  
1 2 1 0.1 345000 0.1 345000  
1 3 1 0.1 345000 0.1 345000

## [angles] ; i j k funct angle force.c. 2 1 3 1 109.47 383 109.47 383 #endif

I am asking it, since I got an error when I used only the #include:

* * *

GROMACS: gmx grompp, version 2018.1  
Executable: /usr/bin/gmx  
Data prefix: /usr  
Working dir: /home/eduardo/Documents/Projeto\_Doutorado/Gromacs/Gromacs-cddp\_CNH/AlignZ  
Command line:  
gmx grompp -f ions.mdp -c com\_solv.gro -p com\_solv.top -o ions.tpr

Setting the LD random seed to -407922730  
Generated 171 of the 171 non-bonded parameter combinations  
Generating 1-4 interactions: fudge = 0.5  
Generated 171 of the 171 1-4 parameter combinations

## ERROR 1 [file spc.itp, line 7]: Atomtype opls\_116 not found …

This opls\_116 atomtype should be listed in the .gro file?

---

<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:** [December 23, 2020, 8:05pm UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/9 "2020-12-23T20:05:54Z")

</div>

> [@Eduardo1](#):
>
> ERROR 1 [file spc.itp, line 7]:  
> Atomtype opls\_116 not found

If you generated your original topology with AMBER, you can’t start mixing in OPLS-AA topologies with associated atom types. You should use an AMBER-compatible water topology.

---

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 24, 2020, 12:26pm UTC](https://gromacs.bioexcel.eu/t/error-during-the-inclusion-of-ions/1319/10 "2020-12-24T12:26:18Z")

</div>

Dear jalemkul,

I would like to thank you for your response. I’ll select an AMBER-compatible water topology.

Sincerely,

Eduardo.
