Additional terms may be required if frozen core approximations and/or ionization potentialelectron affinity (IPEA) shift are applied. The first term in Eq. (39) represents the (electronic) energy to be differentiated, and the second term is the constraint condition for determining the excitation amplitude (Eq. ( )). Since this energy is not obtained through a variational minimization with respect to the excitation amplitudes (and wavefunction parameters), we first need to solve the following λ -equation for each γ: