Penalizing parameter to enforce a sum to 0 constraint?

Since

is the log-kernel of a normal distribution with mean zero and known standard deviation, I would be a bit surprised if this yielded markedly different results than this approach (see line sum(alpha) ~ normal(0, 0.001);).

EDITS: Changed “kernel” to “log-kernel”; corrected the link, and added the corresponding code line here.