Skip to content

docs(skills): add dpdata driver skill#953

Open
njzjz-bot wants to merge 1 commit intodeepmodeling:masterfrom
njzjz-bot:skills/dpdata-driver-skill
Open

docs(skills): add dpdata driver skill#953
njzjz-bot wants to merge 1 commit intodeepmodeling:masterfrom
njzjz-bot:skills/dpdata-driver-skill

Conversation

@njzjz-bot
Copy link
Contributor

@njzjz-bot njzjz-bot commented Mar 15, 2026

This PR adds an Agent Skill under skills/ documenting dpdata Python Driver plugins and System.predict() usage.

Includes a runnable ASE example (with uv inline script metadata for dependencies) and notes on supported driver keys.

Authored by OpenClaw (model: gpt-5.2)

Summary by CodeRabbit

  • Documentation

    • Added comprehensive guide for the dpdata-driver workflow, covering driver concepts, system labeling methods, runtime driver discovery, minimal workflow examples, and advanced features like HybridDriver.
  • Chores

    • Updated project configuration files.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. documentation dpdata labels Mar 15, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 15, 2026

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 2 untouched benchmarks


Comparing njzjz-bot:skills/dpdata-driver-skill (f5a383c) with master (d68b700)

Open in CodSpeed

@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.37%. Comparing base (d68b700) to head (f5a383c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #953   +/-   ##
=======================================
  Coverage   86.37%   86.37%           
=======================================
  Files          86       86           
  Lines        8086     8086           
=======================================
  Hits         6984     6984           
  Misses       1102     1102           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

📝 Walkthrough

Walkthrough

Two files are modified: .gitignore is updated to exclude local development artifacts (uv.lock and .venv/), and a new documentation file SKILL.md is added explaining the dpdata-driver workflow, including driver concepts, usage examples, and dependency requirements.

Changes

Cohort / File(s) Summary
Development Configuration
.gitignore
Added uv.lock and .venv/ to ignore rules for local development artifacts.
Documentation
skills/dpdata-driver/SKILL.md
New documentation file explaining dpdata-driver workflow: driver concepts, System.predict() usage, runtime driver discovery, workflow examples with ASE driver and HybridDriver, and dependency notes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

dpdata

Suggested reviewers

  • wanghan-iapcm
  • njzjz
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs(skills): add dpdata driver skill' directly and clearly describes the main change: adding documentation for a dpdata driver skill under the skills directory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/dpdata-driver/SKILL.md`:
- Around line 86-93: The example uses ASE's EMT calculator (calculator=EMT())
for an H2 demo which is unreliable; replace EMT with a general-purpose
calculator such as ASE's LennardJones to produce stable, documented results.
Update the snippet that constructs the System and calls
sys.predict(driver="ase", calculator=EMT()) so it instead passes
calculator=LennardJones() (or another suitable cross-species calculator) and
ensure any necessary imports (e.g., from ase.calculators.lennardjones import
LennardJones) are added and referenced where EMT and calculator=EMT() currently
appear.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1c67b4fd-be54-4d43-897f-dbedfa214c54

📥 Commits

Reviewing files that changed from the base of the PR and between d68b700 and f5a383c.

📒 Files selected for processing (2)
  • .gitignore
  • skills/dpdata-driver/SKILL.md

Comment on lines +86 to +93
from ase.calculators.emt import EMT
from dpdata.system import System

# write a tiny molecule
open("tmp.xyz", "w").write("""2\n\nH 0 0 0\nH 0 0 0.74\n""")

sys = System("tmp.xyz", fmt="xyz")
ls = sys.predict(driver="ase", calculator=EMT())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Does ASE EMT calculator support hydrogen molecules or is it only for metals?

💡 Result:

ASE’s built-in EMT calculator is primarily meant for a small set of fcc metals (Al, Cu, Ag, Au, Ni, Pd, Pt), but it does include parameters for H (and also C, N, O). Those non-metal parameters are explicitly marked as “not for any serious use”, i.e., you can run an H₂ molecule with EMT, but the results are not considered reliable. [1], [2]


Replace ASE's EMT calculator with a more suitable option for H₂ demonstration.

ASE's EMT calculator includes parameters for hydrogen, but these are explicitly marked as "not for any serious use." Using EMT with an H₂ molecule produces unreliable results unsuitable for documentation examples. Consider using LennardJones or another general-purpose calculator that reliably handles all atomic species.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/dpdata-driver/SKILL.md` around lines 86 - 93, The example uses ASE's
EMT calculator (calculator=EMT()) for an H2 demo which is unreliable; replace
EMT with a general-purpose calculator such as ASE's LennardJones to produce
stable, documented results. Update the snippet that constructs the System and
calls sys.predict(driver="ase", calculator=EMT()) so it instead passes
calculator=LennardJones() (or another suitable cross-species calculator) and
ensure any necessary imports (e.g., from ase.calculators.lennardjones import
LennardJones) are added and referenced where EMT and calculator=EMT() currently
appear.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new agent skill document for using dpdata “driver plugins” via the Python API (e.g., System.predict()), plus ignores common local uv/venv artifacts.

Changes:

  • Add skills/dpdata-driver/SKILL.md documenting driver keys, System.predict(), and usage examples (ASE + hybrid).
  • Update .gitignore to ignore uv.lock and .venv/.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
skills/dpdata-driver/SKILL.md New skill documentation for dpdata driver plugins and example workflows.
.gitignore Ignore local uv.lock and .venv/ development artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +30 to +34
```python
from dpdata.driver import Driver

print(sorted(Driver.get_drivers().keys()))
```
Comment on lines +72 to +77
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "dpdata",
# "numpy",
# "ase",
from dpdata.system import System

# write a tiny molecule
open("tmp.xyz", "w").write("""2\n\nH 0 0 0\nH 0 0 0.74\n""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation dpdata size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants