xnn.common.data.hub.gmtkn55.GMTKN55Builder#
- class xnn.common.data.hub.gmtkn55.GMTKN55Builder[source]#
Bases:
DatasetBuilderBuilder for the GMTKN55 database (see the module docstring).
- load(*, split=None, cache_dir, version='v2', subsets=None, elements=None, max_abs_charge=None, closed_shell=False, quiet=False)[source]#
Download, extract and read the database.
- Parameters:
split (str or None) –
Nonereturns{"structures": [...], "reactions": [...]};"structures"(or"all") and"reactions"return one list.cache_dir (pathlib.Path) – Base cache directory; files go under
cache_dir/"gmtkn55"/"raw".version (str, optional) –
"v2"(default, updated references) or"v1"(the paper’s).subsets (str or sequence of str, optional) – Set names to load (case-insensitive);
Noneloads all 55.elements (iterable of int or str, optional) – Keep only reactions whose species contain these elements alone.
max_abs_charge (float, optional) – Keep only reactions whose species have
|total_charge|at most this value.closed_shell (bool, optional) – Keep only reactions whose species have no unpaired electrons.
quiet (bool, optional) – Suppress the download progress bar.
- Returns:
dict of {str – The structures and the reactions (see the module docstring). After filtering, the structures are those used by the kept reactions.
- Return type: