Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
eb60634
change ucell in module_io
A-006 Dec 3, 2024
410a051
change ucell in module_io/cal_r_overlap.cpp
A-006 Dec 3, 2024
d6be570
change ucell in module_io/cal_test.cpp
A-006 Dec 3, 2024
0a768b4
change ucell in module_io/get_wf_lcao.cpp
A-006 Dec 3, 2024
cecacc8
change ucell in module_io/numerical_desciptor.cpp
A-006 Dec 3, 2024
268f39f
change ucell in module_io/read_wfc_to_rho.cpp
A-006 Dec 3, 2024
6c346f3
change ucell in module_io/td_current_io.cpp
A-006 Dec 3, 2024
1b7aae8
change ucell in module_io/to_wannier90_lcao_in_pw.cpp
A-006 Dec 3, 2024
435a7b6
change ucell in module_io/to_wannier90_pw.cpp
A-006 Dec 3, 2024
99d62be
change ucell in module_io/to_wannier90_lcao.cpp
A-006 Dec 3, 2024
2319777
change ucell in module_io/to_wannier90.cpp
A-006 Dec 3, 2024
141c7ad
change ucell in module_io/write_vxc_lip.hpp.cpp
A-006 Dec 3, 2024
6387181
change ucell in module_io/unk_overlap_lcao.cpp
A-006 Dec 3, 2024
99afe4f
change ucell in module_io/write_dipole.cpp
A-006 Dec 3, 2024
4a56549
change ucell in module_io/write_dmr.cpp
A-006 Dec 3, 2024
47eca79
change ucell in module_io/write_dos_lcao.cpp
A-006 Dec 3, 2024
c3f9ba9
change ucell in module_io/write_elecstat_pot.cpp
A-006 Dec 3, 2024
20196d3
change ucell in module_io/write_wfc_r.cpp
A-006 Dec 3, 2024
f93413d
change ucell in bessel_basis_test.cpp
A-006 Dec 3, 2024
724ead1
change ucell in read_wfc_to_rho_test.cpp
A-006 Dec 3, 2024
4ae95b4
Merge branch 'deepmodeling:develop' into ucell8
A-006 Dec 3, 2024
300fab7
Merge branch 'deepmodeling:develop' into ucell8
A-006 Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/module_esolver/esolver_gets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ void ESolver_GetS::runner(UnitCell& ucell, const int istep)
if (PARAM.inp.out_mat_r)
{
cal_r_overlap_R r_matrix;
r_matrix.init(pv, orb_);
r_matrix.out_rR(istep);
r_matrix.init(ucell,pv, orb_);
r_matrix.out_rR(ucell,istep);
}

ModuleBase::timer::tick("ESolver_GetS", "runner");
Expand Down
12 changes: 8 additions & 4 deletions source/module_esolver/esolver_ks_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep)
PARAM.inp.out_dm1,
false,
PARAM.inp.out_app_flag,
ucell.get_iat2iwt(),
&ucell.nat,
istep);

//! 7) write density matrix
Expand Down Expand Up @@ -1232,7 +1234,8 @@ void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep)
PARAM.inp.nnkpfile,
PARAM.inp.wannier_spin);

myWannier.calculate(this->pelec->ekb,
myWannier.calculate(ucell,
this->pelec->ekb,
this->pw_wfc,
this->pw_big,
this->sf,
Expand All @@ -1251,7 +1254,7 @@ void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep)
PARAM.inp.wannier_spin,
orb_);

