I am attempting to manually swap entries in the MO coefficient matrices of an HF-generated wfn object, then use psi4.molden() to view the swapped orbitals. However, both the indexing and the actual orbital shapes seem to be wrong for the neutral Scandium atom, despite the manually inspected Ca and Cb arrays being correct. I swapped orbital indices 14 and 27 in the numpy array, but which should mean orbitals 15 and 28 were swapped in molden’s notation. However, 14 and 28 were swapped in molden notation; see vim diff below:
Additionally, the orbitals molden generates after the rotation are asymmetric, e.g.
I’m using the following code to obtain this transformation:
psi4.molden(wfn, 'pre-rotation.molden') cb = wfn.Cb().to_array() ca = wfn.Ca().to_array() self.molecule.n_orbitals = len(ca) ca[:][self.active+self.reorder]=ca[:][self.reorder+self.active] cb[:][self.active+self.reorder]=cb[:][self.reorder+self.active] ca = psi4.core.Matrix.from_array(ca) cb = psi4.core.Matrix.from_array(cb) wfn.Cb().copy(cb) wfn.Ca().copy(ca) psi4.molden(wfn, 'scr.molden')
where self.active = [9,10,11,12,13,14] and self.reorder = [9,10,11,12,13,27]
I suspect this is an issue unique to very high symmetry systems, and I am running it in c1 if that matters. Any help is appreciated!