The physical model

A KSEModel collects everything that defines what problem is being solved: the nucleus, the number of electrons, and which exchange–correlation approximation stands in for the true electron–electron interaction beyond the (explicit) Hartree term.

AtomicKohnSham.KSEModel — Type
KSEModel(; Z::Real, N::Real, hartree::Real = 1, ex = NoFunctional(1), ec = NoFunctional(1))

Structure for storing the parameters of an extended Kohn–Sham model (LDA/LSDA). Encodes physical and modeling parameters for atomic or ionic simulations.

Arguments

  • Z::Real: Nuclear charge (number of protons).
  • N::Real: Number of electrons.
  • hartree::Real = 1: Scaling factor for the Hartree term:
    • 0 disables electron-electron repulsion.
    • 1 uses the full Hartree interaction.
  • ex: Exchange functional (e.g. a Libxc Functional, or NoFunctional(nspin) to disable it).
  • ec: Correlation functional (same convention as ex).
source

Exchange–correlation functionals

ex and ec accept any of:

  • Libxc.jl functionals, e.g. Functional(:lda_x; n_spin = 1) for Slater exchange, or Functional(:lda_c_pw; n_spin = 2) for Perdew–Wang correlation in a spin-polarized (LSDA) calculation. This gives access to the full LDA/LSDA catalog implemented by Libxc.
  • NoFunctional(n_spin), to disable exchange or correlation entirely (e.g. for a reduced Hartree–Fock-like model).
  • Built-in functionals (BuiltinFunctional), implemented directly in this package to be run at arbitrary precision (Double64, etc.), which Libxc's Float64-only C implementation cannot do. Currently only Slater exchange (:lda_x) is available this way.

ex/ec must agree on the number of spin channels; model.nspin is inferred automatically as max(ex.n_spin, ec.n_spin).

Convenience constructors

For the two most common setups:

AtomicKohnSham.RHF — Function
RHF(; Z::Real, N::Real)

Convenience constructor for the Hartree–Fock model using the extended Kohn–Sham framework.

Creates a KSEModel with the specified nuclear charge Z and number of electrons N, and disables the exchange–correlation.

Arguments

  • Z::Real: Nuclear charge (e.g., 2.0 for helium).
  • N::Real: Number of electrons.

Returns

  • KSEModel with no exchange–correlation and no Hartree term.
source
AtomicKohnSham.Slater — Function
Slater(; Z::Real, N::Real)

Convenience constructor for an extended Kohn–Sham model with the Slater exchange functional.

Creates a KSEModel with the specified nuclear charge Z and number of electrons N, and uses the Slater exchange-only approximation (no correlation term and no Hartree term).

Arguments

  • Z::Real: Nuclear charge (e.g., 10.0 for neon).
  • N::Real: Number of electrons.

Returns

  • KSEModel using the Slater Xα exchange functional.
source

Example

The rest of this manual builds up a single running example — the ground state of a spin-unpolarized sodium atom with the Slater exchange functional — one piece per page.

using AtomicKohnSham
using Libxc

model = KSEModel(Z = 11, N = 11, ex = Functional(:lda_x; n_spin = 1), ec = NoFunctional(1))
model.nspin
1

Continue to Discretization to turn this model into a solvable finite-dimensional problem.