|
2 | 2 |
|
3 | 3 | #include "module_base/timer.h" |
4 | 4 | #include "module_cell/cal_atoms_info.h" |
| 5 | +#include "module_elecstate/elecstate_print.h" |
5 | 6 | #include "module_hamilt_general/module_xc/xc_functional.h" |
| 7 | +#include "module_hsolver/hsolver.h" |
6 | 8 | #include "module_io/cube_io.h" |
7 | 9 | #include "module_io/json_output/init_info.h" |
8 | 10 | #include "module_io/json_output/output_info.h" |
| 11 | +#include "module_io/nscf_band.h" |
9 | 12 | #include "module_io/output_log.h" |
10 | 13 | #include "module_io/print_info.h" |
11 | 14 | #include "module_io/write_istate_info.h" |
12 | 15 | #include "module_parameter/parameter.h" |
13 | | -#include "module_elecstate/elecstate_print.h" |
14 | | -#include "module_hsolver/hsolver.h" |
15 | 16 |
|
16 | 17 | #include <ctime> |
17 | 18 | #include <iostream> |
@@ -724,6 +725,69 @@ void ESolver_KS<T, Device>::after_scf(UnitCell& ucell, const int istep, const bo |
724 | 725 | } |
725 | 726 | } |
726 | 727 |
|
| 728 | +template <typename T, typename Device> |
| 729 | +void ESolver_KS<T, Device>::after_all_runners(UnitCell& ucell) |
| 730 | +{ |
| 731 | + ESolver_FP::after_all_runners(ucell); |
| 732 | + |
| 733 | + // 1) write information |
| 734 | + if (PARAM.inp.out_dos != 0 || PARAM.inp.out_band[0] != 0 || PARAM.inp.out_proj_band != 0) |
| 735 | + { |
| 736 | + GlobalV::ofs_running << "\n\n\n\n"; |
| 737 | + GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" |
| 738 | + ">>>>>>>>>>>>>>>>>>>>>>>>>" |
| 739 | + << std::endl; |
| 740 | + GlobalV::ofs_running << " | " |
| 741 | + " |" |
| 742 | + << std::endl; |
| 743 | + GlobalV::ofs_running << " | Post-processing of data: " |
| 744 | + " |" |
| 745 | + << std::endl; |
| 746 | + GlobalV::ofs_running << " | DOS (density of states) and bands will be " |
| 747 | + "output here. |" |
| 748 | + << std::endl; |
| 749 | + GlobalV::ofs_running << " | If atomic orbitals are used, Mulliken " |
| 750 | + "charge analysis can be done. |" |
| 751 | + << std::endl; |
| 752 | + GlobalV::ofs_running << " | Also the .bxsf file containing fermi " |
| 753 | + "surface information can be |" |
| 754 | + << std::endl; |
| 755 | + GlobalV::ofs_running << " | done here. " |
| 756 | + " |" |
| 757 | + << std::endl; |
| 758 | + GlobalV::ofs_running << " | " |
| 759 | + " |" |
| 760 | + << std::endl; |
| 761 | + GlobalV::ofs_running << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" |
| 762 | + "<<<<<<<<<<<<<<<<<<<<<<<<<" |
| 763 | + << std::endl; |
| 764 | + GlobalV::ofs_running << "\n\n\n\n"; |
| 765 | + } |
| 766 | + |
| 767 | + // 2) write information |
| 768 | + ModuleIO::write_istate_info(this->pelec->ekb, this->pelec->wg, this->kv); |
| 769 | + |
| 770 | + const int nspin0 = (PARAM.inp.nspin == 2) ? 2 : 1; |
| 771 | + |
| 772 | + // 3) print out band information |
| 773 | + if (PARAM.inp.out_band[0]) |
| 774 | + { |
| 775 | + for (int is = 0; is < nspin0; is++) |
| 776 | + { |
| 777 | + std::stringstream ss2; |
| 778 | + ss2 << PARAM.globalv.global_out_dir << "BANDS_" << is + 1 << ".dat"; |
| 779 | + GlobalV::ofs_running << "\n Output bands in file: " << ss2.str() << std::endl; |
| 780 | + ModuleIO::nscf_band(is, |
| 781 | + ss2.str(), |
| 782 | + PARAM.inp.nbands, |
| 783 | + 0.0, |
| 784 | + PARAM.inp.out_band[1], |
| 785 | + this->pelec->ekb, |
| 786 | + this->kv); |
| 787 | + } |
| 788 | + } |
| 789 | +} |
| 790 | + |
727 | 791 | //------------------------------------------------------------------------------ |
728 | 792 | //! the 16th-20th functions of ESolver_KS |
729 | 793 | //! mohan add 2024-05-12 |
|
0 commit comments