<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { margin-top: 0 ; margin-bottom: 0 }
 --></style><title>Re: [RASMB] 2 ligands and no
equation</title></head><body>
<div>Hi Holger,</div>
<div><br></div>
<div>This is a fairly simple problem requiring about 10+ lines of code
to solve.</div>
<div><br></div>
<div>We have 2 mass action equations and 3 conservation of mass
equations which gives us 5 equations and 5 unknowns: [P], [A], [B],
[PA], [PB]</div>
<div><br></div>
<div><img src="cid:p0500193dba48871b4807@[10.0.1.4].1.0"></div>
<div><br></div>
<div>substituting:</div>
<div><br></div>
<div><img src="cid:p0500193dba48871b4807@[10.0.1.4].1.1"></div>
<div><br></div>
<div>and rearranging, we have</div>
<div><br></div>
<div><img src="cid:p0500193dba48871b4807@[10.0.1.4].1.2"></div>
<div><br></div>
<div><br></div>
<div>These equations can be solved by simple straight iteration with
initial guesses for [A] and [B] given the total molar concentration of
protein and ligands along with Ka and Kb for ligand binding. After
iterating until [P], [A] and [B] have converged to their final values,
the values of [PA] and [PB] can be found by substitution. That should
give you all you need to compute the ratios you are interested
in.</div>
<div><br></div>
<div>Hope that helps,</div>
<div>Walter</div>
<div><br></div>
<div>p.s.    Just thought I'd test it out:</div>
<div>... in fact here's the code with sample output:</div>
<div>------------- output:</div>
<div><font face="Courier" size="-1"> enter Ka (association
constant)<br>
1.e6<br>
  enter Kb (association constant)<br>
1.e6<br>
 enter p-total<br>
1.e-6<br>
 enter a-total<br>
1.e-6<br>
 enter b-total<br>
1.e-6<br>
 [A]=   7.071067811661710E-007<br>
 [B]=   7.071067811661710E-007<br>
 [P]=   4.142135624138481E-007<br>
 [PA]=  2.928932188338290E-007<br>
 [PB]=  2.928932188338290E-007</font></div>
<div><font face="Courier" size="-1">---------- here's another case
with excess B</font></div>
<div><font face="Courier" size="-1"> enter Ka (association
constant)<br>
1.e6<br>
  enter Kb (association constant)<br>
1.e6<br>
 enter p-total<br>
1.e-5<br>
 enter a-total<br>
1.e-5<br>
 enter b-total<br>
1.e-3<br>
 [A]=   9.901089009011984E-006<br>
 [B]=   9.901089009011984E-004<br>
 [P]=   9.989910291482921E-009<br>
 [PA]=  9.891099098801730E-008<br>
 [PB]=  9.891099098801730E-006</font><br>
<font face="Courier" size="-1"></font></div>
<div><font face="Courier" size="-1">----------and here'e the
code.</font></div>
<div><font face="Courier" size="-1"><br></font></div>
<div><font face="Courier"
size="-1"><x-tab>       
</x-tab>program ligand<br>
<x-tab>  </x-tab><br>
<x-tab>        </x-tab><br>
<x-tab>        </x-tab>implicit
none<br>
<x-tab>   </x-tab><br>
<x-tab>        </x-tab><br>
<x-tab>        </x-tab>real*8
A,B,P,PA,PB,KA,KB,ATOT,BTOT,PTOT<br>
<x-tab> </x-tab>real*8
delta_p,delta_a,delta_b,a_last,b_last,p_last<br>
<x-tab>     </x-tab><br>
400<x-tab>    
</x-tab>continue<x-tab>       
</x-tab><br>
<x-tab>        </x-tab><br>
<x-tab>        </x-tab>write(*,*)
'enter Ka (association constant)'<br>
<x-tab>    </x-tab>read(*,*) ka<br>
<x-tab>    </x-tab><br>
<x-tab>        </x-tab>write(*,*)'
enter Kb (association constant)'<br>
<x-tab>    </x-tab>read(*,*) Kb<br>
<x-tab>    </x-tab><br>
300<x-tab>     </x-tab>continue<br>
<br>
<x-tab>        </x-tab>write(*,*)
'enter p-total'<br>
<x-tab>      </x-tab>read(*,*) ptot<br>
<x-tab>  </x-tab><br>
<x-tab>        </x-tab>write(*,*)
'enter a-total'<br>
<x-tab>      </x-tab>read(*,*) atot<br>
<x-tab>  </x-tab><br>
<x-tab>        </x-tab>write(*,*)
'enter b-total'<br>
<x-tab>      </x-tab>read(*,*) btot<br>
<x-tab>  </x-tab><br>
<x-tab>       
</x-tab>a=atot*0.1<br>
<x-tab>      </x-tab>b=btot*0.1<br>
<x-tab>      </x-tab>p=ptot<br>
<x-tab>  </x-tab><br>
<x-tab>        </x-tab><br>
100<x-tab>     </x-tab>continue<br>
<x-tab>        </x-tab>p_last=p<br>
<x-tab>        </x-tab>a_last=a<br>
<x-tab>        </x-tab>b_last=b<br>
<br>
<x-tab>        </x-tab>p=ptot/(1.0
+ ka*a + kb*b)<br>
<x-tab>      </x-tab>a=atot/(1.0 + ka*p)<br>
<x-tab>     </x-tab>b=btot/(1.0 + kb*p)<br>
<x-tab>     </x-tab><br>
<x-tab>       
</x-tab>delta_p=dabs((p-p_last)/p)<br>
<x-tab>     
</x-tab>delta_a=dabs((a-a_last)/a)<br>
<x-tab>     
</x-tab>delta_b=dabs((b-b_last)/b)<br>
<x-tab>      </x-tab><br>
<x-tab>        </x-tab><br>
<x-tab>        </x-tab>if
(delta_p.le.1.e-9 .and. delta_a.le.1.e-9 .and. delta_b.le.1.e-9) 
goto 200<br>
<x-tab>   </x-tab><br>
<x-tab>        </x-tab>! write(*,*)
p,a,b<br>
<x-tab>      </x-tab><br>
<x-tab>        </x-tab>goto 100<br>
<x-tab>        </x-tab><br>
<x-tab>        </x-tab><br>
200<x-tab>     </x-tab>continue<br>
<br>
<br>
<x-tab>        </x-tab>write(*,*)
'[A]= ',a<br>
<x-tab>    </x-tab>write(*,*) '[B]= ',b<br>
<x-tab>    </x-tab>write(*,*) '[P]= ',p<br>
<x-tab>    </x-tab>write(*,*) '[PA]=',Ka*p*a<br>
<x-tab>       </x-tab>write(*,*)
'[PB]=',Kb*p*b<br>
<x-tab>       </x-tab><br>
<x-tab>        </x-tab><br>
<x-tab>        </x-tab>goto 400<br>
<x-tab>        </x-tab><br>
<x-tab>        </x-tab>end<br>
<x-tab>     </x-tab><br>
<x-tab>       
</x-tab></font></div>
<div><br></div>
<div><br></div>

<div><font color="#0000FF">-- <br>
---------------------------------------------------------------------<span
></span>----------------------------------</font></div>
<div><font color="#0000FF">Walter Stafford</font></div>
<div><font color="#0000FF">mailto:stafford@bbri.org</font></div>
<div><font color="#0000FF">direct dial:   
617-658-7808</font></div>
<div><font color="#0000FF">receptionist: 617-926-8040</font></div>
</body>
</html>