Commit f609e81
committed
Remove alphabetical sort in descend_tree for overlapping children
When multiple tree children match a structure, the previous fix sorted
them by label and picked the first. This breaks when siblings overlap
(e.g. Nitrites sorts before Nitro alphabetically, but Nitro is the
intended match because it appears first in the tree file).
The tree is constructed deterministically from the database files, so
the children list order is already deterministic. Simply picking the
first matching child (next_node[0]) restores correct behavior while
remaining deterministic.
Fixes:
- test_statmech: Nitro sample molecule was matching Nitrites (alphabetically
first) instead of Nitro (tree order first)
- test_degeneracy_keeps_separate_transition_states_separated
- test_add_ring_correction_thermo_data_from_tree_for_existing_tricyclic1 parent 39cecf0 commit f609e81
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1074 | 1073 | | |
1075 | 1074 | | |
1076 | 1075 | | |
| |||
0 commit comments