xnn.common.data.hub.lode_dimers.LODEDimersBuilder#

class xnn.common.data.hub.lode_dimers.LODEDimersBuilder[source]#

Bases: DatasetBuilder

Builder for the LODE non-bonded interactions dataset.

See the module docstring for the dataset description and citation. Only the requested subset’s file is downloaded.

load(*, split=None, cache_dir, subset='bio', label=None, return_info=False, quiet=False)[source]#

Download and preprocess one sub-dataset.

Parameters:
  • split (str or None) – The dataset ships no official train/test split. None returns {"all": structures}; "all" returns the list directly. (Split it yourself – e.g. by distance for the paper’s near/far extrapolation task.)

  • cache_dir (pathlib.Path) – Base cache directory; files are stored under cache_dir/"lode_dimers".

  • subset (str, optional) – Which sub-dataset to load. One of bio (default; biomolecular dimers with energies & forces), bio_scan (a bundled charged/polar dimer distance scan used by the long-range example notebooks; no download), monomers, point_charges_coulomb, point_charges_dispersion, xenon.

  • label (str, optional) – For subset="bio" / "bio_scan" only: keep only dimers of this fragment-polarity class – one of AA, CA, CC, CP, PA, PP. None (default) keeps all classes.

  • return_info (bool, optional) – If True, attach the frame’s extxyz info (the per-frame metadata) to each structure dict under the "info" key. For the biomolecular dimers this carries label, dimer_id, distance, the per-monomer energyA / energyB and chargeA / chargeB, etc. – enough to compute binding energies E_dimer - energyA - energyB directly. Downstream graph building ignores the extra key, so it is safe to combine with cutoff. Defaults to False.

  • quiet (bool, optional) – Suppress download progress output. Defaults to False.

Returns:

dict of {str – Structure dicts with keys pos (N, 3), atomic_numbers (N,), cell (3, 3), pbc (3,), energy, – where the subset provides them – forces (N, 3), and (with return_info) info.

Return type:

list of dict} or list of dict

Raises:

ValueError – If subset / label is unknown, label is used with a non-bio subset, or split is unrecognized.