Datasets:
Hani Park
commited on
Commit
·
2fd49e8
1
Parent(s):
01f16f6
Removed invalid SMILES and updated README.md
Browse files
README.md
CHANGED
@@ -1,4 +1,43 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
dataset_info:
|
3 |
- config_name: Molecule3D_random_split
|
4 |
features:
|
@@ -25,15 +64,15 @@ dataset_info:
|
|
25 |
- name: scf energy
|
26 |
dtype: float64
|
27 |
splits:
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
download_size: 1881829100
|
38 |
dataset_size: 5293035693
|
39 |
- config_name: Molecule3D_scaffold_split
|
@@ -72,21 +111,123 @@ dataset_info:
|
|
72 |
num_examples: 779859
|
73 |
download_size: 1867676945
|
74 |
dataset_size: 5293035693
|
75 |
-
configs:
|
76 |
-
- config_name: Molecule3D_random_split
|
77 |
-
data_files:
|
78 |
-
- split: train
|
79 |
-
path: Molecule3D_random_split/train-*
|
80 |
-
- split: test
|
81 |
-
path: Molecule3D_random_split/test-*
|
82 |
-
- split: validation
|
83 |
-
path: Molecule3D_random_split/validation-*
|
84 |
-
- config_name: Molecule3D_scaffold_split
|
85 |
-
data_files:
|
86 |
-
- split: train
|
87 |
-
path: Molecule3D_scaffold_split/train-*
|
88 |
-
- split: validation
|
89 |
-
path: Molecule3D_scaffold_split/validation-*
|
90 |
-
- split: test
|
91 |
-
path: Molecule3D_scaffold_split/test-*
|
92 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
version: 1.1.1
|
3 |
+
language: en
|
4 |
+
license: gpl-3.0
|
5 |
+
size_categories:
|
6 |
+
- 1M<n<10M
|
7 |
+
task_categories:
|
8 |
+
- tabular-regression
|
9 |
+
pretty_name: Molecule3D
|
10 |
+
tags:
|
11 |
+
- molecular geometry
|
12 |
+
- molecular graph
|
13 |
+
dataset_summary: Curated dataset of ground-state geometries of 4 million molecules
|
14 |
+
dervied from density functional theory, consisting of SMILES, sdf, and 3D properties
|
15 |
+
of molecules. Random split and scaffold split datasets are uploaded to our repository.
|
16 |
+
citation: '@misc{https://doi.org/10.48550/arxiv.2110.01717, doi = {10.48550/ARXIV.2110.01717},
|
17 |
+
url = {https://arxiv.org/abs/2110.01717}, author = {Xu, Zhao and Luo, Youzhi and
|
18 |
+
Zhang, Xuan and Xu, Xinyi and Xie, Yaochen and Liu, Meng and Dickerson, Kaleb
|
19 |
+
and Deng, Cheng and Nakata, Maho and Ji, Shuiwang}, keywords = {Machine Learning
|
20 |
+
(cs.LG), Artificial Intelligence (cs.AI), FOS: Computer and information sciences, FOS:
|
21 |
+
Computer and information sciences}, title = {Molecule3D: A Benchmark for Predicting
|
22 |
+
3D Geometries from Molecular Graphs}, publisher = {arXiv}, year = {2021}, copyright
|
23 |
+
= {arXiv.org perpetual, non-exclusive license} }'
|
24 |
+
configs:
|
25 |
+
- config_name: Molecule3D_random_split
|
26 |
+
data_files:
|
27 |
+
- split: train
|
28 |
+
path: Molecule3D_random_split/train-*
|
29 |
+
- split: test
|
30 |
+
path: Molecule3D_random_split/test-*
|
31 |
+
- split: validation
|
32 |
+
path: Molecule3D_random_split/validation-*
|
33 |
+
- config_name: Molecule3D_scaffold_split
|
34 |
+
data_files:
|
35 |
+
- split: train
|
36 |
+
path: Molecule3D_scaffold_split/train-*
|
37 |
+
- split: validation
|
38 |
+
path: Molecule3D_scaffold_split/validation-*
|
39 |
+
- split: test
|
40 |
+
path: Molecule3D_scaffold_split/test-*
|
41 |
dataset_info:
|
42 |
- config_name: Molecule3D_random_split
|
43 |
features:
|
|
|
64 |
- name: scf energy
|
65 |
dtype: float64
|
66 |
splits:
|
67 |
+
- name: train
|
68 |
+
num_bytes: 3175756092
|
69 |
+
num_examples: 2339728
|
70 |
+
- name: test
|
71 |
+
num_bytes: 1058783091
|
72 |
+
num_examples: 779895
|
73 |
+
- name: validation
|
74 |
+
num_bytes: 1058496510
|
75 |
+
num_examples: 779903
|
76 |
download_size: 1881829100
|
77 |
dataset_size: 5293035693
|
78 |
- config_name: Molecule3D_scaffold_split
|
|
|
111 |
num_examples: 779859
|
112 |
download_size: 1867676945
|
113 |
dataset_size: 5293035693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
---
|
115 |
+
|
116 |
+
# Molecule3D
|
117 |
+
[Molecule3D](https://arxiv.org/abs/2110.01717) is a comprehensive dataset containing ground-state geometries derived from Density Functional Theory (DFT) calculations for approximately 4 million molecules.
|
118 |
+
This is a mirror of the [Official Github repo](https://github.com/divelab/MoleculeX/tree/molx/Molecule3D) where the dataset was uploaded in 2021.
|
119 |
+
|
120 |
+
|
121 |
+
## Preprocseeing
|
122 |
+
[Update on 2025.08.16 - version 1.1.1]
|
123 |
+
We removed invalid SMILES strings which could not be parsed by RDKit.
|
124 |
+
- Random split
|
125 |
+
1. train : removed 60 smiles strings from 2339788 strings
|
126 |
+
2. test : removed 35 smiles strings from 779930 strings
|
127 |
+
3. validation : removed 26 smiles strings from 779929 strings
|
128 |
+
- Scaffold split
|
129 |
+
1. train : removed 46 smiles strings from 2339788 strings
|
130 |
+
2. test : removed 71 smiles strings from 779930 strings
|
131 |
+
3. validation : removed 4 smiles strings from 779929 strings
|
132 |
+
|
133 |
+
We also updated the `README.md` file.
|
134 |
+
|
135 |
+
We utilized the raw data uploaded on [Github](https://github.com/divelab/MoleculeX/tree/molx/Molecule3D/data/raw) and performed several preprocessing:
|
136 |
+
1. Sanitize the molecules using RDKit and MolVS (standardize SMILES format)
|
137 |
+
2. Combine the SMILES strings, SDF data, and 3D molecular properties for each molecule.
|
138 |
+
3. Split the dataset using random split and scaffold split (train, test, validation)
|
139 |
+
|
140 |
+
If you would like to try these processes with the original dataset,
|
141 |
+
please follow the instructions in the [Preprocessing Script](https://huggingface.co/datasets/maomlab/Molecule3D/blob/main/Molecule3D_preprocessing.py) file located in our Molecule3D repository.
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
## Quickstart Usage
|
146 |
+
|
147 |
+
### Load a dataset in python
|
148 |
+
Each subset can be loaded into python using the Huggingface [datasets](https://huggingface.co/docs/datasets/index) library.
|
149 |
+
First, from the command line install the `datasets` library
|
150 |
+
|
151 |
+
$ pip install datasets
|
152 |
+
|
153 |
+
then, from within python load the datasets library
|
154 |
+
|
155 |
+
>>> import datasets
|
156 |
+
|
157 |
+
and load one of the `Molecule3D` datasets, e.g.,
|
158 |
+
|
159 |
+
>>> Molecule3D = datasets.load_dataset('maomlab/Molecule3D', name = 'Molecule3D_random_split') # can put 'Molecule3D_scaffold_split' for the name as well
|
160 |
+
README.md: 100% 4.95k/4.95k [00:00<00:00, 559kB/s]
|
161 |
+
Generating train split: 100% 2339788/2339788 [00:34<00:00, 85817.85 examples/s]
|
162 |
+
Generating test split: 100% 779930/779930 [00:15<00:00, 96660.33 examples/s]
|
163 |
+
Generating validation split: 100% 779929/779929 [00:09<00:00, 79064.99 examples/s]
|
164 |
+
|
165 |
+
and inspecting the dataset
|
166 |
+
|
167 |
+
>>> Molecule3D
|
168 |
+
DatasetDict({
|
169 |
+
train: Dataset({
|
170 |
+
features: ['index', 'SMILES', 'sdf', 'cid', 'dipole x', 'dipole y', 'dipole z', 'homo', 'lumo', 'Y', 'scf energy'],
|
171 |
+
num_rows: 2339788
|
172 |
+
})
|
173 |
+
test: Dataset({
|
174 |
+
features: ['index', 'SMILES', 'sdf', 'cid', 'dipole x', 'dipole y', 'dipole z', 'homo', 'lumo', 'Y', 'scf energy'],
|
175 |
+
num_rows: 779930
|
176 |
+
})
|
177 |
+
validation: Dataset({
|
178 |
+
features: ['index', 'SMILES', 'sdf', 'cid', 'dipole x', 'dipole y', 'dipole z', 'homo', 'lumo', 'Y', 'scf energy'],
|
179 |
+
num_rows: 779929
|
180 |
+
})
|
181 |
+
})
|
182 |
+
|
183 |
+
|
184 |
+
### Use a dataset to train a model
|
185 |
+
One way to use the dataset is through the [MolFlux](https://exscientia.github.io/molflux/) package developed by Exscientia.
|
186 |
+
First, from the command line, install `MolFlux` library with `catboost` and `rdkit` support
|
187 |
+
|
188 |
+
pip install 'molflux[catboost,rdkit]'
|
189 |
+
|
190 |
+
then load, featurize, split, fit, and evaluate the catboost model
|
191 |
+
|
192 |
+
import json
|
193 |
+
from datasets import load_dataset
|
194 |
+
from molflux.datasets import featurise_dataset
|
195 |
+
from molflux.features import load_from_dicts as load_representations_from_dicts
|
196 |
+
from molflux.splits import load_from_dict as load_split_from_dict
|
197 |
+
from molflux.modelzoo import load_from_dict as load_model_from_dict
|
198 |
+
from molflux.metrics import load_suite
|
199 |
+
|
200 |
+
split_dataset = load_dataset('maomlab/Molecule3D', name = 'Molecule3D_random_split') # can put 'Molecule3D_scaffold_split' for the name as well
|
201 |
+
|
202 |
+
split_featurised_dataset = featurise_dataset(
|
203 |
+
split_dataset,
|
204 |
+
column = "SMILES",
|
205 |
+
representations = load_representations_from_dicts([{"name": "morgan"}, {"name": "maccs_rdkit"}]))
|
206 |
+
|
207 |
+
model = load_model_from_dict({
|
208 |
+
"name": "cat_boost_regressor",
|
209 |
+
"config": {
|
210 |
+
"x_features": ['SMILES::morgan', 'SMILES::maccs_rdkit'],
|
211 |
+
"y_features": ['Y']}})
|
212 |
+
|
213 |
+
model.train(split_featurised_dataset["train"])
|
214 |
+
preds = model.predict(split_featurised_dataset["test"])
|
215 |
+
|
216 |
+
regression_suite = load_suite("regression")
|
217 |
+
|
218 |
+
scores = regression_suite.compute(
|
219 |
+
references=split_featurised_dataset["test"]['Y'],
|
220 |
+
predictions=preds["cat_boost_regressor::Y"])
|
221 |
+
|
222 |
+
|
223 |
+
## Citation
|
224 |
+
@misc{https://doi.org/10.48550/arxiv.2110.01717,
|
225 |
+
doi = {10.48550/ARXIV.2110.01717},
|
226 |
+
url = {https://arxiv.org/abs/2110.01717},
|
227 |
+
author = {Xu, Zhao and Luo, Youzhi and Zhang, Xuan and Xu, Xinyi and Xie, Yaochen and Liu, Meng and Dickerson, Kaleb and Deng, Cheng and Nakata, Maho and Ji, Shuiwang},
|
228 |
+
keywords = {Machine Learning (cs.LG), Artificial Intelligence (cs.AI), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
229 |
+
title = {Molecule3D: A Benchmark for Predicting 3D Geometries from Molecular Graphs},
|
230 |
+
publisher = {arXiv},
|
231 |
+
year = {2021},
|
232 |
+
copyright = {arXiv.org perpetual, non-exclusive license}
|
233 |
+
}
|