示例#1
0
 def test_euclidian_distance_array(self, params1, params2):
     expect = np.sum((np.array(params1) - np.array(params2))**2)
     a = Atom(*params1)
     assert a.euclidian_dist2(np.array(params2)) == expect
示例#2
0
 def test_euclidian_distance_array2(self, params1, params2):
     expect = np.sum((np.array(params1) - np.array(params2))**2)
     a = Atom(id=1, *params1)
     b = Coordinate(*params2)
     assert a.euclidian_dist2(b) == expect
示例#3
0
 def test_euclidian_distance_array(self, params1, params2):
     expect = np.sum((np.array(params1) - np.array(params2))**2)
     a = Atom(field_name="ATOM", id=1, *params1)
     assert a.euclidian_dist2(np.array(params2)) == expect