JDFTx  1.2.0
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;
40 
41  ElecEigenAlgo elecEigenAlgo;
42  BasisKdep basisKdep;
43  double Ecut, EcutRho;
44 
47 
50 
55 
58 
59  bool scf;
61  bool dumpOnly;
62 
64  : fixed_H(false),
65  cacheProjectors(true), davidsonBandRatio(1.1),
66  elecEigenAlgo(ElecEigenDavidson), basisKdep(BasisKpointDep), Ecut(0), EcutRho(0), dragWavefunctions(true),
67  fluidGummel_nIterations(10), fluidGummel_Atol(1e-5),
68  shouldPrintEigsFillings(false), shouldPrintEcomponents(false), shouldPrintMuSearch(false), shouldPrintKpointsBasis(false),
69  subspaceRotationFactor(30.), subspaceRotationAdjust(true), scf(false), convergeEmptyStates(false), dumpOnly(false)
70  {
71  }
72 };
73 #endif // JDFTX_ELECTRONIC_CONTROL_H
Control()
run a single-electronic-point energy evaluation and process the end dump
Definition: Control.h:63
double EcutRho
energy cutoff for electrons and charge density grid (EcutRho=0 => EcutRho = 4 Ecut) ...
Definition: Control.h:43
ElecEigenAlgo elecEigenAlgo
Eigenvalue algorithm.
Definition: Control.h:41
BasisKdep basisKdep
k-dependence of basis
Definition: Control.h:42
A template to ease option parsing (maps enums <–> strings)
Definition: Util.h:179
double davidsonBandRatio
ratio of number of Davidson working bands to actual bands in system (>= 1)
Definition: Control.h:39
bool subspaceRotationAdjust
whether to automatically tune subspace rotation factor
Definition: Control.h:57
vector3 lattMoveScale
preconditioning factor for each lattice vector during lattice minimization
Definition: Control.h:46
bool shouldPrintMuSearch
whether mu bisection progress should be printed
Definition: Control.h:53
bool shouldPrintEcomponents
whether energy components should be printed at each iteration
Definition: Control.h:52
int fluidGummel_nIterations
max iterations of the fluid<->electron self-consistency loop
Definition: Control.h:48
bool dragWavefunctions
whether to drag wavefunctions using atomic orbital projections on ionic steps
Definition: Control.h:45
double fluidGummel_Atol
stopping free-energy tolerance for the fluid<->electron self-consistency loop
Definition: Control.h:49
bool convergeEmptyStates
whether SCF iteration or total energy minimizer will be called
Definition: Control.h:60
bool shouldPrintKpointsBasis
whether individual kpoint and basis details should be printed at the beginning
Definition: Control.h:54
Definition: Control.h:34
bool dumpOnly
whether to converge empty states after every electronic minimization
Definition: Control.h:61
bool shouldPrintEigsFillings
whether eigenvalues and fillings should be printed at each iteration
Definition: Control.h:51
bool cacheProjectors
whether to cache nonlocal projectors
Definition: Control.h:38
double subspaceRotationFactor
preconditioning factor for subspace rotations / aux hamiltonian relative to wavefunctions ...
Definition: Control.h:56
bool fixed_H
fixed Hamiltonian (band structure) mode for electronic sector
Definition: Control.h:37