JDFTx  1.1.0
SCFparams.h
1 /*-------------------------------------------------------------------
2 Copyright 2013 Deniz Gunceler, Ravishankar Sundararaman
3 
4 This file is part of JDFTx.
5 
6 JDFTx is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 JDFTx is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with JDFTx. If not, see <http://www.gnu.org/licenses/>.
18 -------------------------------------------------------------------*/
19 
20 #ifndef JDFTX_ELECTRONIC_SCFPARAMS_H
21 #define JDFTX_ELECTRONIC_SCFPARAMS_H
22 
23 #include <core/Util.h>
24 #include <core/PulayParams.h>
25 #include <vector>
26 
27 struct SCFparams : public PulayParams
28 {
29  int nEigSteps;
31 
32  string historyFilename;
33 
37  }
39 
40  double qKerker;
41  double qKappa;
42 
43  bool verbose;
44  double mixFractionMag;
45 
46  struct EigenShift
47  { int q;
48  int n;
49  double shift;
50  bool fromHOMO;
51  };
52  std::vector<EigenShift> eigenShifts;
53 
54  SCFparams()
55  { nEigSteps = 2; //for Davidson; the default for CG is 40 (and set by the command)
56  eigDiffThreshold = 1e-8;
57  mixedVariable = MV_Potential;
58  qKerker = 0.8;
59  qKappa = -1.;
60  verbose = false;
61  mixFractionMag = 1.5;
62  }
63 };
64 
65 #endif // JDFTX_ELECTRONIC_SCFPARAMS_H
double shift
Energy shift.
Definition: SCFparams.h:49
bool verbose
Whether the inner eigensolver will print progress.
Definition: SCFparams.h:43
double qKappa
wavevector controlling long-range damping (if negative, auto-set to zero or fluid Debye wave-vector a...
Definition: SCFparams.h:41
int n
Band index.
Definition: SCFparams.h:48
string historyFilename
Read SCF history in order to resume a previous run.
Definition: SCFparams.h:32
Definition: SCFparams.h:46
int q
Quantum number.
Definition: SCFparams.h:47
Mix the local electronic potential (Vscloc) and the kinetic energy potential (Vtau) ...
Definition: SCFparams.h:36
Parameters to control Pulay mixing.
Definition: PulayParams.h:26
bool fromHOMO
Whether n-indexing is done from HOMO (or not)
Definition: SCFparams.h:50
std::vector< EigenShift > eigenShifts
A list of all eigenshifts, used for non-ground-state calculations.
Definition: SCFparams.h:52
enum SCFparams::MixedVariable mixedVariable
Whether we are mixing the density or the potential.
double mixFractionMag
Mixing fraction for magnetization density / potential.
Definition: SCFparams.h:44
Mix electron density (n) and kinetic energy density (tau)
Definition: SCFparams.h:35
Definition: SCFparams.h:27
Miscellaneous utilities.
int nEigSteps
number of steps of the eigenvalue solver per iteration (use elecMinParams.nIterations if 0) ...
Definition: SCFparams.h:29
double qKerker
Wavevector controlling Kerker preconditioning.
Definition: SCFparams.h:40
MixedVariable
Definition: SCFparams.h:34
double eigDiffThreshold
convergence threshold on the RMS change of eigenvalues
Definition: SCFparams.h:30