myWannier.calculate(this->pelec->ekb, this->kv, *(this->psi), &(this->pv));
myWannier.calculate(ucell,this->pelec->ekb, this->kv, *(this->psi), &(this->pv));
}
std::cout << FmtCore::format(" >> Finish %s.\n * * * * * *\n", "Wave function to Wannier90");
}
Expand All @@ -1263,12 +1266,13 @@ void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep)
{
std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "Berry phase calculation");
berryphase bp(&(this->pv));
bp.lcao_init(this->kv,
bp.lcao_init(ucell,
this->kv,
this->GridT,
orb_); // additional step before calling
// macroscopic_polarization (why capitalize
// the function name?)
bp.Macroscopic_polarization(this->pw_wfc->npwk_max, this->psi, this->pw_rho, this->pw_wfc, this->kv);
bp.Macroscopic_polarization(ucell,this->pw_wfc->npwk_max, this->psi, this->pw_rho, this->pw_wfc, this->kv);
std::cout << FmtCore::format(" >> Finish %s.\n * * * * * *\n", "Berry phase calculation");
}
}
Expand Down
5 changes: 3 additions & 2 deletions source/module_esolver/esolver_ks_lcao_tddft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,16 @@ void ESolver_KS_LCAO_TDDFT::after_scf(UnitCell& ucell, const int istep)
{
std::stringstream ss_dipole;
ss_dipole << PARAM.globalv.global_out_dir << "SPIN" << is + 1 << "_DIPOLE";
ModuleIO::write_dipole(pelec->charge->rho_save[is], pelec->charge->rhopw, is, istep, ss_dipole.str());
ModuleIO::write_dipole(ucell,pelec->charge->rho_save[is], pelec->charge->rhopw, is, istep, ss_dipole.str());
}
}
if (TD_Velocity::out_current == true)
{
elecstate::DensityMatrix<std::complex<double>, double>* tmp_DM
= dynamic_cast<elecstate::ElecStateLCAO<std::complex<double>>*>(this->pelec)->get_DM();

ModuleIO::write_current(istep,
ModuleIO::write_current(ucell,
istep,
this->psi,
pelec,
kv,
Expand Down
8 changes: 4 additions & 4 deletions source/module_esolver/esolver_ks_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ void ESolver_KS_PW<T, Device>::after_scf(UnitCell& ucell, const int istep)
PARAM.inp.out_wannier_wvfn_formatted,
PARAM.inp.nnkpfile,
PARAM.inp.wannier_spin);

wan.calculate(this->pelec->ekb, this->pw_wfc, this->pw_big, this->kv, this->psi);
wan.set_tpiba_omega(ucell.tpiba, ucell.omega);
wan.calculate(ucell,this->pelec->ekb, this->pw_wfc, this->pw_big, this->kv, this->psi);
std::cout << FmtCore::format(" >> Finish %s.\n * * * * * *\n", "Wannier functions calculation");
}

Expand All @@ -595,7 +595,7 @@ void ESolver_KS_PW<T, Device>::after_scf(UnitCell& ucell, const int istep)
{
std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "Berry phase polarization");
berryphase bp;
bp.Macroscopic_polarization(this->pw_wfc->npwk_max, this->psi, this->pw_rho, this->pw_wfc, this->kv);
bp.Macroscopic_polarization(ucell,this->pw_wfc->npwk_max, this->psi, this->pw_rho, this->pw_wfc, this->kv);
std::cout << FmtCore::format(" >> Finish %s.\n * * * * * *\n", "Berry phase polarization");
}
}
Expand Down Expand Up @@ -783,7 +783,7 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
//! 6) Print out electronic wave functions in real space
if (PARAM.inp.out_wfc_r == 1) // Peize Lin add 2021.11.21
{
ModuleIO::write_psi_r_1(this->psi[0], this->pw_wfc, "wfc_realspace", true, this->kv);
ModuleIO::write_psi_r_1(ucell,this->psi[0], this->pw_wfc, "wfc_realspace", true, this->kv);
}

//! 7) Use Kubo-Greenwood method to compute conductivities
Expand Down
11 changes: 8 additions & 3 deletions source/module_esolver/lcao_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
if (cal_type == "test_memory")
{
std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "testing memory");
Cal_Test::test_memory(this->pw_rho,
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());
Expand Down Expand Up @@ -324,7 +327,8 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
IState_Envelope IEP(this->pelec);
if (PARAM.globalv.gamma_only_local)
{
IEP.begin(this->psi,
IEP.begin(ucell,
this->psi,
this->pw_rhod,
this->pw_wfc,
this->pw_big,
Expand All @@ -344,7 +348,8 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
}
else
{
IEP.begin(this->psi,
IEP.begin(ucell,
this->psi,
this->pw_rhod,
this->pw_wfc,
this->pw_big,
Expand Down
8 changes: 6 additions & 2 deletions source/module_esolver/pw_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,17 @@ void ESolver_KS_PW<T, Device>::others(UnitCell& ucell, const int istep)
const std::string cal_type = PARAM.inp.calculation;

if (cal_type == "test_memory") {
Cal_Test::test_memory(this->pw_rho,
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(this->psi[0],
nc.output_descriptor(ucell,
this->psi[0],
PARAM.inp.bessel_descriptor_lmax,
PARAM.inp.bessel_descriptor_rcut,
PARAM.inp.bessel_descriptor_tolerence,
Expand Down
2 changes: 1 addition & 1 deletion source/module_hamilt_lcao/module_gint/gint_gamma.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Gint_Gamma : public Gint

//! in gint_gamma_env.cpp
//! calcualte the electronic wave functions via grid integral
void cal_env(const double* wfc, double* rho,UnitCell &ucell);
void cal_env(const double* wfc, double* rho,const UnitCell &ucell);

//! transfer this->hRGint to Veff::hR
void transfer_pvpR(hamilt::HContainer<double>* hR,const UnitCell* ucell);
Expand Down
2 changes: 1 addition & 1 deletion source/module_hamilt_lcao/module_gint/gint_gamma_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "module_basis/module_ao/ORB_read.h"
#include "module_hamilt_pw/hamilt_pwdft/global.h"

void Gint_Gamma::cal_env(const double* wfc, double* rho, UnitCell& ucell)
void Gint_Gamma::cal_env(const double* wfc, double* rho,const UnitCell& ucell)
{
ModuleBase::TITLE("Grid_Integral", "cal_env");

Expand Down
2 changes: 1 addition & 1 deletion source/module_hamilt_lcao/module_gint/gint_k.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Gint_k : public Gint {
double* rho,
const std::vector<ModuleBase::Vector3<double>>& kvec_c,
const std::vector<ModuleBase::Vector3<double>>& kvec_d,
UnitCell& ucell);
const UnitCell& ucell);

//------------------------------------------------------
// in gint_k_sparse1.cpp
Expand Down
2 changes: 1 addition & 1 deletion source/module_hamilt_lcao/module_gint/gint_k_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void Gint_k::cal_env_k(int ik,
double* rho,
const std::vector<ModuleBase::Vector3<double>>& kvec_c,
const std::vector<ModuleBase::Vector3<double>>& kvec_d,
UnitCell& ucell)
const UnitCell& ucell)
{
ModuleBase::TITLE("Gint_k", "cal_env_k");
ModuleBase::timer::tick("Gint_k", "cal_env_k");
Expand Down
Loading
Loading