Preparation of Oxygen in Water

GROMACS version: 2022.2
GROMACS modification: No

I want to run MD simulation of oxygen in water. Oxygen molecule was prepared by quantum calculation and Antechamber. Topology file prepared by acpype. First, I used gmx insert-molecules to set up the box. Then, I add water by gmx solvate. When I try gmx grompp, there is an error:

“No such molecule type SOL”

I searched on internet, someone sugget to add #include “oplsaa.ff/spce.itp” and remove SOL from [ molecules ]. I tried it, but other error come:

“ERROR 1 [file spce.itp, line 7]: Atomtype opls_116 not found”

Can anyone help me? Here is the topology file:

; OXY_GMX.top created by acpype (v: 2022.6.6) on Sat Jun 22 00:58:34 2024

[ defaults ]
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
1 2 yes 0.5 0.8333333333

[ atomtypes ]
;name bond_type mass charge ptype sigma epsilon Amb
o o 0.00000 0.00000 A 2.95992e-01 8.78640e-01 ; 1.66 0.2100

[ moleculetype ]
;name nrexcl
OXY 3

[ atoms ]
; nr type resi res atom cgnr charge mass ; qtot bond_type
1 o 1 OXY O 1 0.000000 16.00000 ; qtot 0.000
2 o 1 OXY O1 2 0.000000 16.00000 ; qtot 0.000

[ bonds ]
; ai aj funct r k
1 2 1 1.4300e-01 3.2158e+05 ; O - O1

[ system ]
OXY in water

[ molecules ]
; Compound nmols
OXY 1
#include “oplsaa.ff/spce.itp”

Is it because I neglect gmx pdb2gmx step? But, I feel stuck on how to solavte GAFF molecule with SPC/E water model

When you add the solvent, your [ atomtypes ] do not include the definition of water atom types. You can include the force field parameters with oplsaa.ff/forcefield.itp, but then remember not to duplicate [ defaults ].

You will find an extended discussion of the different sections in the manual.

I have tried to include ff parameter to the topology file, but the error was still happening.
Do you know how to build system by acpype? I mean, in my case, is it correct when I do this step:

  1. build system just containing oxygen by PACKMOL
  2. define force field (GAFF) by Antechamber/AmberTools
  3. make gromacs coordinate dan topology by acpype
  4. gmx solvate to add water to the system

I also tried this step:

  1. gmx pdb2gmx to make topology file just containing spce water
  2. gmx insert-molecules to add oxygen to the system
  3. edited topology file by including “oxy.itp” generated by acpype and added number of oxygen molecules in [ molecules ]
  4. gmx solvate to add spce water fulfilling the box

Of course, the error still come.

Look, your topology - however you prepare it - needs to have:

  • a molecule definition for O2
  • a molecule definition for SPC/E
  • atomtypes for O2
  • atomtypes for SPC/E

In the last step, you tried I believe you’re going to miss the definition of the o atomtype:

o o 0.00000 0.00000 A 2.95992e-01 8.78640e-01 ; 1.66 0.2100

so just manually insert it into your topology (e.g. create another [ atomtypes ] section after your #include oplsaa.ff/forcefield.itp in your topol.top).

Since your non-standard atomtypes for O2 come from external files, gmx pdb2gmx will not know it has to include them too.

Can I add O2.itp file into …/gromacs/share/topamber99.ff or …/oplsaa.ff, because there are #include oplsaa.ff/forcefield.itp (or amber99.ff) in the .top file

That’s not a big issue in this case, but in general, never mix e.g. OPLS and Amber parameters.

Just include the molecule definition in the .top file, but remember that placement matters (best if you place it right after #include oplsaa.ff/forcefield.itp). I’m assuming O2.itp has both [ atomtypes ] and [ moleculetype ] entries.

Thank you for your guide. Let me ask the last question. As you said that mixing OPLS and Amber parameters is not a big deal in this case, but it is in other cases. So, because Antechamber generate Amber parameters, should I use amber99.ff instead of OPLS?