Skip to content

Commit

Permalink
Work around wrong model group IDs in python-ihm 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Oct 29, 2024
1 parent 77bbdbe commit 498bd81
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/test_mmcif.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,8 @@ def test_ensemble_dumper(self):
"""Test dumping of simple ensembles"""
class DummyPostProcess:
pass
class DummyModel:
pass
m = IMP.Model()
s = IMP.pmi.topology.System(m)
po = IMP.pmi.mmcif.ProtocolOutput()
Expand All @@ -1131,10 +1133,14 @@ class DummyPostProcess:

pp = DummyPostProcess()
pp._id = 99
po._add_simple_ensemble(pp, 'Ensemble 1', 5, 0.1, 1,
{}, None)
po._add_simple_ensemble(pp, 'Ensemble 2', 5, 0.1, 1,
{}, None)
e = po._add_simple_ensemble(pp, 'Ensemble 1', 5, 0.1, 1,
{}, None)
# Work around python-ihm 1.7 not handling IDs of empty model
# groups properly
e.model_group.append(DummyModel())
e = po._add_simple_ensemble(pp, 'Ensemble 2', 5, 0.1, 1,
{}, None)
e.model_group.append(DummyModel())
loc = ihm.location.InputFileLocation(repo='foo', path='bar')
po.set_ensemble_file(1, loc)
loc._id = 42
Expand Down

0 comments on commit 498bd81

Please sign in to comment.