示例#1
0
 def test_as_dict_and_from_dict(self):
     file_name = os.path.join(test_dir, 'HEADER')
     header = Header.from_file(file_name)
     struct = header.struct
     pot = FeffPot(struct, 'O')
     d = pot.as_dict()
     pot2 = FeffPot.from_dict(d)
     self.assertEqual(str(pot), str(pot2),
                      "FeffPot to and from dict does not match")
示例#2
0
    def get_feff_pot(self, structure, central_atom):
        """
        Creates string representation of potentials used in POTENTIAL file and
        feff.inp.

        Args:
            structure: pymatgen structure object
            central_atom: atom symbol string for absorbing atom

        Returns:
            FeffPot object
        """
        return FeffPot(structure, central_atom)