About the water molecules

I am using GROMACS 2024.1 and

during the pdb2gmx step, you apply the -ignh flag, which successfully generates the .gro and .top files.

However, I notice that the water molecules in the PDB file are being removed as a result of this process, which is not my intention. I amseeking a solution to prevent the removal of water molecules while still using the -ignh option.

on other hand if I run without -ignh i have errors regarding Fatal error:
Atom HB3 in residue LYS 3 was not found in rtp entry LYS with 22 atoms
while sorting atoms.

So what is the right way to retain these water molecules and process

remove the hydrogen atoms from the protein and let the gmx pdb2gmx assign the hydrogen atoms, or rename the atoms as per the rtp entry in the corresponding force field.

you can use flags to assign charges/protonations states if you want. Regarding the water molecule is confusing? do you have a system with water molecule? and you wanted to pass that through gmx pdb2gmx?

yes, I mean my system contain additional water molecules too in my PDB file. I just want to generate the .gro and .top file and retain those water molecules.

keeping the name convection with the water definition in the force field is removing the hydrogen atoms? can you paste the water molecule part pdb file, which ff and water model you are using?

I am running like this
gmx pdb2gmx -f modified_file.pdb -o processed.gro -water spce -ignh

I am using the
5: AMBER99SB protein, nucleic AMBER94 (Hornak et al., Proteins 65, 712-725, 2006) forcefield option.

I am running with -ignh to get the .gro and .top file but I want to retain the water molecules present in my pdb

if it is tip3p water in amber represented as OW, HW1 and HW2.
Remove the hydrogen from protein/rename according to Amber94 and process it like

gmx pdb2gmx -f protein.pdb

its spce as mentioned above

check the ff folder and name accordingly.

I did. I removed the Hydrogens in the protein, I had only the Water molecule hydrogens+ aminoacids without hydrogen,

Now when I run without using -ignh option just

gmx pdb2gmx -f modified_file.pdb -o waterrefprocessed.gro -water spce

I still see that all my water molecules are removed in my .gro file except one, I am not understanding why its not retaining those water SOL

HETATM>> ATOM please check the ff files related to water and protein, you need to defined the input pdb as per the definition in the FF files.

Then run

gmx pdb2gmx -f modified_file.pdb

Input.pdb:

REMARK   1 CREATED WITH OPENMM 8.1.1, 2024-04-12
ATOM      1  N   ALA A   1     132.640 119.790 118.780  1.00  0.00           N  
ATOM      2  CA  ALA A   1     133.450 119.900 117.550  1.00  0.00           C  
ATOM      3  CB  ALA A   1     134.640 120.850 117.800  1.00  0.00           C  
ATOM      4  C   ALA A   1     133.940 118.530 117.130  1.00  0.00           C  
ATOM      5  O   ALA A   1     133.470 117.500 117.630  1.00  0.00           O  
ATOM      6  N   ALA A   2     134.880 118.520 116.190  1.00  0.00           N  
ATOM      7  CA  ALA A   2     135.430 117.310 115.610  1.00  0.00           C  
ATOM      8  CB  ALA A   2     135.370 117.410 114.090  1.00  0.00           C  
ATOM      9  C   ALA A   2     136.840 117.090 116.080  1.00  0.00           C  
ATOM     10  O   ALA A   2     137.620 118.040 116.070  1.00  0.00           O  
HETATM33089  OW   SOL A   1     152.030 130.970  99.280  1.00  0.00           O  
HETATM33090  HW1  SOL A   1     151.920 131.910  99.610  1.00  0.00           H  
HETATM33091  HW2  SOL A   1     151.980 130.340 100.050  1.00  0.00           H  
TER   33092      SOL A   1
HETATM33093  OW   SOL A   1     153.690 135.340  95.010  1.00  0.00           O  
HETATM33094  HW1  SOL A   1     154.300 136.140  95.050  1.00  0.00           H  
HETATM33095  HW2  SOL A   1     152.740 135.650  95.080  1.00  0.00           H  
TER   33096      SOL A   1
END

Output.gro:

Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
   26
    1ALA      N    1  13.264  11.979  11.878
    1ALA     H1    2  13.187  11.917  11.862
    1ALA     H2    3  13.321  11.943  11.952
    1ALA     H3    4  13.230  12.069  11.903
    1ALA     CA    5  13.345  11.990  11.755
    1ALA     HA    6  13.286  12.026  11.683
    1ALA     CB    7  13.464  12.085  11.780
    1ALA    HB1    8  13.519  12.092  11.697
    1ALA    HB2    9  13.430  12.175  11.805
    1ALA    HB3   10  13.521  12.049  11.854
    1ALA      C   11  13.394  11.853  11.713
    1ALA      O   12  13.347  11.750  11.763
    2ALA      N   13  13.488  11.852  11.619
    2ALA      H   14  13.523  11.940  11.586
    2ALA     CA   15  13.543  11.731  11.561
    2ALA     HA   16  13.487  11.655  11.594
    2ALA     CB   17  13.537  11.741  11.409
    2ALA    HB1   18  13.575  11.658  11.369
    2ALA    HB2   19  13.442  11.752  11.380
    2ALA    HB3   20  13.590  11.820  11.379
    2ALA      C   21  13.684  11.709  11.608
    2ALA    OC1   22  13.714  11.619  11.639
    2ALA    OC2   23  13.762  11.804  11.607
    0HOH     OW   24  15.203   0.000   0.000
    0HOH    HW1   25  15.192   0.000   0.000
    0HOH    HW2   26  15.198   0.000   0.000
   2.01610  12.17541  11.95204

I tried changing all ways as per spce.itp in
5: AMBER99SB protein, nucleic AMBER94 (Hornak et al., Proteins 65, 712-725, 2006) forcefield option.

nothing works

Any help please, this is a sample input and output

HETATM33089 >> ATOM

change all

HETATM >> ATOM,

what is the issue in your protein/peptide? if it is related to terminal residues, check the definitions for corresponding terminals.

Hi scinikhil Thank you, I have changed everything even HETATM >> ATOM but still not able to fix my issue

I changed the residue number in increasing order for the SOL I am able to retain few water moelcules not all and also the coordinates are getting changed and not able to preserve my previous input

share the files, so that i can have a look