Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Fixes
DSSP by porting upstream PyDSSP 0.9.1 fix (Issue #4913)

Enhancements
* Adds support for parsing `.tpr` files produced by GROMACS 2026.0
* Enables parallelization for analysis.diffusionmap.DistanceMatrix
(Issue #4679, PR #4745)

Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/topology/TPRParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
133 28 2024.1 yes
134 28 2024.4 yes
137 28 2025.0 yes
138 28 2026.0 yes
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I didn't actually check the tpx generation (number 28 here), so we may want to double check that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm following this enum properly, we're on generation 29? https://github.com/gromacs/gromacs/blob/main/src%2Fgromacs%2Ffileio%2Ftpxio.cpp#L244

(generation is Count-1)

Comment thread
orbeckst marked this conversation as resolved.
Outdated
========== ============== ==================== =====

.. [*] Files generated by the beta versions of Gromacs 2020 are NOT supported.
Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/topology/tpr/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
133,
134,
137,
138,
)

# Some constants
Expand Down
9 changes: 9 additions & 0 deletions testsuite/MDAnalysisTests/coordinates/test_tpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
TPR455Double,
TPR_xvf_2024_4,
TPR_NNPOT_2025_0,
TPR_NNPOT_2026_0,
TPR2020B2,
INPCRD,
TPR_gh_5145,
Expand All @@ -82,6 +83,14 @@
# this case is an alanine dipeptide
# with neural network potential active
# and nonzero velocities
(
TPR_NNPOT_2026_0, # tpx 138
[2.36700e00, 2.30000e-02, 9.20000e-02],
[2.95100e00, 2.00000e-01, 2.41000e-01],
(23, 3),
[-4.72100e-01, -2.20900e-01, -2.42800e-01],
[-1.11900e-01, -3.69300e-01, -6.10000e-03],
),
(
TPR_NNPOT_2025_0, # tpx 137
[2.36700e00, 2.30000e-02, 9.20000e-02],
Expand Down
Binary file not shown.
Binary file not shown.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: these new .tprs were all produced using gmx convert-tpr with GROMACS built from source at the release tag for version 2026.0.

Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions testsuite/MDAnalysisTests/datafiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"TPR2024",
"TPR2024_4",
"TPR2025_0",
"TPR2026_0",
"TPR510_bonded",
"TPR2016_bonded",
"TPR2018_bonded",
Expand All @@ -151,6 +152,7 @@
"TPR2024_bonded",
"TPR2024_4_bonded",
"TPR2025_0_bonded",
"TPR2026_0_bonded",
"TPR_EXTRA_2021",
"TPR_EXTRA_2020",
"TPR_EXTRA_2018",
Expand All @@ -161,7 +163,9 @@
"TPR_EXTRA_2024",
"TPR_EXTRA_2024_4",
"TPR_EXTRA_2025_0",
"TPR_EXTRA_2026_0",
"TPR_NNPOT_2025_0",
"TPR_NNPOT_2026_0",
"PDB_sub_sol",
"PDB_sub_dry", # TRRReader sub selection
"TRR_sub_sol",
Expand Down Expand Up @@ -568,6 +572,7 @@
TPR2024 = (_data_ref / "tprs/2lyz_gmx_2024.tpr").as_posix()
TPR2024_4 = (_data_ref / "tprs/2lyz_gmx_2024_4.tpr").as_posix()
TPR2025_0 = (_data_ref / "tprs/2lyz_gmx_2025_0.tpr").as_posix()
TPR2026_0 = (_data_ref / "tprs/2lyz_gmx_2026_0.tpr").as_posix()
# double precision
TPR455Double = (_data_ref / "tprs/drew_gmx_4.5.5.double.tpr").as_posix()
TPR460 = (_data_ref / "tprs/ab42_gmx_4.6.tpr").as_posix()
Expand Down Expand Up @@ -600,7 +605,11 @@
TPR2024_bonded = (_data_ref / "tprs/all_bonded/dummy_2024.tpr").as_posix()
TPR2024_4_bonded = (_data_ref / "tprs/all_bonded/dummy_2024_4.tpr").as_posix()
TPR2025_0_bonded = (_data_ref / "tprs/all_bonded/dummy_2025_0.tpr").as_posix()
TPR2026_0_bonded = (_data_ref / "tprs/all_bonded/dummy_2026_0.tpr").as_posix()
# all interactions
TPR_EXTRA_2026_0 = (
_data_ref / "tprs/virtual_sites/extra-interactions-2026_0.tpr"
).as_posix()
TPR_EXTRA_2025_0 = (
_data_ref / "tprs/virtual_sites/extra-interactions-2025_0.tpr"
).as_posix()
Expand Down Expand Up @@ -633,6 +642,7 @@
).as_posix()
# ALA dipeptide with neural network potential and a few other options
TPR_NNPOT_2025_0 = (_data_ref / "tprs/ala_nnpot_gmx_2025_0.tpr").as_posix()
TPR_NNPOT_2026_0 = (_data_ref / "tprs/ala_nnpot_gmx_2026_0.tpr").as_posix()

XYZ_psf = (_data_ref / "2r9r-1b.psf").as_posix()
XYZ_bz2 = (_data_ref / "2r9r-1b.xyz.bz2").as_posix()
Expand Down
15 changes: 9 additions & 6 deletions testsuite/MDAnalysisTests/topology/test_tprparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
TPR2016, TPR2018, TPR2019B3, TPR2020,
TPR2020B2, TPR2021, TPR2022RC1,
TPR2023, TPR2024, TPR2024_4,
TPR2025_0,
TPR2025_0, TPR2026_0,
TPR_EXTRA_407, TPR_EXTRA_2016,
TPR_EXTRA_2018, TPR_EXTRA_2020,
TPR_EXTRA_2021, TPR_EXTRA_2022RC1,
TPR_EXTRA_2023, TPR_EXTRA_2024,
TPR_EXTRA_2024_4, XTC, TPR334_bonded,
TPR_EXTRA_2025_0,
TPR_EXTRA_2025_0, TPR_EXTRA_2026_0,
TPR455Double, TPR510_bonded,
TPR2016_bonded, TPR2018_bonded,
TPR2019B3_bonded, TPR2020_bonded,
Expand All @@ -50,7 +50,8 @@
TPR2021Double, TPR2022RC1_bonded,
TPR2023_bonded, TPR2024_4_bonded,
TPR2025_0_bonded, TPR2024_bonded,
TPR_NNPOT_2025_0)
TPR2026_0_bonded,
TPR_NNPOT_2025_0, TPR_NNPOT_2026_0)
from numpy.testing import assert_equal

