Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
415b55f
update small places in charge_mixing_residual.cpp
mohanchen Sep 26, 2025
1156f21
update charge_mixing_preconditioner
mohanchen Sep 26, 2025
8d8803b
add timers and remove some PARAM.inp.nspin
mohanchen Sep 26, 2025
91b9ceb
fix problems
mohanchen Sep 26, 2025
a7f6294
add timers
mohanchen Sep 26, 2025
9f95733
small fix
mohanchen Sep 26, 2025
f7f156d
fix a potential memory leak
mohanchen Sep 26, 2025
94e5780
fix bug
mohanchen Sep 27, 2025
8fed198
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen Sep 27, 2025
8616ac3
add ctrl_output_pw files but cannot run now
mohanchen Sep 27, 2025
bbe4c3f
add some interfaces in ctrl_output_pw
mohanchen Sep 27, 2025
77ea800
keep fixing bugs
mohanchen Sep 27, 2025
5364e44
successfully compile the codes
mohanchen Sep 27, 2025
5534980
finally I understand Devicegit add ../source/source_base/module_devic…
mohanchen Sep 27, 2025
9a1c9fd
update function variables
mohanchen Sep 27, 2025
40fa9f0
one step further
mohanchen Sep 27, 2025
155c18d
move on
mohanchen Sep 27, 2025
9c1c376
update codes, done!
mohanchen Sep 27, 2025
e6623f1
fix bug
mohanchen Sep 28, 2025
c715622
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen Sep 29, 2025
2cc87f9
add setup_pot
mohanchen Sep 29, 2025
5d2fc35
fix bugs
mohanchen Sep 30, 2025
632b1c6
update esolver_ks_pw, add setup_pot
mohanchen Sep 30, 2025
0e70265
update format of esolver_ks_pw.cpp
mohanchen Sep 30, 2025
e0eed86
update setup_pot for GPU version
mohanchen Oct 4, 2025
6f1657e
update esolver_ks_pw.cpp
mohanchen Oct 5, 2025
28ce5d6
add setup_estate_pw in source_estate
mohanchen Oct 5, 2025
af3955d
fix some bugs
mohanchen Oct 5, 2025
8030dd0
small update
mohanchen Oct 5, 2025
29776a6
Merge branch 'develop' into develop
mohanchen Oct 5, 2025
266555c
move teardown to deconstructor of ESolver
mohanchen Oct 5, 2025
cb1a21a
fix error in passing pointers
mohanchen Oct 5, 2025
9a4a462
move teardown function to the correct place
mohanchen Oct 5, 2025
4ffe19a
fix bugs
mohanchen Oct 5, 2025
c3c8174
update
mohanchen Oct 5, 2025
94c17c3
add two functions in module_pwdft
mohanchen Oct 5, 2025
8aaf32d
add setup_pwrho file, and update esolver_fp
mohanchen Oct 5, 2025
3268459
update esolver_fp
mohanchen Oct 5, 2025
38093a1
add teardown function in setup_pwrho
mohanchen Oct 5, 2025
440b690
update esolver
mohanchen Oct 5, 2025
d672bca
move the after_all_runners() function of the base class to the end
mohanchen Oct 5, 2025
16ba5d2
add TITLE for after_all_runners
mohanchen Oct 5, 2025
8516477
update esolver_fp, move teardown to desconstructor
mohanchen Oct 5, 2025
9713afb
Revert "update esolver_fp, move teardown to desconstructor"
mohanchen Oct 5, 2025
de9d3de
Revert "add TITLE for after_all_runners"
mohanchen Oct 5, 2025
2163ef5
Revert "move the after_all_runners() function of the base class to th…
mohanchen Oct 5, 2025
e74565d
Merge branch 'deepmodeling:develop' into develop
mohanchen Oct 6, 2025
143e9c1
update esolver, move chargemixing to module_charge
mohanchen Oct 6, 2025
4d89de7
update dm pointer in esolver_ks_lcao
mohanchen Oct 6, 2025
b5b66d6
reduce the charge mixing code in esolver_ks_lcao
mohanchen Oct 6, 2025
e3bff8f
reduce the lines of esolver_ks_lcao
mohanchen Oct 6, 2025
3100997
update dm vector
mohanchen Oct 6, 2025
ca5bf78
change ctrl_output_lcao to ctrl_scf_lcao
mohanchen Oct 6, 2025
f37dd62
add ctrl_runner_lcao, but cannot run
mohanchen Oct 6, 2025
bf5ccbc
add ctrl_runner_lcao successfully
mohanchen Oct 6, 2025
df61055
add ctrl_iter_lcao files
mohanchen Oct 6, 2025
0253953
restore esolver_ks_lcao iter_finish
mohanchen Oct 6, 2025
9a2822c
fix bugs
mohanchen Oct 6, 2025
cf73e30
update ctrl_iter_lcao
mohanchen Oct 6, 2025
60d3440
upate, compile successfully
mohanchen Oct 6, 2025
75762d2
fix bug
mohanchen Oct 6, 2025
53e115d
fix bug, add GlobalC using global.h
mohanchen Oct 6, 2025
8671673
fix deepks compile
mohanchen Oct 6, 2025
1465b2b
update estate
mohanchen Oct 7, 2025
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
5 changes: 4 additions & 1 deletion source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,9 @@ OBJS_IO=input_conv.o\
write_libxc_r.o\
output_log.o\
output_mat_sparse.o\
ctrl_output_lcao.o\
ctrl_scf_lcao.o\
ctrl_runner_lcao.o\
ctrl_iter_lcao.o\
ctrl_output_fp.o\
ctrl_output_pw.o\
para_json.o\
Expand Down Expand Up @@ -704,6 +706,7 @@ OBJS_SRCPW=H_Ewald_pw.o\
VL_in_pw.o\
VNL_in_pw.o\
VNL_grad_pw.o\
chgmixing.o\
charge.o\
charge_init.o\
charge_mpi.o\
Expand Down
21 changes: 1 addition & 20 deletions source/source_esolver/esolver_ks.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "esolver_ks.h"

