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 classes for simulating ellipsoid polymer systems. #102

Merged
merged 58 commits into from
Apr 9, 2024

Conversation

chrisjonesBSU
Copy link
Member

@chrisjonesBSU chrisjonesBSU commented Dec 1, 2023

This PR adds 2 new classes to the flowerMD library.

  1. flowermd.library.polymers.EllipsoidChain
  2. flowermd.library.forcefields.EllipsoidForcefield

These pull from the work I started in the polyellipsoid repo, but implements both the chain construction and forcefield here following flowermd design choices.

The main to-do remaining is deciding when, where and how we want to add the rigid body steps required. I think we should aim for not having to create a new System class that handles the remaining rigid body stuff, but figure out another way to handle it (a utils file, adding rigid body labeling to Molecule and/or Polymer, a flag in System to handle it, etc...)

Just a reminder, the ellipsoid "monomers" here have 3 kinds of particles:

  1. Center bead (used for pair interactions)
  2. Head and tail beads (used to tether beads along the chain)
  3. 2 additional "middle" beads (choice we made to handle angle bending potentials between 2 ellipsoids)

@chrisjonesBSU chrisjonesBSU added the enhancement New feature or request label Dec 1, 2023
@chrisjonesBSU chrisjonesBSU added the WIP Work in progress label Dec 1, 2023
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: Patch coverage is 99.21875% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 94.75%. Comparing base (7f85dc3) to head (c4abc75).
Report is 2 commits behind head on main.

❗ Current head c4abc75 differs from pull request most recent head 15041a1. Consider uploading reports for the commit 15041a1 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
+ Coverage   94.40%   94.75%   +0.35%     
==========================================
  Files          25       26       +1     
  Lines        1840     1965     +125     
==========================================
+ Hits         1737     1862     +125     
  Misses        103      103              
Files Coverage Δ
flowermd/base/simulation.py 92.02% <100.00%> (+0.38%) ⬆️
flowermd/base/system.py 92.39% <100.00%> (+0.39%) ⬆️
flowermd/library/__init__.py 100.00% <ø> (ø)
flowermd/library/forcefields.py 95.52% <100.00%> (+0.59%) ⬆️
flowermd/library/polymers.py 100.00% <100.00%> (ø)
flowermd/utils/__init__.py 100.00% <100.00%> (ø)
flowermd/utils/rigid_body.py 98.27% <98.27%> (ø)

@chrisjonesBSU chrisjonesBSU marked this pull request as ready for review December 8, 2023 19:37
@chrisjonesBSU
Copy link
Member Author

I'm not so sure about the code snippet in utils.rigid_body.py. For one, it probably isn't intuitive to look there if someone wonders how to use these Ellipsoid classes, and two, it is a big code snippet for doc strings. I think it would be better to have an examples section of the docs where this could be, or making a quick tutorial notebook since the tutorials are basically serving as our documented examples for now.

I can work on adding a tutorial for the time being since we are waiting to merge this until the JOSS submission is finished.

Other than that, I still think we may need some more sanity checks, so some simulations ran and see if things make sense.

@marjanalbooyeh
Copy link
Collaborator

I'm not so sure about the code snippet in utils.rigid_body.py. For one, it probably isn't intuitive to look there if someone wonders how to use these Ellipsoid classes, and two, it is a big code snippet for doc strings. I think it would be better to have an examples section of the docs where this could be, or making a quick tutorial notebook since the tutorials are basically serving as our documented examples for now.

I can work on adding a tutorial for the time being since we are waiting to merge this until the JOSS submission is finished.

Other than that, I still think we may need some more sanity checks, so some simulations ran and see if things make sense.

Yeah we can definitely add the tutorial for now and make it more comprehensive once we added the support for rigid body simulation for all types of molecules in flowermd .
I can get some big system simulations running and do sanity checks.

@chrisjonesBSU chrisjonesBSU added the new module PRs that contribute to creating new flowermd modules. label Mar 29, 2024
@chrisjonesBSU chrisjonesBSU merged commit af4adc0 into cmelab:main Apr 9, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new module PRs that contribute to creating new flowermd modules.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants