From 7b375415b3ab08d7b916081fc8ac34acfcdb0be0 Mon Sep 17 00:00:00 2001 From: newbee1905 Date: Mon, 5 Jan 2026 10:28:56 +0700 Subject: [PATCH 1/3] fix: previous url for qm9 is change to springnature --- src/schnetpack/datasets/qm9.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/schnetpack/datasets/qm9.py b/src/schnetpack/datasets/qm9.py index b2c16fe60..ccbfe7057 100644 --- a/src/schnetpack/datasets/qm9.py +++ b/src/schnetpack/datasets/qm9.py @@ -30,8 +30,7 @@ class QM9(AtomsDataModule): References: - .. [#qm9_1] https://ndownloader.figshare.com/files/3195404 - + .. [#qm9_1] https://springernature.figshare.com/ndownloader/files/3195404 """ # properties @@ -179,7 +178,7 @@ def prepare_data(self): def _download_uncharacterized(self, tmpdir): logging.info("Downloading list of uncharacterized molecules...") - at_url = "https://ndownloader.figshare.com/files/3195404" + at_url = "https://springernature.figshare.com/ndownloader/files/3195404" tmp_path = os.path.join(tmpdir, "uncharacterized.txt") request.urlretrieve(at_url, tmp_path) logging.info("Done.") @@ -193,7 +192,7 @@ def _download_uncharacterized(self, tmpdir): def _download_atomrefs(self, tmpdir): logging.info("Downloading GDB-9 atom references...") - at_url = "https://ndownloader.figshare.com/files/3195395" + at_url = "https://springernature.figshare.com/ndownloader/files/3195395" tmp_path = os.path.join(tmpdir, "atomrefs.txt") request.urlretrieve(at_url, tmp_path) logging.info("Done.") @@ -214,7 +213,7 @@ def _download_data( logging.info("Downloading GDB-9 data...") tar_path = os.path.join(tmpdir, "gdb9.tar.gz") raw_path = os.path.join(tmpdir, "gdb9_xyz") - url = "https://ndownloader.figshare.com/files/3195389" + url = "https://springernature.figshare.com/ndownloader/files/3195389" request.urlretrieve(url, tar_path) logging.info("Done.") From d451c39e985511afa02bba93c1570c75d0b18949 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Wed, 7 Jan 2026 01:45:16 +0100 Subject: [PATCH 2/3] refactor: update QM9 data retrieval --- src/schnetpack/datasets/qm9.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/schnetpack/datasets/qm9.py b/src/schnetpack/datasets/qm9.py index ccbfe7057..a94221fff 100644 --- a/src/schnetpack/datasets/qm9.py +++ b/src/schnetpack/datasets/qm9.py @@ -215,7 +215,18 @@ def _download_data( raw_path = os.path.join(tmpdir, "gdb9_xyz") url = "https://springernature.figshare.com/ndownloader/files/3195389" - request.urlretrieve(url, tar_path) + req = request.Request( + url, + headers={ + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36" + }, + ) + + with request.urlopen(req, timeout=600) as response: + logging.info(f"Response status: {response.status}") + with open(tar_path, "wb") as out_file: + shutil.copyfileobj(response, out_file) + logging.info("Done.") logging.info("Extracting files...") From 21e976b559bf71e716f0c5a79557d61b361d7112 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Wed, 7 Jan 2026 01:45:39 +0100 Subject: [PATCH 3/3] format black --- src/schnetpack/datasets/qm9.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schnetpack/datasets/qm9.py b/src/schnetpack/datasets/qm9.py index a94221fff..ff9b295f7 100644 --- a/src/schnetpack/datasets/qm9.py +++ b/src/schnetpack/datasets/qm9.py @@ -226,7 +226,7 @@ def _download_data( logging.info(f"Response status: {response.status}") with open(tar_path, "wb") as out_file: shutil.copyfileobj(response, out_file) - + logging.info("Done.") logging.info("Extracting files...")