Ejemplo n.º 1
0
 def get_pdb_writer(self):
     return PDBWriter(
         range(1,
               len(self._atom_names) + 1),
         self._atom_names,
         self._residue_numbers,
         self._residue_names,
     )
Ejemplo n.º 2
0
 def setUp(self):
     self.atom_numbers = [1000, 1001]
     self.atom_names = ["ABCD", "A2"]
     self.residue_numbers = [999, 1000]
     self.residue_names = ["XYZ", "R2"]
     self.coords = np.zeros((2, 3))
     self.coords[0, :] = 1.0
     self.coords[1, :] = 2.0
     self.writer = PDBWriter(self.atom_numbers, self.atom_names,
                             self.residue_numbers, self.residue_names)
Ejemplo n.º 3
0
 def setUp(self):
     self.atom_numbers = [1000, 1001]
     self.atom_names = ['ABCD', 'A2']
     self.residue_numbers = [999, 1000]
     self.residue_names = ['XYZ', 'R2']
     self.coords = np.zeros((2, 3))
     self.coords[0, :] = 1.0
     self.coords[1, :] = 2.0
     self.writer = PDBWriter(self.atom_numbers, self.atom_names,
                             self.residue_numbers, self.residue_names)
Ejemplo n.º 4
0
 def test_should_raise_with_wrong_number_of_residue_names(self):
     with self.assertRaises(AssertionError):
         PDBWriter(self.atom_numbers, self.atom_names, self.residue_numbers,
                   ["R1"])