docs(skills): add dpdata driver skill#953
docs(skills): add dpdata driver skill#953njzjz-bot wants to merge 1 commit intodeepmodeling:masterfrom
Conversation
Merging this PR will not alter performance
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
📝 WalkthroughWalkthroughTwo files are modified: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
.gitignoreskills/dpdata-driver/SKILL.md
| 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()) |
There was a problem hiding this comment.
🧩 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.
There was a problem hiding this comment.
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.mddocumenting driver keys,System.predict(), and usage examples (ASE + hybrid). - Update
.gitignoreto ignoreuv.lockand.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.
| ```python | ||
| from dpdata.driver import Driver | ||
|
|
||
| print(sorted(Driver.get_drivers().keys())) | ||
| ``` |
| # /// 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""") |
This PR adds an Agent Skill under
skills/documenting dpdata Python Driver plugins andSystem.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
Chores