rng('default');%initialize RNG for reproducibility
%choose params which support stable tug of war, ie
% high native processivity, low PG unbinding rate eps0<< koff0
% frequent PG binding, pi0>> kOn0
% otherwise based on experimental data rates
motorState.kOn0 = 0.5/60; %rate of single motor (synthase) binding to cargo (mreB) (From Stu data)
motorState.pi0 =10*motorState.kOn0; %single motor binding rate s^-1 %promotes tug of war
motorState.eps0=0.3/60;%single motor unbinding rate s^-1 %promotes tug of war, also at low concentration
%processivity is synthesis limited
motorState.kOff0 = 10*motorState.eps0; %rate of single motor (synthase) unbinding from cargo (mreB)
motorState.Fdetach = 1;%detachment force pN nm
motorState.Fstall = 100; %stall force pN nM
motorState.vF=40;%forward velocity nm/s
motorState.vB=0.1;%backward velocity nm/s
motorState.Nplus=0;%initial total number of plus motors
motorState.Nminus=0;%initial total number of bound plus motors
motorState.nPlus=0;%number of bound plus motors
motorState.nMinus=0;%number of bound minus motors
%Nmax = 1 each side (max number of motors), low concentration, which should give frequent pausing model
motorState.motorConcentration =0.1;%arb units, essentiall scaling of low synthase concentration data here
[dynamics] = lipowskiWithUnbindingSim(motorState,simPar);
ylabel('Displacement (nm)');
%Nmax = 1 each side, high concentration, which should give frequent reversals
motorState.motorConcentration =10;%arb units, essentiall scaling of low synthase concentration data here
[dynamics] = lipowskiWithUnbindingSim(motorState,simPar);
ylabel('Displacement (nm)');
%Nmax = inf each side, low concentration which should give frequent pausing
motorState.motorConcentration =0.1;%arb units, essentiall scaling of low synthase concentration data here
[dynamics] = lipowskiWithUnbindingSim(motorState,simPar);
ylabel('Displacement (nm)');
%Nmax = inf each side, high concentration which lipowski predicts should give
%infrequent pausing, relatively infrequent reversals but high processivity
motorState.motorConcentration =10;%arb units, essentiall scaling of low synthase concentration data here
[dynamics] = lipowskiWithUnbindingSim(motorState,simPar);
ylabel('Displacement (nm)');
%Nmax = inf each side, intermediate concentration which lipowski should
motorState.motorConcentration =1;%arb units, essentiall scaling of low synthase concentration data here
[dynamics] = lipowskiWithUnbindingSim(motorState,simPar);
ylabel('Displacement (nm)');
motorState.motorConcentration =1;%arb units, essentiall scaling of low synthase concentration data here
[dynamics] = lipowskiWithUnbindingSim(motorState,simPar);
ylabel('Displacement (nm)');
for ii = 1:numel(motorConcRange)
motorState.motorConcentration =motorConcRange(ii);
[processivityNmax1{ii}, speedNmax1{ii}, lifetimeNmax1{ii}, rateNmax1{ii}, fractionMotileNmax1(ii,:), simResultNmax1{ii},NmotorNmax1{ii}] =...
quantifySimDynamics(motorState, simPar,analysisPar,nSimRepeat);
lifetimeAllNmax1{ii} = lifetimeNmax1{ii}.All;
lifetimeProcessiveNmax1{ii} = lifetimeNmax1{ii}.Processive;
lifetimeStaticNmax1{ii} = lifetimeNmax1{ii}.Static;
fieldName={'c1','c2','c3','c4','c5'};
%categoryName={'10^-2', '10^-1','10^0','10^1','10^2'};
categoryName={'10^0', '10^1','10^2','10^3','10^4'};
violinplot(cell2struct(processivityNmax1,fieldName,2));
xlabel('Relative synthase concentration');
ylabel('Processivity (nm)');
hA.XTickLabel=categoryName;
%probably dont expect speed to be affected based on current sim parameters
violinplot(cell2struct(speedNmax1,fieldName,2));
xlabel('Relative synthase concentration');
hA.XTickLabel=categoryName;
violinplot(cell2struct(lifetimeAllNmax1,fieldName,2));
xlabel('Relative synthase concentration');
ylabel('All lifetime (s)');
hA.XTickLabel=categoryName;
violinplot(cell2struct(lifetimeProcessiveNmax1,fieldName,2));
xlabel('Relative synthase concentration');
ylabel('Processive lifetime (s)');
hA.XTickLabel=categoryName;
violinplot(cell2struct(lifetimeStaticNmax1,fieldName,2));
xlabel('Relative synthase concentration');
ylabel('Static lifetime (s)');
hA.XTickLabel=categoryName;
for ii = 1:numel(motorConcRange)
pause_processive(ii,:) = rateNmax1{ii}.pause_processive;
reversal_processive(ii,:) = rateNmax1{ii}.reversal_processive;
staticToMotile(ii,:) = rateNmax1{ii}.staticToMotile;
errorbar(motorConcRange*1e2, pause_processive(:,1),...
pause_processive(:,1)-pause_processive(:,2),pause_processive(:,3)-pause_processive(:,1));
errorbar(motorConcRange*1e2, reversal_processive(:,1),...
reversal_processive(:,1)-reversal_processive(:,2),reversal_processive(:,3)-reversal_processive(:,1));
errorbar(motorConcRange*1e2, staticToMotile(:,1),...
staticToMotile(:,1)-staticToMotile(:,2),staticToMotile(:,3)-staticToMotile(:,1));
legend('Pausing','Reversal','Paused to motile');
xlabel('Relative synthase concentration');
errorbar(motorConcRange*1e2, fractionMotileNmax1(:,1),...
fractionMotileNmax1(:,1)-fractionMotileNmax1(:,2),fractionMotileNmax1(:,3)-fractionMotileNmax1(:,1));
xlabel('Relative synthase concentration');
ylabel('Motile fraction')
violinplot(cell2struct(NmotorNmax1,fieldName,2));
hA.XTickLabel=categoryName;
xlabel('Relative synthase concentration');
for ii = 1:numel(motorConcRange)
motorState.motorConcentration =motorConcRange(ii);
[processivityNmaxInf{ii}, speedNmaxInf{ii}, lifetimeNmaxInf{ii}, rateNmaxInf{ii}, fractionMotileNmaxInf(ii,:), simResultNmaxInf{ii}, NmotorNmaxInf{ii}] =...
quantifySimDynamics(motorState, simPar,analysisPar,nSimRepeat);
lifetimeAllNmaxInf{ii} = lifetimeNmaxInf{ii}.All;
lifetimeProcessiveNmaxInf{ii} = lifetimeNmaxInf{ii}.Processive;
lifetimeStaticNmaxInf{ii} = lifetimeNmaxInf{ii}.Static;
fieldName={'c1','c2','c3','c4','c5'};
%categoryName={'10^-2', '10^-1','10^0','10^1','10^2'};
categoryName={'10^0', '10^1','10^2','10^3','10^4'};
violinplot(cell2struct(processivityNmaxInf,fieldName,2));
xlabel('Relative synthase concentration');
ylabel('Processivity (nm)');
hA.XTickLabel=categoryName;
%probably dont expect speed to be affected based on current sim parameters
violinplot(cell2struct(speedNmaxInf,fieldName,2));
hA.XTickLabel=categoryName;
xlabel('Relative synthase concentration');
violinplot(cell2struct(lifetimeAllNmaxInf,fieldName,2));
xlabel('Relative synthase concentration');
ylabel('All lifetime (s)');
hA.XTickLabel=categoryName;
violinplot(cell2struct(lifetimeProcessiveNmaxInf,fieldName,2));
xlabel('Relative synthase concentration');
ylabel('Processive lifetime (s)');
hA.XTickLabel=categoryName;
% violinplot(cell2struct(lifetimeStaticNmaxInf,fieldName,2));
% xlabel('Relative synthase concentration');
% ylabel('Static lifetime (s)');
for ii = 1:numel(motorConcRange)
pause_processive(ii,:) = rateNmaxInf{ii}.pause_processive;
reversal_processive(ii,:) = rateNmaxInf{ii}.reversal_processive;
staticToMotile(ii,:) = rateNmaxInf{ii}.staticToMotile;
errorbar(motorConcRange*1e2, pause_processive(:,1),...
pause_processive(:,1)-pause_processive(:,2),pause_processive(:,3)-pause_processive(:,1));
errorbar(motorConcRange*1e2, reversal_processive(:,1),...
reversal_processive(:,1)-reversal_processive(:,2),reversal_processive(:,3)-reversal_processive(:,1));
legend('Pausing','Reversal');
xlabel('Relative synthase concentration');
errorbar(motorConcRange*1e2, staticToMotile(:,1),...
staticToMotile(:,1)-staticToMotile(:,2),staticToMotile(:,3)-staticToMotile(:,1));
title('Paused to motile')
xlabel('Relative synthase concentration');
errorbar(motorConcRange*1e2, fractionMotileNmaxInf(:,1),...
fractionMotileNmaxInf(:,1)-fractionMotileNmaxInf(:,2),fractionMotileNmaxInf(:,3)-fractionMotileNmaxInf(:,1));
xlabel('Relative synthase concentration');
ylabel('Motile fraction')
violinplot(cell2struct(NmotorNmaxInf,fieldName,2));
xlabel('Relative synthase concentration');
hA.XTickLabel=categoryName;
save('lipowskiSimInitialResults220310.mat')
Warning: Figure is saved in lipowskiSimInitialResults220310.mat. Saving graphics handle variables can cause the creation of very large files. To save graphics figures, use savefig.
for ii = 1:numel(motorConcRange)
pause_processive1(ii,:) = rateNmax1{ii}.pause_processive;
reversal_processive1(ii,:) = rateNmax1{ii}.reversal_processive;
staticToMotile1(ii,:) = rateNmax1{ii}.staticToMotile;
errorbar(motorConcRange*1e2, reversal_processive1(:,1),...
reversal_processive1(:,1)-reversal_processive1(:,2),reversal_processive1(:,3)-reversal_processive1(:,1));
errorbar(motorConcRange*1e2, reversal_processive(:,1),...
reversal_processive(:,1)-reversal_processive(:,2),reversal_processive(:,3)-reversal_processive(:,1));
legend('Nmax=1','Nmax=inf');
xlabel('Relative synthase concentration');
ylabel('Reversal rate (s^{-1})')