Skip to content

Commit

Permalink
Fix spglib compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
utf committed Jul 23, 2024
1 parent 96a7727 commit c830e09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion amset/electronic_structure/kpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,17 @@ def get_kpoints_tetrahedral(
kpoint_mesh = get_kpoint_mesh(structure, kpoint_mesh)

atoms = AseAtomsAdaptor().get_atoms(structure)
cell = (
np.array(atoms.get_cell().T, dtype="double", order="C"), # lattice
np.array(atoms.get_scaled_positions(), dtype="double", order="C"), # positions
np.array(atoms.get_atomic_numbers(), dtype="intc"), # numbers
)

if not symprec:
symprec = 1e-8

grid_mapping, grid_address = spglib.get_ir_reciprocal_mesh(
kpoint_mesh, atoms, symprec=symprec, is_time_reversal=time_reversal_symmetry
kpoint_mesh, cell, symprec=symprec, is_time_reversal=time_reversal_symmetry
)
full_kpoints = grid_address / kpoint_mesh

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BoltzTraP2==24.1.1
tqdm==4.66.4
tabulate==0.9.0
memory_profiler==0.61.0
spglib==2.2.0
spglib==2.5.0
click==8.1.7
sumo==2.3.8
h5py==3.11.0
Expand Down

0 comments on commit c830e09

Please sign in to comment.