The Binding of Two Kinds of Symmetric Ligands to an
Infinite Isotropic Linear Lattice by Alan R. Wolfe

This Mathematica  notebook calculates and plots the Scatchard plot, neighbor-effect parameters, and conditional probabilities for the binding of two kinds of symmetric ligands to an isotropic lattice.  It DOES NOT permit comparison of experimental and theoretical data.  It can only be used after the appropriate initialization notebook has been evaluated.  To perform the calculations, simply set the input variables to the desired values and execute the "Kernel-> Evaluation-> Evaluate Notebook" command.  This may be repeated with different values for the input variables.  

The notebook may also be executed in sections.  To operate in this manner, the input parameters cell must be executed first, followed by the cell immediately below the "Calculate…" heading.  Any of the plots can then be displayed in any order.  It's easiest to start by simply selecting the right-most cell grouping bracket and executing everything from the input parameters to the ligand 1 Scatchard plot.

INPUT VARIABLES:

points = 10; kL1 = 1; kL2 = 2; nL1 = 2; nL2 = 1; 
wL1 = 1.5; wL2 = 2; wL12 = 0.2; type = 1; 
(* type 1 isotherms only *)  totalL2 = 2; polymer = 0.1; 
(* type 2 only *)  freeL2 = 2;  
(* type 3 only *)  fracR2Sat = 0.2;

"type" indicates which type of isotherm is desired.  
type = 1 -> a constant total concentration of ligand 2. 
type = 2 -> a constant concentration of free ligand 2; 
type = 3 -> a constant concentration of bound ligand 2; 

totalL2 is the total concentration of ligand 2; polymer is the total lattice residue concentration.  Both concentrations are expressed in the same units used for kL2. 

freeL2 is the concentration of free ligand 2 expressed in the same units used for kL2.  

fracR2Sat is the fraction of the maximum possible ratio of bound ligand 2 to lattice residues that is present on the lattice.

(* Calculate the neighbor-effect parameters and Scatchard plot *)

Note - if the first data point on the plots is calculated incorrectly for type 1 or 2 isotherms, it may help to increase the value of the variable loopNumber in the cell below this one.  This data point may be checked by calculating a type 3 isotherm at the calculated r2 of the initial point of the type 1 or 2 isotherm; if correct, the initial neighbor-effect values will be the same.

(* Initialize program parameters and calculate binding of ligand 2 at r1 = 0 for type 1 or type 2 isotherms *)
points2 = points ; 
flag = False ; 
r1 = 0 ; EL1 = 1 ; 
If [ wL2 == 0, r2Sat = 1/(nL2 + 1), r2Sat = 1/nL2 ] ; 
setLimits ; 
If [ type==1, FreeL2 := TotalL2-R2 polymer ] ; 
If [ type==3, r2 = fracR2Sat r2Sat ] ; 
loopNumber = 10 ; 
If [ type==1, loopArray = Range [1, loopNumber] ; 
     X2 = 0.01 ; r2 = 0.01 ; EL2 = 1 ; 
     Map [ Function [ zz, 
          TotalL2 = totalL2 zz/loopNumber ; neL2a ], loopArray ]  ] ; 
If [ type==2, loopArray = Range [1, loopNumber] ; 
     X2 = 0.01 ; EL2 = 1 ; 
     Map [ Function [ zz, 
          FreeL2 = freeL2 zz/loopNumber ; neL2b ], loopArray ]  ] ; 
r2initial = r2 ; 
f = 1 - nL1 r1 - nL2 r2 ; 
x1 = r1/f ; x2 = r2/f ; 
If [ type==3, EL2 = ( 1-x2 + Sqrt [ (1-x2)^2 + 4 x2 wL2 ] )/2 ] ; 
If [ !wL12==1, EL1 = ( EL2 + x2 wL12 )/( EL2 + x2 ) ] ; 
checkLimits ; 
If [ flag, printWarning3 ; r1ZeroError = True; dropPoints = 1, 
     r1ZeroError = False ; dropPoints = 0 ] ; 
     
