Fatal error: number of coordinates in coordinate file (system_inflated.gro) does not match topology

GROMACS version: 2022.1
GROMACS modification: No
Here post your question:

Membrane Protein: KALP15 in DPPC

Step Three: Defining the Unit Cell & Adding Solvent

2. Pack the lipids around the protein

  1. I ran the below command:
    perl inflategro.pl system.gro 4 DPPC 14 system_inflated.gro 5 area.dat

this resulted in the output below:
There are 20 lipids within cut-off range…
11 will be removed from the upper leaflet…
9 will be removed from the lower leaflet…

  1. I then removed these 20 lipids from my topol.top file resulting in the below:

DPPC 108

  1. I then reached the next command below:

gmx grompp -f minim_inflategro.mdp -c system_inflated.gro -p topol.top -r system_inflated.gro -o system_inflated_em.tpr

and received the below error:
Fatal error:
number of coordinates in coordinate file (system_inflated.gro, 41663)
does not match topology (topol.top, 36263)

Upon inspection of the two above files I saw that my generated system inflated has en extra 20 lipids (128 total lipids) which if I delete 20, this will result in my system_inflated.gro file then having 108 lipids like my topol.top and moreover then having the same number of total atoms as my topol.top (36263).

An additional discrepancy that is exhibited in my generated system_inflated.gro file is that the total number of atoms at the top of the file (which I believe this is what this is indicating) is 41663, see below:

What you read here has nothing to do with anything. So you don’t have to read it. Thank you.
41663
1ALA N 1 16.266 14.952 8.409
1ALA H1 2 16.317 14.976 8.492

which does not match the total number if atoms in this file regardless:

433CYS O230863 13.288 12.184 1.156
1DPPC 0 7.279 18.068 5.265

128DPPC C50 6400 24.347 0.469 3.086
25.67360 25.77400 6.59650

Totaling: 37263 instead of the above indicated 41663

Also, I MANUALLY DELETED THE FINAL 20 LIPIDS FROM MY SYSTEM_INFLATED.GRO FILE and changed the top atom number from 41663 to 36263 similar to my manual change of my topol.top file to DPPC 108 and ran the command again :
gmx grompp -f minim_inflategro.mdp -c system_inflated.gro -p topol.top -r system_inflated.gro -o system_inflated_em.tpr

but this generated many more errors.

My thinking, according to the directions in the tutorial, is that via the execution of the below command:

perl inflategro.pl system.gro 4 DPPC 14 system_inflated.gro 5 area.dat

this should have generated a system_inflated.gro file exhibiting a total atom number at the top of 36263 and just the 108 lipids not the 128 exhibited. Any ideas why it did not generate this file properly please let me know, thanks:)

Thanks:)