function [struct, stopFlag] = matchSeqFun(struct, seq)

for s = 1:length(seq)
    
    for j = 1:length(struct)
                
        if struct(j).procAss.ASSi   == seq(s).resSeq
           struct(j).procAss.ASSi_resName   = seq(s).resName;
        end
            
        if struct(j).procAss.ASSj  	== seq(s).resSeq;
           struct(j).procAss.ASSj_resName   = seq(s).resName;
        end
        
    end
end
    
stopFlag                            = 0;

for j = 1:length(struct)
    
            if ~isfield(struct(j).procAss, 'ASSi_resName')
                stopFlag = 1;
                fprintf(['\nNOT all assignments have been matched to the pdb file'...
             '\nInspect: ', num2str(struct(j).procAss.ASSi), ' ', struct(j).procAss.ATOMi, ' ' ...
                          , num2str(struct(j).procAss.ASSj), ' ', struct(j).procAss.ATOMj ...
             '\n'])
            end
            
            if ~isfield(struct(j).procAss, 'ASSj_resName')
                stopFlag = 1;
                fprintf(['\nNOT all assignments have been matched to the pdb file'...
             '\nInspect: ', num2str(struct(j).procAss.ASSi), ' ', struct(j).procAss.ATOMi, ' ' ...
                          , num2str(struct(j).procAss.ASSj), ' ', struct(j).procAss.ATOMj ...
             '\n'])
            end
end