xnn.common.data.hub.oc20.OC20Builder#
- class xnn.common.data.hub.oc20.OC20Builder[source]#
Bases:
DatasetBuilderBuilder for the OC20 S2EF 200K split (adsorbates on catalyst slabs, energies and forces).
- load(*, split=None, cache_dir, energy='adsorption', n_val=10000, n_train=None, seed=0, return_info=False, quiet=False)[source]#
Download, parse and split the S2EF 200K data.
- Parameters:
split (str or None) –
Nonereturns{"train": ..., "val": ...};"train"/"val"returns that split;"all"returns every frame in file order.cache_dir (pathlib.Path) – Base cache directory; the files are stored under
cache_dir/"oc20".energy (str, optional) –
"adsorption"(default, the S2EF target) or"total".n_val (int, optional) – Size of the random validation subset, by default 10,000.
n_train (int, optional) – Truncate the training split to its first
n_trainframes.seed (int, optional) – Seed of the random split, by default 0.
return_info (bool, optional) – Add an
infodict (sid,tags,reference_energy,total_energy) to every structure.quiet (bool, optional) – Suppress download progress output.
- Returns:
dict of {str – Structure dicts with
pos,atomic_numbers,cell,pbc,energy(eV),forces(eV/Angstrom) andatom_force_weight.- Return type:
- Raises:
ValueError – For an unknown
energyorsplit.