% Plot 1D PMF in psi.
clear

% Read data
[bin, centers, f, df] = textread('pmf.out');

% Plot PMF
clf;
hold on

fill([-124 -124 +28 +28], [min(f-df) max(f+df) max(f+df) min(f-df)], 0.9 * [1 1 1], 'edgecolor', 'none');
fill([centers' fliplr(centers')], [(f+df)' fliplr((f-df)')], 0.7 * [1 1 1]);
plot(centers, f, 'k-', 'LineWidth', 1.5);
axis([min(centers) max(centers) min(f-df) max(f+df)]);
xlabel('\psi (degrees)');
ylabel('PMF (kT)');

text(-120, 0.2, '\alpha_R')
text(30, 0.2, 'C7_{eq}') 

%% Write plot.
outfilename = 'pmf-psi';

exportfig(gcf, sprintf('%s.eps', outfilename), 'width', 3.25, 'height', 2.25);
unix(sprintf('epstopdf %s.eps', outfilename));
