code: def write_file(self, filename, file_format="xyz"):
          
          mol = pb.Molecule(self._obmol)
          return mol.write(file_format, filename, overwrite=True)
docs: Uses OpenBabel to output all supported formats.
  
          Args:
              filename: Filename of file to output
              file_format: String specifying any OpenBabel supported formats.