Accuracy in computing the hydrogen ground state energy

Questions and discussions regarding the use of Qbox
Forum rules
You must be a registered user to post in this forum. Registered users may also post new topics if they consider that their subject does not correspond to any topic already present on the forum.
Post Reply
AJAK
Posts: 2
Joined: Wed May 24, 2017 12:38 pm

Accuracy in computing the hydrogen ground state energy

Post by AJAK »

I am new to QBox and I am trying learn how to use it by computing the ground state energy for hydrogen. The output i get is "<etotal> -0.42716546 </etotal>". Shouldn’t it be more near to -0.5? I guess I'm doing some elementary mistake. Is there any parameter I can change to get a higher precision?

The input I do is

[qbox] set cell 20 0 0 0 20 0 0 0 20
[qbox] species hydrogen hydrogen.xml
[qbox] atom H1 hydrogen 10.000 10.000 10.000
[qbox] set ecut 12
[qbox] set wf_dyn PSDA
[qbox] set ecutprec 4
[qbox] randomize_wf
[qbox] run 0 200.

The file "hydrogen.xml" I am using is the file originally named "H_HSCV_LDA-1.0.xml" found on the page "http://fpmd.ucdavis.edu/potentials/H/index.htm".

Thanks a lot in advance for any help!
fgygi
Site Admin
Posts: 150
Joined: Tue Jun 17, 2008 7:03 pm

Re: Accuracy in computing the hydrogen ground state energy

Post by fgygi »

Hello AJAK,

Your input file is correct, but there are a number of parameters and some features of the DFT-LDA approximations that explain why the answer is not the exact value (-0.5). This calculation uses the default option for the "xc" variable, i.e. xc=LDA. In the local density approximation (LDA) the exchange and correlation energy is described approximately using an expression that depends only on the electronic charge density locally. This means that the one-electron effective potential felt by an electron depends on the electronic charge density of all electrons. In the hydrogen atom (with only one electron), this leads to a spurious "self-interaction", i.e. the effective potential seen by the only electron depends on its own charge, i.e. it is interacting with itself. This is obviously a bad approximation for the hydrogen atom, but turns out to be a more reasonable approximation in larger, many-electron systems.

A number of modifications to the input file can be made to improve the result, and I describe them below:

1) The value of the ecut variable (plane wave energy cutoff) is quite low. It is important to check that the results are converged with respect to the plane wave energy cutoff. For hydrogen, a value of 35 Rydberg is usually adequate:

Code: Select all

set cell 20 0 0  0 20 0  0 0 20
species hydrogen hydrogen.xml
atom H1 hydrogen 10 10 10
set ecut 35
set wf_dyn PSDA
set ecutprec 4
randomize_wf
set scf_tol 1.e-8
run 0 200
(note also the use of the "scf_tol" variable which will stop the calculation as soon as a tolerance of 1.e-8 is reached).
This calculation yields etotal = -0.44297092.

2) The default option in Qbox is to ignore the spin of electrons, and describe orbitals without a spin degree of freedom. This is adequate in many situations (such as closed-shell systems), but is definitely bad for hydrogen (only one electron). This can be changed by setting the variable nspin to 2

Code: Select all

set cell 20 0 0  0 20 0  0 0 20
species hydrogen hydrogen.xml
atom H1 hydrogen 10 10 10
set ecut 35
set nspin 2
set wf_dyn PSDA
set ecutprec 4
randomize_wf
set scf_tol 1.e-8
run 0 200
This yields etotal=-0.47555553, which is better, but the self-interaction error of LDA is still sizeable.

3) If we replace the LDA by the Hartree-Fock approximation, it is much better for hydrogen since it is free of self-interaction errors. Indeed, for hydrogen it should give the exact result:

Code: Select all

set cell 20 0 0  0 20 0  0 0 20
species hydrogen hydrogen.xml
atom H1 hydrogen 10 10 10
set ecut 35
set nspin 2
set xc HF
set wf_dyn PSDA
set ecutprec 4
randomize_wf
set scf_tol 1.e-8
run 0 200
This calculation yields etotal=-0.49744650. This still differs from the exact answer, but now this is due to remaining numerical approximations. First, increasing the value of ecut to 50 Ry yields etotal=-0.49954032. Increasing it further to 70 Ry yields etotal=-0.50043248.
We now have a value of etotal which is below the exact value. This is due to the fact that we are dealing with a periodic unit cell. We have assumed that the hydrogen atom is well isolated from periodic replicas by setting the cell size to 20 Bohr. There is still a very weak binding interaction between hydrogen atoms even at that distance. As a result, etotal is slightly below -0.5. We can test that further by increasing the cell size to 30 Bohr:

Code: Select all

set cell 30 0 0  0 30 0  0 0 30
species hydrogen hydrogen.xml
atom H1 hydrogen 10 10 10
set ecut 70
set nspin 2
set xc HF
set wf_dyn PSDA
set ecutprec 4
randomize_wf
set scf_tol 1.e-8
run 0 200
This calculation yields etotal=-0.49987738.

In summary, it is important to choose carefully the level of approximation of the exchange-correlation energy (LDA, or HF, or other), to check the accuracy of the plane wave basis by increasing the value of ecut, and to check the effect of periodic boundary conditions by increasing the unit cell size.

Hope this helps,
Francois
AJAK
Posts: 2
Joined: Wed May 24, 2017 12:38 pm

Re: Accuracy in computing the hydrogen ground state energy

Post by AJAK »

Thank you so much the thorough reply Francois. This indeed helped my understanding.
Post Reply