This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\DeclareUnicodeCharacter{0301}{*************************************} | |
or | |
{\'\i} --> {\'{i}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''This is demo scripts for running n_gram_graph on delaney.''' | |
from __future__ import print_function | |
import argparse | |
import os | |
import numpy as np | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CondaHTTPError: HTTP None None for url <https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2> | |
Elapsed: None | |
An HTTP error occurred when trying to retrieve this URL. | |
HTTP errors are often intermittent, and a simple retry will get you on your way. | |
SSLError(SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),),) | |
Could not fetch URL https://pypi.python.org/simple/torch-scatter/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847) - skipping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index_list=(0 1 2 3 4) | |
task_list=(mu alpha homo lumo gap r2 zpve cv u0 u298 h298 g298) | |
for index in "${index_list[@]}"; do | |
for task in "${task_list[@]}"; do | |
mkdir -p ../output/"$index"/gcnn | |
LD_LIBRARY_PATH="${HOME}/my_libc_env/lib/x86_64-linux-gnu/:${HOME}/my_libc_env/usr/lib64/" ${HOME}/my_libc_env/lib/x86_64-linux-gnu/ld-2.17.so `which python` \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import deepchem as dc | |
datasets = ['muv'] | |
models = ['weave'] | |
metrics = [dc.metrics.Metric(dc.metrics.roc_auc_score, np.mean),dc.metrics.Metric(dc.metrics.prc_auc_score, np.mean)] | |
for model in models: | |
print("RUNNING:",model) | |
dc.molnet.run_benchmark(datasets,model,test=True,metric=metrics) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Mar 06 14:25:40 2017 | |
@author: Zhenqin Wu | |
""" | |
from __future__ import print_function | |
from __future__ import division | |
from __future__ import unicode_literals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from torch.autograd import Variable | |
class CrossEntropy(nn.Module): | |
def __init__(self, alpha=.5): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rdkit import RDConfig | |
from rdkit.Chem import ChemicalFeatures | |
atom_candidates = ['C', 'Cl', 'I', 'F', 'O', 'N', 'P', 'S', 'Br', 'Unknown'] | |
def one_of_k_encoding(x, allowable_set): | |
if x not in allowable_set: | |
raise Exception("input {0} not in allowable set{1}:".format(x, allowable_set)) | |
return map(lambda s: 1 if x == s else 0, allowable_set) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.model_selection import KFold | |
N = 3867 | |
kf = KFold(n_splits=10, shuffle=True) | |
for _, test_index in kf.split(range(N)): | |
print(len(test_index)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rdkit import Chem | |
from rdkit.Chem import AllChem | |
raw_smiles = 'CC' | |
molecule = Chem.MolFromSmiles('CC') | |
canonical_smiles = Chem.MolToSmiles(molecule) | |
print raw_smiles | |
print canonical_smiles |
NewerOlder