%% This scripts plots the schematics for the big picture of CDC25A/CDK2 activation
clear all
close all
clc
%% fixed parameters
p1=3;
p2=2;


%% Variables
Cyk2Ea=[0:0.01:1]; % in units of CDK2tot, y axis
CDC25Aa=[0:0.01:1]; % in units of CDC25Atot, x axis



% %% Plotting one test
% figure
% screenSize = get(0, 'ScreenSize');
% set(gcf, 'Position',screenSize); % Adjust the figure size
% K5=0.7;
% Co1=0.7;
% K5/(1+K5)-Co1
% K7=2;K6=0.1;
% Co2=0.4;
% (K6+K7)/(1+K6+K7)-Co2
% plot(CDC25Aa,(K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1))./(1+K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1)),'Linewidth',2,'Color','b')
% hold on
% plot((K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2))./(1+K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2)),Cyk2Ea,'Linewidth',2,'Color','r')
% xlim([0 1])
% ylim([0 1])
% title('K5/(1+K5)<Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)>Co2/CDK2tot','FontSize',12,'FontWeight','bold','Color','k')
% xlabel('[CDC25A]a (units of [CDC25A]tot)','FontSize',10,'FontWeight','bold','Color','k')
% ylabel('[CykE2]a (units of [CDK2]tot','FontSize',10,'FontWeight','bold','Color','k')
% ax.LineWidth = 2;        % Adjusting box line width
% ax.FontSize = 10;       % Set the font size (adjust as needed)
% ax.FontWeight = 'bold'; % Set font weight to bold for axis labels
% 
% 


%% Plotting solutions
figure
screenSize = get(0, 'ScreenSize');
set(gcf, 'Position',screenSize); % Adjust the figure size

subplot(3,2,1) % case K5/(1+K5)>Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)>Co2/CDK2tot
K5=10;
Co1=0.3;
K5/(1+K5)-Co1
K7=3;K6=0.01;
Co2=1;
(K6+K7)/(1+K6+K7)-Co2
plot(CDC25Aa,(K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1))./(1+K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1)),'Linewidth',2,'Color','b')
hold on
plot((K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2))./(1+K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2)),Cyk2Ea,'Linewidth',2,'Color','r')
xlim([0 1])
ylim([0 1])
title('K5/(1+K5)>Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)>Co2/CDK2tot','FontSize',12,'FontWeight','bold','Color','k')
xlabel('[CDC25A]a (units of [CDC25A]tot)','FontSize',10,'FontWeight','bold','Color','k')
ylabel('[CykE2]a (units of [CDK2]tot','FontSize',10,'FontWeight','bold','Color','k')
ax.LineWidth = 2;        % Adjusting box line width
ax.FontSize = 10;       % Set the font size (adjust as needed)
ax.FontWeight = 'bold'; % Set font weight to bold for axis labels
daspect([1 2 1])

subplot(3,2,2) % case K5/(1+K5)<Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)>Co2/CDK2tot
K5=1;
Co1=0.3;
K5/(1+K5)-Co1
K7=3;K6=0.01;
Co2=1;
(K6+K7)/(1+K6+K7)-Co2

plot(CDC25Aa,(K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1))./(1+K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1)),'Linewidth',2,'Color','b')
hold on
plot((K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2))./(1+K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2)),Cyk2Ea,'Linewidth',2,'Color','r')
xlim([0 1])
ylim([0 1])
title('K5/(1+K5)<Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)>Co2/CDK2tot','FontSize',12,'FontWeight','bold','Color','k')
xlabel('[CDC25A]a (units of [CDC25A]tot)','FontSize',10,'FontWeight','bold','Color','k')
ylabel('[CykE2]a (units of [CDK2]tot','FontSize',10,'FontWeight','bold','Color','k')
ax.LineWidth = 2;        % Adjusting box line width
ax.FontSize = 10;       % Set the font size (adjust as needed)
ax.FontWeight = 'bold'; % Set font weight to bold for axis labels
daspect([1 2 1])

