Skip to content

Commit bf85797

Browse files
authored
Merge branch 'deepmodeling:develop' into elf
2 parents 12338f6 + 15835bd commit bf85797

File tree

13 files changed

+492
-91
lines changed

13 files changed

+492
-91
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
- [dos\_emax\_ev](#dos_emax_ev)
178178
- [dos\_nche](#dos_nche)
179179
- [stm\_bias](#stm_bias)
180+
- [ldos\_line](#ldos_line)
180181
- [NAOs](#naos)
181182
- [bessel\_nao\_ecut](#bessel_nao_ecut)
182183
- [bessel\_nao\_tolerence](#bessel_nao_tolerence)
@@ -1705,9 +1706,13 @@ These variables are used to control the output of properties.
17051706

17061707
### out_ldos
17071708

1708-
- **Type**: Boolean
1709-
- **Description**: Whether to output the local density of states for given bias in cube file format, which is controlled by [stm_bias](#stm_bias).
1710-
- **Default**: False
1709+
- **Type**: Integer
1710+
- **Description**: Whether to output the local density of states (LDOS), optionally output precision can be set by a second parameter, default is 3.
1711+
- 0: no output
1712+
- 1: output the partial charge density for given bias (controlled by [stm_bias](#stm_bias)) in cube file format, which can be used to plot scanning tunneling spectroscopys to mimick STM images using the Python script [plot.py](../../../tools/stm/plot.py).
1713+
- 2: output LDOS along a line in real space (controlled by [ldos_line](#ldos_line)). Parameters used to control DOS output are also valid for LDOS.
1714+
- 3: output both two LDOS modes above.
1715+
- **Default**: 0
17111716

17121717
### out_band
17131718

@@ -1986,6 +1991,13 @@ These variables are used to control the calculation of DOS. [Detailed introducti
19861991
- **Default**: 1.0
19871992
- **Unit**: V
19881993

1994+
### ldos_line
1995+
1996+
- **Type**: Real*6 Integer(optional)
1997+
- **Description**: Specify the path of the three-dimensional space and display LDOS in the form of a two-dimensional color chart, see details in [out_ldos](#out_ldos). The first three paramenters are the direct coordinates of the start point, the next three paramenters are the direct coordinates of the end point, and the final one is the number of points along the path, whose default is 100.
1998+
- **Default**: 0.0 0.0 0.0 0.0 0.0 1.0 100
1999+
2000+
19892001
[back to top](#full-list-of-input-keywords)
19902002

19912003
## NAOs

source/module_esolver/esolver_ks_lcao.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -690,11 +690,11 @@ void ESolver_KS_LCAO<TK, TR>::iter_init(UnitCell& ucell, const int istep, const
690690
{
691691
this->p_hamilt->refresh();
692692
}
693-
if (iter == 1 && istep == 0)
694-
{
695-
// initialize DMR
696-
this->ld.init_DMR(ucell, orb_, this->pv, this->gd);
697-
}
693+
// if (iter == 1 && istep == 0)
694+
// {
695+
// // initialize DMR
696+
// this->ld.init_DMR(ucell, orb_, this->pv, this->gd);
697+
// }
698698
#endif
699699

700700
if (PARAM.inp.vl_in_h)

source/module_esolver/esolver_ks_pw.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -947,11 +947,10 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
947947
//----------------------------------------------------------
948948
if (PARAM.inp.out_ldos[0])
949949
{
950-
ModuleIO::Cal_ldos<std::complex<double>>::cal_ldos_pw(
951-
reinterpret_cast<elecstate::ElecStatePW<std::complex<double>>*>(this->pelec),
952-
this->psi[0],
953-
this->Pgrid,
954-
ucell);
950+
ModuleIO::cal_ldos_pw(reinterpret_cast<elecstate::ElecStatePW<std::complex<double>>*>(this->pelec),
951+
this->psi[0],
952+
this->Pgrid,
953+
ucell);
955954
}
956955

957956
//----------------------------------------------------------

source/module_esolver/lcao_before_scf.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
243243
->get_DM()
244244
->init_DMR(*(dynamic_cast<hamilt::HamiltLCAO<TK, TR>*>(this->p_hamilt)->getHR()));
245245

246+
#ifdef __DEEPKS
247+
// initialize DMR of DeePKS
248+
this->ld.init_DMR(ucell, orb_, this->pv, this->gd);
249+
#endif
250+
246251
// 15) two cases are considered:
247252
// 1. DMK in DensityMatrix is not empty (istep > 0), then DMR is initialized by DMK
248253
// 2. DMK in DensityMatrix is empty (istep == 0), then DMR is initialized by zeros

0 commit comments

Comments
 (0)