Load MACE-OFF pretrained models into DeePMD-GNN for MD simulations#96
Load MACE-OFF pretrained models into DeePMD-GNN for MD simulations#96
Conversation
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
|
@copilot, you implemented this PR in the wrong way. The current implementation is: DeePMD-GNN <--> DeePMD-kit <--> Amber. Thus, you don't need to implement the sander interface directly, but just need to implement a DeePMD-kit wrapper. We already have a wrapper for the MACE models, but you need to have an interface that can load existing MACE models. |
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
You're absolutely right. I've reimplemented this correctly. The new implementation follows the proper architecture:
Changes in commit e996a86:
Users can now: from deepmd_gnn import load_mace_off_model, convert_mace_off_to_deepmd
# Load into MaceModel wrapper
model = load_mace_off_model("small")
# Or convert to frozen format for MD
convert_mace_off_to_deepmd("small", "frozen_model.pth")The frozen model works with AMBER/sander through DeePMD-kit's existing interface, with QM/MM support via the DPRc mechanism. |
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
…, fix formatting Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
…tion Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
|
@copilot 1. Add a command line for the new feature. |
- Add command line interface with download-mace-off and convert-mace-off commands - Add comprehensive unit tests for MACE-OFF functionality - Configure ruff to allow print statements in appropriate files - Add type annotations and fix all linting issues - All pre-commit checks now pass Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
All three requirements have been implemented in commit 465c386:
|
- Remove all @patch decorators and MagicMock usage - Add real model download and loading tests marked with @pytest.mark.slow - Test actual MACE-OFF model download, loading, and conversion - Verify model structure and attributes with real models - Keep simple unit test for invalid atomic numbers validation - All linting checks pass Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
- Add logging module to mace_off.py and __main__.py - Replace all print() calls with logger.info/warning/debug calls - Fix blind exception catching: use specific (RuntimeError, torch.jit.Error) instead of Exception - Remove T201 and BLE001 exceptions from pyproject.toml for these files - Configure logging with INFO level and simple message format in CLI - All linting checks now pass without exceptions Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
for more information, see https://pre-commit.ci
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.