3
0
mirror of https://github.com/triqs/dft_tools synced 2024-07-19 01:13:40 +02:00

Make mu and total density real

This commit is contained in:
Manuel 2019-08-14 12:10:23 -04:00
parent 1ececb7a4b
commit 9839dcdf9e

View File

@ -1723,7 +1723,9 @@ class SumkDFT(object):
dens = mpi.all_reduce(mpi.world, dens, lambda x, y: x + y)
mpi.barrier()
return dens
if abs(dens.imag) > 1e-20:
mpi.report("Warning: Imaginary part in density will be ignored ({})".format(str(abs(dens.imag))))
return dens.real
def set_mu(self, mu):
r"""