%%% --- Biophysics of Macromolecules --- %%% %%% --- LMU - Sommersemester 2020 --- %%% %%% --- Prof. Lipfert --- %%% %%% %%% Solutions to %%% Problem set 1, Problem 3 %%% Lennard-Jones potential clc;clf;clear; %%% Define Lennard-Jones parameters epsilon = 1.66*10^(-21); %%% in J sigma = 3.4*10^(-10); %%% in m %%% Convert to appropriate units of the problem; %%% For example: Angstroems and kcal/mol epsilon = epsilon / (6.9477*10^(-21)); sigma = sigma / 10^(-10); r = 2:0.01:5; E = 4*epsilon*((sigma./r).^12 - (sigma./r).^6); %%% Plot the result plot(r,E, 'b-', 'linewidth', 2) axis([2.5 5 -0.5 3 ]) grid on %%% Note that the default labels sizes in most plotting programs are too %%% small! Change thge settings to make the plot more readable. set(gca,'LineWidth', 1,'FontSize', 25, 'FontWeight', 'bold', 'TickLength',[0.02 0.02]) ylabel('Energy (kcal/mol)'); xlabel('Distance (A)'); print(figure(1),'-r300','-dpng', 'Lennard-Jones-Potential.png')