Skip to content

torch-molecule 0.2.1

Latest

Choose a tag to compare

@liugangcode liugangcode released this 31 Oct 12:39
· 2 commits to main since this release

Simpler access to the molecular dataset hub,
in the style of scikit-learn's loaders:

from torch_molecule.datasets import load_dataset, list_datasets

X, y = load_dataset("qm9", targets=["gap"], return_X_y=True)
data = load_dataset("moleculeace", "chembl204_ki", split="train")
list_datasets("thrombin")
  • Sources published per target or assay (MoleculeACE, WelQrate, OPERA, ...) are now one dataset
    with one config each; former names such as moleculeace_chembl204_ki still load. A dataset
    with several configs asks for one instead of loading the first.
  • data.info says what each config and target is (title, label, units, ChEMBL or PubChem context).
  • New scheme=, columns=, task_values(), load_table() and download_files() for source
    splits, extra columns, assays, full tables and native files.
  • Files are cached in ~/torchmol_data (TORCHMOL_DATA to change it).

0.2.0 cannot read the hub's renamed datasets; upgrade with pip install -U torch-molecule.