ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hsr_legacy.h
Go to the documentation of this file.
1#ifndef HSR_LEGACY_H
2#define HSR_LEGACY_H
3
7#include "source_cell/klist.h"
11
12#include <fstream>
13#include <string>
14
15// Legacy LCAO_HS_Arrays-based sparse matrix output path (dH/dR, dS/dR, T(R), S(R)).
16// Kept as-is from the former write_hs_r.h; new code should prefer the
17// HContainer-based writers in hsr_writer.h.
18
19namespace ModuleIO
20{
21// Groups the shared format / path / runtime flags threaded through the
22// LCAO_HS_Arrays-based writers. Replaces ten positional parameters that were
23// identical across output_dHR/output_dSR/output_TR.
25{
26 bool binary = false;
27 double sparse_threshold = 0.0;
28 int precision = 8;
29 std::string global_out_dir;
30 std::string global_matrix_dir;
31 std::string calculation;
32 int out_app_flag = 0;
33 int nspin = 1;
34};
35
36void output_dHR(const int& istep,
37 const ModuleBase::matrix& v_eff,
38 const UnitCell& ucell,
39 const Parallel_Orbitals& pv,
40 LCAO_HS_Arrays& HS_Arrays,
41 const Grid_Driver& grid, // mohan add 2024-04-06
42 const TwoCenterBundle& two_center_bundle,
43 const LCAO_Orbitals& orb,
44 const MatROutputOptions& options,
45 const bool gamma_only_local,
46 const int npol,
47 const int nlocal,
48 std::ofstream& ofs_running);
49
50void output_dSR(const int& istep,
51 const UnitCell& ucell,
52 const Parallel_Orbitals& pv,
53 LCAO_HS_Arrays& HS_Arrays,
54 const Grid_Driver& grid, // mohan add 2024-04-06
55 const TwoCenterBundle& two_center_bundle,
56 const LCAO_Orbitals& orb,
57 const MatROutputOptions& options,
58 const bool gamma_only_local,
59 const int npol,
60 const int nlocal,
61 std::ofstream& ofs_running);
62
63void output_TR(const int istep,
64 const UnitCell& ucell,
65 const Parallel_Orbitals& pv,
66 LCAO_HS_Arrays& HS_Arrays,
67 const Grid_Driver& grid,
68 const TwoCenterBundle& two_center_bundle,
69 const LCAO_Orbitals& orb,
70 const std::string& TR_filename,
71 const MatROutputOptions& options,
72 std::ofstream& ofs_running);
73
74template <typename TK>
75void output_SR(const UnitCell& ucell,
77 const Grid_Driver& grid,
78 hamilt::Hamilt<TK>* p_ham,
79 const bool& binary,
80 const double& sparse_threshold,
81 const int precision,
82 const std::string& global_matrix_dir,
83 const std::string& calculation,
84 const int out_app_flag,
85 const int nspin,
86 const int istep,
87 std::ofstream& ofs_running);
88
89} // namespace ModuleIO
90
91#endif
Grid_Driver class for neighbor search interface.
Definition sltk_grid_driver.h:63
Definition lcao_hs_arrays.h:9
Definition orb_read.h:18
Definition matrix.h:15
Definition parallel_orbitals.h:16
Definition two_center_bundle.h:11
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition hamilt.h:17
Internal helpers shared by the R-space sparse text writers. Declared here (instead of duplicated in e...
Definition csr_reader.cpp:8
void output_dHR(const int &istep, const ModuleBase::matrix &v_eff, const UnitCell &ucell, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const Grid_Driver &grid, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, const MatROutputOptions &options, const bool gamma_only_local, const int npol, const int nlocal, std::ofstream &ofs_running)
Definition hsr_legacy.cpp:55
void output_dSR(const int &istep, const UnitCell &ucell, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const Grid_Driver &grid, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, const MatROutputOptions &options, const bool gamma_only_local, const int npol, const int nlocal, std::ofstream &ofs_running)
Definition hsr_legacy.cpp:23
void output_SR(const UnitCell &ucell, Parallel_Orbitals &pv, const Grid_Driver &grid, hamilt::Hamilt< TK > *p_ham, const bool &binary, const double &sparse_threshold, const int precision, const std::string &global_matrix_dir, const std::string &calculation, const int out_app_flag, const int nspin, const int istep, std::ofstream &ofs_running)
Definition hsr_legacy.cpp:102
void output_TR(const int istep, const UnitCell &ucell, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const Grid_Driver &grid, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, const std::string &TR_filename, const MatROutputOptions &options, std::ofstream &ofs_running)
Definition hsr_legacy.cpp:180
Grid_Driver class for neighbor search interface.
Definition hsr_legacy.h:25
int nspin
Definition hsr_legacy.h:33
std::string global_out_dir
Definition hsr_legacy.h:29
std::string calculation
Definition hsr_legacy.h:31
double sparse_threshold
Definition hsr_legacy.h:27
int precision
Definition hsr_legacy.h:28
std::string global_matrix_dir
Definition hsr_legacy.h:30
int out_app_flag
Definition hsr_legacy.h:32
bool binary
Definition hsr_legacy.h:26