// To setup plane wave for electronic wave functions
#include "pw_setup.h"
#include "pw_setup.h" // setup plane wave

#include "source_base/timer.h"
#include "source_base/global_variable.h"
Expand Down Expand Up @@ -152,10 +150,6 @@ void ESolver_KS<T, Device>::before_all_runners(UnitCell& ucell, const Input_para
this->sf.setup_structure_factor(&ucell, Pgrid, this->pw_rhod);
}

//------------------------------------------------------------------------------
//! the 5th function of ESolver_KS: hamilt2rho_single
//! mohan add 2024-05-11
//------------------------------------------------------------------------------
template <typename T, typename Device>
void ESolver_KS<T, Device>::hamilt2rho_single(UnitCell& ucell, const int istep, const int iter, const double ethr)
{
Expand Down Expand Up @@ -248,24 +242,16 @@ void ESolver_KS<T, Device>::runner(UnitCell& ucell, const int istep)
this->scf_nmax_flag=true;
}

//----------------------------------------------------------------
// 3) initialization of SCF iterations
//----------------------------------------------------------------
this->iter_init(ucell, istep, iter);

//----------------------------------------------------------------
// 4) use Hamiltonian to obtain charge density
//----------------------------------------------------------------
this->hamilt2rho(ucell, istep, iter, diag_ethr);

//----------------------------------------------------------------
// 5) finish scf iterations
//----------------------------------------------------------------
this->iter_finish(ucell, istep, iter, conv_esolver);

//----------------------------------------------------------------
// 6) check convergence
//----------------------------------------------------------------
if (conv_esolver || this->oscillate_esolver)
{
this->niter = iter;
Expand All @@ -277,9 +263,7 @@ void ESolver_KS<T, Device>::runner(UnitCell& ucell, const int istep)
}
} // end scf iterations

//----------------------------------------------------------------
// 7) after scf
//----------------------------------------------------------------
this->after_scf(ucell, istep, conv_esolver);

ModuleBase::timer::tick(this->classname, "runner");
Expand Down Expand Up @@ -598,9 +582,6 @@ void ESolver_KS<T, Device>::after_scf(UnitCell& ucell, const int istep, const bo
this->kv);
}
}



}

template <typename T, typename Device>
Expand Down
21 changes: 6 additions & 15 deletions source/source_esolver/esolver_ks.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
#ifndef ESOLVER_KS_H
#define ESOLVER_KS_H

#include <cstring>
//#include <fstream>

// for first-principles esolver
#include "esolver_fp.h"
// for plane wave basis set
#include "source_basis/module_pw/pw_basis_k.h"
// for k-points in Brillouin zone
#include "source_cell/klist.h"
// for charge mixing
#include "source_estate/module_charge/charge_mixing.h"
// for electronic wave functions
#include "source_psi/psi.h"
// for Hamiltonian
#include "source_hamilt/hamilt.h"
#include "esolver_fp.h" // first-principles esolver
#include "source_basis/module_pw/pw_basis_k.h" // use plane wave
#include "source_cell/klist.h" // use k-points in Brillouin zone
#include "source_estate/module_charge/charge_mixing.h" // use charge mixing
#include "source_psi/psi.h" // use electronic wave functions
#include "source_hamilt/hamilt.h" // use Hamiltonian

namespace ModuleESolver
{
Expand Down
Loading
Loading