xnn.common.data.hub.lode_dimers.LODEDimersBuilder#
- class xnn.common.data.hub.lode_dimers.LODEDimersBuilder[source]#
Bases:
DatasetBuilderBuilder 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.
Nonereturns{"all": structures};"all"returns the list directly. (Split it yourself – e.g. bydistancefor 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 ofAA,CA,CC,CP,PA,PP.None(default) keeps all classes.return_info (bool, optional) – If
True, attach the frame’s extxyzinfo(the per-frame metadata) to each structure dict under the"info"key. For the biomolecular dimers this carrieslabel,dimer_id,distance, the per-monomerenergyA/energyBandchargeA/chargeB, etc. – enough to compute binding energiesE_dimer - energyA - energyBdirectly. Downstream graph building ignores the extra key, so it is safe to combine withcutoff. Defaults toFalse.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 (withreturn_info)info.- Return type:
- Raises:
ValueError – If
subset/labelis unknown,labelis used with a non-biosubset, orsplitis unrecognized.