JDFTx  1.1.1
Control.h
1 /*-------------------------------------------------------------------
2 Copyright 2011 Ravishankar Sundararaman
3 Copyright 1996-2003 Sohrab Ismail-Beigi
4 
5 This file is part of JDFTx.
6 
7 JDFTx is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 JDFTx is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with JDFTx. If not, see <http://www.gnu.org/licenses/>.
19 -------------------------------------------------------------------*/
20 
21 #ifndef JDFTX_ELECTRONIC_CONTROL_H
22 #define JDFTX_ELECTRONIC_CONTROL_H
23 
24 #include <electronic/common.h>
25 #include <core/vector3.h>
26 
28 enum BasisKdep { BasisKpointDep, BasisKpointIndep } ;
29 static EnumStringMap<BasisKdep> kdepMap(BasisKpointDep, "kpoint-dependent", BasisKpointIndep, "single" );
30 
32 enum ElecEigenAlgo { ElecEigenCG, ElecEigenDavidson };
33 
34 class Control
35 {
36 public:
37  bool fixed_H;
38  bool fixOccupied;
42 
43  ElecEigenAlgo elecEigenAlgo;
44  BasisKdep basisKdep;
45  double Ecut, EcutRho;
46 
49 
52 
55 
60 
61  bool invertKS;
63  double invertKS_sigma;
65 
66  bool scf;
68  bool dumpOnly;
69 
71  : fixed_H(false),
72  fixOccupied(false), occupiedThreshold(0), cacheProjectors(true), davidsonBandRatio(1.1),
73  elecEigenAlgo(ElecEigenDavidson), basisKdep(BasisKpointDep), Ecut(0), EcutRho(0), dragWavefunctions(true),
74  fluidGummel_nIterations(10), fluidGummel_Atol(1e-5),
75  overlapConditionThreshold(1.5), overlapCheckInterval(20),
76  shouldPrintEigsFillings(false), shouldPrintEcomponents(false), shouldPrintMuSearch(false), shouldPrintKpointsBasis(false),
77  invertKS(false), invertKS_nonlocal(true), invertKS_sigma(0.), scf(false), convergeEmptyStates(false), dumpOnly(false)
78  {
79  }
80 };
81 #endif // JDFTX_ELECTRONIC_CONTROL_H
Control()
run a single-electronic-point energy evaluation and process the end dump
Definition: Control.h:70
double occupiedThreshold
fillings threshold for occupied states
Definition: Control.h:39
double EcutRho
energy cutoff for electrons and charge density grid (EcutRho=0 => EcutRho = 4 Ecut) ...
Definition: Control.h:45
double overlapConditionThreshold
Threshold for overlap condition number at which wavefunctions are re-orthogonalized.
Definition: Control.h:53
ElecEigenAlgo elecEigenAlgo
Eigenvalue algorithm.
Definition: Control.h:43
BasisKdep basisKdep
k-dependence of basis
Definition: Control.h:44
A template to ease option parsing (maps enums <–> strings)
Definition: Util.h:168
double davidsonBandRatio
ratio of number of Davidson working bands to actual bands in system (>= 1)
Definition: Control.h:41
bool invertKS
Kohn-Sham inversion (sequence of band structure solves to find optimum potential) ...
Definition: Control.h:61
vector3 lattMoveScale
preconditioning factor for each lattice vector during lattice minimization
Definition: Control.h:48
int overlapCheckInterval
Number of electronic steps between overlap condition checks.
Definition: Control.h:54
bool shouldPrintMuSearch
whether mu bisection progress should be printed
Definition: Control.h:58
bool shouldPrintEcomponents
whether energy components should be printed at each iteration
Definition: Control.h:57
int fluidGummel_nIterations
max iterations of the fluid<->electron self-consistency loop
Definition: Control.h:50
bool dragWavefunctions
whether to drag wavefunctions using atomic orbital projections on ionic steps
Definition: Control.h:47
double fluidGummel_Atol
stopping free-energy tolerance for the fluid<->electron self-consistency loop
Definition: Control.h:51
double invertKS_sigma
bandwidth cutoff for the external potential
Definition: Control.h:63
bool convergeEmptyStates
whether SCF iteration or total energy minimizer will be called
Definition: Control.h:67
bool shouldPrintKpointsBasis
whether individual kpoint and basis details should be printed at the beginning
Definition: Control.h:59
bool fixOccupied
whether to hold occupied orbitals fixed in band structure calculations
Definition: Control.h:38
bool invertKS_nonlocal
whether to retain non-local portions of pseudopotential for Kohn-Sham inversion
Definition: Control.h:62
string invertKS_chiGuessFilename
filename pattern of variables (wfns/fillings/eigenvals) generating guess chi
Definition: Control.h:64
Definition: Control.h:34
bool dumpOnly
whether to converge empty states after every electronic minimization
Definition: Control.h:68
bool shouldPrintEigsFillings
whether eigenvalues and fillings should be printed at each iteration
Definition: Control.h:56
bool cacheProjectors
whether to cache nonlocal projectors
Definition: Control.h:40
bool fixed_H
fixed Hamiltonian (band structure) mode for electronic sector
Definition: Control.h:37