%In this script, we will compute the state probabilites of a receptor in a
%box of ligand. In this case, the receptor will be active when unbound by
%ligand and will be inactive when bound. The receptor, however, does have a
%probability of being active when ligand is bound and being inactive when
%unbound. We can go through the same type of coding as we did with plotting
%hte promoter state probabilities. We'll start with defining a few
%variables. When working through this example, you should play with the
%energies of each state to see how that affects the activity of the
%receptor.
Kda = 100E-9; %Kd of a ligand bound in the active state (in M)
Kdi = 1E-9; %Kd of a ligand bound in the inactive state (in M)
Ea = 3; %Energy of an active receptor in kT.
Ei = 0; %Energy of an inactive receptor in kT.
L = logspace(-15,2, 1000); %Range of ligand concentration (in M).
%To simplify our typing, let's write the partition function explicity.
Z = exp(-Ea) * (1 + L / Kda) + exp(-Ei)*(1 + L / Kdi);
%Now we'll compute the probabilities of each state.
Pa= exp(-Ea) ./ Z; %Active and unbound.
Pi= exp(-Ei) ./ Z; %Inactie and unbound.
Pab = (exp(-Ea)*L./Kda) ./ Z; %Active and bound.
Pib = (exp(-Ei)*L./Kdi) ./ Z; %Inactive and bound.
%Now we can plot the individual probabilities.
figure(1)
semilogx(L, Pa, 'r-')
hold on
semilogx(L, Pi, 'b-')
semilogx(L, Pab, 'k-')
semilogx(L, Pib, 'm-')
legend('Pactive unbound', 'Pinactive unbound',...
'Pactive bound', 'Pinactive bound');
xlabel('Ligand concentration');
ylabel('Probability of state');
hold off
%Plot the total proportion of active receptor..
figure(2)
semilogx(L, Pa + Pab, 'r-');
xlabel('Ligand Concentration (M)')
ylabel('Probability of state')