Skip to content

Gromacs water defined with SETTLES appear as disconnected when read from TPR #1949

@jbarnoud

Description

@jbarnoud

Expected behaviour

Water molecules appear as fragments.

Actual behaviour

Water defined in Gromacs to use the SETTLES algorithm appear as disconnected when read from a TPR as the SETTLES definition is not read as bonds. As a consequence, the atoms appear disconnected.

I assume that the same system appears with water connected when read from any other topology source that will guess the bonds.

@davidercruz noticed the issue, but I think I remember @orbeckst mentioning it some time ago.

Code to reproduce the behaviour

import MDAnalysis as mda
from MDAnalysisTests.datafiles import TPR, XTC
u = mda.Universe(TPR, XTC)
water = u.select_atoms('resname SOL')
print('Number of water atoms', len(water))
print('Number of water molecules', len(water.split('molecule')))
print('Number of water fragments', len(water.fragments))
print('Number of bonds in the water', len(water.bonds))

Currently version of MDAnalysis:

(run python -c "import MDAnalysis as mda; print(mda.__version__)")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions