{"owner":"deepmodeling","repo":"deepmd-kit","hasSkills":true,"totalSkillsCount":4,"totalTokensCount":3071,"categories":["root-instruction","mcp-config","marketplace","plugin-manifest"],"hasMcp":true,"mcpConfig":{"mcpServers":{"deepmd-kit":{"command":"npx","args":["-y","@modelcontextprotocol/server-deepmd-kit"]}}},"found":["AGENTS.md",".cursor/mcp.json",".claude-plugin/marketplace.json",".claude-plugin/plugin.json"],"skills":{"AGENTS.md":"# DeePMD-kit\n\nDeePMD-kit is a deep learning package for many-body potential energy representation and molecular dynamics. It supports multiple backends (TensorFlow, PyTorch, JAX, Paddle) and integrates with MD packages like LAMMPS and i-PI.\n\n**Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**\n\n## Working Effectively\n\n### Bootstrap and Build Repository\n\n- Create virtual environment: `uv venv venv && source venv/bin/activate`\n- Install base dependencies: `uv pip install tensorflow-cpu` (takes ~8 seconds)\n- Install PyTorch: `uv pip install torch --index-url https://download.pytorch.org/whl/cpu` (takes ~5 seconds)\n- Build Python package: `uv pip install -e .[cpu,test]` -- takes 67 seconds. **NEVER CANCEL. Set timeout to 120+ seconds.**\n- Build C++ components: `export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec(\"tensorflow\").origin).parent)')` then `export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')` then `./source/install/build_cc.sh` -- takes 164 seconds. **NEVER CANCEL. Set timeout to 300+ seconds.**\n\n### Test Repository\n\n- Run single test: `pytest source/tests/tf/test_dp_test.py::TestDPTestEner::test_1frame -v` -- takes 8-13 seconds\n- Run test subset: `pytest source/tests/tf/test_dp_test.py -v` -- takes 15 seconds. **NEVER CANCEL. Set timeout to 60+ seconds.**\n- **Recommended: Use single test cases for validation instead of full test suite** -- full suite has 314 test files and takes 60+ minutes\n\n### Lint and Format Code\n\n- Install linter: `uv pip install ruff`\n- Run linting: `ruff check .` -- takes \\<1 second\n- Format code: `ruff format .` -- takes \\<1 second\n- **Always run `ruff check .` and `ruff format .` before committing changes or the CI will fail.**\n\n### Training and Validation\n\n- Test TensorFlow training: `cd examples/water/se_e2_a && dp train input.json --skip-neighbor-stat` -- training proceeds but is slow on CPU\n- Test PyTorch training: `cd examples/water/se_e2_a && dp --pt train input_torch.json --skip-neighbor-stat` -- training proceeds but is slow on CPU\n- **Training examples are for validation only. Real training takes hours/days. Timeout training tests after 60 seconds for validation.**\n\n## Validation Scenarios\n\n**ALWAYS manually validate any new code through at least one complete scenario:**\n\n### Basic Functionality Validation\n\n1. **CLI Interface**: Run `dp --version` and `dp -h` to verify installation\n1. **Python Interface**: Run `python -c \"import deepmd; import deepmd.tf; print('Both interfaces work')\"`\n1. **Backend Selection**: Test `dp --tf -h`, `dp --pt -h`, `dp --jax -h`, `dp --pd -h`\n\n### Training Workflow Validation\n\n1. **TensorFlow Training**: `cd examples/water/se_e2_a && timeout 60 dp train input.json --skip-neighbor-stat` -- should start training and show decreasing loss\n1. **PyTorch Training**: `cd examples/water/se_e2_a && timeout 60 dp --pt train input_torch.json --skip-neighbor-stat` -- should start training and show decreasing loss\n1. **Verify training output**: Look for \"batch X: trn: rmse\" messages showing decreasing error values\n\n### Test-Based Validation\n\n1. **Core Tests**: `pytest source/tests/tf/test_dp_test.py::TestDPTestEner::test_1frame -v` -- should pass in ~10 seconds\n1. **Multi-backend**: Test both TensorFlow and PyTorch components work\n\n## Common Commands and Timing\n\n### Repository Structure\n\n```\nls -la [repo-root]\n.github/               # GitHub workflows and templates\nCONTRIBUTING.md        # Contributing guide\nREADME.md             # Project overview\ndeepmd/               # Python package source\ndoc/                  # Documentation\nexamples/             # Training examples and configurations\npyproject.toml        # Python build configuration\nsource/               # C++ source code and tests\n```\n\n### Key Directories and Files\n\n- `deepmd/` - Main Python package with backend implementations\n- `source/lib/` - Core C++ library\n- `source/op/` - Backend-specific operators (TF, PyTorch, etc.)\n- `source/api_cc/` - C++ API\n- `source/api_c/` - C API\n- `source/tests/` - Test suite (314 test files)\n- `examples/water/se_e2_a/` - Basic water training example\n- `examples/` - Various model examples for different scenarios\n\n### Common CLI Commands\n\n- `dp --version` - Show version information\n- `dp -h` - Show help and available commands\n- `dp train input.json` - Train a model (TensorFlow backend)\n- `dp --pt train input.json` - Train with PyTorch backend\n- `dp --jax train input.json` - Train with JAX backend\n- `dp --pd train input.json` - Train with Paddle backend\n- `dp test -m model.pb -s system/` - Test a trained model\n- `dp freeze -o model.pb` - Freeze/save a model\n\n### Build Dependencies and Setup\n\n- **Python 3.10+** required\n- **Virtual environment** strongly recommended: `uv venv venv && source venv/bin/activate`\n- **Backend dependencies**: TensorFlow, PyTorch, JAX, or Paddle (install before building)\n- **Build tools**: CMake, C++ compiler, scikit-build-core\n- **C++ build requires**: Both TensorFlow and PyTorch installed, set TENSORFLOW_ROOT and PYTORCH_ROOT environment variables\n\n### Key Configuration Files\n\n- `pyproject.toml` - Python build configuration and dependencies\n- `source/CMakeLists.txt` - C++ build configuration\n- `examples/water/se_e2_a/input.json` - Basic TensorFlow training config\n- `examples/water/se_e2_a/input_torch.json` - Basic PyTorch training config\n\n## Frequent Patterns and Time Expectations\n\n### Installation and Build Times\n\n- **Virtual environment setup**: ~5 seconds\n- **TensorFlow CPU install**: ~8 seconds\n- **PyTorch CPU install**: ~5 seconds\n- **Python package build**: ~67 seconds. **NEVER CANCEL.**\n- **C++ components build**: ~164 seconds. **NEVER CANCEL.**\n- **Full fresh setup**: ~3-4 minutes total\n\n### Testing Times\n\n- **Single test**: 8-13 seconds\n- **Test file (~5 tests)**: ~15 seconds\n- **Backend-specific test subset**: 15-30 minutes. **Use sparingly.**\n- **Full test suite (314 files)**: 60+ minutes. **Avoid in development - use single tests instead.**\n\n### Linting and Formatting\n\n- **Ruff check**: \\<1 second\n- **Ruff format**: \\<1 second\n- **Pre-commit hooks**: May have network issues, use individual tools\n\n### Commit Messages and PR Titles\n\n**All commit messages and PR titles must follow [conventional commit specification](https://www.conventionalcommits.org/):**\n\n- **Format**: `type(scope): description`\n- **Common types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `ci`\n- **Examples**:\n  - `feat(core): add new descriptor type`\n  - `fix(tf): resolve memory leak in training`\n  - `docs: update installation guide`\n  - `ci: add workflow for testing`\n\n### Training and Model Operations\n\n- **Training initialization**: 10-30 seconds\n- **Training per batch**: 0.1-1 second (CPU), much faster on GPU\n- **Model freezing**: 5-15 seconds\n- **Model testing**: 10-30 seconds\n\n## Backend-Specific Notes\n\n### TensorFlow Backend\n\n- **Default backend** when no flag specified\n- **Configuration**: Use `input.json` format\n- **Training**: `dp train input.json`\n- **Requirements**: `tensorflow` or `tensorflow-cpu` package\n\n### PyTorch Backend\n\n- **Activation**: Use `--pt` flag or `export DP_BACKEND=pytorch`\n- **Configuration**: Use `input_torch.json` format typically\n- **Training**: `dp --pt train input_torch.json`\n- **Requirements**: `torch` package\n\n### JAX Backend\n\n- **Activation**: Use `--jax` flag\n- **Training**: `dp --jax train input.json`\n- **Requirements**: `jax` and related packages\n- **Note**: Experimental backend, may have limitations\n\n### Paddle Backend\n\n- **Activation**: Use `--pd` flag\n- **Training**: `dp --pd train input.json`\n- **Requirements**: `paddlepaddle` package\n- **Note**: Less commonly used\n\n## Critical Warnings\n\n- **NEVER CANCEL BUILD OPERATIONS**: Python build takes 67 seconds, C++ build takes 164 seconds\n- **USE SINGLE TESTS FOR VALIDATION**: Run individual tests instead of full test suite for faster feedback\n- **ALWAYS activate virtual environment**: Build and runtime failures occur without proper environment\n- **ALWAYS install backend dependencies first**: TensorFlow/PyTorch required before building C++ components\n- **ALWAYS run linting before commits**: `ruff check . && ruff format .` or CI will fail\n- **ALWAYS test both Python and C++ components**: Some features require both to be built\n- **ALWAYS follow conventional commit format**: All commit messages and PR titles must use conventional commit specification (`type(scope): description`)\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/plugin.json)"},"files":{"AGENTS.md":"# DeePMD-kit\n\nDeePMD-kit is a deep learning package for many-body potential energy representation and molecular dynamics. It supports multiple backends (TensorFlow, PyTorch, JAX, Paddle) and integrates with MD packages like LAMMPS and i-PI.\n\n**Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**\n\n## Working Effectively\n\n### Bootstrap and Build Repository\n\n- Create virtual environment: `uv venv venv && source venv/bin/activate`\n- Install base dependencies: `uv pip install tensorflow-cpu` (takes ~8 seconds)\n- Install PyTorch: `uv pip install torch --index-url https://download.pytorch.org/whl/cpu` (takes ~5 seconds)\n- Build Python package: `uv pip install -e .[cpu,test]` -- takes 67 seconds. **NEVER CANCEL. Set timeout to 120+ seconds.**\n- Build C++ components: `export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec(\"tensorflow\").origin).parent)')` then `export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')` then `./source/install/build_cc.sh` -- takes 164 seconds. **NEVER CANCEL. Set timeout to 300+ seconds.**\n\n### Test Repository\n\n- Run single test: `pytest source/tests/tf/test_dp_test.py::TestDPTestEner::test_1frame -v` -- takes 8-13 seconds\n- Run test subset: `pytest source/tests/tf/test_dp_test.py -v` -- takes 15 seconds. **NEVER CANCEL. Set timeout to 60+ seconds.**\n- **Recommended: Use single test cases for validation instead of full test suite** -- full suite has 314 test files and takes 60+ minutes\n\n### Lint and Format Code\n\n- Install linter: `uv pip install ruff`\n- Run linting: `ruff check .` -- takes \\<1 second\n- Format code: `ruff format .` -- takes \\<1 second\n- **Always run `ruff check .` and `ruff format .` before committing changes or the CI will fail.**\n\n### Training and Validation\n\n- Test TensorFlow training: `cd examples/water/se_e2_a && dp train input.json --skip-neighbor-stat` -- training proceeds but is slow on CPU\n- Test PyTorch training: `cd examples/water/se_e2_a && dp --pt train input_torch.json --skip-neighbor-stat` -- training proceeds but is slow on CPU\n- **Training examples are for validation only. Real training takes hours/days. Timeout training tests after 60 seconds for validation.**\n\n## Validation Scenarios\n\n**ALWAYS manually validate any new code through at least one complete scenario:**\n\n### Basic Functionality Validation\n\n1. **CLI Interface**: Run `dp --version` and `dp -h` to verify installation\n1. **Python Interface**: Run `python -c \"import deepmd; import deepmd.tf; print('Both interfaces work')\"`\n1. **Backend Selection**: Test `dp --tf -h`, `dp --pt -h`, `dp --jax -h`, `dp --pd -h`\n\n### Training Workflow Validation\n\n1. **TensorFlow Training**: `cd examples/water/se_e2_a && timeout 60 dp train input.json --skip-neighbor-stat` -- should start training and show decreasing loss\n1. **PyTorch Training**: `cd examples/water/se_e2_a && timeout 60 dp --pt train input_torch.json --skip-neighbor-stat` -- should start training and show decreasing loss\n1. **Verify training output**: Look for \"batch X: trn: rmse\" messages showing decreasing error values\n\n### Test-Based Validation\n\n1. **Core Tests**: `pytest source/tests/tf/test_dp_test.py::TestDPTestEner::test_1frame -v` -- should pass in ~10 seconds\n1. **Multi-backend**: Test both TensorFlow and PyTorch components work\n\n## Common Commands and Timing\n\n### Repository Structure\n\n```\nls -la [repo-root]\n.github/               # GitHub workflows and templates\nCONTRIBUTING.md        # Contributing guide\nREADME.md             # Project overview\ndeepmd/               # Python package source\ndoc/                  # Documentation\nexamples/             # Training examples and configurations\npyproject.toml        # Python build configuration\nsource/               # C++ source code and tests\n```\n\n### Key Directories and Files\n\n- `deepmd/` - Main Python package with backend implementations\n- `source/lib/` - Core C++ library\n- `source/op/` - Backend-specific operators (TF, PyTorch, etc.)\n- `source/api_cc/` - C++ API\n- `source/api_c/` - C API\n- `source/tests/` - Test suite (314 test files)\n- `examples/water/se_e2_a/` - Basic water training example\n- `examples/` - Various model examples for different scenarios\n\n### Common CLI Commands\n\n- `dp --version` - Show version information\n- `dp -h` - Show help and available commands\n- `dp train input.json` - Train a model (TensorFlow backend)\n- `dp --pt train input.json` - Train with PyTorch backend\n- `dp --jax train input.json` - Train with JAX backend\n- `dp --pd train input.json` - Train with Paddle backend\n- `dp test -m model.pb -s system/` - Test a trained model\n- `dp freeze -o model.pb` - Freeze/save a model\n\n### Build Dependencies and Setup\n\n- **Python 3.10+** required\n- **Virtual environment** strongly recommended: `uv venv venv && source venv/bin/activate`\n- **Backend dependencies**: TensorFlow, PyTorch, JAX, or Paddle (install before building)\n- **Build tools**: CMake, C++ compiler, scikit-build-core\n- **C++ build requires**: Both TensorFlow and PyTorch installed, set TENSORFLOW_ROOT and PYTORCH_ROOT environment variables\n\n### Key Configuration Files\n\n- `pyproject.toml` - Python build configuration and dependencies\n- `source/CMakeLists.txt` - C++ build configuration\n- `examples/water/se_e2_a/input.json` - Basic TensorFlow training config\n- `examples/water/se_e2_a/input_torch.json` - Basic PyTorch training config\n\n## Frequent Patterns and Time Expectations\n\n### Installation and Build Times\n\n- **Virtual environment setup**: ~5 seconds\n- **TensorFlow CPU install**: ~8 seconds\n- **PyTorch CPU install**: ~5 seconds\n- **Python package build**: ~67 seconds. **NEVER CANCEL.**\n- **C++ components build**: ~164 seconds. **NEVER CANCEL.**\n- **Full fresh setup**: ~3-4 minutes total\n\n### Testing Times\n\n- **Single test**: 8-13 seconds\n- **Test file (~5 tests)**: ~15 seconds\n- **Backend-specific test subset**: 15-30 minutes. **Use sparingly.**\n- **Full test suite (314 files)**: 60+ minutes. **Avoid in development - use single tests instead.**\n\n### Linting and Formatting\n\n- **Ruff check**: \\<1 second\n- **Ruff format**: \\<1 second\n- **Pre-commit hooks**: May have network issues, use individual tools\n\n### Commit Messages and PR Titles\n\n**All commit messages and PR titles must follow [conventional commit specification](https://www.conventionalcommits.org/):**\n\n- **Format**: `type(scope): description`\n- **Common types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `ci`\n- **Examples**:\n  - `feat(core): add new descriptor type`\n  - `fix(tf): resolve memory leak in training`\n  - `docs: update installation guide`\n  - `ci: add workflow for testing`\n\n### Training and Model Operations\n\n- **Training initialization**: 10-30 seconds\n- **Training per batch**: 0.1-1 second (CPU), much faster on GPU\n- **Model freezing**: 5-15 seconds\n- **Model testing**: 10-30 seconds\n\n## Backend-Specific Notes\n\n### TensorFlow Backend\n\n- **Default backend** when no flag specified\n- **Configuration**: Use `input.json` format\n- **Training**: `dp train input.json`\n- **Requirements**: `tensorflow` or `tensorflow-cpu` package\n\n### PyTorch Backend\n\n- **Activation**: Use `--pt` flag or `export DP_BACKEND=pytorch`\n- **Configuration**: Use `input_torch.json` format typically\n- **Training**: `dp --pt train input_torch.json`\n- **Requirements**: `torch` package\n\n### JAX Backend\n\n- **Activation**: Use `--jax` flag\n- **Training**: `dp --jax train input.json`\n- **Requirements**: `jax` and related packages\n- **Note**: Experimental backend, may have limitations\n\n### Paddle Backend\n\n- **Activation**: Use `--pd` flag\n- **Training**: `dp --pd train input.json`\n- **Requirements**: `paddlepaddle` package\n- **Note**: Less commonly used\n\n## Critical Warnings\n\n- **NEVER CANCEL BUILD OPERATIONS**: Python build takes 67 seconds, C++ build takes 164 seconds\n- **USE SINGLE TESTS FOR VALIDATION**: Run individual tests instead of full test suite for faster feedback\n- **ALWAYS activate virtual environment**: Build and runtime failures occur without proper environment\n- **ALWAYS install backend dependencies first**: TensorFlow/PyTorch required before building C++ components\n- **ALWAYS run linting before commits**: `ruff check . && ruff format .` or CI will fail\n- **ALWAYS test both Python and C++ components**: Some features require both to be built\n- **ALWAYS follow conventional commit format**: All commit messages and PR titles must use conventional commit specification (`type(scope): description`)\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/plugin.json)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# DeePMD-kit\n\nDeePMD-kit is a deep learning package for many-body potential energy representation and molecular dynamics. It supports multiple backends (TensorFlow, PyTorch, JAX, Paddle) and integrates with MD packages like LAMMPS and i-PI.\n\n**Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**\n\n## Working Effectively\n\n### Bootstrap and Build Repository\n\n- Create virtual environment: `uv venv venv && source venv/bin/activate`\n- Install base dependencies: `uv pip install tensorflow-cpu` (takes ~8 seconds)\n- Install PyTorch: `uv pip install torch --index-url https://download.pytorch.org/whl/cpu` (takes ~5 seconds)\n- Build Python package: `uv pip install -e .[cpu,test]` -- takes 67 seconds. **NEVER CANCEL. Set timeout to 120+ seconds.**\n- Build C++ components: `export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec(\"tensorflow\").origin).parent)')` then `export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')` then `./source/install/build_cc.sh` -- takes 164 seconds. **NEVER CANCEL. Set timeout to 300+ seconds.**\n\n### Test Repository\n\n- Run single test: `pytest source/tests/tf/test_dp_test.py::TestDPTestEner::test_1frame -v` -- takes 8-13 seconds\n- Run test subset: `pytest source/tests/tf/test_dp_test.py -v` -- takes 15 seconds. **NEVER CANCEL. Set timeout to 60+ seconds.**\n- **Recommended: Use single test cases for validation instead of full test suite** -- full suite has 314 test files and takes 60+ minutes\n\n### Lint and Format Code\n\n- Install linter: `uv pip install ruff`\n- Run linting: `ruff check .` -- takes \\<1 second\n- Format code: `ruff format .` -- takes \\<1 second\n- **Always run `ruff check .` and `ruff format .` before committing changes or the CI will fail.**\n\n### Training and Validation\n\n- Test TensorFlow training: `cd examples/water/se_e2_a && dp train input.json --skip-neighbor-stat` -- training proceeds but is slow on CPU\n- Test PyTorch training: `cd examples/water/se_e2_a && dp --pt train input_torch.json --skip-neighbor-stat` -- training proceeds but is slow on CPU\n- **Training examples are for validation only. Real training takes hours/days. Timeout training tests after 60 seconds for validation.**\n\n## Validation Scenarios\n\n**ALWAYS manually validate any new code through at least one complete scenario:**\n\n### Basic Functionality Validation\n\n1. **CLI Interface**: Run `dp --version` and `dp -h` to verify installation\n1. **Python Interface**: Run `python -c \"import deepmd; import deepmd.tf; print('Both interfaces work')\"`\n1. **Backend Selection**: Test `dp --tf -h`, `dp --pt -h`, `dp --jax -h`, `dp --pd -h`\n\n### Training Workflow Validation\n\n1. **TensorFlow Training**: `cd examples/water/se_e2_a && timeout 60 dp train input.json --skip-neighbor-stat` -- should start training and show decreasing loss\n1. **PyTorch Training**: `cd examples/water/se_e2_a && timeout 60 dp --pt train input_torch.json --skip-neighbor-stat` -- should start training and show decreasing loss\n1. **Verify training output**: Look for \"batch X: trn: rmse\" messages showing decreasing error values\n\n### Test-Based Validation\n\n1. **Core Tests**: `pytest source/tests/tf/test_dp_test.py::TestDPTestEner::test_1frame -v` -- should pass in ~10 seconds\n1. **Multi-backend**: Test both TensorFlow and PyTorch components work\n\n## Common Commands and Timing\n\n### Repository Structure\n\n```\nls -la [repo-root]\n.github/               # GitHub workflows and templates\nCONTRIBUTING.md        # Contributing guide\nREADME.md             # Project overview\ndeepmd/               # Python package source\ndoc/                  # Documentation\nexamples/             # Training examples and configurations\npyproject.toml        # Python build configuration\nsource/               # C++ source code and tests\n```\n\n### Key Directories and Files\n\n- `deepmd/` - Main Python package with backend implementations\n- `source/lib/` - Core C++ library\n- `source/op/` - Backend-specific operators (TF, PyTorch, etc.)\n- `source/api_cc/` - C++ API\n- `source/api_c/` - C API\n- `source/tests/` - Test suite (314 test files)\n- `examples/water/se_e2_a/` - Basic water training example\n- `examples/` - Various model examples for different scenarios\n\n### Common CLI Commands\n\n- `dp --version` - Show version information\n- `dp -h` - Show help and available commands\n- `dp train input.json` - Train a model (TensorFlow backend)\n- `dp --pt train input.json` - Train with PyTorch backend\n- `dp --jax train input.json` - Train with JAX backend\n- `dp --pd train input.json` - Train with Paddle backend\n- `dp test -m model.pb -s system/` - Test a trained model\n- `dp freeze -o model.pb` - Freeze/save a model\n\n### Build Dependencies and Setup\n\n- **Python 3.10+** required\n- **Virtual environment** strongly recommended: `uv venv venv && source venv/bin/activate`\n- **Backend dependencies**: TensorFlow, PyTorch, JAX, or Paddle (install before building)\n- **Build tools**: CMake, C++ compiler, scikit-build-core\n- **C++ build requires**: Both TensorFlow and PyTorch installed, set TENSORFLOW_ROOT and PYTORCH_ROOT environment variables\n\n### Key Configuration Files\n\n- `pyproject.toml` - Python build configuration and dependencies\n- `source/CMakeLists.txt` - C++ build configuration\n- `examples/water/se_e2_a/input.json` - Basic TensorFlow training config\n- `examples/water/se_e2_a/input_torch.json` - Basic PyTorch training config\n\n## Frequent Patterns and Time Expectations\n\n### Installation and Build Times\n\n- **Virtual environment setup**: ~5 seconds\n- **TensorFlow CPU install**: ~8 seconds\n- **PyTorch CPU install**: ~5 seconds\n- **Python package build**: ~67 seconds. **NEVER CANCEL.**\n- **C++ components build**: ~164 seconds. **NEVER CANCEL.**\n- **Full fresh setup**: ~3-4 minutes total\n\n### Testing Times\n\n- **Single test**: 8-13 seconds\n- **Test file (~5 tests)**: ~15 seconds\n- **Backend-specific test subset**: 15-30 minutes. **Use sparingly.**\n- **Full test suite (314 files)**: 60+ minutes. **Avoid in development - use single tests instead.**\n\n### Linting and Formatting\n\n- **Ruff check**: \\<1 second\n- **Ruff format**: \\<1 second\n- **Pre-commit hooks**: May have network issues, use individual tools\n\n### Commit Messages and PR Titles\n\n**All commit messages and PR titles must follow [conventional commit specification](https://www.conventionalcommits.org/):**\n\n- **Format**: `type(scope): description`\n- **Common types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `ci`\n- **Examples**:\n  - `feat(core): add new descriptor type`\n  - `fix(tf): resolve memory leak in training`\n  - `docs: update installation guide`\n  - `ci: add workflow for testing`\n\n### Training and Model Operations\n\n- **Training initialization**: 10-30 seconds\n- **Training per batch**: 0.1-1 second (CPU), much faster on GPU\n- **Model freezing**: 5-15 seconds\n- **Model testing**: 10-30 seconds\n\n## Backend-Specific Notes\n\n### TensorFlow Backend\n\n- **Default backend** when no flag specified\n- **Configuration**: Use `input.json` format\n- **Training**: `dp train input.json`\n- **Requirements**: `tensorflow` or `tensorflow-cpu` package\n\n### PyTorch Backend\n\n- **Activation**: Use `--pt` flag or `export DP_BACKEND=pytorch`\n- **Configuration**: Use `input_torch.json` format typically\n- **Training**: `dp --pt train input_torch.json`\n- **Requirements**: `torch` package\n\n### JAX Backend\n\n- **Activation**: Use `--jax` flag\n- **Training**: `dp --jax train input.json`\n- **Requirements**: `jax` and related packages\n- **Note**: Experimental backend, may have limitations\n\n### Paddle Backend\n\n- **Activation**: Use `--pd` flag\n- **Training**: `dp --pd train input.json`\n- **Requirements**: `paddlepaddle` package\n- **Note**: Less commonly used\n\n## Critical Warnings\n\n- **NEVER CANCEL BUILD OPERATIONS**: Python build takes 67 seconds, C++ build takes 164 seconds\n- **USE SINGLE TESTS FOR VALIDATION**: Run individual tests instead of full test suite for faster feedback\n- **ALWAYS activate virtual environment**: Build and runtime failures occur without proper environment\n- **ALWAYS install backend dependencies first**: TensorFlow/PyTorch required before building C++ components\n- **ALWAYS run linting before commits**: `ruff check . && ruff format .` or CI will fail\n- **ALWAYS test both Python and C++ components**: Some features require both to be built\n- **ALWAYS follow conventional commit format**: All commit messages and PR titles must use conventional commit specification (`type(scope): description`)\n","isInternal":false,"tokens":2171,"sizeBytes":8586},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/marketplace.json)","tokens":300,"sizeBytes":202},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/plugin.json","title":"claude-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/plugin.json)","tokens":300,"sizeBytes":188},{"name":"mcp.json","path":".cursor/mcp.json","rawUrl":"https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.cursor/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.cursor/mcp.json)","tokens":300,"sizeBytes":181}],"systemPromptSnippet":"<yakaai_skills repo=\"deepmodeling/deepmd-kit\">\n<!-- File: AGENTS.md (Tokens: ~2171 | Category: root-instruction) -->\n# DeePMD-kit\n\nDeePMD-kit is a deep learning package for many-body potential energy representation and molecular dynamics. It supports multiple backends (TensorFlow, PyTorch, JAX, Paddle) and integrates with MD packages like LAMMPS and i-PI.\n\n**Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**\n\n## Working Effectively\n\n### Bootstrap and Build Repository\n\n- Create virtual environment: `uv venv venv && source venv/bin/activate`\n- Install base dependencies: `uv pip install tensorflow-cpu` (takes ~8 seconds)\n- Install PyTorch: `uv pip install torch --index-url https://download.pytorch.org/whl/cpu` (takes ~5 seconds)\n- Build Python package: `uv pip install -e .[cpu,test]` -- takes 67 seconds. **NEVER CANCEL. Set timeout to 120+ seconds.**\n- Build C++ components: `export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec(\"tensorflow\").origin).parent)')` then `export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')` then `./source/install/build_cc.sh` -- takes 164 seconds. **NEVER CANCEL. Set timeout to 300+ seconds.**\n\n### Test Repository\n\n- Run single test: `pytest source/tests/tf/test_dp_test.py::TestDPTestEner::test_1frame -v` -- takes 8-13 seconds\n- Run test subset: `pytest source/tests/tf/test_dp_test.py -v` -- takes 15 seconds. **NEVER CANCEL. Set timeout to 60+ seconds.**\n- **Recommended: Use single test cases for validation instead of full test suite** -- full suite has 314 test files and takes 60+ minutes\n\n### Lint and Format Code\n\n- Install linter: `uv pip install ruff`\n- Run linting: `ruff check .` -- takes \\<1 second\n- Format code: `ruff format .` -- takes \\<1 second\n- **Always run `ruff check .` and `ruff format .` before committing changes or the CI will fail.**\n\n### Training and Validation\n\n- Test TensorFlow training: `cd examples/water/se_e2_a && dp train input.json --skip-neighbor-stat` -- training proceeds but is slow on CPU\n- Test PyTorch training: `cd examples/water/se_e2_a && dp --pt train input_torch.json --skip-neighbor-stat` -- training proceeds but is slow on CPU\n- **Training examples are for validation only. Real training takes hours/days. Timeout training tests after 60 seconds for validation.**\n\n## Validation Scenarios\n\n**ALWAYS manually validate any new code through at least one complete scenario:**\n\n### Basic Functionality Validation\n\n1. **CLI Interface**: Run `dp --version` and `dp -h` to verify installation\n1. **Python Interface**: Run `python -c \"import deepmd; import deepmd.tf; print('Both interfaces work')\"`\n1. **Backend Selection**: Test `dp --tf -h`, `dp --pt -h`, `dp --jax -h`, `dp --pd -h`\n\n### Training Workflow Validation\n\n1. **TensorFlow Training**: `cd examples/water/se_e2_a && timeout 60 dp train input.json --skip-neighbor-stat` -- should start training and show decreasing loss\n1. **PyTorch Training**: `cd examples/water/se_e2_a && timeout 60 dp --pt train input_torch.json --skip-neighbor-stat` -- should start training and show decreasing loss\n1. **Verify training output**: Look for \"batch X: trn: rmse\" messages showing decreasing error values\n\n### Test-Based Validation\n\n1. **Core Tests**: `pytest source/tests/tf/test_dp_test.py::TestDPTestEner::test_1frame -v` -- should pass in ~10 seconds\n1. **Multi-backend**: Test both TensorFlow and PyTorch components work\n\n## Common Commands and Timing\n\n### Repository Structure\n\n```\nls -la [repo-root]\n.github/               # GitHub workflows and templates\nCONTRIBUTING.md        # Contributing guide\nREADME.md             # Project overview\ndeepmd/               # Python package source\ndoc/                  # Documentation\nexamples/             # Training examples and configurations\npyproject.toml        # Python build configuration\nsource/               # C++ source code and tests\n```\n\n### Key Directories and Files\n\n- `deepmd/` - Main Python package with backend implementations\n- `source/lib/` - Core C++ library\n- `source/op/` - Backend-specific operators (TF, PyTorch, etc.)\n- `source/api_cc/` - C++ API\n- `source/api_c/` - C API\n- `source/tests/` - Test suite (314 test files)\n- `examples/water/se_e2_a/` - Basic water training example\n- `examples/` - Various model examples for different scenarios\n\n### Common CLI Commands\n\n- `dp --version` - Show version information\n- `dp -h` - Show help and available commands\n- `dp train input.json` - Train a model (TensorFlow backend)\n- `dp --pt train input.json` - Train with PyTorch backend\n- `dp --jax train input.json` - Train with JAX backend\n- `dp --pd train input.json` - Train with Paddle backend\n- `dp test -m model.pb -s system/` - Test a trained model\n- `dp freeze -o model.pb` - Freeze/save a model\n\n### Build Dependencies and Setup\n\n- **Python 3.10+** required\n- **Virtual environment** strongly recommended: `uv venv venv && source venv/bin/activate`\n- **Backend dependencies**: TensorFlow, PyTorch, JAX, or Paddle (install before building)\n- **Build tools**: CMake, C++ compiler, scikit-build-core\n- **C++ build requires**: Both TensorFlow and PyTorch installed, set TENSORFLOW_ROOT and PYTORCH_ROOT environment variables\n\n### Key Configuration Files\n\n- `pyproject.toml` - Python build configuration and dependencies\n- `source/CMakeLists.txt` - C++ build configuration\n- `examples/water/se_e2_a/input.json` - Basic TensorFlow training config\n- `examples/water/se_e2_a/input_torch.json` - Basic PyTorch training config\n\n## Frequent Patterns and Time Expectations\n\n### Installation and Build Times\n\n- **Virtual environment setup**: ~5 seconds\n- **TensorFlow CPU install**: ~8 seconds\n- **PyTorch CPU install**: ~5 seconds\n- **Python package build**: ~67 seconds. **NEVER CANCEL.**\n- **C++ components build**: ~164 seconds. **NEVER CANCEL.**\n- **Full fresh setup**: ~3-4 minutes total\n\n### Testing Times\n\n- **Single test**: 8-13 seconds\n- **Test file (~5 tests)**: ~15 seconds\n- **Backend-specific test subset**: 15-30 minutes. **Use sparingly.**\n- **Full test suite (314 files)**: 60+ minutes. **Avoid in development - use single tests instead.**\n\n### Linting and Formatting\n\n- **Ruff check**: \\<1 second\n- **Ruff format**: \\<1 second\n- **Pre-commit hooks**: May have network issues, use individual tools\n\n### Commit Messages and PR Titles\n\n**All commit messages and PR titles must follow [conventional commit specification](https://www.conventionalcommits.org/):**\n\n- **Format**: `type(scope): description`\n- **Common types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `ci`\n- **Examples**:\n  - `feat(core): add new descriptor type`\n  - `fix(tf): resolve memory leak in training`\n  - `docs: update installation guide`\n  - `ci: add workflow for testing`\n\n### Training and Model Operations\n\n- **Training initialization**: 10-30 seconds\n- **Training per batch**: 0.1-1 second (CPU), much faster on GPU\n- **Model freezing**: 5-15 seconds\n- **Model testing**: 10-30 seconds\n\n## Backend-Specific Notes\n\n### TensorFlow Backend\n\n- **Default backend** when no flag specified\n- **Configuration**: Use `input.json` format\n- **Training**: `dp train input.json`\n- **Requirements**: `tensorflow` or `tensorflow-cpu` package\n\n### PyTorch Backend\n\n- **Activation**: Use `--pt` flag or `export DP_BACKEND=pytorch`\n- **Configuration**: Use `input_torch.json` format typically\n- **Training**: `dp --pt train input_torch.json`\n- **Requirements**: `torch` package\n\n### JAX Backend\n\n- **Activation**: Use `--jax` flag\n- **Training**: `dp --jax train input.json`\n- **Requirements**: `jax` and related packages\n- **Note**: Experimental backend, may have limitations\n\n### Paddle Backend\n\n- **Activation**: Use `--pd` flag\n- **Training**: `dp --pd train input.json`\n- **Requirements**: `paddlepaddle` package\n- **Note**: Less commonly used\n\n## Critical Warnings\n\n- **NEVER CANCEL BUILD OPERATIONS**: Python build takes 67 seconds, C++ build takes 164 seconds\n- **USE SINGLE TESTS FOR VALIDATION**: Run individual tests instead of full test suite for faster feedback\n- **ALWAYS activate virtual environment**: Build and runtime failures occur without proper environment\n- **ALWAYS install backend dependencies first**: TensorFlow/PyTorch required before building C++ components\n- **ALWAYS run linting before commits**: `ruff check . && ruff format .` or CI will fail\n- **ALWAYS test both Python and C++ components**: Some features require both to be built\n- **ALWAYS follow conventional commit format**: All commit messages and PR titles must use conventional commit specification (`type(scope): description`)\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/marketplace.json)\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.claude-plugin/plugin.json)\n\n<!-- File: .cursor/mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/deepmodeling/deepmd-kit/HEAD/.cursor/mcp.json)\n</yakaai_skills>"}