Removing water molecules from tpr file while conserving correct protein chain assignment

GROMACS version: 2025.1
GROMACS modification: No

Dear all,

I have performed four sets of MD simulations of a globular protein interacting with a coiled coil with 30,000 frames each, aiming at studying which residues interact more frequently at the interface between the protein and the coil. Since the coiled coil is very long, I have ~ 12K protein atoms and ~750K water atoms. I intend to use MDAnalysis for this, since I find it easier to extract more detailed information with it.

In MDAnalysis, I have to load the .tpr and .xtc files, select the atoms and run the analysis. However, the frames are loaded one at a time and I don’t need the waters. One solution would be to remove the solvent waters, or even have a trajectory with only the interface region. This is easy with gmx trjconv.

However, when I try to convert the tpr file, the information on chains is lost, and MDAnalysis reads all chains as “Protein in water”. Even creating an index file with the different chains didn’t work.

Another solution would be to create a coordinate file with the charges of each atom, but I didn’t find an option for creating such a file with gmx trjconv.

Would anyone know how to create the tpr file with the correct chain information when removing the water molecules?

Best,

Marcos Verissimo Alves
Universidade Federal Fluminense, Brazil

Hi Marcos,

I have been in this situation before and solved it by loading a .top topology instead of a .tpr file. Since .top is plain text, it’s much easier to modify - in your case, it should be as simple as deleting the water entry from the [ molecules ] record.
MDAnalysis will by default assume your .top is an AMBER topology file, so you will have to pass the appropriate keyword to mda.Universe:

u = mda.Universe(topol.top, traj.xtc, topology_format=“ITP”)

This should preserve the segment ID information.

See here for further reference, for example for inclusion of files from non-standard directories: 5.10. ITP topology parser — MDAnalysis 2.0.0 documentation

Best wishes,
Bjarne

Hi Bjarne,

Thanks a lot for the tip! I’ll look into it.

Best,

Marcos