function [sigmaData, diagDecay] = secondStructFun(sigmaData, diagDecay)

user = sigmaData(1).user;

if ~isempty(user.bStrParallel)  || ~isempty(user.bStrAnti) ...
|| ~isempty(user.loop)          || ~isempty(user.helical)

fprintf('\nReading secondary structure supplied')

seq                                     = pdbreadSeqFun(pdb);

for j=1:length(seq)
    
    seq(j).secondStruct         = [];
    
    if ~isempty(user.bStrParallel)
        if ismember(seq(j).resSeq, user.bStrParallel)
            seq(j).secondStruct = 'bStrParallel';
        end
    end
    
    if ~isempty(user.bStrAnti)
        if ismember(seq(j).resSeq, user.bStrAnti)
            seq(j).secondStruct = 'bStrAnti';
        end
    end
    
    if ~isempty(user.loop)
        if ismember(seq(j).resSeq, user.loop)
            seq(j).secondStruct = 'loop';
        end
    end
    
    if ~isempty(user.helical)
        if ismember(seq(j).resSeq, user.helical)
            seq(j).secondStruct = 'helical';
        end
    end
    
end

for j=1:length(sigmaData)
    
    if ~isempty(seq(sigmaData(j).ASSi).secondStruct)
        sigmaData(j).structural.ASSi_secondStruct   = seq(sigmaData(j).ASSi).secondStruct;
    end
    
    if ~isempty(seq(sigmaData(j).ASSj).secondStruct)
        sigmaData(j).structural.ASSj_secondStruct   = seq(sigmaData(j).ASSj).secondStruct;
    end
    
end

for j=1:length(diagDecay)
    
    if ~isempty(seq(diagDecay(j).resRho).secondStruct)
        diagDecay(j).secondStruct   = seq(diagDecay(j).resRho).secondStruct;
    end
end

end
