iodata.formats.poscar module

VASP 5 POSCAR file format.

This format is used by VASP 5.X and VESTA.

dump_one(f, data)[source]

Dump a single frame into a VASP 5 POSCAR file.

Parameters:
  • f (TextIO) – A writeable file object.

  • data (IOData) – An IOData instance which must have the following attributes initialized: atcoords, atnums, cellvecs. If the following attributes are present, they are also dumped into the file: title.

Notes

load_one(lit)[source]

Load a single frame from a VASP 5 POSCAR file.

Parameters:

lit (LineIterator) – The line iterator to read the data from.

Return type:

dict

Returns:

result (dict) – A dictionary with IOData attributes. The following attributes are guaranteed to be loaded: atcoords, atnums, cellvecs, title.