JDFTx  1.2.0
DOS.h
1 /*-------------------------------------------------------------------
2 Copyright 2012 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_DOS_H
21 #define JDFTX_ELECTRONIC_DOS_H
22 
23 #include <electronic/common.h>
24 #include <electronic/ElecInfo.h>
25 #include <core/vector3.h>
26 
28 class DOS
29 {
30 public:
31 
32 
34  struct Weight
35  {
40  };
42 
45 
47  enum Type
48  { Total,
53  File,
56  };
58 
60 
62  double radius;
63 
64  size_t specieIndex;
65  size_t atomIndex;
66 
67  string filename;
68 
69  struct OrbitalDesc
70  { int l, m, s; unsigned n;
71  SpinType spinType;
72  OrbitalDesc(int l=0, int m=0, int s=0, SpinType spinType=SpinNone) : l(l), m(m), s(s), n(0), spinType(spinType) {}
73  void parse(string desc);
74  operator string() const;
75  bool operator<(const OrbitalDesc&) const;
76  };
77  OrbitalDesc orbitalDesc;
78 
79  string getDescription(const Everything&) const;
80  };
81 
82  std::vector<Weight> weights;
83  double Etol;
84  double Esigma;
85 
86  DOS();
87  void setup(const Everything&);
88  void dump();
89 private:
90  const Everything* e;
91 };
92 
93 #endif // JDFTX_ELECTRONIC_DOS_H
density of states within an arbitrary planar slice
Definition: DOS.h:49
void setup(const Everything &)
initialize
vector3 Mhat
Treatment of spin in non-collinear calculations:
Definition: DOS.h:44
Type type
weight function type
Definition: DOS.h:57
Do not weight density of states by fillings.
Definition: DOS.h:38
double Etol
tolerance for identifying eigenvalues (energy resolution) (default: 1e-6)
Definition: DOS.h:83
SpinType spinType
SpinOrbit => relativistic spec, SpinZ => Up/Dn, SpinNone => no spin (collinear) (Note different meani...
Definition: DOS.h:71
Type
Weight-function type.
Definition: DOS.h:47
FillingMode fillingMode
treatment of band/state fillings
Definition: DOS.h:41
FillingMode
Treatment of band/state fillings.
Definition: DOS.h:37
unsigned n
pseudo-atom quantum numbers (m = l+1 is used to signify total l-contribution)
Definition: DOS.h:70
size_t specieIndex
Specie index for atom-centered modes.
Definition: DOS.h:64
density of states inside an arbitrary sphere
Definition: DOS.h:50
string filename
Weight-function input filename for File mode.
Definition: DOS.h:67
Lowdin orthonormalized-atomic-orbital projected density of states.
Definition: DOS.h:55
size_t atomIndex
Atom index for atom-centered modes.
Definition: DOS.h:65
void dump()
dump density of states to file (filename obtained from Dump)
density of states with an arbitrary weight function read from a file
Definition: DOS.h:53
Weight density of states by fillings.
Definition: DOS.h:39
double Esigma
optional gaussian width in spectrum
Definition: DOS.h:84
density of states in a sphere centered on an atom
Definition: DOS.h:52
std::vector< Weight > weights
list of weight functions (default: total DOS only)
Definition: DOS.h:82
double radius
radius for sphere modes or half-width for slice modes (bohrs)
Definition: DOS.h:62
total density of states in unit cell
Definition: DOS.h:48
density of states in a planar slice centered on an atom
Definition: DOS.h:51
Definition: Everything.h:41
atomic-orbital projected density of states
Definition: DOS.h:54
bool operator<(const OrbitalDesc &) const
so that OrbitalDesc can be used as a key
void parse(string desc)
set values from a string (throws a string exception on invalid input)
vector3< int > direction
lattice plane specification for slice mode
Definition: DOS.h:59
(Weighted-) density of states calculator
Definition: DOS.h:28
std::basic_string< char, ichar_traits > string
Case-insensitive string.
Definition: string.h:42
string getDescription(const Everything &) const
return a descriptive string
Weight-function definition.
Definition: DOS.h:34
Definition: DOS.h:69
vector3 center
center of slice/sphere in lattice coordinates
Definition: DOS.h:61