# fmt: on
Expand All @@ -70,6 +71,8 @@
TPR2024_bonded,
TPR2024_4_bonded,
TPR2025_0_bonded,
TPR2026_0_bonded,
TPR_EXTRA_2026_0,
TPR_EXTRA_2025_0,
TPR_EXTRA_2024_4,
TPR_EXTRA_2024,
Expand Down Expand Up @@ -154,7 +157,7 @@ class TestTPRGromacsVersions(TPRAttrs):
TPR451, TPR452, TPR453, TPR454, TPR455, TPR502, TPR504, TPR505,
TPR510, TPR2016, TPR2018, TPR2019B3, TPR2020, TPR2020Double,
TPR2021, TPR2021Double, TPR2022RC1, TPR2023, TPR2024, TPR2024_4,
TPR2025_0,
TPR2025_0, TPR2026_0,
]
)
# fmt: on
Expand Down Expand Up @@ -220,7 +223,7 @@ class TestTPRNnpot(TPRAttrs):
ref_molnums = np.array([0] * 2)
ref_chainIDs = ["A"]

@pytest.fixture(params=[TPR_NNPOT_2025_0])
@pytest.fixture(params=[TPR_NNPOT_2025_0, TPR_NNPOT_2026_0])
def filename(self, request):
return request.param

Expand Down Expand Up @@ -357,7 +360,7 @@ def test_settle(bonds_water):
assert bonds_water[-1][1] == 2262


@pytest.mark.parametrize("tpr_path", [TPR_NNPOT_2025_0])
@pytest.mark.parametrize("tpr_path", [TPR_NNPOT_2025_0, TPR_NNPOT_2026_0])
def test_ala2(tpr_path):
topology = MDAnalysis.topology.TPRParser.TPRParser(tpr_path).parse()
# Check that bonds etc are read correctly
Expand Down
Loading