Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Feature Request] Migrate grid density model to dpmodel for multi-backend support

オープン
#6,029 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, pytorch, tensorflow

調査の方向性

Start by reading the PyTorch implementations in deepmd/pt/, especially DensityFittingNet, DPDensityAtomicModel, GridDensityModel, GridDensityLoss, and DeepDensity, then compare them with the available dpmodel counterparts and PR #5999. Done means the reference model is implemented in dpmodel, PyTorch wraps it, and pt_expt support is added without losing the existing grid/density behavior.

索引モデルが issue の本文から書いたものです。

説明

enhancement
Summary

PR #5999 implements a charge density model on grid points for the PyTorch
backend only. It should eventually be implemented once in dpmodel and
wrapped per backend. This issue tracks the current state and the
migration plan.

Detailed Description
Background

PR #5999 introduces a charge density model that predicts scalar densities on
grid points. The implementation currently exists only for the PyTorch
backend
(deepmd/pt/): DensityFittingNet, DPDensityAtomicModel,
GridDensityModel, GridDensityLoss, and the DeepDensity evaluator.

This does not follow the project's direction of implementing new
functionality once in dpmodel and wrapping it for each backend
(pt / pt_expt / tf / jax / pd).

Current state
  • DensityFittingNet is a plain InvarFitting subclass — nothing
    backend-specific.
  • The grid/atom merge in DPDensityAtomicModel.forward_atomic and the
    directional grid-to-atom neighbor list both have dpmodel counterparts
    (or can be expressed with existing dpmodel/array-api utilities).
  • The data-loading side is already backend-agnostic: grid/density are
    declared with the loader's special_shape="frame_major" contract.
  • The reserved grid type is the last entry of type_map; its descriptor
    input statistics are computed from the grid data during stat.
Plan
  1. Implement the reference version in dpmodel (descriptor-agnostic
    atomic model + density fitting + output definition).
  2. Wrap it for the PyTorch backend (reuse the existing pt classes as the
    wrapping layer where possible).
  3. Add pt_expt support once the dpmodel reference exists.
  4. (Optional) tf/jax/pd wrappers following the same pattern.
  5. Follow-up optimization noted during review: evaluate the descriptor
    only on grid centers instead of all merged grid+atom points
    (requires center-subset support in the descriptor API).
References
  • PR #5999 (this issue is linked from its description)
Further Information, Files, and Links

No response

主要言語
Python
スター
2.1k
フォーク
654
平均マージ
3日 10時間
マージ済み PR(30日)
13

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

deepmodeling/deepmd-kit のほかの issue

deepmodeling/deepmd-kit の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。