function pdbNumCodeReduced   = pdbNumCodeFilter(pdbNumCode, user, conditions)

count = 1;

% keep pseudo methyl but not pseudo methylene

if user.pseudoMethyl == 1
        
    for j = 1:length(pdbNumCode.Model.Atom)
        
        if ~ismember(pdbNumCode.Model.Atom(j).NumCode, conditions.all.methylenePseudo)...
        && ~ismember(pdbNumCode.Model.Atom(j).NumCode, conditions.all.methylAtoms)...
        && ~ismember(pdbNumCode.Model.Atom(j).NumCode, [6111, 6112])...
        && ~ismember(pdbNumCode.Model.Atom(j).NumCode, conditions.all.labile)...
        && pdbNumCode.Model.Atom(j).NumCode ~= 9999
            
            pdbNumCodeReduced.Model.Atom(count) = pdbNumCode.Model.Atom(j);
            count = count+1;
            
        end
    end
end

if user.pseudoMethyl == 0
        
    for j = 1:length(pdbNumCode.Model.Atom)

        if ~ismember(pdbNumCode.Model.Atom(j).NumCode, conditions.all.methylenePseudo)...
        && ~ismember(pdbNumCode.Model.Atom(j).NumCode, conditions.all.methylPseudo)...
        && ~ismember(pdbNumCode.Model.Atom(j).NumCode, conditions.all.labile)...
        && pdbNumCode.Model.Atom(j).NumCode ~= 9999
            
            pdbNumCodeReduced.Model.Atom(count) = pdbNumCode.Model.Atom(j);
            count = count+1;
            
        end
    end
end