def update_rotate_matrix(self, dx, mo_occ, u0=1, mo_coeff=None): dr = hf.unpack_uniq_var(dx, mo_occ) if WITH_EX_EY_DEGENERACY: mol = self._scf.mol if mol.symmetry and mol.groupname in ('Dooh', 'Coov'): orbsym = hf_symm.get_orbsym(mol, mo_coeff) _force_Ex_Ey_degeneracy_(dr, orbsym) return numpy.dot(u0, expmat(dr))
def update_rotate_matrix(self, dx, mo_occ, u0=1, mo_coeff=None): dr = hf.unpack_uniq_var(dx, mo_occ) if WITH_EX_EY_DEGENERACY: mol = self._scf.mol if mol.symmetry and mol.groupname in ('Dooh', 'Coov'): orbsym = scf.ghf_symm.get_orbsym(mol, mo_coeff) _force_Ex_Ey_degeneracy_(dr, orbsym) return numpy.dot(u0, expmat(dr))
def update_rotate_matrix(self, dx, mo_occ, u0=1, mo_coeff=None): nmo = mo_occ.size nocc = numpy.count_nonzero(mo_occ) nvir = nmo - nocc dx = dx.reshape(nvir, nocc) dx_aa = dx[::2, ::2] dr_aa = hf.unpack_uniq_var(dx_aa.ravel, mo_occ[::2]) u = numpy.zeros((nmo, nmo), dtype=dr_aa.dtype) # Allows only the rotation within the up-up space and down-down space u[::2, ::2] = u[1::2, 1::2] = expmat(dr_aa) return numpy.dot(u0, u)
def unpack_uniq_var (self, x): return hf.unpack_uniq_var (x, self.mo_occ)
def update_rotate_matrix(self, dx, mo_occ, u0=1, mo_coeff=None): dr = hf.unpack_uniq_var(dx, mo_occ) return numpy.dot(u0, expmat(dr))
def _rotate_mo(mo_coeff, mo_occ, dx): dr = hf.unpack_uniq_var(dx, mo_occ) u = newton_ah.expmat(dr) return numpy.dot(mo_coeff, u)