Fatal error: The solvent group SOL is not continuous

GROMACS version:2020.4
GROMACS modification: No

I pull off protein for umbrella sampling in gromacs.

While pulling, I need pull.xtc and pull.gro at specific time line. So I cut the pull.xtc and get conf files at 1 second intervals.
I expect it would take too long time to calculate, so I modified the box size of the conf file with the command editconf.
After correcting the box size, I tried to put solvation and ion in the specific timeline conf.gro file again and repeat the same calculation, but I keep getting errors.

when i type


>gmx genion -s ions.tpr -o solv_ions.gro -p topol.top -pname NA -nname CL -neutral -conc 0.1



Fatal error:
The solvent group SOL is not continuous: index[893883]=900933,
index[893884]=902638

comes out

Here is my topology file...

[ molecules ]
; Compound        #mols
Protein_chain_A     1
Protein_chain_B     1
Protein_chain_C     1
Protein_chain_D     1
Protein_chain_E     1
Protein_chain_F     1
SOL         297961
NA               834
CL               870
SOL                 1

i have read similar questions but i don’t know exact way to modify my topology file.

The solvent group SOL is not continuous - User discussions - GROMACS forums (bioexcel.eu)

As it says in the message, there should be one continuous block of solvent. You will need to modify your topol.top and conf.gro files. The topology file is easiest. It should be:

[ molecules ]
; Compound        #mols
Protein_chain_A     1
Protein_chain_B     1
Protein_chain_C     1
Protein_chain_D     1
Protein_chain_E     1
Protein_chain_F     1
SOL         297962
NA               834
CL               870

Regarding the gro file you will have to modify it by hand using a text editor. You will need to cut-and-paste the last three (assuming a three-site water model) coordinate lines in the file (keep in mind that the last line is the shape of the periodic box) and insert them at the end of the large block of solvent, approximately 1700 lines from the bottom. It does not matter that the atom numbers are no longer in the right order.

At first, thank you for your careful and super kind reply.
By your advice I edited my topology fie as

[ molecules ]
; Compound        #mols
Protein_chain_A     1
Protein_chain_B     1
Protein_chain_C     1
Protein_chain_D     1
Protein_chain_E     1
Protein_chain_F     1
SOL         297962
NA               834
CL               870

and

edited my gro file to

.. blahblah
   29CL      CL 2622   0.514   5.891  25.849
   30CL      CL 2623  14.543  11.947  23.290
   31CL      CL 2624  12.403  13.849  24.292
   32CL      CL 2625   2.401  11.369  29.275
   33CL      CL 2626  10.275  10.404  33.752
   34CL      CL 2627  14.172  10.858  12.741
   35CL      CL 2628  11.105   9.463  12.681
   36CL      CL 2629   1.795  11.257  19.147
   37CL      CL 2630  12.263   9.565  16.099
   38CL      CL 2631  11.095  12.842  24.497
   39CL      CL 2632  16.095  11.693  19.005
   40CL      CL 2633   0.127   9.666  31.835
   41CL      CL 2634  15.598  12.719  39.034
   42CL      CL 2635  15.052   0.390  22.804
   43CL      CL 2636   0.967  11.627  30.566
   44CL      CL 2637   2.079   0.932  34.372
   SOL         297962
   NA               834
   CL               870
   16.10986  14.09414  39.67946

and it still doesn’t work at all.
I think < 16.10986 14.09414 39.67946 >
is box size, so i think i paste the last three line in the right place.

but the same error comes out…
**
Fatal error:
The solvent group SOL is not continuous: index[893883]=900933,
index[893884]=902638
**
can you tell me what i am doing wrong right now?
Thank you for your helpful support.

You have not properly edited the .gro file. All you need to do is move the last three SOL lines up so they immediately follow the end of the previous block. Do not copy topology information into the coordinate file; that is syntactically incorrect and will raise other errors.

Thank you for amazing answer!!
My work goes well by your advice!!
Really appreciate for your help.