Skip to content

Commit 7b8b3dd

Browse files
committed
[fix] volume of tetrahedra is called volt not vtet, and DOS routine expects a long in C, enforce dtype of itet
1 parent 8392c50 commit 7b8b3dd

File tree

1 file changed

+5
-4
lines changed
  • python/triqs_dft_tools/converters/plovasp

1 file changed

+5
-4
lines changed

python/triqs_dft_tools/converters/plovasp/vaspio.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,9 @@ def from_file(self, vasp_dir='./', ibz_filename='IBZKPT'):
481481

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

484-
# Traditionally, itet[it, 0] contains multiplicity
485-
self.itet = np.zeros((self.ntet, 5), dtype=int)
484+
# Traditionally, itet[it, 0] contains multiplicity, use explicitly np.int64
485+
# since the integration routine in C++ uses long int
486+
self.itet = np.zeros((self.ntet, 5), dtype=np.int64)
486487
for it in range(self.ntet):
487488
line = next(ibz_file)
488489
self.itet[it, :] = list(map(int, line.split()[:5]))
@@ -734,8 +735,8 @@ def __init__(self, h5path):
734735
self.ksymmap -= 1
735736
try:
736737
self.ntet = kpoints['num_tetrahedra']
737-
self.vtet = kpoints['volume_weight_tetrahedra']
738-
self.itet = kpoints['coordinate_id_tetrahedra']
738+
self.volt = kpoints['volume_weight_tetrahedra']
739+
self.itet = np.int64(kpoints['coordinate_id_tetrahedra'])
739740
except KeyError:
740741
print(" No tetrahedron data found in vaspout.h5. Skipping...")
741742
self.ntet = 0

0 commit comments

Comments
 (0)