def test_apply_transformation(self): # non-sensical example just for testing purposes struct = self.get_structure("BaNiO3") trans = DisorderOrderedTransformation() output = trans.apply_transformation(struct) self.assertFalse(output.is_ordered) self.assertDictEqual(output[-1].species.as_dict(), {"Ni": 0.5, "Ba": 0.5})
def test_apply_transformation(self): # non-sensical example just for testing purposes struct = self.get_structure('BaNiO3') trans = DisorderOrderedTransformation() output = trans.apply_transformation(struct) self.assertFalse(output.is_ordered) self.assertDictEqual(output.species_and_occu[-1].as_dict(), {'Ni': 0.5, 'Ba': 0.5})
def test_apply_transformation(self): # non-sensical example just for testing purposes struct = self.get_structure('BaNiO3') trans = DisorderOrderedTransformation() output = trans.apply_transformation(struct) self.assertFalse(output.is_ordered) self.assertDictEqual(output.species_and_occu[-1].as_dict(), { 'Ni': 0.5, 'Ba': 0.5 })