A variational principle in statistical mechanics for particles systems with bounded pair interactions