JDFTx  1.2.0
Energies.h
1 /*-------------------------------------------------------------------
2 Copyright 2011 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_ENERGIES_H
21 #define JDFTX_ELECTRONIC_ENERGIES_H
22 
23 #include <electronic/common.h>
24 #include <core/EnergyComponents.h>
25 
26 struct Energies
27 {
29 
30  double TS;
31  double F() const { return double(E)-TS; }
32 
33  double muN;
34  double G() const { return F()-muN; }
35 
36  double Eband;
37 
38  Energies();
39  void print(FILE* fp=globalLog) const;
40 };
41 
42 double relevantFreeEnergy(const Everything&);
43 const char* relevantFreeEnergyName(const Everything&);
44 
45 void print_Hsub_eigs(const Everything&);
46 
47 
48 #endif // JDFTX_ELECTRONIC_ENERGIES_H
double G() const
Grand free energy (F-muN)
Definition: Energies.h:34
double Eband
band structure energy (tr Hsub)
Definition: Energies.h:36
double TS
Fillings entropy.
Definition: Energies.h:30
double F() const
Helmholtz energy (Etot-TS)
Definition: Energies.h:31
Definition: Energies.h:26
void print(FILE *fp=globalLog) const
print energies to logPrintf / stream
Energies()
initialize all to 0.
Definition: Everything.h:41
Definition: EnergyComponents.h:36
EnergyComponents E
All components of the internal energy (excluding TS and muN)
Definition: Energies.h:28
Represent components of the (free) energy.
double muN
Fixed electron chemical potential Lagrange multiplier.
Definition: Energies.h:33