ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
io_dmk.h
Go to the documentation of this file.
1#ifndef DM_IO_H
2#define DM_IO_H
3
6
7#include <string>
8#include <vector>
9
10namespace ModuleIO {
11
20std::string dmk_gen_fname(const bool gamma_only, const int ispin, const int ik);
21
28void dmk_write_ucell(std::ofstream& ofs, const UnitCell* ucell);
29
35void dmk_read_ucell(std::ifstream& ifs);
36
40void dmk_readData(std::ifstream& ifs, double& data);
41
45void dmk_readData(std::ifstream& ifs, std::complex<double>& data);
46
60template <typename T>
61bool read_dmk(const int nspin,
62 const int nk,
63 const Parallel_2D& pv,
64 const std::string& dmk_dir,
65 std::vector<std::vector<T>>& dmk,
66 std::ofstream &ofs_running);
67
81template <typename T>
82void write_dmk(const std::vector<std::vector<T>>& dmk,
83 const int precision,
84 const std::vector<double>& efs,
85 const UnitCell* ucell,
86 const Parallel_2D& pv);
87
88} // namespace ModuleIO
89
90#endif // IO_DMK_H
This class packs the basic information of 2D-block-cyclic parallel distribution of an arbitrary matri...
Definition parallel_2d.h:12
Definition unitcell.h:16
This class has two functions: restart psi from the previous calculation, and write psi to the disk.
Definition cal_dos.h:9
void write_dmk(const std::vector< std::vector< T > > &dmk, const int precision, const std::vector< double > &efs, const UnitCell *ucell, const Parallel_2D &pv)
Writes the DMK data to a file.
Definition io_dmk.cpp:282
bool read_dmk(const int nspin, const int nk, const Parallel_2D &pv, const std::string &dmk_dir, std::vector< std::vector< T > > &dmk, std::ofstream &ofs_running)
Reads the DMK data from a file.
Definition io_dmk.cpp:149
void dmk_read_ucell(std::ifstream &ifs)
Reads the unit cell information lines in a DMK file.
Definition io_dmk.cpp:102
void dmk_write_ucell(std::ofstream &ofs, const UnitCell *ucell)
Writes the unit cell information to a DMK file.
Definition io_dmk.cpp:72
std::string dmk_gen_fname(const bool gamma_only, const int ispin, const int ik)
Generates the filename for the DMK file based on the given parameters.
Definition io_dmk.cpp:58
void dmk_readData(std::ifstream &ifs, double &data)
Read one double from a file.
Definition io_dmk.cpp:124