21 #ifndef JDFTX_ELECTRONIC_ELECVARS_H 22 #define JDFTX_ELECTRONIC_ELECVARS_H 24 #include <electronic/common.h> 33 std::vector<ColumnBundle>
C;
35 std::vector<diagMatrix>
F;
41 std::vector< std::vector<matrix> > VdagC;
65 double Vin, Vout, convolve_radius;
67 std::vector<BoxPotential> boxPot;
71 std::shared_ptr<struct FluidSolver> fluidSolver;
72 string fluidInitialStateFilename;
120 std::vector<string> VexternalFilename;
121 friend struct CommandVexternal;
123 string rhoExternalFilename;
124 friend struct CommandRhoExternal;
129 friend struct CommandWavefunction;
130 friend struct CommandLcaoParams;
133 #endif // JDFTX_ELECTRONIC_ELECVARS_H std::shared_ptr< struct ColumnBundleReadConversion > readConversion
ColumnBundle conversion.
Definition: ElecVars.h:76
ScalarFieldArray Vtau
Local part of (optionally spin-dependent) self-consistent potential.
Definition: ElecVars.h:55
std::vector< diagMatrix > Hsub_eigs
eigenvalues of Hsub[q]
Definition: ElecVars.h:39
std::vector< matrix > rhoAtom
Gradient w.r.t kinetic energy density (if meta-GGA)
Definition: ElecVars.h:57
string VFilenamePattern
file pattern to read electron (spin,kinetic) potential from
Definition: ElecVars.h:86
std::vector< ScalarField > ScalarFieldArray
dynamic size collection of real space scalar fields
Definition: ScalarFieldArray.h:32
bool HauxInitialized
whether Haux has been read in/computed
Definition: ElecVars.h:83
std::vector< diagMatrix > F
the fillings (diagonal matrices) for each state
Definition: ElecVars.h:35
ScalarFieldArray tau
kinetic energy density including tauCore, if present (computed if a meta GGA is being used) ...
Definition: ElecVars.h:49
General complex matrix.
Definition: matrix.h:58
ScalarFieldArray Vexternal
external potential
Definition: ElecVars.h:60
Definition: ElecVars.h:63
std::shared_ptr< ScalarFieldTildeData > ScalarFieldTilde
A smart reference-counting pointer to ScalarFieldTildeData.
Definition: ScalarField.h:45
Definition: Energies.h:26
std::vector< diagMatrix > Haux_eigs
auxilliary hamiltonian eigenvalues
Definition: ElecVars.h:34
ScalarFieldArray n
electron density (single ScalarField) or spin density (two ScalarFields [up,dn]) or spin density matr...
Definition: ElecVars.h:44
Real diagonal matrix.
Definition: matrix.h:31
double elecEnergyAndGrad(Energies &ener, ElecGradient *grad=0, ElecGradient *Kgrad=0, bool calc_Hsub=false)
bool isRandom
indicates whether the electronic state is random (not yet minimized)
Definition: ElecVars.h:77
std::vector< matrix > Hsub_evecs
eigenvectors of Hsub[q] in columns
Definition: ElecVars.h:38
ScalarFieldTilde rhoExternal
external charge density
Definition: ElecVars.h:61
std::vector< ColumnBundle > C
orthonormal electronic wavefunctions
Definition: ElecVars.h:33
Definition: ElecMinimizer.h:28
string eigsFilename
file to read eigenvalues from
Definition: ElecVars.h:80
std::vector< matrix > U_rhoAtom
Atomic density matrices and gradients w.r.t them (for DFT+U)
Definition: ElecVars.h:57
ScalarFieldArray get_nXC() const
return the total (spin) density including core contributions
string nFilenamePattern
file pattern to read electron (spin,kinetic) density from
Definition: ElecVars.h:85
ScalarField get_nTot() const
return the total electron density (even in spin polarized situations)
Definition: ElecVars.h:47
void EdensityAndVscloc(Energies &ener, const ExCorr *alternateExCorr=0)
ScalarFieldArray calcDensity() const
Calculate density using current orthonormal wavefunctions (C)
ScalarFieldTilde d_fluid
electrostatic potential due to fluid
Definition: ElecVars.h:51
Definition: Everything.h:41
Definition: ElecVars.h:30
classes ScalarFieldArray, ScalarFieldTildeArray and just enough operators to enable CG w...
double applyHamiltonian(int q, const diagMatrix &Fq, ColumnBundle &HCq, Energies &ener, bool need_Hsub=false)
ScalarFieldArray nAccumulated
ElecVars::n accumulated over an MD trajectory.
Definition: ElecVars.h:45
FluidSolverParams fluidParams
parameters for the external box potential
Definition: ElecVars.h:70
void setEigenvectors()
Set C to eigenvectors of the subspace hamiltonian.
std::shared_ptr< ScalarFieldData > ScalarField
A smart reference-counting pointer to ScalarFieldData.
Definition: ScalarField.h:41
Extra parameters for fluids:
Definition: FluidSolverParams.h:93
ScalarFieldTilde V_cavity
non-electrostatic potential on electrons due to fluid
Definition: ElecVars.h:52
std::vector< matrix > Hsub
Subspace Hamiltonian: Hsub[q]=C[q]^H*C[q].
Definition: ElecVars.h:37
string wfnsFilename
file to read wavefunctions from
Definition: ElecVars.h:75
bool initLCAO
initialize wave functions using linear combinations of atomic orbitals
Definition: ElecVars.h:78
ScalarFieldArray KEdensity() const
Compute the kinetic energy density.
Definition: ColumnBundle.h:30
bool rhoExternalSelfEnergy
whether to include self-energy of rhoExternal in output energy
Definition: ElecVars.h:62
Stores the list of what to dump and when, and implements the functions to do so.
Definition: Dump.h:59
void orthonormalize(int q, matrix *extraRotation=0)