xnn.common.data.ase_io.load_structures#

xnn.common.data.ase_io.load_structures(path, index=':', **target_keys)[source]#

Load a structure file into the list-of-dicts format the dataset expects.

Reads with ase.io.read(), so any ASE-readable format works (.xyz / .extxyz / .cif / VASP / …), then converts each frame via atoms_to_structure().

Parameters:
  • path (str) – Path to a structure file readable by ase.io.read().

  • index (str, optional) – Frame selection passed to ase.io.read(); the default ":" loads all frames.

  • **target_keys – energy_key / forces_key / stress_key overrides forwarded to atoms_to_structure().

Returns:

One structure dict per frame (see atoms_to_structure()).

Return type:

list of dict