Vectorized dihedrals return NaN for a zero-length bond vector instead of raising
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
arc/species/vectors.py の calculate_dihedral_angles() を読み、ゼロベクトルの処理を calculate_dihedral_angle() と比較してください。2つの原子が一致するケースのテストを追加し、共線の場合を処理する前に VectorsError が発生することを確認してください。ゼロ長の結合ベクトルがスカラー関数と同じエラーを発生させれば完了です。
索引モデルが issue の本文から書いたものです。
説明
calculate_dihedral_angles() (arc/species/vectors.py, added in #1106) classifies a torsion as collinear when either cross product is shorter than tol, and returns NaN for it. Two coincident consecutive atoms give a zero-length bond vector, so both cross products vanish and the torsion is returned as NaN, as if the atoms were merely collinear. The scalar calculate_dihedral_angle() raises VectorsError('Input vectors must be non-zero.') for the same input.
The callers are in arc/species/optical_isomers.py (lines 665 and 804 at 3ee094352), where a NaN torsion counts as uninformative. A geometry with coincident atoms is malformed, so this hides the fault rather than changing a result for a valid geometry.
Fix: check v1, v2 and v3 for zero length (below tol) before the collinear test, and raise VectorsError as the scalar function does. Add a test with two coincident atoms.
Found by Copilot on #1055 (review comment 4728719409), where the code arrives through the stack merge.
- 主要言語
- Python
- スター
- 55
- フォーク
- 26
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ReactionMechanismGenerator/ARC のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ReactionMechanismGenerator/ARC#1148 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ReactionMechanismGenerator/ARC#1144 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
ReactionMechanismGenerator/ARC#1143 ·
メンテナーはふだん 3 日以内に返信
-
Gaussian troubleshooting drops int=(Acc2E=14) when the fine grid is off対応中かも @alongd が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ReactionMechanismGenerator/ARC#1141 ·
メンテナーはふだん 3 日以内に返信
-
Gaussian troubleshooting logs opt=cartesian but the input loses it対応中かも @alongd が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
ReactionMechanismGenerator/ARC#1140 ·
メンテナーはふだん 3 日以内に返信
ReactionMechanismGenerator/ARC の issue をすべて見る
似ている issue
-
docs(contributing): the two things that silently block a PR対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンavailable documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 95/100
Nixitov/Riptide-Native#944 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
JTHCode/secretguard#24 ·
メンテナーはふだん 1 日以内に返信
-
area: middleware documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
omarelshamy25x/shamy-hijri#63 ·
メンテナーはふだん 1 日以内に返信