|
49 | 49 | TPR2021_bonded, TPR2021_double_bonded, |
50 | 50 | TPR2021Double, TPR2022RC1_bonded, |
51 | 51 | TPR2023_bonded, TPR2024_4_bonded, |
52 | | - TPR2025_0_bonded, |
53 | | - TPR2024_bonded) |
| 52 | + TPR2025_0_bonded, TPR2024_bonded, |
| 53 | + TPR_NNPOT_2025_0) |
54 | 54 | from numpy.testing import assert_equal |
55 | 55 |
|
56 | 56 | # fmt: on |
@@ -211,6 +211,18 @@ class TestTPR46x(TPRAttrs): |
211 | 211 | def filename(self, request): |
212 | 212 | return request.param |
213 | 213 |
|
| 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 | + |
214 | 226 |
|
215 | 227 | def _test_is_in_topology(name, elements, topology_path, topology_section): |
216 | 228 | """ |
@@ -344,6 +356,16 @@ def test_settle(bonds_water): |
344 | 356 | assert bonds_water[-1][1] == 2262 |
345 | 357 |
|
346 | 358 |
|
| 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 | + |
347 | 369 | @pytest.mark.parametrize( |
348 | 370 | "tpr_path, expected_exception", |
349 | 371 | ( |
|
0 commit comments