mirror of
https://github.com/triqs/dft_tools
synced 2024-10-31 11:13:46 +01:00
Fix BZPatch class and partial DOS computation
modified: pytriqs/lattice/bz_patch.py modified: pytriqs/lattice/tight_binding.py
This commit is contained in:
parent
eaad5fa41d
commit
d6f2fb97b6
@ -21,8 +21,9 @@
|
||||
################################################################################
|
||||
|
||||
#from pytriqs import *
|
||||
from super_lattice import *
|
||||
import numpy
|
||||
from pytriqs.dos import DOS
|
||||
from pytriqs.lattice.tight_binding import dos_patch
|
||||
|
||||
class BZPatch:
|
||||
"""Description of a Patch of the BZ"""
|
||||
@ -46,10 +47,6 @@ class BZPatch:
|
||||
else:
|
||||
pnt[np%3] = point
|
||||
|
||||
def dos(self, lattice, n_bins, n_div_triangle):
|
||||
def dos(self, TB, n_eps, n_div):
|
||||
""" Compute the partial dos of the Patch for the Lattice lattice"""
|
||||
assert isinstance(lattice, (Lattice, TBSuperLattice))
|
||||
return lattice.dos_patch(self._triangles, n_bins, n_div_triangle, self.name)
|
||||
|
||||
|
||||
|
||||
return dos_patch(TB, numpy.array(self._triangles), n_eps, n_div, self.name)
|
||||
|
@ -31,7 +31,6 @@ from lattice_tools import energies_on_bz_grid, energies_on_bz_path, hopping_stac
|
||||
from pytriqs.dos import DOS
|
||||
import numpy
|
||||
|
||||
|
||||
# MOVE THIS BACK INTO CYTHON !!!!
|
||||
|
||||
def dos(tight_binding, n_kpts, n_eps, name) :
|
||||
@ -46,11 +45,11 @@ def dos(tight_binding, n_kpts, n_eps, name) :
|
||||
eps, arr = dos_c(tight_binding, n_kpts, n_eps)
|
||||
return [ DOS (eps, arr[:, i], name) for i in range (arr.shape[1]) ]
|
||||
|
||||
def dos_patch(tight_binding, triangles, n_kpts, n_div, name) :
|
||||
def dos_patch(tight_binding, triangles, n_eps, n_div, name) :
|
||||
"""
|
||||
To be written
|
||||
"""
|
||||
eps, arr = dos_c(tight_binding, n_kpts, eps)
|
||||
eps, arr = dos_patch_c(tight_binding, triangles, n_eps, n_div)
|
||||
return DOS (eps, arr, name)
|
||||
|
||||
# for backward compatibility. Not documented.
|
||||
|
Loading…
Reference in New Issue
Block a user