1#!/usr/bin/env python 2# 3# Author: Oliver J. Backhouse <olbackhouse@gmail.com> 4# George H. Booth <george.booth@kcl.ac.uk> 5# 6 7''' 8A simple example of restricted AGF2. AGF2 will compute correlation energies, one-particle 9properties and charged excitations / energy levels via an iterated, renormalized perturbation 10theory. 11 12Default AGF2 corresponds to the AGF2(1,0) method outlined in the papers: 13 - O. J. Backhouse, M. Nusspickel and G. H. Booth, J. Chem. Theory Comput., 16, 1090 (2020). 14 - O. J. Backhouse and G. H. Booth, J. Chem. Theory Comput., 16, 6294 (2020). 15''' 16 17from pyscf import gto, scf, agf2 18 19mol = gto.M(atom='O 0 0 0; H 0 0 1; H 0 1 0', basis='cc-pvdz') 20 21mf = scf.RHF(mol) 22mf.conv_tol = 1e-12 23mf.run() 24 25# Run an AGF2 calculation 26gf2 = agf2.AGF2(mf) 27gf2.conv_tol = 1e-7 28gf2.run(verbose=4) 29 30# Print the first 3 ionization potentials 31# Note that there is no additional cost to write out larger numbers of excitations. 32gf2.ipagf2(nroots=3) 33 34# Print the first 3 electron affinities 35gf2.eaagf2(nroots=3) 36