Skip to content
Snippets Groups Projects
Commit 17a7647d authored by Kostas Vilkelis's avatar Kostas Vilkelis :flamingo:
Browse files

normalize total energy to kpoint number

parent 1a3f357d
No related branches found
No related tags found
1 merge request!3create solvers and interface modules
......@@ -126,7 +126,7 @@ def total_energy(h, rho):
total_energy : float
System total energy computed as tr[h@rho].
"""
return np.sum(np.trace(h @ rho, axis1=-1, axis2=-2)).real
return np.sum(np.trace(h @ rho, axis1=-1, axis2=-2)).real / np.prod(rho.shape[:-2])
def updated_matrices(mf_k, model):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment