Commit 2773a63
Fix species rename from thermo library for reaction-generated species
7318b37 introduced a `rename` flag to `generate_thermo` to prevent
user-labelled initial species from being silently renamed by a library
match. However, it called `generate_thermo(spec)` (rename=False) inside
`make_new_species`, caching `spec.thermo` before the rename-enabled call
in `apply_thermo_to_species` could run — so the `if not spc.thermo` guard
in `generate_thermo` always short-circuited the rename for reaction
products, leaving them with SMILES labels (e.g. "O=O") instead of their
library names (e.g. "O2(S)").
Fix: pass `rename=not bool(spec.label)` so that reaction-generated species
(no label yet) are renamed from the library entry, while user-labelled
initial species are left unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1ad3d07 commit 2773a63
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | | - | |
| 372 | + | |
372 | 373 | | |
373 | 374 | | |
374 | 375 | | |
| |||
0 commit comments