Example #1
0
 def test_get_structure_by_formula(self):
     data = COD().get_structure_by_formula("Li2O")
     self.assertTrue(len(data) > 15)
     self.assertEqual(data[0]["structure"].composition.reduced_formula,
                      "Li2O")
Example #2
0
 def test_get_structure_by_id(self):
     s = COD().get_structure_by_id(2002926)
     self.assertEqual(s.formula, "Be8 H64 N16 F32")
Example #3
0
 def test_get_cod_ids(self):
     ids = COD().get_cod_ids("Li2O")
     self.assertTrue(len(ids) > 15)