function p = BR_prob_atom_P(P,atom)
%

n_pow_2 = length(P);
n = log2(n_pow_2);
p = 0;
for v = 0:n_pow_2-1
    bits = BR_int2bits(v,n);
    if bits(atom)==1
        p = p + P(v+1);
    end
end
