  We consider Coulomb gas models for which the empirical measure typically
concentrates, when the number of particles becomes large, on an equilibrium
measure minimizing an electrostatic energy. We study the behavior when the gas
is conditioned on a rare event. We first show that the special case of
quadratic confinement and linear constraint is exactly solvable due to a
remarkable factorization, and that the conditioning has then the simple effect
of shifting the cloud of particles without deformation. To address more general
cases, we perform a theoretical asymptotic analysis relying on a large
deviations technique known as the Gibbs conditioning principle. The technical
part amounts to establishing that the conditioning ensemble is an I-continuity
set of the energy. This leads to characterizing the conditioned equilibrium
measure as the solution of a modified variational problem. For simplicity, we
focus on linear statistics and on quadratic statistics constraints. Finally, we
numerically illustrate our predictions and explore cases in which no explicit
solution is known. For this, we use a Generalized Hybrid Monte Carlo algorithm
for sampling from the conditioned distribution for a finite but large system.
