Feature&Refactor: plan to change datatypes of all flags `out_*` from `bool/int` to `std::vector<int>` inside ABACUS to support seperate output precision control #3456
The output of Hamiltonian and overlap matrix with precision 5 is actually unacceptable for scientific calculation purpose, the same problem also exists in out_chg, the loss of precision would cause extra number of scf loops in restarted run. Postprocessing like Bader charge analysis also needs relatively high precision of cube file.
Based on PR #3454 , after changing from bool/int to std::vector<int> which contains two elements, the first element in vector would be identical with the original, for selecting option, the second would be precision.
Default value will give the second.
Describe the Code Quality Issue
The output of Hamiltonian and overlap matrix with precision 5 is actually unacceptable for scientific calculation purpose, the same problem also exists in
out_chg
, the loss of precision would cause extra number of scf loops in restarted run. Postprocessing like Bader charge analysis also needs relatively high precision of cube file. Based on PR #3454 , after changing frombool/int
tostd::vector<int>
which contains two elements, the first element in vector would be identical with the original, for selecting option, the second would be precision. Default value will give the second.Checklist:
out_mul
out_chg
out_pot
out_dm
out_dm1
out_wfc_pw
out_wfc_r
out_wfc_lcao
out_dos
out_band
out_proj_band
out_mat_hs
out_mat_r
out_mat_t
out_mat_dh
out_mat_xc