Using these expressions, one can take explicit functional derivatives of E x (see Eq. 138) with respect to {ϕ iσ }, {Φ (1) iσ }, and {Φ (2) iσ } to obtain the total OEP exchange potential v xσ (r) used in the DFT formulation and further iterated to obtain the electronic density n(r) under the influence of the cavity.