Skip to content

Commit

Permalink
Ensure supercell matrix is integer to avoid pymatgen expansion issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Nov 18, 2024
1 parent e41f41a commit 3819efc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doped/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,7 @@ def __init__(
self.primitive_structure = primitive_structure
self.supercell_matrix = supercell_matrix

self.supercell_matrix = np.rint(self.supercell_matrix).astype(int) # round to nearest integer
self.primitive_structure = Structure.from_sites(
[site.to_unit_cell() for site in self.primitive_structure]
)
Expand Down

0 comments on commit 3819efc

Please sign in to comment.