JDFTx  1.2.0
PulayParams.h
1 /*-------------------------------------------------------------------
2 Copyright 2015 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_CORE_PULAYPARAMS_H
21 #define JDFTX_CORE_PULAYPARAMS_H
22 
23 #include <cstdio>
24 
27 {
28  FILE* fpLog;
29  const char* linePrefix;
30  const char* energyLabel;
31  const char* energyFormat;
32 
36 
37  int history;
38  double mixFraction;
39  double qMetric;
40 
41  PulayParams()
42  : fpLog(stdout), linePrefix("Pulay: "), energyLabel("E"), energyFormat("%22.15le"),
43  nIterations(50), energyDiffThreshold(1e-8), residualThreshold(1e-7),
44  history(10), mixFraction(0.5), qMetric(0.8)
45  {
46  }
47 };
48 
49 #endif //JDFTX_CORE_PULAYPARAMS_H
double qMetric
Wavevector controlling the metric for overlaps.
Definition: PulayParams.h:39
double energyDiffThreshold
convergence threshold for energy difference between successive iterations
Definition: PulayParams.h:34
int nIterations
maximum iterations (single point calculation if 0)
Definition: PulayParams.h:33
const char * linePrefix
prefix for each output line of Pulay (default "Pulay: ")
Definition: PulayParams.h:29
Parameters to control Pulay mixing.
Definition: PulayParams.h:26
const char * energyFormat
printf format for the minimized quantity (default "%22.15le")
Definition: PulayParams.h:31
FILE * fpLog
Stream to log iterations to.
Definition: PulayParams.h:28
double residualThreshold
convergence threshold on the residual
Definition: PulayParams.h:35
double mixFraction
Mixing fraction for total density / potential.
Definition: PulayParams.h:38
int history
Number of past residuals and vectors that are cached and used for mixing.
Definition: PulayParams.h:37
const char * energyLabel
Label for the minimized quantity (default "E")
Definition: PulayParams.h:30