xnn.common.data.runner_io.write_runner_data#

xnn.common.data.runner_io.write_runner_data(structures, path, units='xnn')[source]#

Write structure dicts to a RuNNer input.data file (default layout).

Each structure gives pos and atomic_numbers and optionally cell (written when pbc is set or absent), energy, forces, charges, total_charge and comment; missing per-atom values are written as zeros and a missing energy as zero.

Parameters:
  • structures (iterable of dict) – The structures, in xnn units (units="xnn") or atomic units.

  • path (str or pathlib.Path) – The file to write.

  • units (str, optional) – The units of structures: "xnn" (default, converted to bohr and hartree) or "atomic" (written unchanged).

Return type:

None