A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://nbviewer.ipython.org/urls/raw.github.com/rdkit/UGM_2013/master/Notebooks/ESOL/ESOL.ipynb below:

Jupyter Notebook Viewer

logSw = dict()
supplier = Chem.SmilesMolSupplier("Delaney_SupplData.smi", delimiter="\t", titleLine=True)
for mol in supplier:
    if mol:
        mol_id = "ESOL_" + mol.GetProp("_Name")
        mol.SetProp("_Name", mol_id)
        logSw[mol_id] = dict()
        logSw[mol_id]["CANSMILES"] = Chem.MolToSmiles(mol)
        # RDKit clogSw
        logSw[mol_id]["RDKit_clogSw"] = clogSw(mol)
        mol.SetProp("RDKit_clogSw", str(logSw[mol_id]["RDKit_clogSw"]))
        # ESOL
        logSw[mol_id]["ESOL predicted log(solubility:mol/L)"] = mol.GetProp("ESOL predicted log(solubility:mol/L)")
        # Measured Solubility
        logSw[mol_id]["measured log(solubility:mol/L)"] = mol.GetProp("measured log(solubility:mol/L)")
    # end if
# end for

# Dump logSw in csv
import csv
f = open('ESOL_Results.csv','wb')
w = csv.writer(f)
w.writerow(["Canonical SMILES", "Mol_Id", "measured log(solubility:mol/L)", "ESOL predicted log(solubility:mol/L)", "RDKit_clogSw"])
for mol_id in logSw:
    w.writerow([logSw[mol_id]["CANSMILES"], 
                mol_id, 
                logSw[mol_id]["measured log(solubility:mol/L)"], 
                logSw[mol_id]["ESOL predicted log(solubility:mol/L)"],
                logSw[mol_id]["RDKit_clogSw"]])
# end for
f.flush()
f.close()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4