Number of coordinates in coordinate file does not match topology when using TIP4P water model

GROMACS version: gromacs-5.1.4
GROMACS modification:

Hi, I would like to address an issue with the “gmx grompp” command. I try to use TIP4P water model in my protein-water simulation system. However, there is a fatal error showing “Fatal error: number of coordinates in the coordinate file (protein_sol.gro, 130904) does not match topology (topol.top, 129760).” when I try to run “gmx_mpi grompp” for addition of ions.

The set of commands are listed below:

gmx_mpi pdb2gmx -f protein.pdb -o protein.gro -water tip4p ( Amber99sb-ildn as force field)

gmx_mpi editconf -f protein.gro -o protein_box.gro -c -bt cubic -box 10 10 10

gmx_mpi solvate -cp protein_box.gro -cs tip4p.gro -p topol.top -o protein_sol.gro

The [molecule] section of the topol.top file is as below:

[ molecules ]
; Compound #mols
Protein_chain_A 1
SOL 286
SOL 30998

May I know is it the issue with the water model? I have tried using tip3p but it doesn’t show this error.

Thank you very much.

Sincerely,
Raymond

Hi,

For some reason your [ molecules ] directive of your topology has two entries for SOL. Add the two entries together and make only one entry as SOL 31284 (e.g., 286 + 30998 = 31284). This will make the number of atoms in your topology equal to the number of atoms that are contained in your .gro file.

  • John

Hi John,

I have tried to combined them into one entry. However, I faced the same problem.

I have try to solve it using another method. I would like to verify if my method was right.

I try to use " grep -o ‘SOL’ protein_sol.gro | wc -l" command to find out the total number of solvent molecules in .gro, which is 125136 solvents in the .gro file. Hence, since I used a 4-point model, I tried to divide 125136 by 4 (125136/4) which gives 31284. Then, I used this value of 31284 to substitute the existing value of 30998 for SOL in the [molecule] section of topol.top. Fortunately, I managed to solve the “gmx_mpi grompp” error for ions.

Hence, the [molecule] of topol.top file becomes:
[ molecules ]
; Compound #mols
Protein_chain_A 1
SOL 286
SOL 31284

May I know is this the right way to get through this? The protein originally contain 286 crystal water molecules.

Sincerely,
Raymond