% Acquires the xyz data from the file 1bl8.dat

fid = fopen('1bl8.dat','r')

x=[];y=[];z=[];
while ~feof(fid)
%Get the next line from the file
s = fgetl(fid);

if strcmp(s(1:4),'ATOM')
%Lines that begin with 'ATOM' house xyz data
if strcmp(s(14:15),'CA')
%This atom is of interest--alpha carbon, part of the "backbone"
%Update the x, y, and z arrays...
x = [x;str2double(s(33:38))];
y = [y;str2double(s(41:46))];
z = [z;str2double(s(49:54))];
end
end
end

fclose(fid);