# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """loading script for the pubchemqc-b3lyp data""" import ijson import datasets _CITATION = """\ @article{Nakata2023, abstract = {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.}, author = {Maho Nakata and Toshiyuki Maeda}, doi = {10.1021/ACS.JCIM.3C00899/ASSET/IMAGES/MEDIUM/CI3C00899_0012.GIF}, issn = {1549960X}, issue = {18}, journal = {Journal of Chemical Information and Modeling}, month = {9}, pages = {5734-5754}, pmid = {37677147}, publisher = {American Chemical Society}, title = {PubChemQC B3LYP/6-31G*//PM6 Data Set: The Electronic Structures of 86 Million Molecules Using B3LYP/6-31G* Calculations}, volume = {63}, url = {https://pubs.acs.org/doi/abs/10.1021/acs.jcim.3c00899}, year = {2023}, } """ _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. """ _HOMEPAGE = "https://nakatamaho.riken.jp/pubchemqc.riken.jp/b3lyp_pm6_datasets.html" _LICENSE = "https://creativecommons.org/licenses/by/4.0" _BASE_DATA_URL_FORMAT_STR = "https://huggingface.co/datasets/molssiai-hub/pubchemqc-b3lyp/resolve/main/data/{name}/train/{range}.json" _CONFIG_NAMES = [ "b3lyp_pm6", "b3lyp_pm6_chon300nosalt", "b3lyp_pm6_chon500nosalt", "b3lyp_pm6_chnopsfcl300nosalt", "b3lyp_pm6_chnopsfcl500nosalt", "b3lyp_pm6_chnopsfclnakmgca500" ] _FEATURE_KEYS = [ 'cid', 'state', 'pubchem-inchi', 'pubchem-charge', 'pubchem-version', 'name', 'coordinates', 'atomic-numbers', 'atom-count', 'heavy-atom-count', 'core-electrons', 'bond-order', 'connection-indices', 'formula', 'version', 'obabel-inchi', 'pm6-obabel-canonical-smiles', 'charge', 'energy-beta-gap', 'energy-beta-homo', 'energy-beta-lumo', 'energy-alpha-gap', 'energy-alpha-homo', 'energy-alpha-lumo', 'total-energy', 'homos', 'orbital-energies', 'mo-count', 'basis-count', 'multiplicity', 'molecular-mass', 'number-of-atoms', 'lowdin-partial-charges', 'mulliken-partial-charges', 'dipole-moment', 'pubchem-multiplicity', 'pubchem-obabel-canonical-smiles', 'pubchem-isomeric-smiles', 'pubchem-molecular-weight', 'pubchem-molecular-formula' ] _FEATURE_TYPES = datasets.Features( { "cid": datasets.Value(dtype="int64", id=None), "state": datasets.Value(dtype="string", id=None), "pubchem-inchi": datasets.Value(dtype="string", id=None), "pubchem-charge": datasets.Value(dtype="int64", id=None), "pubchem-version": datasets.Value(dtype="string", id=None), "name": datasets.Value(dtype="string", id=None), "coordinates": datasets.Sequence(feature=datasets.Value(dtype="float64", id=None), length=-1, id=None), "atomic-numbers": datasets.Sequence(feature=datasets.Value(dtype="int64", id=None), length=-1, id=None), "atom-count": datasets.Value(dtype="int64", id=None), "heavy-atom-count": datasets.Value(dtype="int64", id=None), "core-electrons": datasets.Sequence(feature=datasets.Value(dtype="int64", id=None), length=-1, id=None), "bond-order": datasets.Sequence(feature=datasets.Value(dtype="int64", id=None), length=-1, id=None), "connection-indices": datasets.Sequence(feature=datasets.Value(dtype="int64", id=None), length=-1, id=None), "formula": datasets.Value(dtype="string", id=None), "version": datasets.Value(dtype="string", id=None), "obabel-inchi": datasets.Value(dtype="string", id=None), "pm6-obabel-canonical-smiles": datasets.Value(dtype="string", id=None), "charge": datasets.Value(dtype="int64", id=None), "energy-beta-gap": datasets.Value(dtype="float64", id=None), "energy-beta-homo": datasets.Value(dtype="float64", id=None), "energy-beta-lumo": datasets.Value(dtype="float64", id=None), "energy-alpha-gap": datasets.Value(dtype="float64", id=None), "energy-alpha-homo": datasets.Value(dtype="float64", id=None), "energy-alpha-lumo": datasets.Value(dtype="float64", id=None), "total-energy": datasets.Value(dtype="float64", id=None), "homos": datasets.Sequence(feature=datasets.Value(dtype="int64", id=None), length=-1, id=None), "orbital-energies": datasets.Sequence(feature=datasets.Sequence(feature=datasets.Value(dtype="float64", id=None), length=-1, id=None), length=-1, id=None), "mo-count": datasets.Value(dtype="int64", id=None), "basis-count": datasets.Value(dtype="int64", id=None), "multiplicity": datasets.Value(dtype="int64", id=None), "molecular-mass": datasets.Value(dtype="float64", id=None), "number-of-atoms": datasets.Value(dtype="int64", id=None), "lowdin-partial-charges": datasets.Sequence(feature=datasets.Value(dtype="float64", id=None), length=-1, id=None), "mulliken-partial-charges": datasets.Sequence(feature=datasets.Value(dtype="float64", id=None), length=-1, id=None), "dipole-moment": datasets.Value(dtype="float64", id=None), "pubchem-multiplicity": datasets.Value(dtype="int64", id=None), "pubchem-obabel-canonical-smiles": datasets.Value(dtype="string", id=None), 'pubchem-isomeric-smiles': datasets.Value(dtype="string", id=None), "pubchem-molecular-weight": datasets.Value(dtype="float64", id=None), "pubchem-molecular-formula": datasets.Value(dtype="string", id=None), } ) _ID_RANGES_B3LYP_PM6 = [ "069838214-070067759", "016418668-016622411", "018248993-018501518", "080598281-080799107", "050460404-050669555", "089044623-089269002", "052430628-052673047", "050245960-050460403", "083205711-083406375", "068061518-068284290", "027714325-028367889", "000000001-000253696", "097278004-097482378", "001687096-002009718", "093246646-093447393", "074250632-075507818", "109698559-109914622", "095261252-095462819", "081801790-082002124", "043121110-043321695", "066926358-067148252", "039406497-040154274", "062875058-063075606", "043522281-043722983", "004997250-005220177", "094253942-094454501", "081601176-081801789", "068502199-068722952", "097886617-098106994", "101520800-101784274", "075507819-076965970", "062072696-062273137", "045586430-045805292", "108469989-108670985", "082604005-082804581", "120069554-120278439", "008835467-009074444", "112655106-112856951", "103158479-103359312", "056146357-056347853", "019488508-019703067", "020253760-020549110", "107664738-107866036", "083807474-084008211", "040154275-040743801", "020823895-021041615", "087551363-087800478", "068284291-068502198", "097482379-097684978", "023098136-023422039", "017379703-017584491", "109274931-109483471", "116076960-116277746", "023695704-023957050", "054938049-055138612", "009317711-009561456", "073213210-074250631", "110729402-110932217", "082403521-082604004", "044139774-044414522", "070541718-070768491", "057707755-057938179", "116478905-116680795", "004562802-004786579", "070305863-070541717", "071874892-072076290", "001194894-001426768", "079595038-079795541", "060266706-060467686", "005220178-005478786", "079996245-080196714", "106255750-106457061", "105451910-105653107", "087050400-087301606", "036185344-038234901", "042391117-042714925", "102042996-102298261", "112856952-113058407", "121337267-121494125", "066085824-066286345", "079394423-079595037", "006826337-007176354", "084208787-084410291", "063476623-063677410", "105250935-105451909", "046008145-046227079", "050669556-050873793", "059789367-060039314", "121123661-121337266", "059559916-059789366", "003242748-003461775", "007176355-007449540", "119643196-119851991", "023422041-023695669", "097684979-097886616", "107463348-107664737", "005862345-006190260", "083406376-083606831", "096269672-096471110", "069612798-069838213", "002552285-002804369", "080799108-080999622", "003899016-004119706", "104849339-105050142", "109483473-109698558", "043722984-043926848", "006504211-006826336", "010542013-010773379", "038234918-039406494", "118143532-118360971", "005478787-005862344", "117086426-117288091", "063677411-063879293", "106054712-106255749", "067148253-067368219", "118801814-119014242", "107262257-107463347", "084008212-084208786", "108670986-108872508", "070067760-070305862", "086827832-087050399", "018501519-018777647", "079194099-079394422", "018777648-019029724", "098855980-099060097", "041733630-042391116", "112024942-112245949", "106457062-106657998", "007683236-007896656", "017584492-018042736", "007896657-008126070", "012519140-013258253", "119224645-119431401", "066487152-066703856", "067591395-067830698", "000738833-000967529", "120914890-121123660", "052673048-052915909", "052915910-053168351", "004341752-004562801", "109914623-110118745", "067368220-067591394", "064280438-064480989", "022774226-023098135", "025069870-025340337", "105653108-105853686", "000967530-001194893", "062674137-062875057", "090159716-090383532", "092639644-092841886", "010773380-011009162", "079795542-079996244", "047007890-048201959", "119851992-120069553", "057002094-057226938", "119431402-119643195", "119014243-119224644", "093044840-093246645", "100331198-100532635", "065684618-065885224", "054189379-054472509", "106657999-106860006", "055742931-055944904", "072545233-073213209", "061471322-061671774", "078792790-078993619", "096068544-096269671", "024843983-025069869", "088315671-088567103", "060869412-061069970", "003461778-003683221", "093649966-093851046", "067830699-068061517", "105050143-105250934", "114869070-115070740", "082202929-082403520", "019703069-019986827", "091074701-091308340", "069164715-069386128", "102298264-102548258", "111804560-112024940", "057473634-057707754", "061069971-061270556", "051662685-051906947", "015767396-016203391", "108872509-109073823", "011474898-011701281", "051906948-052163952", "014116820-015061896", "055138613-055340010", "117489164-117702788", "120701700-120914889", "093447394-093649965", "066703857-066926357", "113460821-113662218", "063276177-063476622", "102957567-103158478", "064480990-064682056", "108269163-108469988", "013258290-014116756", "019264034-019488507", "043321696-043522280", "100130172-100331197", "087301607-087551362", "053906020-054189377", "049808870-050033093", "116881648-117086425", "026862533-027714305", "029340288-030252867", "098635916-098855979", "089938436-090159715", "071427538-071658020", "008584963-008835466", "110118746-110326719", "078993620-079194098", "099060098-099266087", "102756503-102957566", "072076291-072545232", "055541373-055742930", "034626922-036185297", "024209591-024428440", "053623448-053906019", "057226939-057473633", "096672925-096874348", "048201980-049808869", "111370237-111583698", "050873794-051123310", "111583699-111804559", "098388562-098635915", "019986828-020253759", "095059742-095261251", "120278440-120490161", "064682057-064882517", "011244432-011474897", "061270557-061471321", "056347854-056549247", "100532636-100737716", "024629876-024843982", "044414525-044667922", "087800479-088065439", "061872192-062072695", "055340011-055541372", "117288092-117489163", "025340338-025684809", "095664613-095867002", "098106995-098388561", "070768492-070982906", "041114773-041733629", "117702789-117926586", "084410292-084611212", "092436183-092639643", "100737717-100988360", "081400427-081601175", "006190261-006504210", "054472510-054726377", "070982907-071200898", "002804370-003018593", "060039315-060266705", "001426770-001687095", "016888133-017126668", "058859492-059101427", "083005157-083205710", "115070741-115271900", "060467687-060668792", "063075607-063276176", "008348112-008584961", "056549248-056784475", "026210317-026862532", "089269003-089495112", "068722953-068943375", "082002125-082202928", "114667779-114869069", "118581018-118801813", "008126072-008348110", "053399292-053623447", "118360972-118581017", "066286346-066487151", "045805293-046008144", "046227080-046449704", "084812012-086604548", "115876156-116076959", "071200899-071427537", "101253713-101520799", "059101428-059330760", "051123311-051324457", "104045737-104246570", "114064430-114265517", "105853687-106054711", "086604549-086827831", "031128104-032521525", "113259602-113460820", "032521528-034626919", "092229790-092436182", "016203393-016418667", "064079771-064280437", "095867003-096068543", "099916491-100130171", "092841887-093044839", "069386129-069612797", "000253697-000507790", "080999623-081200048", "117926588-118143531", "065283562-065484049", "104246571-104447580", "052163953-052430627", "058622640-058859491", "088065440-088315670", "110326720-110528243", "076965971-078792789", "016622412-016888132", "011701282-011952003", "062273138-062473557", "113058408-113259601", "091762562-091996244", "090383537-090596056", "114265518-114466685", "084611213-084812011", "110932218-111149618", "100988361-101253712", "011009163-011244431", "071658021-071874891", "060668793-060869411", "028781382-029340286", "009856051-010085437", "082804582-083005156", "107061195-107262256", "095462820-095664612", "009074445-009317709", "115271901-115473442", "058166102-058393491", "113863267-114064429", "055944905-056146356", "002291227-002552284", "004119707-004341751", "030252869-031128101", "064882518-065082875", "091996246-092229789", "007449541-007683235", "103844951-104045736", "080397063-080598280", "094454502-094655257", "042714926-042917209", "103359313-103560061", "065082876-065283561", "025684810-026210309", "096874349-097076075", "116277747-116478904", "021041616-021320960", "004786580-004997249", "109073824-109274930", "011952004-012519139", "003683222-003899013", "093851047-094052601", "091308341-091541850", "115473443-115675045", "015061897-015767391", "099266088-099468150", "114466686-114667778", "051324458-051662684", "111149619-111370236", "059330761-059559915", "018042737-018248992", "050033094-050245959", "089495113-089716886", "054726378-054938048", "110528244-110729401", "090596057-090835579", "103560062-103844950", "094052602-094253941", "089716887-089938435", "068943376-069164713", "028367890-028781381", "094655258-094857535", "107866037-108067849", "120490162-120701699", "115675046-115876155", "083606832-083807473", "022517041-022774225", "021320963-021612445", "080196715-080397062", "000507791-000738832", "002009719-002291226", "104648369-104849338", "003018594-003242747", "017126669-017379702", "097076076-097278003", "043926849-044139773", "021938775-022224336", "102548259-102756502", "063879294-064079770", "046449705-046775736", "010085438-010311631", "108067850-108269162", "106860007-107061194", "116680796-116881647", "040743804-041114772", "088811422-089044622", "021612446-021938774", "023957051-024209590", "057938180-058166101", "090835580-091074700", "042917210-043121109", "065885225-066085823", "024428441-024629875", "045192129-045586429", "053168352-053399291", "101784275-102042995", "112453071-112655105", "081200049-081400426", "019029725-019264033", "091541851-091762561", "065484050-065684617", "020549112-020823893", "099468151-099697131", "088567104-088811421", "094857536-095059741", "009561457-009856050", "062473558-062674136", "113662219-113863266", "104447581-104648368", "096471111-096672924", "112245950-112453070", "010311632-010542012", "061671775-061872191", "099697132-099916490", "044667925-045192128", "046775739-047007889", "056784476-057002093", "058393492-058622639", "022224337-022517040", ] _ID_RANGES_B3LYP_PM6_CHON300NOSALT = [ '060885798-061345091', '118294492-120431958', '112305607-113258698', '108228714-110456031', '104337752-104758349', '096761144-097451844', '082694907-083183038', '065808274-066247517', '020525342-022088764', '090912014-092541365', '093493392-094258068', '106902651-107435409', '064828042-065252427', '114376740-114900319', '008642912-010913367', '064382255-064828041', '117264204-118294491', '105763909-106377643', '063466774-063946248', '067472210-069221247', '083611072-083968598', '092541372-093493391', '083968599-084616767', '043541594-045816812', '083183040-083611071', '079936322-080443275', '110456032-112305606', '054724214-055269203', '099628183-101699868', '022088765-024696026', '113258699-113778438', '102731182-103196920', '079480149-079936318', '010913368-012360578', '116370358-116832923', '062550520-062990452', '106377644-106902648', '081902170-082312566', '089199979-090912009', '062990453-063466773', '107435410-108228713', '120431984-121494105', '105284305-105763908', '062187327-062550519', '115811644-116370357', '028806818-042625827', '087432300-089199977', '070981205-074892238', '116832924-117264203', '069221253-070981204', '065252428-065808273', '104758350-105284304', '018370603-020525339', '059666795-060885796', '114900322-115293266', '012360579-014810860', '055269204-057881245', '081402483-081902169', '101699869-102731181', '057881253-059666791', '082312567-082694905', '053256515-054724211', '103196922-103863958', '094258069-094878794', '024696027-028806816', '063946249-064382254', '061345093-061790775', '097451860-099628182', '113778440-114376739', '000800489-004460988', '094878795-095543958', '074892239-079065711', '096266164-096761143', '066247518-067472207', '000000001-000800488', '084616768-087432275', '080919203-081402482', '014810862-018370598', '079065712-079480148', '042625828-043541593', '080443276-080919202', '115293267-115811641', '103863961-104337751', '095543959-096266163', '061790777-062187325', '045816814-053256514', '004460990-008642499' ] _ID_RANGES_B3LYP_PM6_CHON500NOSALT = [ '011779671-012506722', '097043125-097323196', '116985091-117314832', '119372631-120015593', '090961029-091468139', '019816070-020344086', '092934827-093272425', '107106007-107470999', '045706063-046106681', '062167823-062454040', '060612846-060952412', '069425275-069952259', '102070666-102524741', '099304156-099731092', '081776355-082085126', '093886444-094187014', '017516237-018154283', '094187015-094469403', '060239662-060612841', '096506018-096762767', '106387709-106721768', '021914903-022530703', '016203747-016583938', '114255042-114635920', '083967281-084253986', '086999041-087634529', '028257968-028897475', '118970822-119372630', '063807298-064097257', '069952261-070462083', '103245624-103596969', '093576682-093886443', '067273139-067826521', '083026410-083362685', '045148432-045706062', '059199053-059740521', '002784338-003210427', '009434087-009964286', '104375203-104677693', '104677694-105034316', '105034317-105440256', '068330055-068886172', '121013253-121433756', '053615079-054090764', '071823810-072141822', '082085127-082373624', '095939052-096230757', '066272518-066706412', '051069787-051389928', '061874453-062167822', '030244637-032072533', '071351774-071823809', '094769496-095073978', '047065077-049803996', '070858305-071351773', '024690082-025213933', '055624446-055997441', '028897478-030244625', '116046246-116351177', '062762810-063095573', '092606229-092934826', '098545201-098935415', '018154284-018623472', '023104603-023737427', '066706413-067273138', '111524260-112046646', '061579585-061874443', '113144488-113500510', '107977556-108550314', '106060993-106387707', '017039671-017516236', '043059010-043406002', '115063881-115347573', '079390820-079725142', '100671752-101131773', '072141823-073389392', '107471000-107977553', '013714614-015186135', '084254109-084564824', '019184785-019816069', '117810327-118401593', '044236312-045148431', '009030222-009434085', '009964287-010449296', '113869748-114255041', '120503737-121013252', '043747549-044236311', '007531176-007884136', '068886175-069425274', '098935416-099304153', '115704652-116046245', '046106682-046585419', '101131774-101608070', '001659481-002267011', '092282091-092606228', '052753623-053193519', '025808687-026875966', '114635922-115063880', '043406003-043747548', '104032434-104375201', '038371664-039991220', '115347574-115704651', '024322298-024690080', '040872012-041835868', '101608071-102070665', '088283762-088871111', '112470749-112797052', '063421353-063807297', '056750861-057103101', '080386285-080722072', '083362686-083659460', '110101447-110407357', '100076424-100671750', '061275750-061579583', '018623473-019184784', '120015595-120503735', '008256084-008632212', '026875967-028257966', '055997442-056373933', '046585424-047065076', '003688693-004169308', '004169310-004687207', '022530704-023104602', '095639471-095939051', '007884138-008256082', '058661948-059199052', '062454041-062762809', '011288514-011779670', '096762768-097043124', '016583939-017039667', '003210428-003688692', '095349478-095639470', '000000001-000392654', '006433912-007102168', '054090765-054577081', '065626204-065954036', '079099725-079390819', '000392655-000782433', '053193520-053615078', '010449297-010857769', '041835869-042680783', '005735286-006433911', '090516571-090961027', '116683623-116985090', '080049960-080386283', '109690495-110101446', '020344103-020867798', '097591207-097924715', '086276587-086999040', '065954037-066272514', '088871112-089386078', '023737429-024322293', '042680784-043059009', '063095575-063421346', '054577092-054955281', '075507146-078763352', '060952413-061275749', '057103102-057549130', '094469408-094769495', '056373934-056750860', '082650534-083026409', '059740522-060239656', '081019316-081384237', '093272426-093576681', '064695500-064976201', '095073979-095349477', '010857770-011288513', '002267012-002784333', '116351178-116683622', '096230758-096506017', '035227322-038371660', '001171493-001659480', '079725143-080049959', '081384238-081776354', '004687211-005132998', '021351813-021914902', '110407358-110717807', '065284796-065626203', '064097259-064404866', '112797053-113144487', '099731093-100076417', '054955282-055283022', '106721769-107106006', '008632215-009030220', '091468142-091896684', '051893970-052314307', '078763353-079099722', '102524742-102907201', '097323197-097591206', '052314310-052753621', '064404867-064695499', '058115212-058661946', '109247644-109690493', '105768799-106060991', '015186136-016203738', '039991230-040872011', '067826522-068330053', '032072566-035227234', '105440257-105768798', '073389413-075507145', '020867799-021351808', '118401598-118970821', '083659461-083967280', '108928687-109247643', '007102169-007531174', '012506723-013714613', '005132999-005735285', '091896685-092282090', '087634531-088283760', '070462091-070858302', '113500511-113869746', '112046648-112470748', '089940508-090516570', '025213934-025808685', '089386079-089940507', '103596970-104032433', '108550318-108928682', '064976203-065284794', '084564830-086276585', '055283023-055624445', '102907202-103245623', '121433757-121494125', '051389930-051893969', '080722073-081019315', '000782434-001171491', '110717808-111065684', '117314833-117810326', '057549132-058115210', '111065686-111524258', '049804004-051069784', '082373625-082650533', '097924716-098545199' ] _ID_RANGES_B3LYP_PM6_CHNOPSFCL300NOSALT = [ '082385463-082619051', '044537690-047210217', '081637077-081899764', '001489131-003497697', '094282441-094633135', '089666777-090851529', '084129311-084666953', '023557355-026400024', '080820740-081062997', '114805359-115083957', '115318118-115588377', '115856938-116127466', '064066291-064329598', '107846646-108217877', '015254338-017464680', '062033474-062283735', '065608026-065912477', '068670104-069903771', '103200364-103489392', '091759591-093068494', '003497710-005421344', '096111307-096377200', '095017943-095543418', '065912478-066175625', '105496490-105769258', '095543420-096111306', '060997781-061274164', '071053866-072054490', '061793241-062033473', '026400238-028740903', '017464681-019330941', '106384337-106653466', '063254582-063561647', '082916667-083179125', '062518369-062756205', '082147719-082385462', '079508931-079777604', '076919116-079007440', '028740905-039099126', '093433370-093861326', '113462022-113714752', '090851531-091759534', '104966673-105241281', '083661022-083888989', '062283736-062518368', '079777605-080037549', '119037398-120403811', '101914810-102649218', '117168681-117393062', '113714754-113967723', '101004757-101914808', '053914278-054856694', '107210104-107505000', '104683387-104966672', '055089804-056612727', '104418139-104683386', '019330942-020404787', '113097270-113462021', '081337093-081637076', '063561648-063817384', '118011920-119037396', '059754261-060723416', '064574256-064821615', '067536631-068670097', '008048197-010377301', '093068495-093433369', '103489393-103870006', '096377201-096746429', '096976295-097686756', '080037550-080295100', '113967724-114232383', '088828385-089666775', '063817385-064066289', '079007441-079247207', '112564993-113097222', '106653467-106931628', '043078955-043344624', '065072764-065318999', '083888990-084129310', '062756206-063009220', '106931629-107210103', '047210220-052455351', '083422896-083661021', '087795103-088828383', '116908065-117168680', '081899767-082147718', '000543829-001489130', '052455352-053914277', '104136369-104418137', '011087460-012201415', '022400313-023557346', '081062998-081337092', '109015675-110490737', '120403812-121494105', '061540770-061793240', '114232396-114522874', '115083958-115318117', '005421349-008048184', '021458376-022400312', '064821616-065072763', '069903775-071053860', '105769261-106108464', '043344625-043609250', '054856695-055089803', '043609251-044537689', '093861327-094282440', '086632918-087795099', '057484683-058644996', '110490738-111468390', '063009221-063254581', '114522875-114805358', '058644998-059754256', '020404800-021458375', '097686757-098568552', '065319000-065608025', '116655777-116908064', '010377302-011087458', '115588378-115856935', '056612728-057484680', '111468391-112564992', '083179126-083422895', '102944660-103200363', '080553560-080820739', '117393063-118011919', '066450956-067536627', '094633136-095017942', '096746430-096976294', '061274165-061540769', '108217878-109015674', '098568555-101004752', '102649220-102944659', '064329599-064574255', '012201416-013409171', '084666954-086632913', '116384820-116655776', '080295101-080553559', '000000001-000543823', '107505001-107846645', '066175626-066450955', '116127467-116384819', '072054492-076919115', '013409173-015254337', '039099130-043078954', '060723417-060997780', '082619052-082916666', '106108466-106384335', '105241282-105496489', '103870007-104136368', '079247208-079508930' ] _ID_RANGES_B3LYP_PM6_CHNOPSFCL500NOSALT = [ '106320602-106557095', '115135978-115366525', '010355753-010682394', '078815577-079038561', '096805971-097016602', '098654832-098898994', '044454900-045173075', '083436035-083642695', '093846080-094062700', '072703683-073896446', '008568052-008826566', '070581276-070860359', '106086251-106320601', '001771363-002162392', '065703926-065936587', '084754774-086609369', '064106083-064338001', '087225761-087659461', '063400892-063661634', '117238718-117456414', '066428264-066738121', '081361026-081631255', '109114823-109322261', '101603547-101989629', '019723330-020115649', '051194653-051455408', '062518746-062738945', '097657362-097882808', '010002052-010355752', '064338002-064560902', '060960298-061192244', '018675223-019058911', '090388907-090640655', '048861554-049885107', '062963060-063181393', '104666680-104916152', '093396461-093622801', '003056772-003350669', '035758129-037992030', '043539312-043769649', '056871468-057145676', '045173076-045603914', '017201144-017501191', '000644686-000877840', '009341538-009615887', '067805382-068154758', '019058912-019419544', '100806418-101194936', '011702377-012104865', '028945218-029788002', '119413610-119891271', '096186490-096392837', '070231469-070581275', '016334000-016577019', '117798279-118144135', '006501929-007040340', '108121656-108425392', '026204049-026901545', '061863525-062082079', '046358935-046662491', '084522022-084754773', '092720338-092944132', '088958345-089313416', '055701604-055926392', '099883237-100127352', '110848605-111172149', '003350670-003666717', '100127353-100479317', '065465221-065703925', '021991554-022399363', '050940740-051194652', '056375130-056597434', '004277329-004600410', '080421118-080656445', '086609370-086911062', '008826567-009081893', '040800231-041235007', '029788003-030728724', '024630777-024913658', '067440118-067805381', '008320245-008568051', '045835462-046082946', '040152448-040800230', '098898996-099130444', '015966173-016333999', '022399365-022761014', '107034248-107270814', '094698277-094922270', '103381120-103709891', '112727096-112946976', '064994031-065228276', '105637828-105858907', '108903083-109114822', '116543879-116771894', '002484420-002773837', '051807976-052085657', '104183440-104429165', '080656446-080896329', '102672539-102921717', '065228277-065465220', '002773838-003056763', '045603915-045835461', '079492107-079729186', '066738122-067094352', '042589042-042863794', '109655401-109971100', '110640375-110848604', '060500382-060728538', '111878501-112265667', '097882811-098297408', '083642696-083863485', '079962203-080197472', '059256436-059607206', '102921718-103151953', '023611938-024109920', '110430463-110640374', '112265669-112503052', '108425393-108640638', '093177633-093396460', '096392838-096602104', '009615888-010002051', '100479319-100806417', '101194937-101603546', '095555993-095770360', '006054671-006501928', '055045213-055271197', '115366527-115599236', '058171312-058513815', '003952310-004277328', '071515877-071829775', '079038562-079257302', '115841645-116081229', '033840537-035758128', '052358464-052628439', '024913659-025265574', '102369348-102672538', '051455409-051807975', '054819898-055045212', '060282721-060500381', '056597436-056871467', '114910414-115135977', '024413559-024630775', '080197473-080421117', '062301977-062518745', '022761015-023241059', '114141584-114402115', '016577020-016891419', '079257303-079492105', '069858856-070231468', '092501122-092720337', '004600412-004890603', '039372729-040152447', '113157458-113392301', '071180166-071515869', '082987917-083216205', '097441255-097657361', '011014318-011359166', '115599237-115841644', '037992031-039372728', '058513817-058883667', '098297409-098654828', '082294984-082506304', '113880297-114141583', '009081894-009341537', '052085658-052358463', '113634452-113880296', '054126698-054489419', '118485655-118809366', '118809367-119110211', '095341105-095555992', '089665631-090023507', '068154759-068475889', '066177383-066428262', '000877841-001149347', '021161496-021566908', '023241060-023611937', '026901546-027848945', '083216206-083436034', '107270815-107509281', '069166907-069506822', '015053436-015966166', '070860361-071180165', '046662492-047005405', '020867478-021161495', '043083121-043310916', '111505543-111878499', '092271367-092501121', '082725985-082987911', '113392302-113634451', '081119216-081361025', '057145677-057466746', '007351088-007616418', '107509282-107811252', '082081968-082294983', '047005406-048861549', '103709892-103955281', '091016711-091372505', '043310917-043539311', '103955282-104183439', '049885108-050940739', '112503053-112727095', '103151954-103381119', '031982313-033840533', '061419627-061641997', '106557096-106788453', '095770361-095978905', '080896330-081119215', '083863486-084084466', '091700196-091968384', '053496732-053764552', '108640639-108903082', '096602105-096805970', '053177031-053496729', '000000001-000315293', '081631256-081865905', '094922271-095133068', '003666719-003952308', '094062701-094274836', '104429166-104666678', '121272958-121494125', '117456415-117798278', '021566909-021991553', '008086318-008320244', '091968385-092271366', '061641998-061863524', '099585525-099883236', '017501192-018004912', '019419545-019723329', '044072611-044454898', '114402116-114640166', '064779496-064994030', '059969143-060282720', '073896447-075430756', '079729187-079962202', '076926544-078815576', '018004913-018285883', '109322262-109655399', '002162394-002484418', '055485870-055701603', '104916153-105160166', '095978906-096186489', '053764554-054126697', '082506305-082725984', '001433696-001771360', '105160167-105406732', '101989630-102369345', '067094355-067440112', '013883794-015053435', '090023508-090388905', '120281507-120651361', '052628441-052890992', '081865906-082081967', '087659465-088112798', '107811254-108121655', '121026027-121272957', '010682395-011014317', '116081230-116303275', '042093132-042589041', '055926393-056149274', '094486835-094698276', '110221965-110430462', '052890994-053177030', '007040343-007351087', '024109921-024413558', '116303276-116543878', '105406733-105637827', '007847771-008086316', '025265575-025651617', '111172151-111505542', '105858908-106086250', '084084467-084308808', '063885889-064106082', '072047958-072703682', '025651618-026204048', '062738946-062963059', '054489421-054819897', '030728727-031982309', '063181394-063400891', '043769650-044072610', '057831746-058171311', '075430757-076926543', '069506825-069858855', '097016603-097227558', '018285884-018675221', '089313417-089665629', '119110212-119413608', '086911063-087225760', '061192245-061419626', '041235009-042093109', '090640656-091016706', '094274837-094486834', '112946977-113157457', '007616420-007847770', '099353755-099585524', '119891273-120281506', '011359167-011702376', '088553629-088958340', '068475890-068820202', '057466747-057831745', '092944133-093177632', '060728539-060960297', '071829776-072047957', '012961164-013883793', '020115650-020485959', '058883669-059256435', '055271198-055485869', '012104866-012961163', '005568919-006054670', '000315294-000644685', '088112799-088553627', '099130445-099353754', '016891420-017201143', '084308809-084522021', '005194949-005568909', '001149349-001433695', '068820203-069166906', '091372506-091700194', '027848946-028449892', '059607207-059969142', '062082080-062301976', '117002192-117238717', '065936588-066177381', '042863797-043083120', '109971101-110221964', '056149275-056375129', '116771895-117002191', '106788454-107034246', '064560903-064779495', '020485965-020867477', '097227559-097441252', '046082947-046358934', '028449896-028945217', '093622802-093846079', '114640168-114910413', '063661635-063885888', '004890604-005194948', '095133069-095341104', '118144137-118485654', '120651363-121026026' ] _ID_RANGES_B3LYP_PM6_CHNOPSFCLNAKMGCA500 = [ '000858563-001127277', '008766471-009023947', '006913469-007280730', '043231327-043458121', '051915362-052191075', '047101469-049713834', '043967598-044296697', '109090170-109297176', '097870020-098238823', '060543826-060779724', '101947011-102329717', '104158157-104404768', '093832640-094050017', '118065784-118399416', '090469583-090714364', '018435759-018798360', '002750888-003004168', '006447340-006913468', '031443943-033102033', '056209548-056434705', '082514992-082735048', '119271887-119493609', '011928546-012633971', '063467307-063708753', '079743705-079974155', '104404769-104636075', '110401508-110611812', '045715561-045940229', '061236110-061461897', '091700390-091966386', '105612898-105833884', '109614744-109945407', '039975108-040607274', '091393654-091700388', '095120708-095328581', '098238824-098638433', '023545687-023996569', '000000001-000298223', '018131161-018435758', '103598067-103930054', '110190398-110401507', '112214081-112470992', '101169290-101572732', '107775979-108095759', '066476638-066792162', '045357623-045715560', '111118503-111470416', '116729001-116963620', '033102034-035285652', '113596433-113844800', '080687797-080907642', '025953040-026657400', '061685173-061905269', '120621697-120852767', '025520310-025953038', '115560695-115793408', '072841924-073923983', '007563494-007797980', '052732428-053039586', '045940252-046225539', '105134113-105378591', '060047877-060325850', '059681228-060047876', '094050018-094262260', '022718817-023144726', '093610266-093832639', '067124107-067449218', '041767798-042432543', '046225540-046496602', '051067845-051276686', '065270161-065522981', '092707152-092930834', '009925192-010264132', '105833886-106058014', '058588405-058960656', '009543538-009925191', '117196011-117410861', '088722857-089078823', '064821472-065050471', '104892236-105134112', '030375495-031443940', '078826650-079051187', '061461898-061685172', '114107968-114358771', '069707216-070030624', '013494628-014626827', '064149910-064382645', '055105777-055329428', '009023949-009282357', '118740678-119034741', '058960660-059332184', '020182243-020539032', '005463609-005957981', '014626829-015555902', '098638434-098883662', '029406694-030375494', '082303867-082514991', '009282358-009543537', '071584857-071861576', '022369275-022718816', '106294038-106528438', '026657408-027519630', '008271715-008510844', '116035959-116262367', '108875090-109090169', '117410862-117715654', '003609073-003896627', '081643739-081877353', '103127339-103357682', '097003652-097214852', '039148386-039975107', '056922219-057214545', '092256407-092487890', '037219244-039148383', '097214853-097428416', '086901806-087187340', '082092007-082303866', '095966292-096173691', '109945408-110190397', '081372533-081643738', '081877354-082092006', '002135498-002459353', '062561664-062780618', '090714365-091062980', '121088365-121350293', '119717131-119940490', '102648505-102897872', '063708754-063928701', '011257492-011594734', '103930055-104158155', '092487891-092707151', '076953047-078826649', '040607279-041088427', '117715655-118065783', '073923984-075452115', '069061811-069382794', '096793559-097003651', '046496605-046853486', '100108373-100453638', '020894254-021200486', '070678846-070949551', '052469408-052732427', '021200489-021576697', '091966387-092256406', '080907643-081131075', '082735049-082997273', '106759014-107006886', '069382795-069707214', '049713835-050781944', '081131076-081372532', '017598382-018131160', '084761484-086612140', '028770555-029406691', '084529439-084761483', '057906408-058242734', '116262368-116502752', '044921804-045357622', '097644346-097870019', '004219206-004542690', '080210897-080432986', '062345259-062561663', '107006887-107245301', '086612146-086901804', '120852768-121088364', '119493610-119717130', '003896628-004219205', '042432545-042778230', '053272798-053566230', '097428417-097644345', '008028391-008271714', '094685731-094909221', '043458122-043687291', '099111472-099339947', '082997274-083225650', '103357683-103598066', '102329721-102648504', '056695884-056922218', '042778231-043006092', '083225651-083444545', '010591399-010916593', '110611813-110817324', '091062983-091393652', '096380371-096589163', '079503818-079743704', '079974156-080210896', '112915012-113125714', '011594735-011928545', '002459354-002750887', '094909222-095120707', '000298224-000618477', '024810909-025146188', '093162838-093383628', '055986804-056209547', '083444546-083651135', '121350295-121494125', '015555903-016226454', '114358772-114602668', '067779308-068107950', '016466303-016750753', '059332185-059681216', '106058015-106294037', '088354178-088722855', '060779725-061005376', '010916594-011257491', '104636076-104892234', '058242737-058588403', '079268577-079503817', '035285656-037219240', '087570116-087967059', '084092656-084317515', '023996570-024349963', '065522982-065748172', '067449219-067779306', '102897873-103127338', '062780619-063005032', '023144727-023545686', '075452116-076953046', '044296703-044921803', '003004169-003292922', '054880555-055105776', '061005377-061236109', '017375386-017598381', '057548651-057906406', '099562280-099869411', '094262261-094472394', '119940492-120177048', '007797981-008028389', '055329429-055543937', '008510845-008766470', '105378592-105612897', '115793409-116035958', '111470417-111823937', '028320848-028770553', '071266170-071584856', '018798361-019164754', '068419396-068741466', '003292923-003609072', '024349964-024568623', '079051188-079268576', '113125715-113357213', '115329503-115560694', '065748173-065978765', '087187341-087570115', '083872784-084092655', '070030625-070372990', '053881443-054240679', '090115964-090469582', '107482228-107775978', '051276687-051606947', '012633972-013494620', '064602910-064821471', '119034742-119271886', '108095761-108386993', '089078824-089434140', '089434141-089770210', '099339948-099562279', '114602669-114850966', '061905270-062126390', '043006093-043231326', '025146189-025520308', '001406787-001738122', '046853491-047101465', '057214549-057548649', '089770211-090115963', '007280731-007563493', '095328582-095543490', '001738123-002135497', '080432987-080687796', '054240683-054596966', '054596967-054880553', '106528440-106759013', '066220658-066476637', '053566231-053881442', '004542691-004843500', '096173692-096380370', '021983600-022369270', '027519631-028320847', '024568624-024810908', '056434706-056695883', '108615516-108875089', '112470993-112692811', '005135518-005463608', '000618478-000858562', '072079001-072841923', '084317516-084529438', '053039587-053272797', '001127278-001406786', '094472395-094685730', '019164755-019501105', '060325851-060543825', '101572734-101947010', '066792163-067124104', '107245302-107482227', '120401133-120621696', '114850967-115100358', '109297177-109614742', '051606949-051915361', '055543938-055761163', '052191076-052469407', '118399418-118740677', '083651136-083872783', '095543491-095757752', '065978766-066220657', '070372992-070678837', '021576698-021983599', '062126391-062345258', '064382646-064602909', '098883663-099111471', '113844801-114107967', '019819596-020182242', '108386994-108615515', '004843501-005135514', '043687292-043967597', '095757753-095966291', '017033260-017375385', '068741468-069061806', '005957982-006447338', '110817325-111118502', '100453641-100785895', '116963621-117196010', '071861577-072079000', '115100359-115329501', '093383629-093610265', '063005033-063225851', '070949552-071266169', '099869413-100108372', '019501106-019819591', '065050472-065270160', '010264133-010591398', '111823939-112214079', '050781945-051067844', '068107951-068419395', '092930835-093162837', '020539033-020894253', '087967060-088354176', '120177049-120401132', '016750754-017033259', '041088428-041767797', '112692812-112915011', '063928702-064149909', '016226455-016466302', '063225852-063467303', '055761164-055986803', '096589164-096793558', '116502753-116729000', '113357214-113596431', '100785896-101169282' ] class PubChemQCB3LYPConfig(datasets.BuilderConfig): """ Configuration class for the PubChemQCB3LYP dataset. Args: features (dict): A dictionary specifying the features of the dataset. data_url (str): The URL to download the dataset. url (str): The URL to the dataset homepage. citation (str): The citation for the dataset. **kwargs: Additional keyword arguments. Attributes: version (datasets.Version): The version of the dataset. """ def __init__(self, features, url, citation, id_range, **kwargs): super(PubChemQCB3LYPConfig, self).__init__( version=datasets.Version("0.0.0"), **kwargs ) self.features = features self.url = url self.citation = citation self.id_range = id_range class PubChemQCB3LYP(datasets.GeneratorBasedBuilder): BUILDER_CONFIG_CLASS = PubChemQCB3LYPConfig DEFAULT_CONFIG_NAME = "b3lyp_pm6" VERSION = datasets.Version("0.0.0") url = "https://huggingface.co/datasets/molssiai-hub/pubchemqc-b3lyp" BUILDER_CONFIGS = [ PubChemQCB3LYPConfig( name="b3lyp_pm6", description=_DESCRIPTION, features=_FEATURE_KEYS, url=url, citation=_CITATION, id_range=_ID_RANGES_B3LYP_PM6, ), PubChemQCB3LYPConfig( name="b3lyp_pm6_chon300nosalt", description=_DESCRIPTION, features=_FEATURE_KEYS, url=url, citation=_CITATION, id_range=_ID_RANGES_B3LYP_PM6_CHON300NOSALT, ), PubChemQCB3LYPConfig( name="b3lyp_pm6_chon500nosalt", description=_DESCRIPTION, features=_FEATURE_KEYS, url=url, citation=_CITATION, id_range=_ID_RANGES_B3LYP_PM6_CHON500NOSALT, ), PubChemQCB3LYPConfig( name="b3lyp_pm6_chnopsfcl300nosalt", description=_DESCRIPTION, features=_FEATURE_KEYS, url=url, citation=_CITATION, id_range=_ID_RANGES_B3LYP_PM6_CHNOPSFCL300NOSALT, ), PubChemQCB3LYPConfig( name="b3lyp_pm6_chnopsfcl500nosalt", description=_DESCRIPTION, features=_FEATURE_KEYS, url=url, citation=_CITATION, id_range=_ID_RANGES_B3LYP_PM6_CHNOPSFCL500NOSALT, ), PubChemQCB3LYPConfig( name="b3lyp_pm6_chnopsfclnakmgca500", description=_DESCRIPTION, features=_FEATURE_KEYS, url=url, citation=_CITATION, id_range=_ID_RANGES_B3LYP_PM6_CHNOPSFCLNAKMGCA500, ) ] def _info(self): if self.config.name in _CONFIG_NAMES: features = _FEATURE_TYPES else: raise NotImplementedError("Unknown configuration in _info") return datasets.DatasetInfo( description=_DESCRIPTION, features=features, homepage=_HOMEPAGE, supervised_keys=None, license=_LICENSE, citation=_CITATION, ) def _split_generators(self, dl_manager): if self.config.name in _CONFIG_NAMES: file_list = [] for range in self.config.id_range: file_list.append(_BASE_DATA_URL_FORMAT_STR.format( name=self.config.name, range=range)) else: raise NotImplementedError( "Unknown configuration in _split_generators") return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={ "filepaths": dl_manager.download(sorted(file_list)), }, ) ] def _generate_examples(self, filepaths): if self.config.name in _CONFIG_NAMES: idx = 0 for filepath in filepaths: with open(filepath, "rb") as f: items = ijson.items(f, "item", use_float=True) for data in items: yield idx, data idx += 1 else: raise NotImplementedError( "Unknown configuration in _generate_examples")