Skip to content

Commit

Permalink
Squashed 'modules/pmi/' changes from d2651da..026f119
Browse files Browse the repository at this point in the history
026f119 Use assertAlmostEqual to compare float values.
30a441b Speed up test by using a smaller system.

git-subtree-dir: modules/pmi
git-subtree-split: 026f119f77a2288ae88012b8ff1703bb5e475a05
  • Loading branch information
benmwebb committed Oct 13, 2016
1 parent 1222bd3 commit 79ff0f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions modules/pmi/test/test_em_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ def test_gaussian_em(self):
p = gem.target_ps[0]
pos = IMP.core.XYZ(p).get_coordinates()

self.assertEqual(pos[0], -6.50710525063)
self.assertEqual(pos[1], -44.7706839578)
self.assertEqual(pos[2], -70.33819299)
self.assertAlmostEqual(pos[0], -6.50710525063, delta=1e-6)
self.assertAlmostEqual(pos[1], -44.7706839578, delta=1e-6)
self.assertAlmostEqual(pos[2], -70.33819299, delta=1e-6)

gem.center_target_density_on_model()
pos = IMP.core.XYZ(p).get_coordinates()
self.assertNotEqual(pos[0], -6.50710525063)
self.assertNotAlmostEqual(pos[0], -6.50710525063, delta=1e-6)

gem.center_target_density_on_origin()
pos = IMP.core.XYZ(p).get_coordinates()
self.assertEqual(pos[0], 0)
self.assertEqual(pos[1], 0)
self.assertEqual(pos[2], 0)
self.assertAlmostEqual(pos[0], 0, delta=1e-6)
self.assertAlmostEqual(pos[1], 0, delta=1e-6)
self.assertAlmostEqual(pos[2], 0, delta=1e-6)

def test_add_em_gmms_to_hierarchy(self):
"""Test adding EM Restraint GMMs to PMI2 Hierarchies and RMF"""
Expand Down
2 changes: 1 addition & 1 deletion modules/pmi/test/test_transform_mover.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def test_pmi_representation_sampling_mainchain_mover(self):



domains=[("A", "A.1", 0.10, fastafile, "1WCM:A", "BEADS", None, (1,100,0), None, 1, None, None, None, None, None, None)]
domains=[("A", "A.1", 0.10, fastafile, "1WCM:A", "BEADS", None, (1,50,0), None, 1, None, None, None, None, None, None)]

with IMP.allow_deprecated():
bm=IMP.pmi.macros.BuildModel1(simo)
Expand Down

0 comments on commit 79ff0f7

Please sign in to comment.