(* Initialize loop parameters and output arrays *) 
r1SatDetermine ; neChoose ; 
xAxisInterval = r1Sat/(points2) ; 
abscissa = Range [1, points2-1] ; abscissa2 = {} ; 
points3 = points2 ; 
AppendTo [ abscissa2, points3 - 1/2] ; points2 = points2+1 ; 
AppendTo [ abscissa2, points3 - 1/4] ; points2 = points2+1 ; 
abscissa = xAxisInterval Join [ abscissa, abscissa2 ] ; 
r1L1finitial = r1L1f ; EL1initial = EL1 ; EL2initial = EL2 ; 
r2L2finitial = r2L2f ; 
x2initial = x2 ; 
ffinitial = ff ; 
latticeCoverageInitial = latticeCoverage ; 

(* Evaluate neighbor-effect parameters for r1 < r1Sat *)  
startPrint ; 
ordinate = Map [ Function [ zz, r1 = zz ; 
     f = 1 - nL1 r1 - nL2 r2 ; 
     x1 = r1/f ; 
     x2 = r2/f ; 
     If [ needCheck, 
          If [ flag==True, {EL1,EL2} = {1,1} ] ; 
          If [ flag==False, ne ; checkLimits ] ; 
          If [ flag==True, dropPoints = dropPoints + 1 ] , 
          ne ] ; 
     If [ flag==False, Print [ r1//N, "     ", r1L1f//N ] ] ; 
     {r1L1f, EL1, EL2, r2, r2L2f,x1,x2,ff,latticeCoverage} ], abscissa ] ; 
Print [ r1Sat//N,"         0" ] ; 

(* Evaluate NE parameters & conditional probabilities at r1 = r1Sat *)  
PrependTo [ ordinate, 
     {r1L1finitial,EL1initial,EL2initial,r2initial,
          r2L2finitial,0,x2initial,ffinitial,latticeCoverageInitial} ] ; 
chooseNEandCP ; 
AppendTo [ ordinate, 
     {0, EL1, EL2, r2, finalr2L2f,0,0,0, latticeCoverage} ] ;

(* Indicate which equations were used *)  scroll = 1

Print [ "ne = ", neChoice, " ; NE = ", NEchoice, 
     " ; CP = ", CPchoice] ; 
Print [ "r1Sat = ", r1Sat//N, " ; r2 at r1Sat = ", r2//N ] ;

(* Display the Scatchard plot for ligand 1 *)  scroll = 1

makePlot [ 1, 0, "r1/L1f", "        Scatchard plot - ligand 1" ] ;

(* Plot the neighbor-effect parameters *)  scroll = 1

makePlot [ 2, EL1initial, "eL1","NE for free L1 sites" ]

makePlot [ 3, EL2initial, "eL2", "NE for free L2 sites" ]

(* Plot the binding data for ligand 2 *)  scroll = 1

If [ wL1==0 && !wL12==0 && nL2==1 && (type==1 || type==2), 
     makePlot [ 4, r2initial, "r2", "  [bound ligand 2]/[polymer]" ], 
     makePlot [ 4, 0, "r2", "  [bound ligand2]/[polymer]" ]  ]

If [ wL1==0 && !wL12==0 && nL2==1 && N [ r2//N ] < r1, 
     makePlot [ 5, r2L2finitial, "r2/free L2", 
          "              Scatchard plot for ligand 2" ], 
     makePlot [ 5, 0, "r2/free L2", "              Scatchard plot - ligand 2" ]  ]

(* Plot lattice coverage *)  scroll = 1

makePlot [ 9, latticeCoverageInitial, "l.c.", 
"  fraction of lattice covered" ]

(* Plot the conditional probabilities *)  scroll = 1

(* ff *)

makePlot [ 8, 0, "ff", "" ]

(* bL1f *)

makeCPplot [ bL1f, "     bL1f" ]

(* bL2f *)

makeCPplot [ bL2f, "     bL2f" ]

(* fbL1 *)

makeCPplot [ fbL1, "     fbL1" ]

(* fbL2 *)

makeCPplot [ fbL2, "     fbL2" ]

(* bL1bL1 *)

makeCPplot [ bL1bL1, "          bL1bL1" ]

(* bL2bL2 *)

makeCPplot [ bL2bL2, "          bL2bL2" ]

(* bL1bL2 *)

makeCPplot [ bL1bL2, "          bL1bL2" ]

(* bL2bL1 *)

makeCPplot [ bL2bL1, "          bL2bL1" ]