Skip to content
Snippets Groups Projects
chemutils.py 356 B
Newer Older
import math

def kd(delta_G:float, temperature:float=298) -> float:
  """
  calculates the affinity constant depending on the binding free energy
  @param delta_G: the value of the binding free energy
  @param temperature: temperature, using Kelvin degrees
  @return: affinity constant (alias Kd)
  """
  
  return math.exp(delta_G / (8.314 * temperature))