— EDU — Orbitals of the Hydrogen Atom
Header
- Files for the tutorial located in nextnano++\examples\education
Orbitals_Hydrogen_3D_nnp.in
- Scope of the tutorial:
Schrödinger equation
Coulomb potential
Numerical accuracy
- Main adjustable parameters in the input file:
regularizing parameter
$eta
radius of the simulation domain
$pos_end
positions of the grid definitions:
$pos_fine
,$pos_medium
, and$pos_coarse
grid spacings:
$grid_coarse
,$grid_medium
, and$grid_fine
- Relevant output files:
bias_00000\bandedge_Gamma_1d_z.dat
bias_00000\bandedge_Gamma_2d_yz.dat
bias_00000\Quantum\energy_spectrum_quantum_region_Gamma_00000.dat
bias_00000\Quantum\amplitude_quantum_region_Gamma_XXXX.fld
Introduction
This tutorial demonstrates use of nextnano++ in computing orbitals of a Hydrogen atom. As orbitals and their energies can be obtained analytically for the Hydrogen atom (see. [LeviAQM2006]), this tutorial serves also as a playground for exploration of numerical limits of 3D simulations on small computers.
In this tutorial we assume that the proton is set in the origin of the coordinate system and the electron is confined by the Coulomb potential arising from the presence of the proton
where
Note that the length is given in (nm) in the input file. The Schrödinger equation for the system is given by
where
This equation can be solved by nextnano++ within 1-band model. To do so one needs to take care about:
definition of a convenient vacuum “material”,
grid spacing and size of the simulation domain,
infinity of the potential at the origin of the coordinate system.
Preparing the simulation
Convenient vacuum “material”
Let us define vacuum material modifying existing material, e.g., GaAs. As energy dispersion of electron in vacuum is isotropic parabola, 1-band model for conduction band for zincblende crystals can be parametrized to describe vacuum. The effective mass corresponding to the free electron is equal to 1. Assuming that total energy of stationary electron is equal 0 eV, we set the minimum of the band to be zero. We do it safely by setting all: band gap, band offset, and spin-orbit splitting to zero.
40database{ # gallium arsenide turned into vacuum at 0 eV
41 binary_zb{
42 name = GaAs # same as the substrate to neglect strain
43 conduction_bands{
44 Gamma{
45 bandgap = 0
46 mass = 1
47 }
48 }
49 valence_bands{
50 bandoffset = 0
51 delta_SO = 0
52 }
53 }
54}
Note that we also turn off temperature dependence of the band gap so that Varshi formula is not applied and does not shift the minimum.
Choice of the crystal orientation and substrate are arbitrary in this simulation.
We set some, because the solver requires them.
All strain effects are ignored as strain{ }
is not called in the run{ }
section - there is no strain in the vacuum.
28global{
29 simulate3D{}
30 crystal_zb{
31 x_hkl = [1, 0, 0]
32 y_hkl = [0, 1, 0]
33 }
34 substrate{ name = "GaAs" }
35
36 temperature_dependent_bandgap = no
37 temperature = 4.0 # Kelvin
38}
The vacuum is ready!
The grid and simulation domain
Keeping in mind that these computations are meant to be held on desktop computers or laptops, the biggest limitation comes from the number of grid points that one can include in the simulation, as it directly impacts RAM needed for the simulation. The simulation grid should be defined to have possibly low number of grid points while keeping most of them the center of the atom to properly represent the potential and orbitals of interest.
In the input file for this tutorial we defined such a grid to keep it fine nearby the center of the atom and gradually coarser while going outwards (basic example on how to define such grids can be found here).
For that purpose we use 6 variables to have quite flexible control over the grid spacing ($grid_coarse
, $grid_medium
, and $grid_fine
) and positions where these spacings begin to apply ($pos_fine
, $pos_medium
, and $pos_coarse
).
The last parameter of the grid, $pos_end
, is defining the size of the entire simulation domain.
All of these parameters together are determining number of grid points, hence, how much memory the simulation will require and how much time it will take to have the Schrödinger equation solved.
14 #spacing
15 $grid_coarse = 0.1
16 $grid_medium = 0.05
17 $grid_fine = 0.005
56 grid{
57 xgrid{
58 line{ pos =-$pos_end spacing = $grid_coarse }
59 line{ pos =-$pos_coarse spacing = $grid_coarse }
60 line{ pos =-$pos_medium spacing = $grid_medium }
61 line{ pos =-$pos_fine spacing = $grid_fine }
62 line{ pos = 0 spacing = $grid_fine }
63 line{ pos = $pos_fine spacing = $grid_fine }
64 line{ pos = $pos_medium spacing = $grid_medium }
65 line{ pos = $pos_coarse spacing = $grid_coarse }
66 line{ pos = $pos_end spacing = $grid_coarse }
67 }
68 ygrid{
69 line{ pos =-$pos_end spacing = $grid_coarse }
70 line{ pos =-$pos_coarse spacing = $grid_coarse }
71 line{ pos =-$pos_medium spacing = $grid_medium }
72 line{ pos =-$pos_fine spacing = $grid_fine }
73 line{ pos = 0 spacing = $grid_fine }
74 line{ pos = $pos_fine spacing = $grid_fine }
75 line{ pos = $pos_medium spacing = $grid_medium }
76 line{ pos = $pos_coarse spacing = $grid_coarse }
77 line{ pos = $pos_end spacing = $grid_coarse }
78 }
79 zgrid{
80 line{ pos =-$pos_end spacing = $grid_coarse }
81 line{ pos =-$pos_coarse spacing = $grid_coarse }
82 line{ pos =-$pos_medium spacing = $grid_medium }
83 line{ pos =-$pos_fine spacing = $grid_fine }
84 line{ pos = 0 spacing = $grid_fine }
85 line{ pos = $pos_fine spacing = $grid_fine }
86 line{ pos = $pos_medium spacing = $grid_medium }
87 line{ pos = $pos_coarse spacing = $grid_coarse }
88 line{ pos = $pos_end spacing = $grid_coarse }
89 }
90 }
Note
In general, the accuracy increases with reduction of the grid, unless machine precision begins to limit accuracy of derivatives.
Regularized Coulomb potential
The Coulomb potential itself is posing a problem in this simulation as it introduces infinity, which gets more and more severe when the grid gets finer around it.
One way to remove this infinity is to regularize the potential (2.4.39) introducing a regularizing parameter
Assuming that one cares about accuracy for the ground state in the Hydrogen atom, the
This potential we define inside the import{ } group using $eta
(see top of the input file) as a variable corresponding to
161$e = 1 #eV
162$eps = 55.263E-3 #e^2eV^(-1)nm^(-1)
163$pi = 3.1415
164
165import{
166 analytic_function{
167 name = "Potential"
168 function = "(1/(4*$eps*$pi))*( $e/(sqrt((x)^2 + (y)^2 + (z)^2 + $eta^2)) )"
169 label = potential_label
170 }
171output_imports{} # output all imported data including scale factor.
172}
The potential is included as an initialization of Poisson equation, which further is not solved.
120 poisson{
121 import_potential{ import_from = "Potential" }
122 output_potential{}
123 }
Results and Discussion
Orbitals s1 and s2
Let us have a look at s orbitals that are expected to be the most affected by regularization of the Coulomb potential. One can easily compare these orbitals with literature [LeviAQM2006] as their amplitudes have symmetry of a sphere. To do so, one can define 1D sections through the center of the atom in the input file using section{ } nested group and plot numerical amplitudes together with the ones derived analytically
(2.4.42)
Such comparison of s1 and s2 orbitals obtained with both methods is shown in Figure 2.4.127 a) and b), respectively.
Figure 2.4.127 a), b) Comparison of 1s and 2s orbitals obtained from analytical formulas and numerical simulation. c), d) Difference between the analytical and numerical wave functions of s1 and s2 orbitals, respectively.
As seen in the Figure 2.4.127 c) and d), the most significant loss of accuracy is present near the center of the atom, where regularization has the biggest effect. It reaches approximately 10% of the maximum amplitude at the zero coordinate, and falls below 1% at radius smaller than 0.05 nm.
Regularized potential
Investigating the potential (see Figure 2.4.128) one can see that regularization impacts the potential in the order of magnitude 10-2 - 10-1 V at the distance near the Bohr radius.

