Ejemplo n.º 1
0
 def test_from_string(self):
     header = Header.from_string(header_string)
     self.assertEqual(
         header.struct.composition.reduced_formula,
         "CoO",
         "Failed to generate structure from HEADER string",
     )
Ejemplo n.º 2
0
 def test_get_string(self):
     header = Header.from_string(header_string)
     struc = header.struct
     central_atom = 'O'
     a = Atoms(struc, central_atom, radius=10.)
     atoms = str(a)
     self.assertEqual(atoms.splitlines()[3].split()[4], central_atom,
                      "failed to create ATOMS string")
Ejemplo n.º 3
0
 def test_get_string(self):
     header = Header.from_string(header_string)
     struc = header.struct
     central_atom = 'O'
     a = Atoms(struc, central_atom, radius=10.)
     atoms = str(a)
     self.assertEqual(atoms.splitlines()[3].split()[4], central_atom,
                      "failed to create ATOMS string")
Ejemplo n.º 4
0
 def test_from_string(self):
     header = Header.from_string(header_string)
     self.assertEqual(header.struct.composition.reduced_formula, "CoO",
                      "Failed to generate structure from HEADER string")