This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

The DFT solver, as written

ge.viv

Ordinary Viv that sets the globals the engine reads. Generated by dft/ref/make_deck.py; the pseudopotential parameters come from CP2K's table, never typed.

View on GitHub
# Germanium, diamond structure. LDA closes its gap ENTIRELY -- the classic failure -- and it
# takes a converged cutoff to see it: at silicon's 6 Ha germanium passes for a semiconductor.
#
# dft/run.sh ge it iterative engine: dft/pwdft_it.viv + dft/ge_it_check.viv
#
# GENERATED by dft/ref/make_deck.py from dft/ref/materials.py -- do not edit by hand.
 
# GTH/HGH pseudopotentials, LDA (Pade). GENERATED by dft/pseudo/make_pseudo.py
# from CP2K's GTH_POTENTIALS table -- do not edit by hand.
# S. Goedecker, M. Teter, J. Hutter, PRB 54, 1703 (1996)
# C. Hartwigsen, S. Goedecker, J. Hutter, PRB 58, 3641 (1998)
# species 0: Ge GTH-PADE-q4
NSPEC = 1.0
GTH_NLOC = 4.0 #: GTH_NLOC coefficients C1..C4 of the local part
GTH_NL = 4.0 #: GTH_NL angular momentum channels, l = 0 .. 3
GTH_NPMAX = 3.0 #: GTH_NPMAX at most this many projectors in one channel
ZION = zeros(NSPEC)
RLOC = zeros(NSPEC)
CLOC = zeros(NSPEC, GTH_NLOC)
NPRJ = zeros(NSPEC, GTH_NL) #: NPRJ projectors per (species, l)
RPRJ = zeros(NSPEC, GTH_NL) #: RPRJ projector radius r_l per (species, l)
HPRJ = zeros(NSPEC, GTH_NL, GTH_NPMAX, GTH_NPMAX) #: HPRJ the coupling matrix h^l_ij per (species, l)
ZION[0] = 4.0
RLOC[0] = 0.54
NPRJ[0, 0] = 3.0
RPRJ[0, 0] = 0.49374254
HPRJ[0, 0, 0, 0] = 3.82689099
HPRJ[0, 0, 0, 1] = -0.42611775
HPRJ[0, 0, 0, 2] = -0.32795553
HPRJ[0, 0, 1, 0] = -0.42611775
HPRJ[0, 0, 1, 1] = 1.10023129
HPRJ[0, 0, 1, 2] = 0.84677753
HPRJ[0, 0, 2, 0] = -0.32795553
HPRJ[0, 0, 2, 1] = 0.84677753
HPRJ[0, 0, 2, 2] = -1.34421765
NPRJ[0, 1] = 2.0
RPRJ[0, 1] = 0.60106438
HPRJ[0, 1, 0, 0] = 1.36251781
HPRJ[0, 1, 0, 1] = 0.26511216
HPRJ[0, 1, 1, 0] = 0.26511216
HPRJ[0, 1, 1, 1] = -0.62736987
NPRJ[0, 2] = 1.0
RPRJ[0, 2] = 0.78836851
HPRJ[0, 2, 0, 0] = 0.19120485
 
# --- the crystal: an fcc lattice ---------------------------------------------
ALAT = 10.68 #: ALAT lattice constant, bohr
A = [[0.0, ALAT / 2.0, ALAT / 2.0],
[ALAT / 2.0, 0.0, ALAT / 2.0],
[ALAT / 2.0, ALAT / 2.0, 0.0]] #: A primitive vectors, one per ROW
NAT = 2.0
ATSPEC = [0.0, 0.0] #: ATSPEC species index of each atom
ATFRAC = [[0.125, 0.125, 0.125],
[-0.125, -0.125, -0.125]] #: ATFRAC positions, fractions of A
 
# --- the calculation --------------------------------------------------------
ECUT = 14.0 #: ECUT plane-wave cutoff, hartree
NBANDS = 8.0 #: NBANDS bands computed at every k-point
SMEAR = 0.0 #: SMEAR Fermi-Dirac width, hartree; 0 for an insulator
NKMESH = 2.0 #: NKMESH the k-mesh is NKMESH^3, shifted (dft/kmesh.viv)
MIX = 0.6 #: MIX the damping in the Anderson mixer (dft/pw_common.viv)
SCF_TOL = 1.0e-9
MAXIT = 80.0
NITER = 3.0 #: NITER LOBPCG steps per k-point per SCF iteration (iterative engine)
NITER_BANDS = 60.0 #: NITER_BANDS at most this many LOBPCG steps per band-path point, from a cold start
EIG_TOL = 1.0e-5 #: EIG_TOL residual norm |H psi - eps psi| every band that matters must reach
 
# --- the band path: L -> Gamma -> X ------------------------------------------
NCORNER = 3.0
CORNER = [[0.5, 0.5, 0.5],
[0.0, 0.0, 0.0],
[0.5, 0.0, 0.5]]
NSEG = 30.0 #: NSEG points per path segment; the figure has 2 NSEG + 1