Spaces:
Running
Running
File size: 19,330 Bytes
00f95e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "2493a0c3-4b27-496a-9514-32fb4941c94e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import datasets\n",
"from datasets import ( \n",
" get_dataset_config_info,\n",
" get_dataset_config_names,\n",
" get_dataset_split_names,\n",
" get_dataset_default_config_name, \n",
" load_dataset\n",
")\n",
"from pprint import pprint"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "c4892171-f79f-4eee-99db-a21d11b09e5c",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ba47ec20fe404e01942074c02dce13af",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Downloading builder script: 0%| | 0.00/55.7k [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f65e2b756dd34c0fbf7a64f87431ba7d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Downloading readme: 0%| | 0.00/16.7k [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"ds_hub = load_dataset(path=\"molssiai-hub/pubchemqc-b3lyp\",\n",
" name=\"b3lyp_pm6\",\n",
" split=\"train\",\n",
" streaming=True,\n",
" trust_remote_code=True)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "3334886b-abac-455e-a098-2a281ed3d4d5",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"['cid',\n",
" 'state',\n",
" 'pubchem-inchi',\n",
" 'pubchem-charge',\n",
" 'pubchem-version',\n",
" 'name',\n",
" 'coordinates',\n",
" 'atomic-numbers',\n",
" 'atom-count',\n",
" 'heavy-atom-count',\n",
" 'core-electrons',\n",
" 'bond-order',\n",
" 'connection-indices',\n",
" 'formula',\n",
" 'version',\n",
" 'obabel-inchi',\n",
" 'pm6-obabel-canonical-smiles',\n",
" 'charge',\n",
" 'energy-beta-gap',\n",
" 'energy-beta-homo',\n",
" 'energy-beta-lumo',\n",
" 'energy-alpha-gap',\n",
" 'energy-alpha-homo',\n",
" 'energy-alpha-lumo',\n",
" 'total-energy',\n",
" 'homos',\n",
" 'orbital-energies',\n",
" 'mo-count',\n",
" 'basis-count',\n",
" 'multiplicity',\n",
" 'molecular-mass',\n",
" 'number-of-atoms',\n",
" 'lowdin-partial-charges',\n",
" 'mulliken-partial-charges',\n",
" 'dipole-moment',\n",
" 'pubchem-multiplicity',\n",
" 'pubchem-obabel-canonical-smiles',\n",
" 'pubchem-isomeric-smiles',\n",
" 'pubchem-molecular-weight',\n",
" 'pubchem-molecular-formula']"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds_hub.column_names"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "bd6618bf-6c00-450e-ad8b-6c39bc47383c",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'cid': Value(dtype='int64', id=None),\n",
" 'state': Value(dtype='string', id=None),\n",
" 'pubchem-inchi': Value(dtype='string', id=None),\n",
" 'pubchem-charge': Value(dtype='int64', id=None),\n",
" 'pubchem-version': Value(dtype='string', id=None),\n",
" 'name': Value(dtype='string', id=None),\n",
" 'coordinates': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None),\n",
" 'atomic-numbers': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),\n",
" 'atom-count': Value(dtype='int64', id=None),\n",
" 'heavy-atom-count': Value(dtype='int64', id=None),\n",
" 'core-electrons': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),\n",
" 'bond-order': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),\n",
" 'connection-indices': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),\n",
" 'formula': Value(dtype='string', id=None),\n",
" 'version': Value(dtype='string', id=None),\n",
" 'obabel-inchi': Value(dtype='string', id=None),\n",
" 'pm6-obabel-canonical-smiles': Value(dtype='string', id=None),\n",
" 'charge': Value(dtype='int64', id=None),\n",
" 'energy-beta-gap': Value(dtype='float64', id=None),\n",
" 'energy-beta-homo': Value(dtype='float64', id=None),\n",
" 'energy-beta-lumo': Value(dtype='float64', id=None),\n",
" 'energy-alpha-gap': Value(dtype='float64', id=None),\n",
" 'energy-alpha-homo': Value(dtype='float64', id=None),\n",
" 'energy-alpha-lumo': Value(dtype='float64', id=None),\n",
" 'total-energy': Value(dtype='float64', id=None),\n",
" 'homos': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),\n",
" 'orbital-energies': Sequence(feature=Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), length=-1, id=None),\n",
" 'mo-count': Value(dtype='int64', id=None),\n",
" 'basis-count': Value(dtype='int64', id=None),\n",
" 'multiplicity': Value(dtype='int64', id=None),\n",
" 'molecular-mass': Value(dtype='float64', id=None),\n",
" 'number-of-atoms': Value(dtype='int64', id=None),\n",
" 'lowdin-partial-charges': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None),\n",
" 'mulliken-partial-charges': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None),\n",
" 'dipole-moment': Value(dtype='float64', id=None),\n",
" 'pubchem-multiplicity': Value(dtype='int64', id=None),\n",
" 'pubchem-obabel-canonical-smiles': Value(dtype='string', id=None),\n",
" 'pubchem-isomeric-smiles': Value(dtype='string', id=None),\n",
" 'pubchem-molecular-weight': Value(dtype='float64', id=None),\n",
" 'pubchem-molecular-formula': Value(dtype='string', id=None)}"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds_hub.features"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "359a7334-70ed-4724-88c2-44fd01fa7162",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"('The presented “PubChemQC B3LYP/6-31G*//PM6” data set is composed of the '\n",
" 'electronic properties of 85,938,443 molecules, encompassing a broad spectrum '\n",
" 'of molecules from essential compounds to biomolecules with a molecular '\n",
" 'weight up to 1000. These molecules account for 94.0% of the original PubChem '\n",
" 'Compound catalog as of August 29, 2016. The electronic properties, including '\n",
" 'orbitals, orbital energies, total energies, dipole moments, and other '\n",
" 'pertinent properties, were computed by using the B3LYP/6-31G* and PM6 '\n",
" 'methods.\\n')\n"
]
}
],
"source": [
"pprint(ds_hub.description, width=80)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "aafb0ae2-8896-49d4-81e6-99ee39d5720b",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"path = \"molssiai-hub/pubchemqc-b3lyp\""
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "29fc1e0e-fc9e-45f6-8cdd-6fa1c2368a29",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"('@article{Nakata2023,\\n'\n",
" 'abstract = {The presented “PubChemQC B3LYP/6-31G*//PM6” data set is composed '\n",
" 'of the electronic properties of 85,938,443 molecules, encompassing a broad '\n",
" 'spectrum of molecules from essential compounds to biomolecules with a '\n",
" 'molecular weight up to 1000. These molecules account for 94.0% of the '\n",
" 'original PubChem Compound catalog as of August 29, 2016. The electronic '\n",
" 'properties, including orbitals, orbital energies, total energies, dipole '\n",
" 'moments, and other pertinent properties, were computed by using the '\n",
" 'B3LYP/6-31G* and PM6 methods. The data set, available in three formats, '\n",
" 'namely, GAMESS quantum chemistry program files, selected JSON output files, '\n",
" 'and a PostgreSQL database, provides researchers with the ability to query '\n",
" 'molecular properties. It is further subdivided into five subdata sets for '\n",
" 'more specific data. The first two subsets encompass molecules with carbon, '\n",
" 'hydrogen, oxygen, and nitrogen with molecular weights under 300 and 500, '\n",
" 'respectively. The third and fourth subsets incorporate molecules with '\n",
" 'carbon, hydrogen, nitrogen, oxygen, phosphorus, sulfur, fluorine, and '\n",
" 'chlorine, with molecular weights under 300 and 500, respectively. The fifth '\n",
" 'subset comprises molecules with carbon, hydrogen, nitrogen, oxygen, '\n",
" 'phosphorus, sulfur, fluorine, chlorine, sodium, potassium, magnesium, and '\n",
" 'calcium, with a molecular weight of under 500. The coefficients of '\n",
" 'determination for the highest occupied molecular orbital-lowest unoccupied '\n",
" 'molecular orbital energy gap range from 0.892 (for CHON500) to 0.803 (for '\n",
" 'the whole data set). These comprehensive results pave the way for '\n",
" 'applications in drug discovery and materials science, among others. The data '\n",
" 'sets can be accessed under the Creative Commons Attribution 4.0 '\n",
" 'International license at the following web address: '\n",
" 'https://nakatamaho.riken.jp/pubchemqc.riken.jp/b3lyp_pm6_datasets.html.},\\n'\n",
" 'author = {Maho Nakata and Toshiyuki Maeda},\\n'\n",
" 'doi = {10.1021/ACS.JCIM.3C00899/ASSET/IMAGES/MEDIUM/CI3C00899_0012.GIF},\\n'\n",
" 'issn = {1549960X},\\n'\n",
" 'issue = {18},\\n'\n",
" 'journal = {Journal of Chemical Information and Modeling},\\n'\n",
" 'month = {9},\\n'\n",
" 'pages = {5734-5754},\\n'\n",
" 'pmid = {37677147},\\n'\n",
" 'publisher = {American Chemical Society},\\n'\n",
" 'title = {PubChemQC B3LYP/6-31G*//PM6 Data Set: The Electronic Structures of '\n",
" '86 Million Molecules Using B3LYP/6-31G* Calculations},\\n'\n",
" 'volume = {63},\\n'\n",
" 'url = {https://pubs.acs.org/doi/abs/10.1021/acs.jcim.3c00899},\\n'\n",
" 'year = {2023},\\n'\n",
" '}\\n')\n"
]
}
],
"source": [
"pprint(get_dataset_config_info(path=path).citation, width=80)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "64067367-3b8d-49fb-b6b4-047a1d737c25",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"['b3lyp_pm6',\n",
" 'b3lyp_pm6_chon300nosalt',\n",
" 'b3lyp_pm6_chon500nosalt',\n",
" 'b3lyp_pm6_chnopsfcl300nosalt',\n",
" 'b3lyp_pm6_chnopsfcl500nosalt',\n",
" 'b3lyp_pm6_chnopsfclnakmgca500']"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_dataset_config_names(path)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "4ce893fb-59a4-4de7-9d28-0b7f575bbdd4",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"['train']"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_dataset_split_names(path)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "5e0d35c5-df4c-412b-8ca9-af95f69dbf24",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"'b3lyp_pm6'"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_dataset_default_config_name(path)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "8c38c671-5ac8-442b-a56d-315a8446ec2c",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"DatasetInfo(description='The presented “PubChemQC B3LYP/6-31G*//PM6” data set is composed of the electronic properties of 85,938,443 molecules, encompassing a broad spectrum of molecules from essential compounds to biomolecules with a molecular weight up to 1000. These molecules account for 94.0% of the original PubChem Compound catalog as of August 29, 2016. The electronic properties, including orbitals, orbital energies, total energies, dipole moments, and other pertinent properties, were computed by using the B3LYP/6-31G* and PM6 methods.\\n', citation='@article{Nakata2023,\\nabstract = {The presented “PubChemQC B3LYP/6-31G*//PM6” data set is composed of the electronic properties of 85,938,443 molecules, encompassing a broad spectrum of molecules from essential compounds to biomolecules with a molecular weight up to 1000. These molecules account for 94.0% of the original PubChem Compound catalog as of August 29, 2016. The electronic properties, including orbitals, orbital energies, total energies, dipole moments, and other pertinent properties, were computed by using the B3LYP/6-31G* and PM6 methods. The data set, available in three formats, namely, GAMESS quantum chemistry program files, selected JSON output files, and a PostgreSQL database, provides researchers with the ability to query molecular properties. It is further subdivided into five subdata sets for more specific data. The first two subsets encompass molecules with carbon, hydrogen, oxygen, and nitrogen with molecular weights under 300 and 500, respectively. The third and fourth subsets incorporate molecules with carbon, hydrogen, nitrogen, oxygen, phosphorus, sulfur, fluorine, and chlorine, with molecular weights under 300 and 500, respectively. The fifth subset comprises molecules with carbon, hydrogen, nitrogen, oxygen, phosphorus, sulfur, fluorine, chlorine, sodium, potassium, magnesium, and calcium, with a molecular weight of under 500. The coefficients of determination for the highest occupied molecular orbital-lowest unoccupied molecular orbital energy gap range from 0.892 (for CHON500) to 0.803 (for the whole data set). These comprehensive results pave the way for applications in drug discovery and materials science, among others. The data sets can be accessed under the Creative Commons Attribution 4.0 International license at the following web address: https://nakatamaho.riken.jp/pubchemqc.riken.jp/b3lyp_pm6_datasets.html.},\\nauthor = {Maho Nakata and Toshiyuki Maeda},\\ndoi = {10.1021/ACS.JCIM.3C00899/ASSET/IMAGES/MEDIUM/CI3C00899_0012.GIF},\\nissn = {1549960X},\\nissue = {18},\\njournal = {Journal of Chemical Information and Modeling},\\nmonth = {9},\\npages = {5734-5754},\\npmid = {37677147},\\npublisher = {American Chemical Society},\\ntitle = {PubChemQC B3LYP/6-31G*//PM6 Data Set: The Electronic Structures of 86 Million Molecules Using B3LYP/6-31G* Calculations},\\nvolume = {63},\\nurl = {https://pubs.acs.org/doi/abs/10.1021/acs.jcim.3c00899},\\nyear = {2023},\\n}\\n', homepage='https://nakatamaho.riken.jp/pubchemqc.riken.jp/b3lyp_pm6_datasets.html', license='https://creativecommons.org/licenses/by/4.0', features={'cid': Value(dtype='int64', id=None), 'state': Value(dtype='string', id=None), 'pubchem-inchi': Value(dtype='string', id=None), 'pubchem-charge': Value(dtype='int64', id=None), 'pubchem-version': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None), 'coordinates': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), 'atomic-numbers': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'atom-count': Value(dtype='int64', id=None), 'heavy-atom-count': Value(dtype='int64', id=None), 'core-electrons': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'bond-order': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'connection-indices': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'formula': Value(dtype='string', id=None), 'version': Value(dtype='string', id=None), 'obabel-inchi': Value(dtype='string', id=None), 'pm6-obabel-canonical-smiles': Value(dtype='string', id=None), 'charge': Value(dtype='int64', id=None), 'energy-beta-gap': Value(dtype='float64', id=None), 'energy-beta-homo': Value(dtype='float64', id=None), 'energy-beta-lumo': Value(dtype='float64', id=None), 'energy-alpha-gap': Value(dtype='float64', id=None), 'energy-alpha-homo': Value(dtype='float64', id=None), 'energy-alpha-lumo': Value(dtype='float64', id=None), 'total-energy': Value(dtype='float64', id=None), 'homos': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'orbital-energies': Sequence(feature=Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), length=-1, id=None), 'mo-count': Value(dtype='int64', id=None), 'basis-count': Value(dtype='int64', id=None), 'multiplicity': Value(dtype='int64', id=None), 'molecular-mass': Value(dtype='float64', id=None), 'number-of-atoms': Value(dtype='int64', id=None), 'lowdin-partial-charges': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), 'mulliken-partial-charges': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None), 'dipole-moment': Value(dtype='float64', id=None), 'pubchem-multiplicity': Value(dtype='int64', id=None), 'pubchem-obabel-canonical-smiles': Value(dtype='string', id=None), 'pubchem-isomeric-smiles': Value(dtype='string', id=None), 'pubchem-molecular-weight': Value(dtype='float64', id=None), 'pubchem-molecular-formula': Value(dtype='string', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name='pubchemqc-b3lyp', dataset_name='pubchemqc-b3lyp', config_name='b3lyp_pm6', version=0.0.0, splits={'train': {'name': 'train', 'dataset_name': 'molssiai-hub/pubchemqc-b3lyp'}}, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_dataset_config_info(path)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|