Repository navigation
Expand file tree
/
Copy pathpw_others.cpp
More file actions
90 lines (79 loc) · 3.12 KB
/
Copy pathpw_others.cpp
File metadata and controls
90 lines (79 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include "esolver_ks_pw.h"
#include "source_base/global_variable.h"
#include "source_pw/module_pwdft/elecond.h"
#include "source_io/input_conv.h"
#include "source_io/output_log.h"
#include <iostream>
//--------------temporary----------------------------
#include "source_estate/module_charge/symmetry_rho.h"
#include "source_estate/occupy.h"
#include "source_hamilt/module_ewald/H_Ewald_pw.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/print_info.h"
//-----force-------------------
#include "source_pw/module_pwdft/forces.h"
//-----stress------------------
#include "source_pw/module_pwdft/stress_pw.h"
//---------------------------------------------------
#include "source_base/memory.h"
#include "source_base/module_device/device.h"
#include "source_estate/elecstate_pw.h"
#include "source_hamilt/module_vdw/vdw.h"
#include "source_pw/module_pwdft/hamilt_pw.h"
#include "source_hsolver/diago_iter_assist.h"
#include "source_hsolver/hsolver_pw.h"
#include "source_hsolver/kernels/dngvd_op.h"
#include "source_base/kernels/math_kernel_op.h"
#include "source_io/berryphase.h"
#include "source_io/numerical_basis.h"
#include "source_io/numerical_descriptor.h"
#include "source_io/to_wannier90_pw.h"
#include "source_io/winput.h"
#include "source_io/write_elecstat_pot.h"
#include "source_io/module_parameter/parameter.h"
#include <ATen/kernels/blas.h>
#include <ATen/kernels/lapack.h>
#include "source_base/formatter.h"
// mohan add 2025-03-06
#include "source_io/cal_test.h"
namespace ModuleESolver {
template <typename T, typename Device>
void ESolver_KS_PW<T, Device>::others(UnitCell& ucell, const int istep)
{
ModuleBase::TITLE("ESolver_KS_PW", "others");
const std::string cal_type = PARAM.inp.calculation;
if (cal_type == "test_memory")
{
Cal_Test::test_memory(ucell.nat,
ucell.ntype,
ucell.GGT,
this->pw_rho,
this->pw_wfc,
this->p_chgmix->get_mixing_mode(),
this->p_chgmix->get_mixing_ndim());
}
else if (cal_type == "gen_bessel")
{
Numerical_Descriptor nc;
nc.output_descriptor(ucell,
this->psi[0],
PARAM.inp.bessel_descriptor_lmax,
PARAM.inp.bessel_descriptor_rcut,
PARAM.inp.bessel_descriptor_tolerence,
this->kv.get_nks());
ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "GENERATE DESCRIPTOR FOR DEEPKS");
}
else
{
ModuleBase::WARNING_QUIT("ESolver_KS_PW::others",
"CALCULATION type not supported");
}
return;
}
template class ESolver_KS_PW<std::complex<float>, base_device::DEVICE_CPU>;
template class ESolver_KS_PW<std::complex<double>, base_device::DEVICE_CPU>;
#if ((defined __CUDA) || (defined __ROCM))
template class ESolver_KS_PW<std::complex<float>, base_device::DEVICE_GPU>;
template class ESolver_KS_PW<std::complex<double>, base_device::DEVICE_GPU>;
#endif
} // namespace ModuleESolver