diff --git a/pyblock2/_pyscf/mcscf/uno.py b/pyblock2/_pyscf/mcscf/uno.py index 2a249abc..ddf473c8 100644 --- a/pyblock2/_pyscf/mcscf/uno.py +++ b/pyblock2/_pyscf/mcscf/uno.py @@ -174,7 +174,7 @@ def funval(pija): return ierr, u -def get_uno(mf, iprint=True): +def get_uno(mf, do_loc=True, iprint=True): mol = mf.mol @@ -224,6 +224,13 @@ def get_uno(mf, iprint=True): diff = coeff.conj().T @ ova @ coeff - np.identity(norb) assert np.linalg.norm(diff) < 1e-7 + if not do_loc: + mo_occ = eig + index = np.argsort(-mo_occ) + mo_occ = mo_occ[index] + coeff = coeff[:, index] + return coeff, eig + # 3. Search for active space # 3.1 Transform the entire MO space into core, active, and external space