This file contains hidden or 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 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. |
This file contains hidden or 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 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 |
This file contains hidden or 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 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))) | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.