The Kohn–Sham equations are found by varying the total energy expression with respect to a set of orbitals, subject to constraints on those orbitals, to yield the Kohn–Sham potential as
The Kohn–Sham equations can be understood as a method for deriving the Kohn–Sham potential by iteratively adjusting an energy expression based on a set of orbital functions, subject to limitations that ensure these orbitals are valid and consistent.