Maximum entropy principle for many-body ground states