%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File: eam_convert.m
%%
%% Last Modified : Fri Jun  1 15:51:26 2007
%% Chris Weinberger, cweinber@stanford.edu
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

fid = fopen('auu4.eam');

comment = fgets(fid);

ielem = fscanf(fid,'%d',1);
amass = fscanf(fid,'%f',1);
blatt = fscanf(fid,'%f',1);
lat   = fscanf(fid,'%s',1);

nrho = fscanf(fid,'%d',1);
drho = fscanf(fid,'%f',1);
nr   = fscanf(fid,'%d',1);
dr   = fscanf(fid,'%f',1);
rcut = fscanf(fid,'%f',1);

ielem,amass,blatt,lat,nrho,drho,nr,dr,rcut

Frho = zeros(nrho,1);
Phi  = zeros(nr,1);
Rho  = zeros(nr,1);

Frho = fscanf(fid,'%f',nrho);
Phi  = fscanf(fid,'%f',nr);
Rho  = fscanf(fid,'%f',nr);

fclose(fid);

figure(1); plot(Frho);
figure(2); plot(Phi);
figure(3); plot(Rho);
