Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions DelG_to_Kd_converter.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/usr/bin/python

import math # This will import math module
import math # This will import math module

delg = float(input("What is your DelG in kcal/mol?" ))
Kd_value = math.exp((delg*1000)/(1.98*298.15)) # this will calculate the dissociation constant from the Gibbs free energy of binding
Kd_value1 = (math.exp((delg*1000)/(1.98*298.15)))*1000000 # this will calculate the dissociation constant from the Gibbs free energy of binding
Kd_value2 = (math.exp((delg*1000)/(1.98*298.15)))*1000000000 # this will calculate the dissociation constant from the Gibbs free energy of binding
print("Kd =", Kd_value, "M") # this will print out the results in M
print("Kd =", Kd_value1, "microM") # this will print out the results in microM
print("Kd =", Kd_value2, "nM") # this will print out the results in nM
R = 1.9872 #cal/K.mol
T = 298.18 #in degrees Kelvin - Body temperature
Kd_value = math.exp((-delg*1000)/(R*T)) # this will calculate the dissociation constant from the Gibbs free energy of binding
Kd_value1 = (math.exp((-delg*1000)/(R*T)))*1000000 # this will calculate the dissociation constant from the Gibbs free energy of binding
Kd_value2 = (math.exp((-delg*1000)/(R*T)))*1000000000 # this will calculate the dissociation constant from the Gibbs free energy of binding
print("Kd =", "{:e}".format(Kd_value), "M") # this will print out the results in M
print("Kd =", "{:e}".format(Kd_value1), "microM") # this will print out the results in microM
print("Kd =", "{:e}".format(Kd_value2), "nM") # this will print out the results in nM

# to run the script use this command: python DelG_to_Kd_converter.py
# to run the script in terminal use this command: python DelG_to_Kd_converter.py
# if you are using this script, please cite: Shityakov, S.; Broscheit, J.; Forster, C., alpha-Cyclodextrin dimer complexes of dopamine and levodopa derivatives to assess drug delivery to the central nervous system: ADME and molecular docking studies. Int J Nanomedicine 2012, 7, 3211-9.
# edited by Sebastian Moes