atgctg
commited on
feat: add smiles property
Browse files- pubchem_selfies.py +6 -4
pubchem_selfies.py
CHANGED
@@ -14,8 +14,6 @@
|
|
14 |
# TODO: Address all TODOs and remove all explanatory comments
|
15 |
"""TODO: File Description"""
|
16 |
|
17 |
-
|
18 |
-
import csv
|
19 |
import json
|
20 |
import os
|
21 |
|
@@ -75,8 +73,9 @@ _HOMEPAGE = "https://pubchem.ncbi.nlm.nih.gov/"
|
|
75 |
# TODO: Add the licence for the dataset here if you can find it
|
76 |
# _LICENSE = ""
|
77 |
|
78 |
-
#
|
79 |
-
|
|
|
80 |
|
81 |
|
82 |
class PubchemSelfies(datasets.GeneratorBasedBuilder):
|
@@ -161,5 +160,8 @@ class PubchemSelfies(datasets.GeneratorBasedBuilder):
|
|
161 |
properties = data["molecules"][0]["properties"]
|
162 |
yield key, {
|
163 |
"PUBCHEM_COMPOUND_CID": properties["PUBCHEM_COMPOUND_CID"],
|
|
|
|
|
|
|
164 |
"CAN_SELFIES": properties["CAN_SELFIES"],
|
165 |
}
|
|
|
14 |
# TODO: Address all TODOs and remove all explanatory comments
|
15 |
"""TODO: File Description"""
|
16 |
|
|
|
|
|
17 |
import json
|
18 |
import os
|
19 |
|
|
|
73 |
# TODO: Add the licence for the dataset here if you can find it
|
74 |
# _LICENSE = ""
|
75 |
|
76 |
+
# TODO: define urls
|
77 |
+
# example: https://huggingface.co/datasets/zpn/pubchem-selfies/blob/refs%2Fpr%2F2/data/Compound_000000001_000500000/Compound_000000001_000500000_SELFIES.jsonl.tar.gz
|
78 |
+
_URLS = [""]
|
79 |
|
80 |
|
81 |
class PubchemSelfies(datasets.GeneratorBasedBuilder):
|
|
|
160 |
properties = data["molecules"][0]["properties"]
|
161 |
yield key, {
|
162 |
"PUBCHEM_COMPOUND_CID": properties["PUBCHEM_COMPOUND_CID"],
|
163 |
+
"PUBCHEM_OPENEYE_CAN_SMILES": properties[
|
164 |
+
"PUBCHEM_OPENEYE_CAN_SMILES"
|
165 |
+
],
|
166 |
"CAN_SELFIES": properties["CAN_SELFIES"],
|
167 |
}
|