Mismatched conformer degrees of freedom pass silently through TST, then surface as a bare "Singular matrix" in the MSC solve
评估
调研方向
从 rmgpy/reaction.py:1441 中的 Reaction.calculate_tst_rate_coefficient 和 rmgpy/pdep/msc.pyx 中的 np.linalg.solve 调用开始。跟踪现有的 b NaN 警告,并确定是否应报告不匹配的 mode 类或奇异矩阵上下文。完成标准是:非对称不匹配或求解失败会报告可采取行动的诊断详细信息,而不是静默失败或仅报告 "Singular matrix"。
由索引模型根据 Issue 内容生成。
描述
Ran into both of these while splicing QM transition states into an otherwise RMG-estimated pressure-dependent network, and they compound in a way that made the diagnosis much harder than it needed to be.
If the transition state conformer carries translation and rotation but the wells are vibration-only (or the other way round), Reaction.calculate_tst_rate_coefficient (rmgpy/reaction.py:1441) just multiplies the partition functions together — nothing anywhere in it looks at what modes either side actually has. In my case Q‡/Q_reactant was off by ~1e14 and k_TST(3200 K) came out at 1.8e26 s^-1 for a unimolecular step.
That rescales k(E), and the modified strong collision solve then dies at np.linalg.solve(a_mat, b) in rmgpy/pdep/msc.pyx with nothing but numpy.linalg.LinAlgError: Singular matrix — no grain, no J, no temperature, no pressure. I ended up bisecting by hand down to grain 346 / J=0 / 3200 K / 0.1 bar.
The bit that struck me is that the intent is already there a few lines up: b gets checked with np.isnan and logs a warning naming the grain and the isomer. a_mat has no equivalent check, and it's the argument that actually fails.
A warning in calculate_tst_rate_coefficient when the reactant and TS conformers carry different mode classes, or just the grain/J/T/P coordinates on the singular-matrix failure, would have turned a two-hour hunt into an immediate error message. Either one alone would have done it.
One thing worth flagging for anyone fixing this: the loud failure only happens when the mismatch is asymmetric. I checked afterwards, and if you put translation and rotation on the wells and the TS alike, the partition functions cancel again — the solve succeeds and the rate coefficient comes back unchanged, on a network that's still wrong. So the singular matrix isn't a general tripwire for this, which is an argument for the warning rather than relying on the crash.
Happy to open a PR for both.
- 主要语言
- Python
- 星标
- 539
- 派生
- 264
- 平均合并
- 7 天 19 小时
- 30 天内合并 PR
- 2
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ReactionMechanismGenerator/RMG-Py 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
ReactionMechanismGenerator/RMG-Py#3014 ·
-
Eckart.calculate_tunneling_function: cancellation in 1 - ratio and missing cos branch for small barriers可能已有人在做 @sectio-aurea-q 于 3 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 42/100
ReactionMechanismGenerator/RMG-Py#3019 ·
-
Arkane ORCA parser misclassifies oblique diatomic OH as a nonlinear rotor due to exact-zero inertia test可能已有人在做 @Mohit-Ak 于 2 天前认领。 未关闭
难度 3/5 半天 新手友好度 52/100
ReactionMechanismGenerator/RMG-Py#3016 ·
-
难度 4/5 3-5 天 新手友好度 55/100
ReactionMechanismGenerator/RMG-Py#3015 ·
-
难度 4/5 3-5 天 新手友好度 25/100
ReactionMechanismGenerator/RMG-Py#3008 · 2 条评论 ·
查看 ReactionMechanismGenerator/RMG-Py 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
slavakurilyak/awesome-ai-agents#845 ·
维护者通常 1 天内回复
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directory可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭difficulty:2 enhancement good first issue
难度 1/5 1-3 小时 新手友好度 92/100
MakazhanAlpamys/Soup#2178 ·
维护者通常 1 天内回复
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-values未关闭
难度 2/5 1-3 小时 新手友好度 75/100
scverse/rapids-singlecell#854 ·
维护者通常 1 天内回复
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGL可能已有人在做 @ninglinLiu 今天认领。 未关闭area:frontend backend:slang bug direction:input
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=False可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 13 天内回复