-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding ML custom force for isotropic CG systems #178
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Since we probably don't want to add pytorch as a hard depdency, anywhere we import we should check if it's installed and give an error message if it's not. Maybe it says something like
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #178 +/- ##
==========================================
- Coverage 94.77% 93.40% -1.37%
==========================================
Files 26 29 +3
Lines 1970 2213 +243
==========================================
+ Hits 1867 2067 +200
- Misses 103 146 +43
|
Yeah I agree. I'll add that condition. |
for more information, see https://pre-commit.ci
This pull request focuses on the initial implementation of machine learning models for coarse-graining simulations. The changes include adding new utility functions, creating a custom force class, defining a neural network model, and providing a tutorial notebook.
Changes:
Introduced IsotropicCustomForce in flowermd/library/ml_forces.py to integrate a PyTorch model with the simulation framework.
Defined LennardJonesNeighborModel and its configuration in flowermd/modules/coarse_graining_ML/isotropic_coarse_graining.py for predicting forces based on neighbor distances.
Added functions adjust_periodic_boundary, find_neighbors, and neighbors_dr to flowermd/internal/box_neighbors_utils.py for handling periodic boundary conditions and neighbor calculations.
Added a new Jupyter notebook tutorials/6-flowermd-ML-coarse-graining.ipynb to demonstrate the usage of the pre-trained machine learning model for coarse-graining simulations.
Note: I'll wait for the units PR to be merged before merging this one.