3
0
mirror of https://github.com/triqs/dft_tools synced 2024-07-04 18:36:05 +02:00

Correction of a minor bug in transport code.

This commit is contained in:
Manuel Zingl 2014-12-23 13:03:01 +01:00
parent b3b199bf40
commit 4249d7d9d3
2 changed files with 10 additions and 7 deletions

View File

@ -411,8 +411,11 @@ class Wien2kConverter(ConverterTools):
nu2 = int(R.next())
band_window_optics_isp.append((nu1, nu2))
n_bands = nu2 - nu1 + 1
velocity_xyz = numpy.zeros((n_bands, n_bands, 3), dtype = complex)
for _ in range(4): R.next()
if n_bands <= 0:
velocity_xyz = numpy.zeros((1, 1, 3), dtype = complex)
else:
velocity_xyz = numpy.zeros((n_bands, n_bands, 3), dtype = complex)
for nu_i in range(n_bands):
for nu_j in range(nu_i, n_bands):
for i in range(3):

View File

@ -641,7 +641,7 @@ class SumkDFTTools(SumkDFT):
for direction in self.directions:
self.Gamma_w[direction] = (mpi.all_reduce(mpi.world, self.Gamma_w[direction], lambda x, y : x + y)
/ self.cellvolume(self.lattice_type, self.lattice_constants, self.lattice_angles)[1]) / self.n_symmetries
/ self.cellvolume(self.lattice_type, self.lattice_constants, self.lattice_angles)[1] / self.n_symmetries)
def transport_coefficient(self, direction, iq=0, n=0, beta=40):