Пример #1
0
 def test_hydroxyl(self):
     hydroxyls = np.array(
         [nuclinfo.hydroxyl(self.universe, self.universe.atoms.segids[0], resid) for resid in (7, 10, 11, 22)]
     )
     expected_hydroxyls = np.array([122.73991394, 123.34986115, 123.20658112, 122.57156372], dtype=np.float32)
     assert_array_almost_equal(
         hydroxyls, expected_hydroxyls, self.prec, err_msg="RNA hydroxyl dihedrals do not match"
     )
Пример #2
0
def test_hydroxyl(universe):
    hydroxyls = np.array([
        nuclinfo.hydroxyl(universe, universe.atoms.segids[0], resid)
        for resid in (7, 10, 11, 22)
    ])
    expected_hydroxyls = np.array(
        [122.73991394, 123.34986115, 123.20658112, 122.57156372],
        dtype=np.float32)
    assert_array_almost_equal(hydroxyls,
                              expected_hydroxyls,
                              PREC,
                              err_msg="RNA hydroxyl dihedrals do not match")
Пример #3
0
 def test_hydroxyl_2(self):
     val = nuclinfo.hydroxyl(self.u, seg='RNAA', i=5)
     assert_almost_equal(val, 122.965, decimal=3)
Пример #4
0
 def test_hydroxyl_1(self):
     val = nuclinfo.hydroxyl(self.u, seg='RNAA', i=20)
     assert_almost_equal(val, 122.689, decimal=3)
Пример #5
0
def test_hydroxyl(u, seg, i, expected_value):
    val = nuclinfo.hydroxyl(u, seg=seg, i=i)
    assert_almost_equal(val, expected_value, decimal=3)
Пример #6
0
def test_hydroxyl(u, seg, i, expected_value):
    val = nuclinfo.hydroxyl(u, seg=seg, i=i)
    assert_almost_equal(val, expected_value, decimal=3)