function  XYZ = AtomCoor(pdb,ser_num)

% This function returns the coordinate of an Atom in the vector XYZ
% The requested variables are the pdb file and the serial number 

% get the number of atom in the pdb
nbr_lines = length(pdb.Model.Atom);

    for i = 1 : nbr_lines

        if pdb.Model.Atom(i).AtomSerNo == ser_num
            XYZ = [ pdb.Model.Atom(i).X pdb.Model.Atom(i).Y pdb.Model.Atom(i).Z ] ; 
        end
        
    end
    
end
