Skip to content

Commit

Permalink
Squashed 'modules/pmi/' changes from 6103587aa0..498bd81adc
Browse files Browse the repository at this point in the history
498bd81adc Work around wrong model group IDs in python-ihm 1.7
77bbdbef10 Include extra 3D-EM-restraint-related fields

git-subtree-dir: modules/pmi
git-subtree-split: 498bd81adcb90e69f9b99ce04198f3183baab177
  • Loading branch information
benmwebb committed Oct 29, 2024
1 parent f2d8dac commit 62cd6b8
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions modules/pmi/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 Expand Up @@ -1801,11 +1807,13 @@ class DummyProtocolStep:
_ihm_3dem_restraint.fitting_method
_ihm_3dem_restraint.fitting_method_citation_id
_ihm_3dem_restraint.struct_assembly_id
_ihm_3dem_restraint.map_segment_flag
_ihm_3dem_restraint.number_of_gaussians
_ihm_3dem_restraint.model_id
_ihm_3dem_restraint.cross_correlation_coefficient
1 4 'Gaussian mixture models' . 2 2 5 0.100
2 4 'Gaussian mixture models' . 2 2 9 0.200
_ihm_3dem_restraint.details
1 4 'Gaussian mixture models' . 2 . 2 5 0.100 .
2 4 'Gaussian mixture models' . 2 . 2 9 0.200 .
#
""")

Expand Down

0 comments on commit 62cd6b8

Please sign in to comment.