Figure 2.4.128 (a) shows the Coulomb energy distribution. (b) is the difference between the numerical Coulomb potential
For that reason, a well-computed first orbital can be expected to have the eigenenergy deviating from the analytical value by approximately 10-2 - 10-1 eV.
Energies
Accordingly, the effect can be best seen by comparing analytical energies of orbitals [LeviAQM2006]
(2.4.43)
where $grid_medium=0.01
); see columns 4-6 in Table 2.4.1.
Here the difference of energies is overestimated by approximately 0.19 eV for the ground state, which corresponds to additional potential energy introduced by the regularization.
Such fine simulation, however, can take more than half a day to finish. Interesting results can be also obtained using coarser grid, therefore, within shorter simulation runs (couple of minutes). Columns 4 and 7-8 of Table 2.4.1 show that it is possible to match energy of the first orbital with the analytical results. However, this is just a luck arising from lowering of numerical accuracy due to coarser grid. The proof are energies of all further orbitals, which deviate from analytical solutions much more than for the fine simulation, moreover, being reduced instead of increased despite additional energy introduced by regularization. As expected, the discrepancy is further gradually reducing as orbitals are localized further away from the center of the potential; amplitudes are less varying in space. The choice of the grid, therefore, depends on the goal of the simulation and must be performed carefully.
Degeneracy of orbitals
Finally, let us have a look at selected amplitudes of orbitals in the Hydrogen atom shown in Figure 2.4.129.

Figure 2.4.129 Cross-sections of 1s, 2s, 3s, 2p, and 3d orbitals computed for the Hydrogen atom.
As the energy of the orbital without presence of magnetic field is given only by the principal quantum number
Exercises
- Compute lowest s, p, and d orbitals of a hydrogen atom and answer following questions:
Are computed wave-functions of s orbitals in agreement with analytical solutions?
Are all energies of orbitals the same as obtained analytically? If not, why do they deviate from analytical solutions?
Is proper degeneracy present in the numerical solutions?
- Additional question on numerics:
What is the biggest regularizing parameter that can be used for the electrostatic potential and grid spacing if one aims at 1 meV accuracy for the energy of the ground state?
Last update: 27/10/2023