Graduate Numerical Hartree Fock with Finite Difference Matrices for Helium

Click For Summary
SUMMARY

This discussion focuses on implementing the Hartree-Fock method for calculating the energy levels of helium using finite difference matrices, as outlined in the referenced paper. The user is experiencing convergence issues, with oscillating energy results and normalization problems in their numerical wave function calculations. The process involves initializing wave functions based on hydrogen atom solutions, calculating operators for individual electrons, and using MATLAB's eigs function for eigenvalue solutions. The user seeks clarification on normalization requirements and is looking for assistance in achieving convergence.

PREREQUISITES
  • Understanding of Hartree-Fock theory and its application to multi-electron systems
  • Familiarity with finite difference methods for numerical solutions
  • Proficiency in MATLAB, particularly with the eigs function for eigenvalue problems
  • Knowledge of wave function normalization and its implications in quantum mechanics
NEXT STEPS
  • Review the paper on Hartree-Fock method implementation for finite difference matrices
  • Learn about wave function normalization techniques in quantum mechanics
  • Explore MATLAB's numerical integration functions for verifying wave function normalization
  • Investigate convergence criteria and methods for iterative eigenvalue problems in quantum systems
USEFUL FOR

Students and researchers in computational physics, particularly those focusing on quantum mechanics and numerical methods for solving multi-electron systems. This discussion is especially beneficial for those implementing the Hartree-Fock method in MATLAB.

DanielA
Messages
27
Reaction score
2
TL;DR
I am following a paper which solves the system with an eigenvalue solver alone using an initial guess and SCF calculations https://www.mdpi.com/2218-2004/6/2/22?type=check_update&version=2#related_content
Here is the paper again: https://www.mdpi.com/2218-2004/6/2/22?type=check_update&version=2#related_content

For a class project I need to calculate the energy levels of atoms using the Hartree Fock method as presented in this paper which essentially brute forces the calculation using finite difference matrices to write the Hartree-Fock equations as a matrix equation solved by standard eigenvalue solvers instead of using other more subtle approaches.

However, I am failing to achieve convergence whatsoever and my energies are oscillating. Considering my inexperience with problems like this, I'm worried that I'm misunderstanding the work at a basic numerical level. I also probably don't understand how the results are being presented and what is going into converting between numerical results and the final plots/energies since Hartree-Fock energies aren't the real energy of the electrons like a true Schrödinger equation. The paper compares the difference in energy results to https://physics.nist.gov/PhysRefData/Handbook/Tables/heliumtable5.htm which makes sense since we don't calculate the ground state energy to get a zero point. I assume the 1s2s level is the sum of the two electron energies the rescaled by adding the 1s^2 state.In the broad stroke, the process is simple. Hartree Fock theory separates a multi electron wave function into N individual single electron eigenvalue equations which must be solved iteratively because the operator depends on the other wave functions.
1606601953633.png

The first term can be written as a tridiagonal matrix using finite-difference coefficients as found in the paper. The second and third terms are as written diagonal matrices.
The 4th, Hartree, term the spherically averaged coulomb repulsion an electron feels from all the other electrons. It is also diagonal and represents the average coulomb force experienced by the ith electron by all others. It, and the exchange term require knowledge of the position radial wave functions of the other electrons. I am familiar with the algebra to derive the expression as written.

The exchange term, K, is a dense matrix also dependent on the other wave functions, but also on the spin and angular momentum relations between the electrons. The V_k term is found in the paper and is related to the wigner 3-j terms. The last student to do this problem couldn't achieve convergence with this matrix and had to make an approximation. Tonight I'll implement that change and see if it's the real issue, but I don't see why this expression won't work.

1606601985532.png
1606602082475.png

The process is as follows for helium:
1. Initialize the wave functions as the energy level dependent solution of the hydrogen atom hamiltonian with Z = 2, which I solved for numerically and have an accurate solution for in terms of atomic units out to arbitrary radius (ie bohrs and hartrees). ie if I want to study the 1s2s configuration I would set the first electron to the 1st eigenfunction and the second electron to the second eigenfunction.

Problem: This is probably a dumb question, but as far as I can tell, although the energies are right, the total solution doesn't seem close to normalized. I numerically integrated the radial portion as $$\int{r^2*\Psi^{*}*\Psi}dr$$ and got 0.1501 which, since the spherical portion of the hydrogen atom is 1 by design, means this doesn't seem to be normalized.

The paper, and other resources don't talk about it, but when doing numerical calculations do I need to worry about normalization of a wave function? I'd assume no, because in the end it's just a scaling number and should be calculable at the end of everything. Additionally, I tried to normalize my functions at different points in the code, and it actually caused convergence... at an energy of about 50 hartree for both electrons.

2. I initialize my electrons, and calculate my operator for both electrons individually using the above equation which is easy to implement in matlab. I can upload my code later, but I've checked it too many times at this point for the implementation to be the issue assuming the equations are right.

3. I use eigs function in MATLAB to solve for the lowest energy eigenvalues and eigenfunctions of the system to save time. For the ground state I'd only need to calculate the first one and for first excited I can calculate the first two (and use the second).

4. I compare the energy change of each electron individually and sum the total change to check for convergence using a 2-norm for the norm function. It's probably better to sum the energy of both electrons and compare it to the sum of the last energy instead, but looking at outputs, that wouldn't suddenly cause my code to converge and if it did, my energy values aren't matching what the paper got for helium.
4a. If I reach convergence I output the exact wave functions I found.

5. If convergence is not reached, I loop again with the electrons set to the new, calculated eigenfunctions where the 1s electron is set to the lowest energy solution of its operator and the 2s electron is set to the second lowest energy of its operator.

I can give more detail if needed, but it's easiest to skim through the paper.

The stepsize is 0.05 bohr out to 30 bohr radius which is low enough to generate a smooth function and avoid issues with missing oscillations of the wave. The wave also clearly converges for helium after ~10 bohr. Calculation speed isn't an issue either as that's essentially the reason the authors took this approach. The code as written in the paper, and in my code is also designed to easily scale to N electrons for higher Z nuclei. I just want to match the helium solution well enough.

I appreciate any help or discussion I can get. At this point I'm just trying to read what I can and try to better understand the numerical methods since I'm essentially just changing random things in my code hoping it works out.
 

Attachments

  • 1606601994652.png
    1606601994652.png
    5.3 KB · Views: 248
Physics news on Phys.org
I'm not sure the best way to upload the MATLAB code I have if anyone wants to see it. I'd prefer to be able to just upload it directly, but doesn't seeme like I can.
 
DanielA said:
I'm not sure the best way to upload the MATLAB code I have if anyone wants to see it. I'd prefer to be able to just upload it directly, but doesn't seeme like I can.
Hi can you please share the code?
 
DanielA said:
I'm not sure the best way to upload the MATLAB code I have if anyone wants to see it. I'd prefer to be able to just upload it directly, but doesn't seeme like I can.
Hi can you please share the code?
 
@DanielA Hi, I am trying to implement something similar , can you please share the code?
 
Last edited:
Thread 'Unexpected irregular reflection signal from a high-finesse cavity'
I am observing an irregular, aperiodic noise pattern in the reflection signal of a high-finesse optical cavity (finesse ≈ 20,000). The cavity is normally operated using a standard Pound–Drever–Hall (PDH) locking configuration, where an EOM provides phase modulation. The signals shown in the attached figures were recorded with the modulation turned off. Under these conditions, when scanning the laser frequency across a cavity resonance, I expected to observe a simple reflection dip. Instead...

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 24 ·
Replies
24
Views
8K
  • · Replies 2 ·
Replies
2
Views
2K