Skip to content

Commit 1ed4802

Browse files
authored
Feature: Add supersine electric fields and refactor RT-TDDFT field handling (deepmodeling#7767)
* Feature: Add supersine electric fields and refactor RT-TDDFT field handling * Fix PW compile error * Refactor and centralize RT-TDDFT vector-potential I/O * Rename supersine parameters to td_supsine * Initialize expression parsing variables in read_input_tool.h * Remove Potential double-grid global PARAM dependency * Split time-dependent field classes by responsibility * Harden RT-TDDFT tests and field I/O
1 parent 74c4269 commit 1ed4802

93 files changed

Lines changed: 4010 additions & 2435 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/advanced/input_files/input-main.md

Lines changed: 172 additions & 84 deletions
Large diffs are not rendered by default.

docs/parameters.yaml

Lines changed: 167 additions & 109 deletions
Large diffs are not rendered by default.

source/Makefile.Objects

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ VPATH=./src_global:\
6969
./src_ri:\
7070
./source_lcao/module_ri:\
7171
./source_io/module_parameter:\
72+
./source_io/module_efield:\
7273
./source_lcao/module_lr:\
7374
./source_lcao/module_lr/ao_to_mo_transformer:\
7475
./source_lcao/module_lr/dm_trans:\
@@ -578,6 +579,8 @@ OBJS_IO=module_parameter/input_conv.o\
578579
write_init.o\
579580
td_current_io.o\
580581
td_current_io_comm.o\
582+
td_efield_io.o\
583+
td_vector_pot_io.o\
581584
write_libxc_r.o\
582585
output_log.o\
583586
output_mat_sparse.o\

source/source_esolver/esolver_ks_lcao_tddft.cpp

Lines changed: 78 additions & 95 deletions
Large diffs are not rendered by default.

source/source_esolver/esolver_ks_lcao_tddft.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
#include "source_lcao/module_rt/td_moving_gauge.h"
99
#include "source_lcao/module_rt/velocity_op.h"
1010

11+
#include <memory>
12+
13+
namespace elecstate
14+
{
15+
class TDFieldManager;
16+
}
17+
1118
namespace ModuleESolver
1219
{
1320

@@ -28,12 +35,7 @@ class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO<std::complex<double>, TR>
2835

2936
void store_h_s_psi(UnitCell& ucell, const int istep, const int iter, const bool conv_esolver);
3037

31-
void iter_finish(UnitCell& ucell,
32-
const int istep,
33-
const int estep,
34-
const int estep_max,
35-
int& iter,
36-
bool& conv_esolver);
38+
void iter_finish(UnitCell& ucell, const int istep, const int estep, const int estep_max, int& iter, bool& conv_esolver);
3739

3840
virtual void after_scf(UnitCell& ucell, const int istep, const bool conv_esolver) override;
3941

@@ -72,6 +74,8 @@ class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO<std::complex<double>, TR>
7274
//! Restart flag
7375
bool restart_done = false;
7476

77+
std::shared_ptr<elecstate::TDFieldManager> td_field_manager_;
78+
7579
private:
7680
void weight_dm_rho(const UnitCell& ucell);
7781
};

source/source_estate/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ list(APPEND objects
1313
module_pot/gatefield.cpp
1414
module_pot/efield.cpp
1515
module_pot/H_Hartree_pw.cpp
16+
module_pot/H_TDDFT_pw.cpp
1617
module_pot/pot_xc.cpp
1718
module_pot/pot_local.cpp
1819
module_pot/potential_new.cpp
@@ -22,6 +23,9 @@ list(APPEND objects
2223
module_pot/pot_sep.cpp
2324
module_pot/pot_xc_fdm.cpp
2425
module_pot/pot_cosikr.cpp
26+
module_pot/td_field.cpp
27+
module_pot/td_field_profiles.cpp
28+
module_pot/td_field_manager.cpp
2529
module_charge/chgmixing.cpp
2630
module_charge/gint_precision_controller.cpp
2731
module_charge/charge.cpp
@@ -46,7 +50,6 @@ list(APPEND objects
4650
if(ENABLE_LCAO)
4751
list(APPEND objects
4852
elecstate_lcao.cpp
49-
module_pot/H_TDDFT_pw.cpp
5053
module_dm/init_dm.cpp
5154
module_dm/density_matrix.cpp
5255
module_dm/density_matrix_io.cpp

0 commit comments

Comments
 (0)