Skip to content

Commit

Permalink
Add work-around for disordered sites listing
Browse files Browse the repository at this point in the history
  • Loading branch information
stefsmeets committed Nov 18, 2024
1 parent 6f8375e commit 5b12ca2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gemdat/transitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ def occupancy(self) -> Structure:
counts = counts / len(states)
occupancies = dict(zip(unq, counts))

species = [{site.specie.name: occupancies.get(i, 0)} for i, site in enumerate(sites)]
species = [
{site.species.elements[0].name: occupancies.get(i, 0)}
for i, site in enumerate(sites)
]

return Structure(
lattice=sites.lattice,
Expand Down

0 comments on commit 5b12ca2

Please sign in to comment.