Last active
May 7, 2023 12:39
-
-
Save CoryKornowicz/b9c758e286e952730e69b3345353818c to your computer and use it in GitHub Desktop.
Kd to deltaG. For comparing Binding Affinity to expected calculated Kd
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 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))) | |
def dG_to_Kd(dG): | |
dG = float(dG) | |
# R T | |
Kd = math.e**(dG/(0.0019872036*298)) | |
print('{:0.2e} dG'.format(Kd)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment