Skip to content

Commit

Permalink
ENH: support tpx 133 (GMX 2024.1) (#4523)
Browse files Browse the repository at this point in the history
* ENH: support tpx 133 (GMX 2024.1)
* One of my postdocs (Emvia) needs parsing of newer
  `.tpr` files to work; we actually are using tpx version
  `130` internally, but that wasn't from a stable release,
  so I just went for `2024.1` and presumbly we can just use
  `convert-tpr` to "up-version" to the stable release version.
* This patch used `convert-tpr` with GMX `2024.1` to mimic
  Jonathan's changes from gh-4052, when we last bumped `tpx`
  version. The full testsuite passed for me locally at least, so
  maybe we'll be lucky enough to have another simple bump.
* DOC: PR 4523 revisions
* add `CHANGELOG` and TPR docs updates
  • Loading branch information
tylerjereddy authored Mar 25, 2024
1 parent 0582265 commit f5335b4
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 10 deletions.
4 changes: 3 additions & 1 deletion package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ The rules for this file:

-------------------------------------------------------------------------------
??/??/?? IAlibay, HeetVekariya, marinegor, lilyminium, RMeli,
ljwoods2, aditya292002, pstaerk, PicoCentauri, BFedder
ljwoods2, aditya292002, pstaerk, PicoCentauri, BFedder,
tyler.je.reddy

* 2.8.0

Fixes
* Add support for TPR files produced by Gromacs 2024.1
* Remove mutable data from ``progressbar_kwargs`` argument in ``AnalysisBase.run()``
(PR #4459)
* Fix ChainReader `__repr__()` method when sub-reader is MemoryReader
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 @@ -66,6 +66,7 @@
122 28 2021 yes
127 28 2022 yes
129 28 2023 yes
133 28 2024.1 yes
========== ============== ==================== =====
.. [*] Files generated by the beta versions of Gromacs 2020 are NOT supported.
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/topology/tpr/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"""

#: Gromacs TPR file format versions that can be read by the TPRParser.
SUPPORTED_VERSIONS = (58, 73, 83, 100, 103, 110, 112, 116, 119, 122, 127, 129)
SUPPORTED_VERSIONS = (58, 73, 83, 100, 103, 110, 112, 116, 119, 122, 127, 129, 133)

# Some constants
STRLEN = 4096
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 6 additions & 3 deletions testsuite/MDAnalysisTests/datafiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@
"TPR450", "TPR451", "TPR452", "TPR453", "TPR454", "TPR455", "TPR455Double",
"TPR460", "TPR461", "TPR502", "TPR504", "TPR505", "TPR510", "TPR2016",
"TPR2018", "TPR2019B3", "TPR2020B2", "TPR2020", "TPR2020Double",
"TPR2021", "TPR2021Double", "TPR2022RC1", "TPR2023",
"TPR2021", "TPR2021Double", "TPR2022RC1", "TPR2023", "TPR2024",
"TPR510_bonded", "TPR2016_bonded", "TPR2018_bonded", "TPR2019B3_bonded",
"TPR2020B2_bonded", "TPR2020_bonded", "TPR2020_double_bonded",
"TPR2021_bonded", "TPR2021_double_bonded", "TPR2022RC1_bonded",
"TPR334_bonded", "TPR2023_bonded",
"TPR334_bonded", "TPR2023_bonded", "TPR2024_bonded",
"TPR_EXTRA_2021", "TPR_EXTRA_2020", "TPR_EXTRA_2018",
"TPR_EXTRA_2016", "TPR_EXTRA_407", "TPR_EXTRA_2022RC1",
"TPR_EXTRA_2023",
"TPR_EXTRA_2023", "TPR_EXTRA_2024",
"PDB_sub_sol", "PDB_sub_dry", # TRRReader sub selection
"TRR_sub_sol",
"XTC_sub_sol",
Expand Down Expand Up @@ -398,6 +398,7 @@
TPR2021 = (_data_ref / 'tprs/2lyz_gmx_2021.tpr').as_posix()
TPR2022RC1 = (_data_ref / 'tprs/2lyz_gmx_2022-rc1.tpr').as_posix()
TPR2023 = (_data_ref / 'tprs/2lyz_gmx_2023.tpr').as_posix()
TPR2024 = (_data_ref / 'tprs/2lyz_gmx_2024.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 All @@ -417,7 +418,9 @@
TPR2021_double_bonded = (_data_ref / 'tprs/all_bonded/dummy_2021_double.tpr').as_posix()
TPR2022RC1_bonded = (_data_ref / 'tprs/all_bonded/dummy_2022-rc1.tpr').as_posix()
TPR2023_bonded = (_data_ref / 'tprs/all_bonded/dummy_2023.tpr').as_posix()
TPR2024_bonded = (_data_ref / 'tprs/all_bonded/dummy_2024.tpr').as_posix()
# all interactions
TPR_EXTRA_2024 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2024.tpr').as_posix()
TPR_EXTRA_2023 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2023.tpr').as_posix()
TPR_EXTRA_2022RC1 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2022-rc1.tpr').as_posix()
TPR_EXTRA_2021 = (_data_ref / 'tprs/virtual_sites/extra-interactions-2021.tpr').as_posix()
Expand Down
13 changes: 8 additions & 5 deletions testsuite/MDAnalysisTests/topology/test_tprparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
TPR450, TPR451, TPR452, TPR453, TPR454, TPR455, TPR455Double,
TPR460, TPR461, TPR502, TPR504, TPR505, TPR510, TPR510_bonded,
TPR2016, TPR2018, TPR2019B3, TPR2020B2, TPR2020, TPR2020Double,
TPR2021, TPR2021Double, TPR2022RC1, TPR2023,
TPR2021, TPR2021Double, TPR2022RC1, TPR2023, TPR2024,
TPR2016_bonded, TPR2018_bonded, TPR2019B3_bonded,
TPR2020B2_bonded, TPR2020_bonded, TPR2020_double_bonded,
TPR2021_bonded, TPR2021_double_bonded, TPR334_bonded,
TPR2022RC1_bonded, TPR2023_bonded,
TPR2022RC1_bonded, TPR2023_bonded, TPR2024_bonded,
TPR_EXTRA_2021, TPR_EXTRA_2020, TPR_EXTRA_2018,
TPR_EXTRA_2016, TPR_EXTRA_407, TPR_EXTRA_2022RC1,
TPR_EXTRA_2023,
TPR_EXTRA_2023, TPR_EXTRA_2024,
XTC,
)
from MDAnalysisTests.topology.base import ParserBase
Expand All @@ -57,6 +57,8 @@
TPR2020_double_bonded,
TPR2022RC1_bonded,
TPR2023_bonded,
TPR2024_bonded,
TPR_EXTRA_2024,
TPR_EXTRA_2023,
TPR_EXTRA_2022RC1,
TPR_EXTRA_2021,
Expand Down Expand Up @@ -130,7 +132,8 @@ class TestTPRGromacsVersions(TPRAttrs):
TPR407, TPR450, TPR451, TPR452, TPR453, TPR454,
TPR455, TPR502, TPR504, TPR505, TPR510, TPR2016,
TPR2018, TPR2019B3, TPR2020, TPR2020Double,
TPR2021, TPR2021Double, TPR2022RC1, TPR2023,])
TPR2021, TPR2021Double, TPR2022RC1, TPR2023,
TPR2024])
def filename(self, request):
return request.param

Expand Down Expand Up @@ -257,7 +260,7 @@ def test_all_impropers(topology, impr):
@pytest.fixture(params=(
TPR400, TPR402, TPR403, TPR404, TPR405, TPR406, TPR407, TPR450, TPR451,
TPR452, TPR453, TPR454, TPR502, TPR504, TPR505, TPR510, TPR2016, TPR2018,
TPR2023,
TPR2023, TPR2024,
))
def bonds_water(request):
parser = MDAnalysis.topology.TPRParser.TPRParser(request.param).parse()
Expand Down

0 comments on commit f5335b4

Please sign in to comment.