What kind of name is 'hamiltonian_elec_update2'?
This is ugly. Please rename this 'hamiltonian_elec_update2' function to something meaningful, and ideally try not to replicate all the code of hamiltonian_elec_update.
Edited by Francesco Troisi
This is ugly. Please rename this 'hamiltonian_elec_update2' function to something meaningful, and ideally try not to replicate all the code of hamiltonian_elec_update.