function struct = HpdbSerNoFunMaster(struct, pdbHnumCode)

for j = 1:length(struct)
            
        if ~isempty(struct(j).numcode.ATOMi_H)
            
            for b = 1:length(struct(j).numcode.ATOMi_H)
                
                ASS             = struct(j).numcode.ASSi;
                ATOM            = struct(j).numcode.ATOMi_H(b);
                ATOM_pdbSerNo   = pdbSerNoFun(ASS,ATOM,pdbHnumCode);
    
                if isempty(ATOM_pdbSerNo)
        
                    diary('on')
                    fprintf(['\nNOT all assignments have been matched to the pdb file'...
                    '\nInspect your pdb file for missing protons in residue: '...
                    '\n' , num2str(struct(j).ASSi) ' ', struct(j).ASSi_resName ' and group ' ,struct(j).ATOMi...
                    '\n'])
                    diary('off')
        
                end
                
                struct(j).numcode.ATOMi_HpdbSerNo(b) = ATOM_pdbSerNo;
                
            end
            
        end
        
        if ~isempty(struct(j).numcode.ATOMj_H)
            
            for b = 1:length(struct(j).numcode.ATOMj_H)
                
                ASS             = struct(j).numcode.ASSj;
                ATOM            = struct(j).numcode.ATOMj_H(b);
                ATOM_pdbSerNo   = pdbSerNoFun(ASS,ATOM,pdbHnumCode);
    
                if isempty(ATOM_pdbSerNo)
        
                    diary('on')
                    fprintf(['\nNOT all assignments have been matched to the pdb file'...
                    '\nInspect your pdb file for missing protons in: '...
                    '\nInspect your pdb file for missing protons in residue: '...
                    '\n' , num2str(struct(j).ASSj) ' ', struct(j).ASSj_resName ' and group ' ,struct(j).ATOMj...
                    '\n'])
                    diary('off')
        
                end
                
                struct(j).numcode.ATOMj_HpdbSerNo(b) = ATOM_pdbSerNo;
    
            end
            
        end
        
end
