Classes | |
struct | BoxPotential |
Public Member Functions | |
ScalarFieldArray | get_nXC () const |
return the total (spin) density including core contributions | |
ScalarField | get_nTot () const |
return the total electron density (even in spin polarized situations) | |
void | setup (const Everything &everything) |
void | EdensityAndVscloc (Energies &ener, const ExCorr *alternateExCorr=0) |
double | elecEnergyAndGrad (Energies &ener, ElecGradient *grad=0, ElecGradient *Kgrad=0, bool calc_Hsub=false) |
void | setEigenvectors (int q=-1) |
int | nOccupiedBands (int q) const |
Return the number of occupied bands (f > occupiedThrehsold) for a given state. | |
ScalarFieldArray | KEdensity () const |
Compute the kinetic energy density. | |
ScalarFieldArray | calcDensity () const |
Calculate density using current orthonormal wavefunctions (C) | |
void | orthonormalize (int q) |
Orthonormalise Y to compute C, U and its cohorts for a quantum number q. | |
double | applyHamiltonian (int q, const diagMatrix &Fq, ColumnBundle &HCq, Energies &ener, bool need_Hsub=false) |
void | orthonormalizeGrad (int q, const diagMatrix &Fq, const ColumnBundle &HCq, ColumnBundle &gradYq, double KErollover=1., ColumnBundle *KgradYq=0, matrix *gradBq=0, matrix *KgradBq=0) |
Propagates the gradient wrt orthonormal C (HCq) to gradient wrt Y and B (if given). | |
double | bandEnergyAndGrad (int q, Energies &ener, ColumnBundle *grad=0, ColumnBundle *Kgrad=0) |
Returns the total single particle energy and gradient of all KS orbitals. | |
Public Attributes | |
std::vector< ColumnBundle > | Y |
unconstrained electronic wavefunctions | |
std::vector< matrix > | B |
subspace rotation / auxilliary hamiltonian | |
double | subspaceRotationFactor |
preconditioning factor for subspace rotations / aux hamiltonian relative to wavefunctions | |
std::vector< matrix > | B_evecs |
eigenvectors of B[q] in columns | |
std::vector< diagMatrix > | B_eigs |
eigenvalues of B[q] | |
std::vector< matrix > | Hsub |
Subspace Hamiltonian: Hsub[q]=C[q]^H*C[q]. | |
std::vector< matrix > | Hsub_evecs |
eigenvectors of Hsub[q] in columns | |
std::vector< diagMatrix > | Hsub_eigs |
eigenvalues of Hsub[q] | |
std::vector< ColumnBundle > | C |
orthonormal wavefunctions (after appropriate subspace rotation) | |
std::vector< diagMatrix > | F |
the fillings (diagonal matrices) for each state | |
std::vector< std::vector< matrix > > | VdagC |
std::vector< matrix > | grad_CdagOC |
gradient w.r.t overlap (required for forces when O is atom dependent) | |
ScalarFieldArray | n |
electron density (single ScalarField) or spin density (two ScalarFields [up,dn]) or spin density matrix (four ScalarFields [UpUp, DnDn, Re(UpDn), Im(UpDn)]) | |
ScalarFieldArray | tau |
kinetic energy density including tauCore, if present (computed if a meta GGA is being used) | |
ScalarFieldTilde | d_fluid |
electrostatic potential due to fluid | |
ScalarFieldTilde | V_cavity |
non-electrostatic potential on electrons due to fluid | |
ScalarFieldArray | Vscloc |
ScalarFieldArray | Vtau |
Local part of (optionally spin-dependent) self-consistent potential. | |
std::vector< matrix > | rhoAtom |
Gradient w.r.t kinetic energy density (if meta-GGA) | |
std::vector< matrix > | U_rhoAtom |
Atomic density matrices and gradients w.r.t them (for DFT+U) | |
ScalarFieldArray | Vexternal |
external potential | |
ScalarFieldTilde | rhoExternal |
external charge density | |
bool | rhoExternalSelfEnergy |
whether to include self-energy of rhoExternal in output energy | |
std::vector< BoxPotential > | boxPot |
FluidSolverParams | fluidParams |
parameters for the external box potential | |
std::shared_ptr< struct FluidSolver > | fluidSolver |
string | fluidInitialStateFilename |
string | wfnsFilename |
file to read wavefunctions from | |
std::shared_ptr< struct ColumnBundleReadConversion > | readConversion |
ColumnBundle conversion. | |
bool | isRandom |
indicates whether the electronic state is random (not yet minimized) | |
bool | initLCAO |
initialize wave functions using linear combinations of atomic orbitals | |
string | eigsFilename |
file to read eigenvalues from | |
string | HauxFilename |
file to read auxilliary hamiltonian (B) from (used only for FermiFillingsAux mode) | |
bool | HauxInitialized |
whether Haux has been read in/computed | |
double | overlapCondition |
Current condition number of the orbital overlap matrix (over all states) | |
string | nFilenamePattern |
file pattern to read electron (spin,kinetic) density from | |
string | VFilenamePattern |
file pattern to read electron (spin,kinetic) potential from | |
Friends | |
struct | CommandVexternal |
class | InverseKohnSham |
Adjusts Vexternal to produce target electron density. | |
struct | CommandRhoExternal |
struct | CommandWavefunction |
struct | CommandLcaoParams |
class | Dump |
double ElecVars::applyHamiltonian | ( | int | q, |
const diagMatrix & | Fq, | ||
ColumnBundle & | HCq, | ||
Energies & | ener, | ||
bool | need_Hsub = false |
||
) |
Applies the Kohn-Sham Hamiltonian on the orthonormal wavefunctions C, also computes Hsub if necessary Function is implemented for a single quantum number WARNING: Does not apply exact exchange or +U. Those require the all quantum numbers to be done at once. If fixed hamiltonian, returns the trace of the subspace hamiltonian multiplied by the weight of that quantum number, returns 0 if otherwise.
Compute the terms written as a functional of the electronic density, and its gradient i.e. Vscloc If supplied, alternateExCorr replaces the main exchange and correlaton functional
double ElecVars::elecEnergyAndGrad | ( | Energies & | ener, |
ElecGradient * | grad = 0 , |
||
ElecGradient * | Kgrad = 0 , |
||
bool | calc_Hsub = false |
||
) |
Update and return the electronic system/band structure energy. Optionally compute the gradient, preconditioned gradient and/or the subspace hamiltonian
void ElecVars::setEigenvectors | ( | int | q = -1 | ) |
Set Y and C to eigenvectors of the subspace hamiltonian input variable q controls the quantum number, -1 means all.