Skip to content
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

Add custom forcefields #35

Closed
wants to merge 13 commits into from
Closed

Add custom forcefields #35

wants to merge 13 commits into from

Conversation

marjanalbooyeh
Copy link
Collaborator

@marjanalbooyeh marjanalbooyeh commented Aug 29, 2023

This PR adds a simple example of ML based force predictors to the forcefields library. (issue #15 )

I also separated the python file for xml based forcefields from custom forcefields.

The custom_forcefirlds.py would be a good place for now to add any kind of force object we can think of. We can think of a better name for it if we want.

I need to add a unit test for the ML based torch custom force. That requires some offline model training.

@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Merging #35 (99be3c6) into main (d91f1a9) will decrease coverage by 2.87%.
The diff coverage is 56.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
- Coverage   92.24%   89.37%   -2.87%     
==========================================
  Files          18       19       +1     
  Lines        1328     1384      +56     
==========================================
+ Hits         1225     1237      +12     
- Misses        103      147      +44     
Files Changed Coverage Δ
...md_organics/library/forcefields/xml_forcefields.py 100.00% <ø> (ø)
...organics/library/forcefields/custom_forcefields.py 55.10% <55.10%> (ø)
hoomd_organics/library/__init__.py 100.00% <100.00%> (ø)

@chrisjonesBSU
Copy link
Member

chrisjonesBSU commented Aug 29, 2023

One thing we might want to consider is whether or not we want to include pytorch in the default conda environments. Is pytorch pretty big and slow to install? For some dependencies that will rarely be used, we could add import checks and if they aren't installed throw errors with a message of the correct conda install command. What do you think?

@marjanalbooyeh
Copy link
Collaborator Author

One thing we might want to consider is whether or not we want to include pytorch in the default conda environments. Is pytorch pretty big and slow to install? For some dependencies that will rarely be used, we could add import checks and if they aren't installed throw errors with a message of the correct conda install command. What do you think?

Yeah, I agree. Installing Pytorch with CPU usually doesn't slow installation but the GPU installation may cause some complications with Cuda. Since Pytorch is not being used anywhere else in this package, I agree that we should take it out of the env file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add FF classes for table potentials and pytorch models.
2 participants