subplot(3,2,3) % case K5/(1+K5)>Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)<Co2/CDK2tot
K5=10;
Co1=0.3;
K5/(1+K5)-Co1
K7=0.3;K6=0.01;
Co2=1;
(K6+K7)/(1+K6+K7)-Co2
plot(CDC25Aa,(K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1))./(1+K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1)),'Linewidth',2,'Color','b')
hold on
plot((K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2))./(1+K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2)),Cyk2Ea,'Linewidth',2,'Color','r')
xlim([0 1])
ylim([0 1])
title('K5/(1+K5)>Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)<Co2/CDK2tot','FontSize',12,'FontWeight','bold','Color','k')
xlabel('[CDC25A]a (units of [CDC25A]tot)','FontSize',10,'FontWeight','bold','Color','k')
ylabel('[CykE2]a (units of [CDK2]tot','FontSize',10,'FontWeight','bold','Color','k')
ax.LineWidth = 2;        % Adjusting box line width
ax.FontSize = 10;       % Set the font size (adjust as needed)
ax.FontWeight = 'bold'; % Set font weight to bold for axis labels
daspect([1 2 1])

subplot(3,2,4) % case K5/(1+K5)<Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)<Co2/CDK2tot
K5=1;
Co1=0.3;
K5/(1+K5)-Co1
K7=0.3;K6=0.01;
Co2=1;
(K6+K7)/(1+K6+K7)-Co2
plot(CDC25Aa,(K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1))./(1+K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1)),'Linewidth',2,'Color','b')
hold on
plot((K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2))./(1+K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2)),Cyk2Ea,'Linewidth',2,'Color','r')
xlim([0 1])
ylim([0 1])
title('K5/(1+K5)<Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)<Co2/CDK2tot','FontSize',12,'FontWeight','bold','Color','k')
xlabel('[CDC25A]a (units of [CDC25A]tot)','FontSize',10,'FontWeight','bold','Color','k')
ylabel('[CykE2]a (units of [CDK2]tot','FontSize',10,'FontWeight','bold','Color','k')
ax.LineWidth = 2;        % Adjusting box line width
ax.FontSize = 10;       % Set the font size (adjust as needed)
ax.FontWeight = 'bold'; % Set font weight to bold for axis labels
daspect([1 2 1])

subplot(3,2,5) % case K5/(1+K5)<Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)>Co2/CDK2tot
K5=1;
Co1=0.3;
K5/(1+K5)-Co1
K7=3;K6=1;
Co2=1;
(K6+K7)/(1+K6+K7)-Co2
plot(CDC25Aa,(K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1))./(1+K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1)),'Linewidth',2,'Color','b')
hold on
plot((K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2))./(1+K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2)),Cyk2Ea,'Linewidth',2,'Color','r')
xlim([0 1])
ylim([0 1])
title('K5/(1+K5)<Co1/CDC25tot (case 2), K6mod rescue','FontSize',12,'FontWeight','bold','Color','k')
xlabel('[CDC25A]a (units of [CDC25A]tot)','FontSize',10,'FontWeight','bold','Color','k')
ylabel('[CykE2]a (units of [CDK2]tot','FontSize',10,'FontWeight','bold','Color','k')
ax.LineWidth = 2;        % Adjusting box line width
ax.FontSize = 10;       % Set the font size (adjust as needed)
ax.FontWeight = 'bold'; % Set font weight to bold for axis labels
daspect([1 2 1])

subplot(3,2,6) % case K5/(1+K5)<Co1/CDC25tot and (K7+K6mod)/(1+K7+K6mod)<Co2/CDK2tot
K5=1;
Co1=0.3;
K5/(1+K5)-Co1
K7=0.3;K6=1;
Co2=1;
(K6+K7)/(1+K6+K7)-Co2
plot(CDC25Aa,(K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1))./(1+K6+K7.*(CDC25Aa./Co1).^p1./(1+(CDC25Aa./Co1).^p1)),'Linewidth',2,'Color','b')
hold on
plot((K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2))./(1+K5.*(Cyk2Ea./Co2).^p2./(1+(Cyk2Ea./Co2).^p2)),Cyk2Ea,'Linewidth',2,'Color','r')
xlim([0 1])
ylim([0 1])
title('K5/(1+K5)<Co1/CDC25tot (case 4), K6mod rescus','FontSize',12,'FontWeight','bold','Color','k')
xlabel('[CDC25A]a (units of [CDC25A]tot)','FontSize',10,'FontWeight','bold','Color','k')
ylabel('[CykE2]a (units of [CDK2]tot','FontSize',10,'FontWeight','bold','Color','k')
ax.LineWidth = 2;        % Adjusting box line width
ax.FontSize = 10;       % Set the font size (adjust as needed)
ax.FontWeight = 'bold'; % Set font weight to bold for axis labels
daspect([1 2 1])