Skip to content

Commit e6e8bb5

Browse files
committed
Add GROMACS 2025.0 TPR with NNpot
Generated input file with random set of features enabled Using inputs from gromacs/src/testutils/simulationdatabase/ `gmx grompp -f tt6710474.mdp -c ala.gro -n ala.ndx -p ala.top -o ala_nnpot_gmx_2025_0.tpr`
1 parent fd827c3 commit e6e8bb5

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed
10.7 KB
Binary file not shown.

testsuite/MDAnalysisTests/datafiles.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
"TPR_EXTRA_2024",
160160
"TPR_EXTRA_2024_4",
161161
"TPR_EXTRA_2025_0",
162+
"TPR_NNPOT_2025_0",
162163
"PDB_sub_sol",
163164
"PDB_sub_dry", # TRRReader sub selection
164165
"TRR_sub_sol",
@@ -620,6 +621,10 @@
620621
TPR_EXTRA_407 = (
621622
_data_ref / "tprs/virtual_sites/extra-interactions-4.0.7.tpr"
622623
).as_posix()
624+
# ALA dipeptide with neural network potential and a few other options
625+
TPR_NNPOT_2025_0 = (
626+
_data_ref / "tprs/ala_nnpot_gmx_2025_0.tpr"
627+
).as_posix()
623628

624629
XYZ_psf = (_data_ref / "2r9r-1b.psf").as_posix()
625630
XYZ_bz2 = (_data_ref / "2r9r-1b.xyz.bz2").as_posix()

testsuite/MDAnalysisTests/topology/test_tprparser.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
TPR2021_bonded, TPR2021_double_bonded,
5050
TPR2021Double, TPR2022RC1_bonded,
5151
TPR2023_bonded, TPR2024_4_bonded,
52-
TPR2025_0_bonded,
53-
TPR2024_bonded)
52+
TPR2025_0_bonded, TPR2024_bonded,
53+
TPR_NNPOT_2025_0)
5454
from numpy.testing import assert_equal
5555

5656
# fmt: on
@@ -211,6 +211,18 @@ class TestTPR46x(TPRAttrs):
211211
def filename(self, request):
212212
return request.param
213213

214+
class TestTPRNnpot(TPRAttrs):
215+
expected_n_atoms = 23
216+
expected_n_residues = 2
217+
expected_n_segments = 1
218+
ref_moltypes = np.array(["Protein_chain_A"] * 2, dtype=object)
219+
ref_molnums = np.array([0] * 2)
220+
ref_chainIDs = ["A"]
221+
222+
@pytest.fixture(params=[TPR_NNPOT_2025_0])
223+
def filename(self, request):
224+
return request.param
225+
214226

215227
def _test_is_in_topology(name, elements, topology_path, topology_section):
216228
"""
@@ -344,6 +356,16 @@ def test_settle(bonds_water):
344356
assert bonds_water[-1][1] == 2262
345357

346358

359+
@pytest.mark.parametrize("tpr_path", [TPR_NNPOT_2025_0])
360+
def test_ala2(tpr_path):
361+
topology = MDAnalysis.topology.TPRParser.TPRParser(tpr_path).parse()
362+
# Check that bonds etc are read correctly
363+
assert len(topology.bonds.values) == 22 # 12 Bond + 10 Connect
364+
assert len(topology.angles.values) == 21 # 21 Angle
365+
assert len(topology.dihedrals.values) == 26 # 26 Proper Dih.
366+
assert len(topology.impropers.values) == 1 # 1 Per. Imp. Dih.
367+
368+
347369
@pytest.mark.parametrize(
348370
"tpr_path, expected_exception",
349371
(

0 commit comments

Comments
 (0)