Skip to content

Instantly share code, notes, and snippets.

@PatWalters
PatWalters / seaborn_scatterplot.ipynb
Last active January 23, 2026 10:17
A Collection of Things I Frequently Forget How To Do With Seaborn Scatterplots
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PatWalters
PatWalters / 0_Shape_HexBin.ipynb
Last active November 6, 2020 23:36
Calculate Normalized PMIs for a set of molecules and plot using Hexagon binning
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PatWalters
PatWalters / fix_inchi.ipynb
Last active March 9, 2021 01:01
A quick fix for strange tautomers generated from parsing InChI - not extensively tested, your mileage may vary
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
import sys
import dask.dataframe as dd
import pandas as pd
from rdkit import Chem
from rdkit.Chem.Descriptors import MolWt
from rdkit.Chem.rdMolDescriptors import BCUT2D
import time
@PatWalters
PatWalters / smid.py
Last active August 17, 2021 08:31
An RDKit implementation of Smallest Maximum Intramolecular Distance
#!/usr/bin/env python
import sys
from rdkit import Chem
from rdkit.Chem.rdmolops import Get3DDistanceMatrix
import numpy as np
from rdkit.Chem import AllChem
# An RDKit implementation of Smallest Maximum Intramolecular Distance
# https://pubs.acs.org/doi/pdf/10.1021/acs.jcim.9b00692
@PatWalters
PatWalters / similarity_example.ipynb
Created June 2, 2021 02:13
A simple similarity calculation example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PatWalters
PatWalters / rdkit_props.ipynb
Last active July 8, 2021 01:11
Calculating descriptors with the RDKit
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.