Skip to content

Instantly share code, notes, and snippets.

@leelasd
Created September 12, 2018 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leelasd/f4e2292224404f536cb729431fba5c58 to your computer and use it in GitHub Desktop.
Save leelasd/f4e2292224404f536cb729431fba5c58 to your computer and use it in GitHub Desktop.
Equilibrium Concentrations of two ligands in case of Competitive binding
# -*- coding: utf-8 -*-
"""Competitive Binding.ipynb
Created on Sep 11 15:40:05 2016
@author: Leela S. Dodda leela.dodda@yale.edu
@author: William L. Jorgensen Lab
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1xm_e38URAOk4Aspxffkupbm_zMyKcFxv
"""
import numpy as np
def Concentrations(Ka,Kb,Ai,Bi,Pi):
'''
Input Variables:
Ka = Binding COnstant of Ligand A
Kb = Binding COnstant of Ligand B
Ai = Initial Concentration of Ligand A
Bi = Initial Concentration of Ligand B
Pi = Initial Concentration of Protein
Output:
Af = Equilibrium Concentration of Ligand A
Bf = Equilibrium Concentration of Ligand B
Pf = Equilibrium Concentration of Protein
Reference For This Method:
** An exact mathematical expression for describing competitive binding of
two different ligands to a protein molecule **
Zhi-Xin Wang
FEBS Letters 360 (1995) 111-114
'''
a = Ka+Kb+ Ai+Bi - Pi
b = Kb*(Ai-Pi) + Ka*(Bi-Pi) + Ka*Kb
c = -1.0 * Ka * Kb*Pi
num = (-2.0*a**3) + (9.0 *a*b) - (27.0*c)
denom = 2.0*np.sqrt((a**2-3.0*b)**3)
theta = np.arccos(num/denom)
Pf = (-1.0*a/3.0) + ((2.0/3.0)*np.sqrt(a**2-3.0*b)*np.cos(theta/3.0))
ratioA = Ka/Pf
ratioB = Kb/Pf
Af = Ai*(ratioA/(ratioA+1.0))
Bf = Bi*(ratioB/(ratioB+1.0))
return(Af,Bf,Pf)
Ka = 5.3e-9#Binding COnstant of Ligand A
Kb = 43.0e-9#Binding COnstant of Ligand B
Ai = 0.2e-6#Initial Concentration of Ligand A
Bi = 0.5e-6#Initial Concentration of Ligand B
Pi = 0.2e-6#Initial Concentration of Protein
Af,Bf,Pf = Concentrations(Ka,Kb,Ai,Bi,Pi)
print('Protein Concentration at Eq %.2E'%Pf)
print('Ligand A Concentration at Eq %.2E'%Af)
print('Ligand B Concentration at Eq %.2E'%Bf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment