ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
cal_dos.h
Go to the documentation of this file.
1#ifndef DOS_H
2#define DOS_H
3
4#include <array>
5#include <vector>
8
9namespace ModuleIO
10{
11
12 // Per-energy rows in text column order for one spin channel.
13 using DosSpectrum = std::vector<std::array<double, 5>>;
14
15 void prepare_dos(std::ofstream& ofs_running,
16 const elecstate::Efermi &energy_fermi,
17 const ModuleBase::matrix& ekb,
18 const int nks,
19 const int nbands,
20 const double& dos_edelta_ev,
21 const double& dos_scale,
22 double &emax,
23 double &emin,
24 const bool dos_setemax,
25 const double dos_emax_ev,
26 const bool dos_setemin,
27 const double dos_emin_ev,
28 const bool two_fermi);
29
30 bool cal_dos(const int &is,
31 const std::string &fn,// file address for DOS.
32 const double &de_ev, // delta energy in ev.
33 const double &emax_ev,// maximal energy in ev.
34 const double &emin_ev,// minimal energy in ev.
35 const double &bcoeff,
36 const int &nks, //number of k points
37 const int &nkstot, // total number of k points
38 const std::vector<double> &wk,//weight of k points
39 const std::vector<int> &isk,
40 const int &nbands,// number of bands
41 const ModuleBase::matrix &ekb, //store energy for each k point and each band
42 const ModuleBase::matrix &wg, //weight of (kpoint,bands))
43 const int istep_in, // ionic_step
44 const int out_app_flag, // 0: no append, 1: append, 2: subdirectory
45 const int precision, // number of decimal places in the DOS file
46 const int bndpar, // number of band parallel groups
47 DosSpectrum* spectrum); // collect rank-zero rows for NPY output when supplied
48
49}
50
51#endif
Definition matrix.h:15
This file contains all energies about first-principle calculations.
Internal helpers shared by the R-space sparse text writers. Declared here (instead of duplicated in e...
Definition csr_reader.cpp:8
bool cal_dos(const int &is, const std::string &fn, const double &de_ev, const double &emax_ev, const double &emin_ev, const double &bcoeff, const int &nks, const int &nkstot, const std::vector< double > &wk, const std::vector< int > &isk, const int &nbands, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const int istep_in, const int out_app_flag, const int precision, const int bndpar, DosSpectrum *spectrum)
Definition cal_dos.cpp:98
void prepare_dos(std::ofstream &ofs_running, const elecstate::Efermi &energy_fermi, const ModuleBase::matrix &ekb, const int nks, const int nbands, const double &dos_edelta_ev, const double &dos_scale, double &emax, double &emin, const bool dos_setemax, const double dos_emax_ev, const bool dos_setemin, const double dos_emin_ev, const bool two_fermi)
Definition cal_dos.cpp:11
std::vector< std::array< double, 5 > > DosSpectrum
Definition cal_dos.h:13
Definition fp_energy.h:65