MADNESS
0.10.1
|
The source is here.
This example computes the energy of the ground state of the hydrogen atom as the expectation value of the non-relativistic Schrödinger Hamiltonian within the Born-Oppenheimer approximation. Explicitly,
where the unnormalized wave function is
Two functions are required - the wave function and the potential. Note the small constants introduced to eliminate the cusp in the wave function and the singularity in the potential. Due to the volume element this smoothing has negligible effect on the result (perturbation theory can make this rigorous).
The wave function is exponentially decaying and has the value 2e-9 at r=20, so we pick this as a box size that is effectively infinite.
Using integration by parts and noting that
Finally, due to the spherical symmetry we only need compute one component of the Laplacian in Cartesian coordinates.
The exact answer is in atomic units.