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

cu.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
# Copper, fcc, with its 3d shell in the valence: 11 electrons, five flat d bands 2-5 eV below
# the Fermi level, and ~1400 plane waves per k-point -- so the ITERATIVE engine only.
#
# dft/run.sh cu it iterative engine: dft/pwdft_it.viv + dft/cu_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: Cu GTH-PADE-q11
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] = 11.0
RLOC[0] = 0.53
NPRJ[0, 0] = 3.0
RPRJ[0, 0] = 0.42373431
HPRJ[0, 0, 0, 0] = 3.88805001
HPRJ[0, 0, 0, 1] = -1.26901549
HPRJ[0, 0, 0, 2] = 0.55872509
HPRJ[0, 0, 1, 0] = -1.26901549
HPRJ[0, 0, 1, 1] = 3.27658391
HPRJ[0, 0, 1, 2] = -1.44262198
HPRJ[0, 0, 2, 0] = 0.55872509
HPRJ[0, 0, 2, 1] = -1.44262198
HPRJ[0, 0, 2, 2] = 2.29009139
NPRJ[0, 1] = 2.0
RPRJ[0, 1] = 0.57217697
HPRJ[0, 1, 0, 0] = 1.75127242
HPRJ[0, 1, 0, 1] = -0.1584422
HPRJ[0, 1, 1, 0] = -0.1584422
HPRJ[0, 1, 1, 1] = 0.37494269
NPRJ[0, 2] = 1.0
RPRJ[0, 2] = 0.26614275
HPRJ[0, 2, 0, 0] = -12.67695749
 
# --- the crystal: an fcc lattice ---------------------------------------------
ALAT = 6.82 #: 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 = 1.0
ATSPEC = [0.0] #: ATSPEC species index of each atom
ATFRAC = [[0.0, 0.0, 0.0]] #: ATFRAC positions, fractions of A
 
# --- the calculation --------------------------------------------------------
ECUT = 50.0 #: ECUT plane-wave cutoff, hartree
NBANDS = 12.0 #: NBANDS bands computed at every k-point
SMEAR = 0.01 #: SMEAR Fermi-Dirac width, hartree; 0 for an insulator
NKMESH = 4.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