[RASMB] 2 ligands and no equation
Walter Stafford
stafford at bbri.org
Mon Jan 13 11:05:11 PST 2003
Hi Holger,
This is a fairly simple problem requiring about 10+ lines of code to solve.
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]
substituting:
and rearranging, we have
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.
Hope that helps,
Walter
p.s. Just thought I'd test it out:
... in fact here's the code with sample output:
------------- output:
enter Ka (association constant)
1.e6
enter Kb (association constant)
1.e6
enter p-total
1.e-6
enter a-total
1.e-6
enter b-total
1.e-6
[A]= 7.071067811661710E-007
[B]= 7.071067811661710E-007
[P]= 4.142135624138481E-007
[PA]= 2.928932188338290E-007
[PB]= 2.928932188338290E-007
---------- here's another case with excess B
enter Ka (association constant)
1.e6
enter Kb (association constant)
1.e6
enter p-total
1.e-5
enter a-total
1.e-5
enter b-total
1.e-3
[A]= 9.901089009011984E-006
[B]= 9.901089009011984E-004
[P]= 9.989910291482921E-009
[PA]= 9.891099098801730E-008
[PB]= 9.891099098801730E-006
----------and here'e the code.
program ligand
implicit none
real*8 A,B,P,PA,PB,KA,KB,ATOT,BTOT,PTOT
real*8 delta_p,delta_a,delta_b,a_last,b_last,p_last
400 continue
write(*,*) 'enter Ka (association constant)'
read(*,*) ka
write(*,*)' enter Kb (association constant)'
read(*,*) Kb
300 continue
write(*,*) 'enter p-total'
read(*,*) ptot
write(*,*) 'enter a-total'
read(*,*) atot
write(*,*) 'enter b-total'
read(*,*) btot
a=atot*0.1
b=btot*0.1
p=ptot
100 continue
p_last=p
a_last=a
b_last=b
p=ptot/(1.0 + ka*a + kb*b)
a=atot/(1.0 + ka*p)
b=btot/(1.0 + kb*p)
delta_p=dabs((p-p_last)/p)
delta_a=dabs((a-a_last)/a)
delta_b=dabs((b-b_last)/b)
if (delta_p.le.1.e-9 .and. delta_a.le.1.e-9 .and.
delta_b.le.1.e-9) goto 200
! write(*,*) p,a,b
goto 100
200 continue
write(*,*) '[A]= ',a
write(*,*) '[B]= ',b
write(*,*) '[P]= ',p
write(*,*) '[PA]=',Ka*p*a
write(*,*) '[PB]=',Kb*p*b
goto 400
end
--
-------------------------------------------------------------------------------------------------------
Walter Stafford
mailto:stafford at bbri.org
direct dial: 617-658-7808
receptionist: 617-926-8040
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.rasmb.org/pipermail/rasmb-rasmb.org/attachments/20030113/62bb16e3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: P4A87AF43
Type: image/png
Size: 1639 bytes
Desc: not available
URL: <http://list.rasmb.org/pipermail/rasmb-rasmb.org/attachments/20030113/62bb16e3/attachment-0021.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: P197DE9D1_2
Type: image/png
Size: 978 bytes
Desc: not available
URL: <http://list.rasmb.org/pipermail/rasmb-rasmb.org/attachments/20030113/62bb16e3/attachment-0022.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: P197DE9D1_3
Type: image/png
Size: 1173 bytes
Desc: not available
URL: <http://list.rasmb.org/pipermail/rasmb-rasmb.org/attachments/20030113/62bb16e3/attachment-0023.png>
More information about the RASMB
mailing list