The Binding of Asymmetric Ligands to an Infinite Anisotropic Linear Lattice by Alan R. Wolfe

This Mathematica  notebook calculates and plots the Scatchard plot, neighbor-effect parameters, q, conditional probabilities, and length distribution of clusters of bound ligands for the anisotropic lattice, asymmetric ligand case with two binding modes (n1 need not equal n2).  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 Action-Evaluate Notebook command.  This may be repeated with different values for the input variables.

INPUT VARIABLES:

points = 10; k1 = 1; k2 = 2; n1 = 1; n2 = 1; 
w11 = 1; w22 = 2; w12 = 0.1; w21 = 4;

(* Choose definitions *) 
If [ n1==n2, Def1, Def2 ] ; 

referencePlot = True ; 
Print [ "initial slope = ", initialSlope //N ] ; 
Print [ "deltaA (dimensionless version) = ", deltaA//N ] ;

INPUT VARIABLES - cluster length plots:

rCluster2D = 0.9; maxLength2D = 6; 
points3D = 10; maxLength3D = 5;

rCluster2D*rSat is the r value for which 2D cluster length distribution 
     data will be displayed.  
points3D is the number of equally spaced r values greater than zero 
     for which the cluster length distribution will be displayed in 
     the 3D plots.  
(note - execution will be more efficient if points3D = points).  
maxLength is the maximum cluster length that will be considered.

(* CALCULATE THE NEIGHBOR-EFFECT PARAMETERS, Q, AND THE 
SCATCHARD PLOT *) scroll = 1

(* Initialize loop parameters and output arrays *) 
rSatDetermine ; neChoose ; 
xAxisInterval = rSat/(points) ; 
abscissa = Range [1, points-1] ; abscissa2 = {} ; 
points2 = points ; 
AppendTo [ abscissa2, points2 - 1/2] ; points = points+1 ; 
AppendTo [ abscissa2, points2 - 1/4] ; points = points+1 ; 
abscissa = xAxisInterval Join [ abscissa, abscissa2 ] ; 
E1L = E1R = E2L = E2R = 1 ; 
Q = k1/(k1 + k2) ;

(* Evaluate neighbor-effect parameters and q for r < rSat *) scroll = 1

startPrint ; 
dropPoints = 0 ; 
ordinate = Map [ Function [ zz, r = zz ; X = r/F ; 
     If [ needCheck, 
          If [ flag==True, 
               {E1L,E1R,E2L,E2R,Q} = {1,1,1,1,0.5} ; 
               dropPoints = dropPoints + 1 ] ; 
          If [ flag==False, ne ; checkLimits ; 
               If [ flag==True, dropPoints = dropPoints + 1 ] ] , 
          ne ] ; 
     If [ flag==False, Print [ r//N, "    ", rLf//N ] ] ; 
     {rLf,E1L,E1R,E2L,E2R,Q,X,ff} ], abscissa ] ; 
makeReference ;

(* Evaluate neighbor-effect parameters for r = rSat *) scroll = 1

PrependTo [ ordinate, {(k1 + k2)/2,1,1,1,1,k1/(k1 + k2),0,1} ] ; 
chooseNEandCP ; 
AppendTo [ ordinate, {0,E1L,E1R,E2L,E2R,Q,0,0} ] ;

(* Indicate which equations were used in the calculations *) scroll = 1

Print [ "ne = ", neChoice, "; NE = ", NEchoice, "; CP = ", CPchoice ] ;

(* DISPLAY THE SCATCHARD PLOT *) scroll = 1

If [ (n1==n2 || k1==0 || k2==0) && referencePlot, 
     makePlot2, 
     makePlot [ 1, 0, "r/Lf", "Scatchard plot" ] ] ;

(* PLOT THE NEIGHBOR-EFFECT PARAMETERS AND Q *) scroll = 1

(* E1L *)

If [ k1>0, makePlot [ 2, 1, "E1L", "left NE for free b1L sites" ]  ]

(* E1R *)

If [ k2>0, makePlot [ 3, 1, "E1R", "right NE for free b2L sites" ]  ]

(* E2L *)

If [ k2>0, makePlot [ 4, 1, "E2L", "left NE for free b2L sites" ]  ]

(* E2R *)

If [ k1>0, makePlot [ 5, 1, "E2R", "right NE for free b1L sites" ]  ]

(* q *)

qPlot

(* CALCULATE AND PLOT THE CONDITIONAL PROBABILITIES *) scroll = 1

(* ff *)

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

(* b1Lf *)

If [ k1>0, makeCPplot [ b1Lf, "      b1Lf" ] ]

(* b1Rf *)

If [ k2>0, makeCPplot [ b1Rf, "      b1Rf" ] ]

(* b2Lf *)

If [ k2>0, makeCPplot [ b2Lf, "      b2Lf" ] ]

(* b2Rf *)

If [ k1>0, makeCPplot [ b2Rf, "      b2Rf" ] ]

(* fb1L *)

makeCPplot [ fb1L, "     fb1L" ]

(* fb1R *)

makeCPplot [ fb1R, "     fb1R" ]

(* fb2L *)

makeCPplot [ fb2L, "     fb2L" ]

(* fb2R *)

makeCPplot [ fb2R, "     fb2R" ]

(* b1Lb1R *)

If [ k1>0, makeCPplot [ b1Lb1R, "          b1Lb1R" ] ]

(* b1Rb1L *)

If [ k2>0, makeCPplot [ b1Rb1L, "          b1Rb1L" ] ]

(* b2Lb2R *)

If [ k2>0, makeCPplot [ b2Lb2R, "          b2Lb2R" ] ]

(* b2Rb2L *)

If [ k1>0, makeCPplot [ b2Rb2L, "          b2Rb2L" ] ]

(* b1Lb2R *)

If [ k1>0, makeCPplot [ b1Lb2R, "b1Lb2R  (b2Rb1L) " ] ]

(* b1Rb2L *)

If [ k2>0, makeCPplot [ b1Rb2L, "b1Rb2L  (b2Lb1R) " ] ]

(* CALCULATE, PRINT AND PLOT 3D CLUSTER LENGTH DATA *) scroll = 1

(* calculate and print *)

clusterArray = Table [ 0, {maxLength3D} ] ; 
ligandArray = clusterArray ; 
clusterArray3D = Table [ clusterArray, {points3D+1} ] ; 
ligandArray3D = clusterArray3D ; 
maxLength = maxLength3D ; 
printHeadings ; 
Do [ rCluster = (ij/points3D) ; clusterDistribution ; 
     clusterArray3D[[ij+1]] = clusterArray ; 
     ligandArray3D[[ij+1]] = ligandArray , 
{ ij, 0, points3D} ] ; 
chooseTicks ;

(* plot fraction of clusters, left view *)

threeDplot [ 2.2, -2.4, 1.0, "length         ", "          r/rSat", 
     "f clus.", clusterArray3D, tickArray1 ] ;

(* plot fraction of clusters, right view *)

threeDplot [ 2.2, 2.4, 1.0, "         length", "r/rSat          ", 
     "f clus.", clusterArray3D, tickArray0 ] ;

(* plot fraction of clusters, center view *)

threeDplot [ 2.2, -0.001, 1.0, "     length", "r/rSat", 
     "f clus.", clusterArray3D, tickArray ] ;

(* plot fraction of ligands, left view *)

threeDplot [ 2.2, -2.4, 1.0, "length         ", "          r/rSat", 
     "f lig.", ligandArray3D, tickArray1 ] ;

(* plot fraction of ligands, right view *)

threeDplot [ 2.2, 2.4, 1.0, "         length", "r/rSat          ", 
     "f lig.", ligandArray3D, tickArray0 ] ;

(* plot fraction of ligands, center view *)

threeDplot [ 2.2, -0.001, 1.0, "     length", "r/rSat", 
     "f lig.", ligandArray3D, tickArray ] ;

(* CALCULATE, PRINT AND PLOT 2D CLUSTER LENGTH DATA *) scroll = 1

If [ (flag==False) || (rCluster2D rSat < rError) || (rCluster2D==1), 
     rCluster = rCluster2D ; maxLength = maxLength2D ; 
     clusterArray = Table [ 0, {maxLength} ] ; 
     ligandArray = clusterArray ; 
     printHeadings ; clusterDistribution ] ;

If [ (flag==False) || (rCluster2D rSat < rError) || (rCluster2D==1), 
     Print [ "r = ", rCluster2D rSat, "; average cluster length = ", 
          averageClusterLength ] ] ; 
If [ flag && (rCluster2D rSat >= rError) && (rCluster2D < 1), 
     Print [ "r = ", rCluster2D rSat ] ; 
     Print [ "The average cluster length could not be calculated due to a" ] ; 
     Print [ "computational error." ] ] ;

twoDplot [ "fraction clusters", maxClusters, clusterArray ] ;

twoDplot [ "fraction ligands", maxLigands, ligandArray ] ;

rCluster2D

rCluster2D = 0.99; maxLength2D = 6;

Note - if the values of rCluster2D (= r/rSat) and/or maxLength2D 
are changed and the cell assigning these values is executed, the 
cluster length distribution can be recalculated for the new value(s) 
by selecting the group of cells above this group and executing the 
"Action-Evaluate Selection" command (use menu or "enter" key).