  We show that classical density functional theory can be based on the
constrained search method [M. Levy, Proc. Natl. Acad. Sci. 76, 6062 (1979)].
From the Gibbs inequality one first derives a variational principle for the
grand potential as a functional of a trial many-body distribution. This
functional is minimized in two stages. The first step consists of a constrained
search of all many-body distributions that generate a given one-body density.
The result can be split into internal and external contributions to the total
grand potential. In contrast to the original approach by Mermin and Evans, here
the intrinsic Helmholtz free energy functional is defined by an explicit
expression that does not refer to an external potential in order to generate
the given one-body density. The second step consists of minimizing with respect
to the one-body density. We show that this framework can be applied in a
straightforward way to the canonical ensemble.
