def setup(self): self.h1e = self.hf.h1e_mo self.eri = self.hf.eri_mo if self.options['dm0'] is None: self.rdm1 = self.hf.rdm1_mo else: self.rdm1 = np.array(self.options['dm0'], dtype=types.float64) self.converged = False self.iteration = 0 chempot = self.hf.chempot self.gf = aux.Aux(self.hf.e, np.eye(self.hf.nao), chempot=chempot) self.se = aux.Aux([], [ [], ] * self.hf.nao, chempot=chempot) self._se_prev = None self.rpa = None self.e_qp = self.hf.e.copy() self._timings = {} self._energies = {} log.title('Options', self.verbose) log.options(self.options, self.verbose) log.title('Input', self.verbose) log.molecule(self.hf.mol, self.verbose) log.write('Basis = %s\n' % self.hf.mol.basis, self.verbose) log.write('E(nuc) = %.12f\n' % self.hf.e_nuc, self.verbose) log.write('E(hf) = %.12f\n' % self.hf.e_tot, self.verbose) log.write('nao = %d\n' % self.hf.nao, self.verbose) log.write('nmom = (%s, %s)\n' % self.nmom, self.verbose)
def setup(self): super().setup() log.title('Options', self.verbose) log.options(self.options, self.verbose) log.title('Input', self.verbose) log.molecule(self.hf.mol, self.verbose) log.write('Basis = %s\n' % self.hf.mol.basis, self.verbose) log.write('E(nuc) = %.12f\n' % self.hf.e_nuc, self.verbose) log.write('E(hf) = %.12f\n' % self.hf.e_tot, self.verbose) log.write('nao = %d\n' % self.hf.nao, self.verbose)
def setup(self): super().setup() log.title('Options', self.verbose) log.options(self.options, self.verbose) log.title('Input', self.verbose) log.molecule(self.hf.mol, self.verbose) log.write('Basis = %s\n' % self.hf.mol.basis, self.verbose) log.write('E(nuc) = %.12f\n' % self.hf.e_nuc, self.verbose) log.write('E(hf) = %.12f\n' % self.hf.e_tot, self.verbose) log.write('<S^2> = %.6f\n' % self.hf.spin_square[0], self.verbose) log.write('nao = %d\n' % self.hf.nao, self.verbose) log.write('nfrozen = (%d, %d)\n' % self.options['frozen'], self.verbose) log.write('nmom = (%s, %s)\n' % self.nmom, self.verbose)
def setup(self): super().setup() self.gf = self.se.new(self.hf.e, np.eye(self.hf.nao)) if self.eri.ndim == 3: self.eri = lib.pack_tril(self.eri) log.title('Options', self.verbose) log.options(self.options, self.verbose) log.title('Input', self.verbose) log.molecule(self.hf.mol, self.verbose) log.write('Basis = %s\n' % self.hf.mol.basis, self.verbose) log.write('E(nuc) = %.12f\n' % self.hf.e_nuc, self.verbose) log.write('E(hf) = %.12f\n' % self.hf.e_tot, self.verbose) log.write('nao = %d\n' % self.hf.nao, self.verbose) log.write('nmom = (%s, %s)\n' % self.nmom, self.verbose) self.run_mp2()
def setup(self): super().setup() self.gf = (self.se[0].new(self.hf.e[0], np.eye(self.hf.nao)), self.se[1].new(self.hf.e[1], np.eye(self.hf.nao))) if self.eri.ndim == 4: self.eri = np.stack([lib.pack_tril(x) for x in self.eri], axis=0) log.title('Options', self.verbose) log.options(self.options, self.verbose) log.title('Input', self.verbose) log.molecule(self.hf.mol, self.verbose) log.write('Basis = %s\n' % self.hf.mol.basis, self.verbose) log.write('E(nuc) = %.12f\n' % self.hf.e_nuc, self.verbose) log.write('E(hf) = %.12f\n' % self.hf.e_tot, self.verbose) log.write('nao = %d\n' % self.hf.nao, self.verbose) log.write('nmom = (%s, %s)\n' % self.nmom, self.verbose) self.run_mp2()
def test_options(self): sys.stdout = stdout = StringIO() log.options({'test': 'also a test'}) sys.stdout = sys.__stdout__