Exemple #1
0
 def test_distance(self):
     m = SASModel()
     n = SASModel()
     m.read(self.testfile1)
     n.read(self.testfile2)
     f_np = m.dist(n, m.atoms, n.atoms, False)
     f_cy = m.dist(n, m.atoms, n.atoms, True)
     self.assertAlmostEqual(f_np, f_cy, 10,
                            "distance is the same %s!=%s" % (f_np, f_cy))
Exemple #2
0
 def test_same(self):
     m = SASModel()
     n = SASModel()
     m.read(self.testfile1)
     n.read(self.testfile1)
     numpy.random.shuffle(n.atoms)
     f_np = m.dist(n, m.atoms, n.atoms, False)
     f_cy = m.dist(n, m.atoms, n.atoms, True)
     self.assertAlmostEqual(f_np, 0, 10, "NSD not nul with np")
     self.assertAlmostEqual(f_cy, 0, 10, "NSD not nul with cy")