%%% --- Biophysics of Macromolecules --- %%% %%% --- LMU - Sommersemester 2020 --- %%% %%% --- Prof. Lipfert --- %%% %%% %%% Solutions to %%% Problem set 3, Problem 1 %%% Two-state protein folding clc; clear; %%% Define thermal energy RT = 0.6; % Thermal energy in kcal/mol %%% Load data temp = load('FractionFolded_GuHCl_Tthermophilus_BLACK.txt'); GdnHCl_Tt = temp(:,1); f_U_Tt = temp(:,2); f_U_Tt = f_U_Tt/100; % Convert from % to fraction temp = load('FractionFolded_GuHCl_yeast_BLACK.txt'); GdnHCl_yeast = temp(:,1); f_U_yeast = temp(:,2); f_U_yeast = f_U_yeast/100; % Convert from % to fraction figure(1); clf; hold on; box on; %%% Plot data for T. Thermophilus PGK p1 = plot(GdnHCl_Tt, f_U_Tt, 'ro', 'linewidth', 2, 'markersize', 15, 'markerfacecolor', [0 0 0]) %%% Plot data for yeast PGK p2 = plot(GdnHCl_yeast, f_U_yeast, 'bo', 'linewidth', 2, 'markersize', 15, 'markerfacecolor', [0 0 0]) set(gca,'LineWidth', 1,'FontSize', 25, 'FontWeight', 'bold', 'TickLength',[0.02 0.02]) ylabel('Fraction unfolded'); xlabel('[GdnHCl] (M)'); axis([-0.2 5.2 -0.1 1.1]) %%% Fit the data for T. Thermophilus PGK [param residual exitflag] = fminsearch(@(param) norm(f_U_Tt - (1./(1+exp(-(param(1) + param(2).*GdnHCl_Tt)./RT))) ), [-5 1]) dG_0 = param(1); m = param(2); xfit = 0:0.01:5; yfit = (1./(1+exp(-(param(1) + param(2).*xfit)./RT))); %%% Co-plot the fit plot(xfit, yfit, 'r-', 'linewidth', 2) display(['Fitted DeltaG_0 = ' num2str(dG_0,3) ' kcal/mol; m =' num2str(m,3) ... ' kcal/mol/M; [GdnHCl]_1/2 = ' num2str(-dG_0/m,3) ' M' ]) %%% Fit the data for T. Thermophilus PGK [param residual exitflag] = fminsearch(@(param) norm(f_U_yeast - (1./(1+exp(-(param(1) + param(2).*GdnHCl_yeast)./RT))) ), [-2 1]) dG_0 = param(1); m = param(2); %xfit = 0:0.01:3; yfit = (1./(1+exp(-(param(1) + param(2).*xfit)./RT))); %%% Co-plot the fit plot(xfit, yfit, 'b-', 'linewidth', 2) display(['Fitted DeltaG_0 = ' num2str(dG_0,3) ' kcal/mol; m =' num2str(m,3) ... ' kcal/mol/M; [GdnHCl]_1/2 = ' num2str(-dG_0/m,3) ' M' ]) %%% Add legend legend([p1 p2], {'T. thermophilus', 'yeast'}, 'location', 'southeast') %%% Export plot to png print(figure(1),'-r300','-dpng', 'FractionUnfoldedFit.png')