Skip to content

Electronic matrix elements refactor

Francesco Troisi requested to merge matrix_elements_refactor into main

Description

This MR refactors the calculation and the output of the electronic matrix elements. Currently Octopus supports 7 matrix elements option: momentum, angular_momentum, ks_multipoles, dipole, one_body, two_body, two_body_exc. The computation and output of such elements took place in routines located in three different locations:

  • Momentum and ang_momentum -> states_elec_calc.F90
  • One_body, two_body, two_body_exc -> energy_calc.F90
  • Ks_multipoles and dipole -> output_me_inc.F90

Furthermore, some routines were doing both the calculation and the output. Now, all the calculation routines are located in a new module, called elec_matrix_elements, and they only take care of the calculation. On the contrary, the output is done in output_me

Checklist

  • I have checked that my code follows the Octopus coding standards
  • I have added tests for all the new features added in this request.
Edited by Francesco Troisi

Merge request reports