question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Obtaining the Slater determinant of a HF calculation

See original GitHub issue

Hi,

I was wondering whether there is an option to retrieve the matrix of molecular orbitals (which is then reduced by a determinant). From my understanding, I should be able to retrieve a NxN matrix for a specific N-electron system.

I thought the following code would result in the molecular orbital matrix of oxygen with a random electron configuration:

import numpy as np
from pyscf import gto, scf

mol = gto.Mole(atom=[
  ['O', (0, 0, 0)],
], basis='sto-6g', unit='bohr', spin=0, charge=0)
mol.build()

mean_field = scf.RHF(mol)
mean_field.kernel()

electrons = np.random.randn(8, 3)

ao = mol.eval_gto('GTOval_sph', electrons)
mo = ao @ mean_field.mo_coeff
print(mo.shape)

Result:

(8, 5)

However, isn’t the matrix supposed to be a NxN matrix? I don’t quite understand where the 5 comes from.

Thank you!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
tberkelcommented, May 18, 2021

He doesn’t want the matrix of MOs coefficients in the basis of AOs, but rather the matrix (at a specified set of electron coordinates) whose determinant gives the value of the N-electron wavefunction, i.e. the matrix here: https://wikimedia.org/api/rest_v1/media/math/render/svg/343779d82465137a7292f331e1e8f178307ca60d

On Tue, May 18, 2021 at 6:18 PM Susi Lehtola @.***> wrote:

import numpy as np from pyscf import gto, scf

mol = gto.Mole(atom=[ [‘O’, (0, 0, 0)], ], basis=‘sto-6g’, unit=‘bohr’, spin=0, charge=0) mol.build()

mean_field = scf.RHF(mol) mean_field.kernel() print(mean_field.mo_coeff.shape)

mo_coeff is a 5x5 matrix.

STO-6G is 2s1p for oxygen. This gives 5 spatial orbitals, or 10 spin-orbitals. Oxygen has 8 electrons; this means that you have 2 spin-orbitals that will be unoccupied; however, the 8 occupied spin-orbitals (4 spin-up and 4 spin-down in the present calculation) are each expanded in terms of the 5 basis functions.

Minimal basis sets are unreliable even at the Hartree-Fock level of theory.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/pyscf/pyscf/issues/946#issuecomment-843602495, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGAJC6NRQYZS77OBVAJOHDTOLRUBANCNFSM45CUTRLQ .

1reaction
tberkelcommented, May 20, 2021

I think you don’t want the np.concatenate() step. For the wavefunction, you could use the product of the determinants of spin up and spin down. So you could make an (N/2)x(N/2) matrix for spin up and another one for spin down.

On Thu, May 20, 2021 at 11:12 AM Susi Lehtola @.***> wrote:

Well the spin functions are missing from the matrix. I’m not sure how they should be evaluated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pyscf/pyscf/issues/946#issuecomment-845208563, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGAJC7V3OQAJBLF3SB4ALDTOURG5ANCNFSM45CUTRLQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slater Determinant - an overview | ScienceDirect Topics
The CIS wave function is obtained through the addition of a rather small number of new Slater determinants. In the HF ground state...
Read more >
Chapter 18 The single Slater determinant wavefunction ...
This prescription for avoiding spin contamination (i.e., carrying out the UHF calculation and then forming a new spin-pure Ψ) is referred to as...
Read more >
Slater determinant - Wikipedia
In quantum mechanics, a Slater determinant is an expression that describes the wave function of a multi-fermionic system. It satisfies anti-symmetry ...
Read more >
Hartree-Fock Method
For a single Slater determinant wave function the total charge density is simply the sum of the charge densities of the various orbitalsHF....
Read more >
9.3 The Hartree-Fock Approximation
The final step is to find the orbitals that produce the best approximation of the true wave function using such a single determinant....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found