1# -*- coding: utf-8 mode: shell-script -*- 2 3Test : XC 2D 4Options : libxc4 5Program : octopus 6TestGroups : short-run, functionals 7Enabled : Yes 8 9Input: 02-xc_2d.00-hartree.inp 10match ; SCF convergence ; GREPCOUNT(static/info, 'SCF converged') ; 1.0 11match ; Hartree energy ; GREPFIELD(static/info, 'Total =', 3) ; 1.11161424 12match ; Hartree eigenvalues sum ; GREPFIELD(static/info, 'Eigenvalues =', 3) ; 1.42868005 13match ; Hartree kinetic energy ; GREPFIELD(static/info, 'Kinetic =', 3) ; 0.31633274 14match ; Hartree external energy ; GREPFIELD(static/info, 'External =', 3) ; 0.47821569 15match ; Hartree eigenvalue 1 up ; GREPFIELD(static/info, ' 1 up', 3) ; 0.606973 16match ; Hartree eigenvalue 2 up ; GREPFIELD(static/info, ' 2 up', 3) ; 0.821602 17match ; Hartree eigenvalue 1 dn ; GREPFIELD(static/info, ' 1 dn', 3) ; 1.156249 18match ; Hartree eigenvalue 2 dn ; GREPFIELD(static/info, ' 2 dn', 3) ; 1.221872 19 20# This tests the Hartree-Fock implementation. It reproduces one number 21# given in: [B. Reusch et al., Phys. Rev. B 63, 113313]. I have chosen 22# a 2D calculation because of the great computational load produced by 23# Hartree-Fock calculation. 24# 25# The input file produces an unrestricted Hartree-Fock calculation for 26# a two-electron quantum-dot in an S=1 configuration. The details of 27# the calculation correspond to the first row of Table I in the 28# aforementioned paper. The units in that table are given in units of 29# "omega", and since omega in this case is 0.25 effective atomic 30# units, 1.0419 e.a.u. corresponds to 4.168, as given in the table. 31 32# Results for 8-electron quantum dots, provided in the paper, can 33# also be approximately reproduced. I do not put a test because it 34# would be too slow. In fact, the results provided by octopus are 35# lower in energy and closer to the Quantum Monte Carlo numbers, which 36# could be due to the use of an underconverged basis set in the paper. 37 38Input: 02-xc_2d.01-hf.inp 39match ; SCF convergence ; GREPCOUNT(static/info, 'SCF converged') ; 1 40match ; Hartree-Fock energy ; GREPFIELD(static/info, 'Total =', 3) ; 1.04191861 41match ; Hartree-Fock eigenvalues sum ; GREPFIELD(static/info, 'Eigenvalues =', 3) ; 1.31401934 42match ; Hartree-Fock kinetic energy ; GREPFIELD(static/info, 'Kinetic =', 3) ; 0.31688385 43match ; Hartree-Fock external energy ; GREPFIELD(static/info, 'External =', 3) ; 0.45293349 44match ; Hartree-Fock eigenvalue 1 up ; GREPFIELD(static/info, ' 1 up', 3) ; 0.537515 45match ; Hartree-Fock eigenvalue 2 up ; GREPFIELD(static/info, ' 2 up', 3) ; 0.776505 46match ; Hartree-Fock eigenvalue 1 dn ; GREPFIELD(static/info, ' 1 dn', 3) ; 1.169397 47match ; Hartree-Fock eigenvalue 2 dn ; GREPFIELD(static/info, ' 2 dn', 3) ; 1.224726 48 49# We use the wave-functions obtained to test the 2D XC functionals 50 51Input: 02-xc_2d.lda_amgb.inp 52match ; LDA AMGB eigenvalue 1 up ; GREPFIELD(static/info, ' 1 up', 3) ; 0.746062 53match ; LDA AMGB eigenvalue 2 up ; GREPFIELD(static/info, ' 2 up', 3) ; 0.930742 54match ; LDA AMGB eigenvalue 1 dn ; GREPFIELD(static/info, ' 1 dn', 3) ; 0.927729 55match ; LDA AMGB eigenvalue 2 dn ; GREPFIELD(static/info, ' 2 dn', 3) ; 1.040174 56match ; LDA Exchange ; GREPFIELD(static/info, 'Exchange =', 3) ; -0.62342504 57match ; LDA AMGB Correlation ; GREPFIELD(static/info, 'Correlation =', 3) ; -0.03534534 58match ; LDA AMGB Int[n*v_xc] ; GREPFIELD(static/info, 'Int\[n\*v_xc\] =', 3) ; -0.97730047 59 60Input: 02-xc_2d.gga_b86.inp 61match ; GGA 2D B86 eigenvalue 1 up ; GREPFIELD(static/info, ' 1 up', 3) ; 0.758378 62match ; GGA 2D B86 eigenvalue 2 up ; GREPFIELD(static/info, ' 2 up', 3) ; 0.934658 63match ; GGA 2D B86 eigenvalue 1 dn ; GREPFIELD(static/info, ' 1 dn', 3) ; 1.169397 64match ; GGA 2D B86 eigenvalue 2 dn ; GREPFIELD(static/info, ' 2 dn', 3) ; 1.224726 65match ; GGA 2D B86 Exchange ; GREPFIELD(static/info, 'Exchange =', 3) ; -0.66569035 66match ; GGA 2D B86 Int[n*v_xc] ; GREPFIELD(static/info, 'Int\[n\*v_xc\] =', 3) ; -0.96106957 67 68Input: 02-xc_2d.gga_b86_mgc.inp 69match ; GGA 2D B86 MGC eigenvalue 1 up ; GREPFIELD(static/info, ' 1 up', 3) ; 0.757507 70match ; GGA 2D B86 MGC eigenvalue 2 up ; GREPFIELD(static/info, ' 2 up', 3) ; 0.932683 71match ; GGA 2D B86 MGC eigenvalue 1 dn ; GREPFIELD(static/info, ' 1 dn', 3) ; 1.169397 72match ; GGA 2D B86 MGC eigenvalue 2 dn ; GREPFIELD(static/info, ' 2 dn', 3) ; 1.224726 73match ; GGA 2D B86 MGC Exchange ; GREPFIELD(static/info, 'Exchange =', 3) ; -0.65901733 74match ; GGA 2D B86 MGC Int[n*v_xc] ; GREPFIELD(static/info, 'Int\[n\*v_xc\] =', 3) ; -0.96391509 75 76Input: 02-xc_2d.gga_b88.inp 77match ; GGA 2D B88 eigenvalue 1 up ; GREPFIELD(static/info, ' 1 up', 3) ; 0.751802 78match ; GGA 2D B88 eigenvalue 2 up ; GREPFIELD(static/info, ' 2 up', 3) ; 0.922801 79match ; GGA 2D B88 eigenvalue 1 dn ; GREPFIELD(static/info, ' 1 dn', 3) ; 1.169397 80match ; GGA 2D B88 eigenvalue 2 dn ; GREPFIELD(static/info, ' 2 dn', 3) ; 1.224726 81match ; GGA 2D B88 Exchange ; GREPFIELD(static/info, 'Exchange =', 3) ; -0.67040364 82match ; GGA 2D B88 Int[n*v_xc] ; GREPFIELD(static/info, 'Int\[n\*v_xc\] =', 3) ; -0.97950183 83 84Input: 02-xc_2d.gga_pbe.inp 85match ; GGA 2D PBE eigenvalue 1 up ; GREPFIELD(static/info, ' 1 up', 3) ; 0.752796 86match ; GGA 2D PBE eigenvalue 2 up ; GREPFIELD(static/info, ' 2 up', 3) ; 0.923345 87match ; GGA 2D PBE eigenvalue 1 dn ; GREPFIELD(static/info, ' 1 dn', 3) ; 1.169397 88match ; GGA 2D PBE eigenvalue 2 dn ; GREPFIELD(static/info, ' 2 dn', 3) ; 1.224726 89match ; GGA 2D PBE Exchange ; GREPFIELD(static/info, 'Exchange =', 3) ; -0.67022789 90match ; GGA 2D PBE Int[n*v_xc] ; GREPFIELD(static/info, 'Int\[n\*v_xc\] =', 3) ; -0.97796406 91 92# From PRM 2008 paper: "a spin-polarized extension of the present functional is still missing" 93# Though Octopus and libxc do not flag a problem when running spin-polarized, 94# we will do SCF from scratch spin-unpolarized. Restarting from spin-polarized Hartree-Fock like the others 95# would mean deliberately misunderstanding the restart wavefunctions. 96Input: 02-xc_2d.lda_prm.inp 97match ; LDA PRM eigenvalue 1 ; GREPFIELD(static/info, ' 1 ', 3) ; 0.800413 98match ; LDA PRM eigenvalue 2 ; GREPFIELD(static/info, ' 2 ', 3) ; 0.985039 99match ; LDA Exchange ; GREPFIELD(static/info, 'Exchange =', 3) ; -0.40774389 100match ; LDA PRM Correlation ; GREPFIELD(static/info, 'Correlation =', 3) ; -0.11830011 101match ; LDA PRM Int[n*v_xc] ; GREPFIELD(static/info, 'Int\[n\*v_xc\] =', 3) ; -0.75815185 102