Skip to content

Instantly share code, notes, and snippets.

View leelasd's full-sized avatar
🏠
Working from home

Leela S. Dodda leelasd

🏠
Working from home
View GitHub Profile
@leelasd
leelasd / extract_approved_drugs.py
Created November 16, 2021 14:19
Extract approved Drugs from Chembl 29 local database
import psycopg2
import pandas as pd
import pandas.io.sql as sqlio
con = psycopg2.connect(database="chembl_29", user="leelasd", password="", host="127.0.0.1", port="5432")
print("Database opened successfully")
sql="""SELECT DISTINCT m.chembl_id AS compound_chembl_id,s.canonical_smiles,
m.molregno,
@leelasd
leelasd / PermeabilityDataFromChembl.py
Created November 16, 2021 03:36
Extract Permeability Data from Chembl SQL database
import psycopg2
import pandas as pd
import pandas.io.sql as sqlio
con = psycopg2.connect(database="chembl_29", user="leelasd", password="", host="127.0.0.1", port="5432")
print("Database opened successfully")
sql="""SELECT m.chembl_id AS compound_chembl_id,
s.canonical_smiles,
r.compound_key,
@leelasd
leelasd / retrieve_bioactivity_info_from_chembl.py
Created November 15, 2021 03:30 — forked from avrilcoghlan/retrieve_bioactivity_info_from_chembl.py
Python script to query the ChEMBL database to retrieve a list of compounds with bioactivities for certain target proteins, and then retrieve information on the molecular properties of those compounds
import pandas as pd # uses pandas python module to view and analyse data
import requests # this is used to access json files
#====================================================================#
# using a list of known targets, find compounds that are active on these targets:
def find_bioactivities_for_targets(targets):
targets = ",".join(targets) # join the targets into a suitable string to fulfil the search conditions of the ChEMBL api
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from openmmtools.constants import kB
from simtk import unit
import numpy as np
from tqdm import tqdm
from IPython.core.display import display, HTML
from IPython.display import SVG
from rdkit.Chem.Draw import IPythonConsole
import mdtraj as md
#from utils import *
import nglview
import torch
import torch.nn as nn
from torch.nn import Softplus
from torch.utils.data import Dataset, DataLoader
import dgl
import dgl.function as fn
from dgl.batched_graph import sum_nodes
from dgl.data.chem.utils import mol_to_complete_graph
import numpy as np
from collections import defaultdict
@leelasd
leelasd / Clustering Methods.ipynb
Created October 27, 2020 22:59 — forked from greglandrum/Clustering Methods.ipynb
Clustering Methods.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leelasd
leelasd / Show_Ph4_Features_in_PyMOL.ipynb
Created October 27, 2020 22:56 — forked from greglandrum/Show_Ph4_Features_in_PyMOL.ipynb
Show_Ph4_Features_in_PyMOL.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leelasd
leelasd / KNIME_from_Jupyter_demo.ipynb
Created October 27, 2020 22:55 — forked from greglandrum/KNIME_from_Jupyter_demo.ipynb
KNIME from Jupyter_demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.