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 警告を追跡し、モードクラスの不一致または特異行列のコンテキストを報告すべきかどうかを判断します。非対称な不一致または solve の失敗が、暗黙に失敗したり "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時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
Project submission:オープン
難易度 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対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン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対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 13 日以内に返信