open-reaction-database / ord-data

Official data repository for the Open Reaction Database
https://open-reaction-database.org
Creative Commons Attribution Share Alike 4.0 International
236 stars 60 forks source link

Change 4 names/descriptions #172

Closed connorcoley closed 1 year ago

connorcoley commented 1 year ago

Received suggested names/descriptions from original authors

import os
from ord_schema import message_helpers
from ord_schemam.proto import dataset_pb2
from google.protobuf import json_format

dsets = [
    ("ord_dataset-68cb8b4b2b384e3d85b5b1efae58b203",
    "Rapid material-sparing screening of 5760 Suzuki-Miyaura coupling reactions",
    "5760 nanoscale flow reactions from https://doi.org/10.1126/science.aap9112 screening a series of electrophiles and nucleophiles against 12 ligands (one blank), 8 bases (one blank), and four solvents."),
    ("ord_dataset-3b5db90e337942ea886b8f5bc5e3aa72",
    "Ni-catalyzed Suzuki Miyaura cross-coupling",
    "A nickel-catalyzed Suzuki-Miyaura cross-coupling reaction with various aryl chlorides and aryl boronic acids evaluated with phosphine ligands. From https://www.science.org/doi/10.1126/science.abj4213"),
    ("ord_dataset-cbcc4048add7468e850b6ec42549c70d",
    "Pd-catalyzed Buchwald-Hartwig C-N cross-coupling",
    "A palladium-catalyzed Buchwald-Hartwig cross coupling reaction with different precatalysts with different ligands, and bases."),
    ("ord_dataset-eeba974d3c284aed86d1c1d442260a1e",
    "HTE Suzuki coupling dataset",
    "Pd-catalyzed Suzuki coupling HTE dataset from Figure 2 of doi:10.1021/jacs.2c08592"),
]

for (_id, name, desc) in dsets:
    prefix = _id[12:14]
    fname = f"data/{prefix}/{_id}.pb.gz"
    #os.system(f"git lfs pull --include \"{fname}\"")
    dataset = message_helpers.load_message(fname, dataset_pb2.Dataset)
    dataset_web = message_helpers.fetch_dataset(_id)
    assert(json_format.MessageToJson(dataset).encode() ==
        json_format.MessageToJson(dataset_web).encode())
    print(f"Old name:  {dataset_web.name}")
    print(f"Old desc:  {dataset_web.description}")
    dataset.name = name
    dataset.description = desc
    print(f"New name:  {dataset.name}")
    print(f"New desc:  {dataset.description}")
    message_helpers.write_message(dataset, fname)
Old name:  
Old desc:  
New name:  Rapid material-sparing screening of 5760 Suzuki-Miyaura coupling reactions
New desc:  5760 nanoscale flow reactions from https://doi.org/10.1126/science.aap9112 screening a series of electrophiles and nucleophiles against 12 ligands (one blank), 8 bases (one blank), and four solvents.
Old name:  
Old desc:  
New name:  Ni-catalyzed Suzuki Miyaura cross-coupling
New desc:  A nickel-catalyzed Suzuki-Miyaura cross-coupling reaction with various aryl chlorides and aryl boronic acids evaluated with phosphine ligands. From https://www.science.org/doi/10.1126/science.abj4213
Old name:  
Old desc:  
New name:  Pd-catalyzed Buchwald-Hartwig C-N cross-coupling
New desc:  A palladium-catalyzed Buchwald-Hartwig cross coupling reaction with different precatalysts with different ligands, and bases.
Old name:  
Old desc:  
New name:  HTE Suzuki coupling dataset
New desc:  Pd-catalyzed Suzuki coupling HTE dataset from Figure 2 of doi:10.1021/jacs.2c08592