function [sigmaDataClean, sigmaDataScrub]  = scrubIntraResMethyleneNew(sigmaDataStr)

atomNumGrpNum


count1 = 1;
count2 = 1;
scrubFlag = 0;

for j = 1:length(sigmaDataStr)

    for s = 1:length(conditions.methylene) - 2 %minus two, because the last two methylene conditons are not relevant here!
    
        if scrubFlag == 0
            if ismember(sigmaDataStr(j).numcode.ATOMi, conditions.methylene(s).atoms) ...
            && ismember(sigmaDataStr(j).numcode.ATOMj, conditions.methylene(s).atoms) ...
            && sigmaDataStr(j).numcode.ASSi == sigmaDataStr(j).numcode.ASSj
        
            scrubFlag = 1;
        
            end
        end
        
    end
    
    
    
    if scrubFlag == 0 && strcmp(sigmaDataStr(j).ASSi_resName, 'PRO')
        
            if sigmaDataStr(j).numcode.ASSi == sigmaDataStr(j).numcode.ASSj ...
            && ismember(sigmaDataStr(j).numcode.ATOMi, [conditions.all.PROring]) ...
            && ismember(sigmaDataStr(j).numcode.ATOMj, [conditions.all.PROring])
        
            scrubFlag = 1;
        
            end
    end
          
    if scrubFlag == 0 && strcmp(sigmaDataStr(j).ASSi_resName, 'PHE') ...
                      || strcmp(sigmaDataStr(j).ASSi_resName, 'TYR')
        
            if sigmaDataStr(j).numcode.ASSi == sigmaDataStr(j).numcode.ASSj ...
            && ismember(sigmaDataStr(j).numcode.ATOMi, [conditions.all.PHETYRring]) ...
            && ismember(sigmaDataStr(j).numcode.ATOMj, [conditions.all.PHETYRring])
        
            scrubFlag = 1;
        
            end
    end
    
    if scrubFlag == 0 && strcmp(sigmaDataStr(j).ASSi_resName, 'HIS')
        
            if sigmaDataStr(j).numcode.ASSi == sigmaDataStr(j).numcode.ASSj ...
            && ismember(sigmaDataStr(j).numcode.ATOMi, [conditions.all.HISring]) ...
            && ismember(sigmaDataStr(j).numcode.ATOMj, [conditions.all.HISring])
        
            scrubFlag = 1;
        
            end
    end
    
    
    if scrubFlag == 0 && strcmp(sigmaDataStr(j).ASSi_resName, 'TRP')
        
            if sigmaDataStr(j).numcode.ASSi == sigmaDataStr(j).numcode.ASSj ...
            && ismember(sigmaDataStr(j).numcode.ATOMi, [conditions.all.TRPring]) ...
            && ismember(sigmaDataStr(j).numcode.ATOMj, [conditions.all.TRPring])
        
            scrubFlag = 1;
        
            end
    end
    
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    if scrubFlag == 1
        
        sigmaDataScrub(count1)    = sigmaDataStr(j);
        count1 =  count1 + 1;
    
    elseif scrubFlag == 0
     	sigmaDataClean(count2)       = sigmaDataStr(j);
     	count2 =  count2 + 1;
    end
    
    scrubFlag = 0;
        
end