mirror of
https://github.com/triqs/dft_tools
synced 2025-01-03 01:55:56 +01:00
Correction of a minor bug in transport code.
This commit is contained in:
parent
b3b199bf40
commit
4249d7d9d3
@ -411,13 +411,16 @@ 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()
|
||||
for nu_i in range(n_bands):
|
||||
for nu_j in range(nu_i, n_bands):
|
||||
for i in range(3):
|
||||
velocity_xyz[nu_i][nu_j][i] = R.next() + R.next()*1j
|
||||
if (nu_i != nu_j): velocity_xyz[nu_j][nu_i][i] = velocity_xyz[nu_i][nu_j][i].conjugate()
|
||||
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):
|
||||
velocity_xyz[nu_i][nu_j][i] = R.next() + R.next()*1j
|
||||
if (nu_i != nu_j): velocity_xyz[nu_j][nu_i][i] = velocity_xyz[nu_i][nu_j][i].conjugate()
|
||||
velocities_k[isp].append(velocity_xyz)
|
||||
band_window_optics.append(numpy.array(band_window_optics_isp))
|
||||
print "DONE!"
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user