Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CoryKornowicz
CoryKornowicz / KdtodG.py
Last active May 7, 2023 12:39
Kd to deltaG. For comparing Binding Affinity to expected calculated Kd
import math
# deltaG = -RT*ln(Kd)
def Kd_to_dG(Kd):
Kd = float(Kd)
# R T
dG = -0.0019872036*298*math.log(Kd)
print('{} Kcal/mol'.format(round(dG, 2)))
@CoryKornowicz
CoryKornowicz / neb.py
Created March 30, 2022 21:23 — forked from rmcgibbo/neb.py
Nudged Elastic Band in Python
from __future__ import division
import numpy as np
import IPython as ip
import matplotlib.pyplot as pp
import warnings
from collections import namedtuple
import scipy.optimize
#symbolic algebra
import theano
@CoryKornowicz
CoryKornowicz / main.py
Created December 2, 2025 10:43
MLX - Intelligent Matrix Exponentiation
import mlx.core as mx
import mlx.nn as nn
import mlx.optimizers as optim
from mlx.data.datasets import load_mnist
@mx.compile
def matrix_exp(M):
"""
Compute matrix exponential using scaling and squaring with Padé approximation.
This implements a simplified version suitable for small matrices.