[BUG] deepmd/kk silently ignores spin atoms instead of rejecting them
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 74/100
調査の方向性
PairDeepMDKokkos::init_style() と compute() から始め、次にそれらの動作を PairDeepMD::compute() と比較します。特に atom->sp_flag guard に注目してください。atom_style spin/kk と通常の .pt2 モデルを使って問題を再現し、deepmd と deepmd/kk を比較するリグレッションを追加します。deepmd/kk が磁気状態を暗黙に無視するのではなく、spin 原子を拒否すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
The host deepmd pair style rejects spin atoms and tells the user to select a spin-aware pair style. The deepmd/kk compute override omits that guard, so an ordinary model can run with atom_style spin/kk while silently ignoring every atom's spin state.
This is present on origin/master at 8cfd46e37448.
Evidence
PairDeepMD::compute() contains:
if (atom->sp_flag) {
error->all(FLERR,
"Pair style 'deepmd' does not support spin atoms, please use "
"pair style 'deepspin' instead.");
}
PairDeepMDKokkos::compute() overrides the entire host compute path and never performs this check. Its device graph is built only from coordinates and atom types; it neither consumes atom->sp nor produces atom->fm.
Trigger and impact
Run an ordinary edge-, graph-, or canonical-input .pt2 model with:
atom_style spin/kk
pair_style deepmd/kk <ordinary-model.pt2>
Unlike pair_style deepmd, initialization and compute proceed. Changing magnetic moments has no effect, and no magnetic force is produced, which can silently yield invalid spin dynamics.
Expected behavior
PairDeepMDKokkos::init_style() or compute() should apply the same atom->sp_flag rejection as the host path. A regression should compare deepmd and deepmd/kk behavior for a spin atom style.
Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh
- 主要言語
- Python
- スター
- 2.1k
- フォーク
- 654
- 平均マージ
- 3日 10時間
- マージ済み PR(30日)
- 13
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
deepmodeling/deepmd-kit のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
deepmodeling/deepmd-kit#6038 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
deepmodeling/deepmd-kit#5991 ·
メンテナーはふだん 4 日以内に返信
-
Docs enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
deepmodeling/deepmd-kit#5766 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
deepmodeling/deepmd-kit#5689 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
deepmodeling/deepmd-kit#5686 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
deepmodeling/deepmd-kit の issue をすべて見る
似ている issue
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
EclipseFdn/open-vsx.org#13573 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
collective/icalendar#1854 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rancher/rancher-ai-agent#412 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TUDelftGeodesy/DePSI#134 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
HenriquesLab/rxiv-maker#335 ·