Fatal error: No line with moleculetype 'SOL' found but it is present in topol.top

GROMACS version:
GROMACS modification: Yes/No
Here post your question

Hello,

I am running into this error and don’t quite understand. I am trying to neutralize my system and there is definitely a SOL moleculetype at the bottom of the topol.top file. How do I fix this?

Program: gmx genion, version 2022.5
Source file: src/gromacs/gmxpreprocess/genion.cpp (line 351)

Fatal error:
No line with moleculetype ‘SOL’ found the [ molecules ] section of file
‘topol.top’

THIS IS THE MOLECULES SECTION FROM THE TOPOL.TOP

[ 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
Protein_chain_G 1
Protein_chain_H 1
Protein_chain_I 1
Protein_chain_J 1
Protein_chain_K 1
Protein_chain_L 1
Protein_chain_M 1
Protein_chain_N 1
Protein_chain_O 1
Protein_chain_P 1
Protein_chain_Q 1
Protein_chain_R 1
Protein_chain_S 1
Protein_chain_T 1
Protein_chain_U 1
Protein_chain_V 1
Protein_chain_W 1
Protein_chain_X 1
Protein_chain_Y 1
Protein_chain_Z 1
Protein_chain_a 1
Protein_chain_b 1
Protein_chain_c 1
Protein_chain_d 1
Protein_chain_e 1
Protein_chain_f 1
Protein_chain_g 1
Protein_chain_h 1
Protein_chain_i 1
Protein_chain_j 1
Protein_chain_k 1
Protein_chain_l 1
Protein_chain_m 1
Protein_chain_n 1
Protein_chain_o 1
Protein_chain_p 1
Protein_chain_q 1
Protein_chain_r 1
Protein_chain_s 1
Protein_chain_t 1
Protein_chain_u 1
Protein_chain_v 1
Protein_chain_w 1
Protein_chain_x 1
Protein_chain_y 1
Protein_chain_z 1
Protein_chain_1 1
Protein_chain_2 1
Protein_chain_3 1
Protein_chain_4 1
Protein_chain_5 1
Protein_chain_6 1
Protein_chain_7 1
Protein_chain_8 1
SOL 876467

Hi,
You could provide some extra information.
how is your command line? did you use the option -p to provide the correct name of your topology to gmx genion ?
Kind regards
\Alessandra

Hello,

Yes so command line is:

gmx genion -s ions.tpr -o solvate_ions.gro -conc 0.15 -p topol.top -pname NA -nname CL -neutral

Then I select 13-SOL

Then that error appears. However when I search in the topol.top file it has the SOL line shown like above. There is a #topol.top.1# that is backed up with no SOL, but I am confused.

The most likely cause of the issue is the presence of a non-*nix style line ending on the SOL line, implying the file was once opened with a non-plain text editor. Run dos2unix on topol.top and then try again.

The purpose of genion is to modify the topology. GROMACS always writes these types of backup file instead of overwriting one with the same name, so you can recover your work if something goes wrong.

1 Like

ok, thank you both.