2929#endif
3030#include " source_lcao/module_rdmft/rdmft.h" // use RDMFT codes
3131#include " source_io/to_qo.h" // use toQO
32+ #include " source_lcao/rho_tau_lcao.h" // mohan add 2025-10-24
3233
3334
3435template <typename TK, typename TR>
@@ -368,10 +369,16 @@ void ModuleIO::ctrl_scf_lcao(UnitCell& ucell,
368369 std::cout << FmtCore::format (" >> Finish %s.\n * * * * * *\n " , " Wave function to Wannier90" );
369370 }
370371
372+ // 14) calculate the kinetic energy density tau
373+ // mohan add 2025-10-24
374+ if (inp.out_elf [0 ] > 0 )
375+ {
376+ LCAO_domain::dm2tau (pelec->DM ->get_DMR_vector (), inp.nspin , pelec->charge );
377+ }
371378
372379#ifdef __EXX
373380 // ------------------------------------------------------------------
374- // ! 14 ) Output Hexx matrix in LCAO basis
381+ // ! 15 ) Output Hexx matrix in LCAO basis
375382 // (see `out_chg` in docs/advanced/input_files/input-main.md)
376383 // ------------------------------------------------------------------
377384 if (inp.out_chg [0 ])
@@ -392,7 +399,7 @@ void ModuleIO::ctrl_scf_lcao(UnitCell& ucell,
392399 }
393400
394401 // ------------------------------------------------------------------
395- // ! 15 ) Write RPA information in LCAO basis
402+ // ! 16 ) Write RPA information in LCAO basis
396403 // ------------------------------------------------------------------
397404 if (inp.rpa )
398405 {
@@ -408,7 +415,7 @@ void ModuleIO::ctrl_scf_lcao(UnitCell& ucell,
408415#endif
409416
410417 // ------------------------------------------------------------------
411- // ! 16 ) Perform RDMFT calculations, added by jghan, 2024-10-17
418+ // ! 17 ) Perform RDMFT calculations, added by jghan, 2024-10-17
412419 // ------------------------------------------------------------------
413420 if (inp.rdmft == true )
414421 {
0 commit comments