Make lambda value to be gloabl parameter, so that we can change dynamically in OpenMM context.#29
Merged
Merged
Conversation
* Update the c interface with deepmd * Remove the setting to GPUNode for DeepPot * Improved the packaging of the plugin * Remove simtk in import modules * Small edit on version control in setup.py * Add ci config yaml * Fix bug in github actions * Build up the environment for CI unit test * Update github actions run on self-hosted runners * Update image to ghcr.io * Add docker login to ghcr.io * Update ci.yml * Update ci.yml * Update ci.yml * Add credentials in image pul * Update ci * Update ci * Update ci * Test * Small fixs for github actions running in container * Update env variable name * Update env variable name * Update env variable name * Minor fix * Update env variable name * test * test * Update test for CUDA platform * remove redundant files * Remove depend in CUDA toolkit include * Update container image * Fix bug in load conda environment * Fix bug in load conda environment * Debug * Debug * Debug * Debug * Small updates in image name
* Update the c interface with deepmd * Remove the setting to GPUNode for DeepPot * Improved the packaging of the plugin * Remove simtk in import modules * Small edit on version control in setup.py * Add ci config yaml * Fix bug in github actions * Build up the environment for CI unit test * Update github actions run on self-hosted runners * Update image to ghcr.io * Add docker login to ghcr.io * Update ci.yml * Update ci.yml * Update ci.yml * Add credentials in image pul * Update ci * Update ci * Update ci * Test * Small fixs for github actions running in container * Update env variable name * Update env variable name * Update env variable name * Minor fix * Update env variable name * test * test * Update test for CUDA platform * remove redundant files * Remove depend in CUDA toolkit include * Update container image * Fix bug in load conda environment * Fix bug in load conda environment * Debug * Debug * Debug * Debug * Small updates in image name * Configure CI with ci.yml (#1) * Update the c interface with deepmd * Remove the setting to GPUNode for DeepPot * Improved the packaging of the plugin * Remove simtk in import modules * Small edit on version control in setup.py * Add ci config yaml * Fix bug in github actions * Build up the environment for CI unit test * Update github actions run on self-hosted runners * Update image to ghcr.io * Add docker login to ghcr.io * Update ci.yml * Update ci.yml * Update ci.yml * Add credentials in image pul * Update ci * Update ci * Update ci * Test * Small fixs for github actions running in container * Update env variable name * Update env variable name * Update env variable name * Minor fix * Update env variable name * test * test * Update test for CUDA platform * remove redundant files * Remove depend in CUDA toolkit include * Update container image * Fix bug in load conda environment * Fix bug in load conda environment * Debug * Debug * Debug * Debug * Small updates in image name * Update readme * Utilized pytest in CI. * Small fix * Small fix * Small fix * Fix bug * Fix bug in pytest * Update * Fix bug in pytest * Update the test for python interface * Refactor the user interface of dp plugin. * Update __init__.py * Update test_deepmd_nve.py * Update test_dp_plugin_nve.py * Add tests for nvt, npt, alchemical simulations * Fix bug in alchemical simulation. * Updaste unit test threshold * Updaste unit test threshold * Update the simulation templates in tests. * Add support for DP/MM with dixed DP region * Avoid unit test * Refactor dp (#3) * Refactor DP plugin * Avoid unit test * Small fix in python * Update the unit test for dp.mm with fixed region * Small update in ci.yml * Add support for dp mask * Add support for DP/MM with adaptive DP region. * Add support of dp mask for reference platform * Fix bugs in adaptive dp region simulation * Update file name for pytest * Refactor dp (#4) * Refactor DP plugin * Avoid unit test * Small fix in python * Update the unit test for dp.mm with fixed region * Small update in ci.yml * Add support for dp mask * Add support for DP/MM with adaptive DP region. * Add support of dp mask for reference platform * Fix bugs in adaptive dp region simulation * Update file name for pytest * Update image in ci workflow * Fix bug in ci workflow * Fix in ci workflow * Fix in ci workflow * Refactor dp (#5) * Refactor DP plugin * Avoid unit test * Small fix in python * Update the unit test for dp.mm with fixed region * Small update in ci.yml * Add support for dp mask * Add support for DP/MM with adaptive DP region. * Add support of dp mask for reference platform * Fix bugs in adaptive dp region simulation * Update file name for pytest * Update image in ci workflow * Fix bug in ci workflow * Small fix * Test the support for dp mask * Add test for dp adaptive with multi regions * Add test for dp adaptive with multi regions * Small fix in unit test * Update deepmd C++ API with C API.
* Configure CI with ci.yml (#1) * Update the c interface with deepmd * Remove the setting to GPUNode for DeepPot * Improved the packaging of the plugin * Remove simtk in import modules * Small edit on version control in setup.py * Add ci config yaml * Fix bug in github actions * Build up the environment for CI unit test * Update github actions run on self-hosted runners * Update image to ghcr.io * Add docker login to ghcr.io * Update ci.yml * Update ci.yml * Update ci.yml * Add credentials in image pul * Update ci * Update ci * Update ci * Test * Small fixs for github actions running in container * Update env variable name * Update env variable name * Update env variable name * Minor fix * Update env variable name * test * test * Update test for CUDA platform * remove redundant files * Remove depend in CUDA toolkit include * Update container image * Fix bug in load conda environment * Fix bug in load conda environment * Debug * Debug * Debug * Debug * Small updates in image name * Refactor plugin for support C API of DeePMD-kit (#6) * Update the c interface with deepmd * Remove the setting to GPUNode for DeepPot * Improved the packaging of the plugin * Remove simtk in import modules * Small edit on version control in setup.py * Add ci config yaml * Fix bug in github actions * Build up the environment for CI unit test * Update github actions run on self-hosted runners * Update image to ghcr.io * Add docker login to ghcr.io * Update ci.yml * Update ci.yml * Update ci.yml * Add credentials in image pul * Update ci * Update ci * Update ci * Test * Small fixs for github actions running in container * Update env variable name * Update env variable name * Update env variable name * Minor fix * Update env variable name * test * test * Update test for CUDA platform * remove redundant files * Remove depend in CUDA toolkit include * Update container image * Fix bug in load conda environment * Fix bug in load conda environment * Debug * Debug * Debug * Debug * Small updates in image name * Configure CI with ci.yml (#1) * Update the c interface with deepmd * Remove the setting to GPUNode for DeepPot * Improved the packaging of the plugin * Remove simtk in import modules * Small edit on version control in setup.py * Add ci config yaml * Fix bug in github actions * Build up the environment for CI unit test * Update github actions run on self-hosted runners * Update image to ghcr.io * Add docker login to ghcr.io * Update ci.yml * Update ci.yml * Update ci.yml * Add credentials in image pul * Update ci * Update ci * Update ci * Test * Small fixs for github actions running in container * Update env variable name * Update env variable name * Update env variable name * Minor fix * Update env variable name * test * test * Update test for CUDA platform * remove redundant files * Remove depend in CUDA toolkit include * Update container image * Fix bug in load conda environment * Fix bug in load conda environment * Debug * Debug * Debug * Debug * Small updates in image name * Update readme * Utilized pytest in CI. * Small fix * Small fix * Small fix * Fix bug * Fix bug in pytest * Update * Fix bug in pytest * Update the test for python interface * Refactor the user interface of dp plugin. * Update __init__.py * Update test_deepmd_nve.py * Update test_dp_plugin_nve.py * Add tests for nvt, npt, alchemical simulations * Fix bug in alchemical simulation. * Updaste unit test threshold * Updaste unit test threshold * Update the simulation templates in tests. * Add support for DP/MM with dixed DP region * Avoid unit test * Refactor dp (#3) * Refactor DP plugin * Avoid unit test * Small fix in python * Update the unit test for dp.mm with fixed region * Small update in ci.yml * Add support for dp mask * Add support for DP/MM with adaptive DP region. * Add support of dp mask for reference platform * Fix bugs in adaptive dp region simulation * Update file name for pytest * Refactor dp (#4) * Refactor DP plugin * Avoid unit test * Small fix in python * Update the unit test for dp.mm with fixed region * Small update in ci.yml * Add support for dp mask * Add support for DP/MM with adaptive DP region. * Add support of dp mask for reference platform * Fix bugs in adaptive dp region simulation * Update file name for pytest * Update image in ci workflow * Fix bug in ci workflow * Fix in ci workflow * Fix in ci workflow * Refactor dp (#5) * Refactor DP plugin * Avoid unit test * Small fix in python * Update the unit test for dp.mm with fixed region * Small update in ci.yml * Add support for dp mask * Add support for DP/MM with adaptive DP region. * Add support of dp mask for reference platform * Fix bugs in adaptive dp region simulation * Update file name for pytest * Update image in ci workflow * Fix bug in ci workflow * Small fix * Test the support for dp mask * Add test for dp adaptive with multi regions * Add test for dp adaptive with multi regions * Small fix in unit test * Update deepmd C++ API with C API. * Move pb to lfs * Move pb to lfs * Update the download link to libdeepmd_c package * update readme * Add setGPURank function in Deep Potential model * Update Readme.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the DeepMD alchemical integration by promoting the lambda scaling factor to a global OpenMM parameter, enabling dynamic updates during simulation. It also updates example scripts, kernel implementations, and plugin APIs to support named lambda parameters.
- Introduce
LambdaNameand global parameter handling inDeepmdForceandDeepPotentialModel - Update example to set and reuse a single simulation context with
setParameter - Adjust reference/CUDA kernels to fetch lambda by name and bump version/build files
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/setup.py | Bumped package version to 0.3.0 |
| python/examples/water_solvation_energy/water_solvation_free_energy.py | Added LambdaName, changed data paths, reuse simulation context |
| python/OpenMMDeepmdPlugin/tools.py | DeepPotentialModel init updated, added setLambdaName |
| python/OpenMMDeepmdPlugin.i | Swig interface extended for lambda parameter |
| platforms/reference/src/ReferenceDeepmdKernels.cpp | Fetch lambda by name from context |
| platforms/reference/include/ReferenceDeepmdKernels.h | Added lambda_name member |
| platforms/cuda/src/CudaDeepmdKernels.cpp | Fetch lambda by name in CUDA kernel execute |
| platforms/cuda/include/CudaDeepmdKernels.h | Added CUDA kernel lambda_name member |
| openmmapi/src/DeepmdForceImpl.cpp | Exposed default parameters via getDefaultParameters |
| openmmapi/src/DeepmdForce.cpp | Added global parameter map, lambda APIs |
| openmmapi/include/internal/DeepmdForceImpl.h | Declared getDefaultParameters |
| openmmapi/include/DeepmdForce.h | Updated constructor and lambda parameter API |
| .conda/meta.yaml | Bumped conda recipe version |
| .conda/build.sh | Expanded install steps for DeepMD C library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.