Skip to content

get_xspectra_structures: Fix Crash for supercell_min_parameter = 0 - #54

Merged
PNOGillespie merged 2 commits into
mainfrom
fix-crash-on-min_cellpar_0
Aug 24, 2026
Merged

PNOGillespie merged 2 commits into
mainfrom
fix-crash-on-min_cellpar_0

Conversation

@PNOGillespie

Copy link
Copy Markdown
Collaborator

Fixes a crash noted recently (#51) in which setting supercell_min_parameter to exactly 0.0 (which triggers a part of get_xspectra_structures that explicitly skips supercell generation) causes a crash due to the input structure node being returned as one of the outputs, resulting in the code assigning a CREATE link to a node which already has one.

This PR fixes the previous issue by ensuring that, in cases where no modification to the structure is needed, StructureData nodes are deep-copied rather than simply assigned.

Additionally, depreciated code related to accessing dict properties using str indexing has been replaced by calling their attributes instead.

PNOGillespie and others added 2 commits August 24, 2026 11:41
Fixes a crash noted recently (#51) in which setting
`supercell_min_parameter` to exactly `0.0` (which triggers a part of
`get_xspectra_structures` that explicitly skips supercell generation)
causes a crash due to the input structure node being returned as one of
the outputs, resulting in the code assigning a `CREATE` link to a node
which already has one.
@PNOGillespie
PNOGillespie merged commit e81639e into main Aug 24, 2026
1 check passed
@PNOGillespie
PNOGillespie deleted the fix-crash-on-min_cellpar_0 branch August 24, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant