function prob = BR_prob_or_atom_probs(clause,A_probs)
%

prob = 0;
if isempty(clause)
    return
end
len_clause = length(clause);
if len_clause==1
    if clause(1)<0
        prob = 1 - A_probs(abs(clause(1)));
    else
        prob = A_probs(abs(clause(1)));
    end
    return
end
L_probs = A_probs;
for e = 1:len_clause
    if clause(e)<0
        L_probs(abs(clause(e))) = 1 - A_probs(abs(clause(e)));
    end
end
p1 = L_probs(abs(clause(1)));
p2 = BR_prob_or(clause(2:end),L_probs);
prob = p1 + p2 - p1*p2;
