Improved variational calculations with atomic energy functionals using an additional restriction on the density