Ejemplo n.º 1
0
 def test_rangeexpand_w_ints_fails(self):
     expanded_range = residue_and_atom.rangeexpand_residues2residxs([0, 10, 20],
                                                                    self.fragments,
                                                                    self.top,
                                                                    interpret_as_res_idxs=True
                                                                    )
     np.testing.assert_array_equal(expanded_range,[0,10,20])
Ejemplo n.º 2
0
 def test_rangeexpand_resSeq_one_number_w_comma(self):
     expanded_range =   residue_and_atom.rangeexpand_residues2residxs("381,",
                                                                  self.fragments,
                                                                  self.top,
                                                                  sort=True
                                                                  )
     np.testing.assert_array_equal(expanded_range,[6])
Ejemplo n.º 3
0
 def test_rangeexpand_resSeq_sort(self):
     expanded_range =   residue_and_atom.rangeexpand_residues2residxs("381,26",
                                                                  self.fragments,
                                                                  self.top,
                                                                  sort=True
                                                                  )
     np.testing.assert_array_equal(expanded_range,[3,6])
Ejemplo n.º 4
0
 def test_rangeexpand_w_ints_fails_as_resSeq(self):
     with pytest.raises(ValueError):
         residue_and_atom.rangeexpand_residues2residxs([0, 10, 20],
                                                       self.fragments,
                                                       self.top,
                                                       )
Ejemplo n.º 5
0
 def test_rangeexpand_raises_on_empty_wildcard(self):
     with pytest.raises(ValueError):
         expanded_range =   residue_and_atom.rangeexpand_residues2residxs("ARG*",
                                                                      self.fragments,
                                                                      self.top,
                                                                      )
Ejemplo n.º 6
0
 def test_rangeexpand_resSeq_w_jumps(self):
     expanded_range =   residue_and_atom.rangeexpand_residues2residxs("26-381",
                                                                  self.fragments,
                                                                  self.top,
                                                                  )
     np.testing.assert_array_equal(expanded_range,[3,4,5,6])
Ejemplo n.º 7
0
 def test_rangeexpand_res_idxs(self):
     expanded_range =   residue_and_atom.rangeexpand_residues2residxs("2-4,6",
                                                                  self.fragments,
                                                                  self.top,
                                                                  interpret_as_res_idxs=True)
     np.testing.assert_array_equal(expanded_range,[2,3,4,6])
Ejemplo n.º 8
0
 def test_wildcards(self):
     expanded_range =   residue_and_atom.rangeexpand_residues2residxs("GLU*",
                                                                  self.fragments,
                                                                  self.top)
     np.testing.assert_array_equal(expanded_range, [0,4])