Skip to content

Commit

Permalink
[fix] volume of tetrahedra is called volt not vtet, and DOS routine e…
Browse files Browse the repository at this point in the history
…xpects a long in C, enforce dtype of itet
  • Loading branch information
the-hampel committed Feb 19, 2025
1 parent 8392c50 commit 7b8b3dd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/triqs_dft_tools/converters/plovasp/vaspio.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,9 @@ def from_file(self, vasp_dir='./', ibz_filename='IBZKPT'):

print(" {0:>26} {1:d}".format("Total number of tetrahedra:", self.ntet))

# Traditionally, itet[it, 0] contains multiplicity
self.itet = np.zeros((self.ntet, 5), dtype=int)
# Traditionally, itet[it, 0] contains multiplicity, use explicitly np.int64
# since the integration routine in C++ uses long int
self.itet = np.zeros((self.ntet, 5), dtype=np.int64)
for it in range(self.ntet):
line = next(ibz_file)
self.itet[it, :] = list(map(int, line.split()[:5]))
Expand Down Expand Up @@ -734,8 +735,8 @@ def __init__(self, h5path):
self.ksymmap -= 1
try:
self.ntet = kpoints['num_tetrahedra']
self.vtet = kpoints['volume_weight_tetrahedra']
self.itet = kpoints['coordinate_id_tetrahedra']
self.volt = kpoints['volume_weight_tetrahedra']
self.itet = np.int64(kpoints['coordinate_id_tetrahedra'])
except KeyError:
print(" No tetrahedron data found in vaspout.h5. Skipping...")
self.ntet = 0
Expand Down

0 comments on commit 7b8b3dd

Please sign in to comment.