xnn.common.data.runner_io.iter_runner_data#

xnn.common.data.runner_io.iter_runner_data(path, units='xnn', charges=True)[source]#

Iterate over the structures of a RuNNer input.data file.

Parameters:
  • path (str or pathlib.Path) – The file.

  • units (str, optional) – "xnn" (default): Angstrom, eV and eV/Angstrom; "atomic": the file’s bohr, hartree and hartree/bohr unchanged.

  • charges (bool, optional) – Return the per-atom charge column as the charges label (default). Data sets without reference charges carry zeros in that column; pass False so they are not taken for labels.

Yields:

dict – Structure dicts with pos, atomic_numbers, cell, pbc and, when present, energy, forces, charges, total_charge and comment.

Return type:

Iterable[dict[str, Any]]