Skip to content

Commit

Permalink
Enforce the order of orbitals in ElectronicStructure.ground_state
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Jun 21, 2022
1 parent dbc8219 commit d9a7236
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crystals/atom.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def ground_state(cls, element: ElementLike) -> "ElectronicStructure":
num_elec = element.atomic_number

structure = dict()
for shell in Orbital:
for shell in sorted(Orbital):
shell_elec = min([Orbital.maximum_electrons(shell), num_elec])
structure[shell] = shell_elec
num_elec -= shell_elec
Expand Down

0 comments on commit d9a7236

Please sign in to comment.