-
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
Update simulation interface and add density to update_volume #42
Update simulation interface and add density to update_volume #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple small change requests.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
==========================================
+ Coverage 92.42% 93.83% +1.40%
==========================================
Files 18 18
Lines 1321 1347 +26
==========================================
+ Hits 1221 1264 +43
+ Misses 100 83 -17
|
Since this PR makes quite a bit of changes to |
This PR applies a couple of changes to the system and simulation classes:
run_update_volume
in simulation now takes in adensity
parameter which basically calculates the final box length given the density and shrinks or expands based on that.target_box
in system will be scaled by the reference length.calculate_box_length
has been added to utils, which calculates the target box length given the mass and density. Both system and simulation classes call this method now.P.S. In
calculate_box_length
method, I'm not sure if the mass conversion from amu to g is needed for all cases or not? This method is called in a few scenarios:1- During system initialization where no scaling has happened yet
2- When
run_update_volume
is called from the simulation. This can be on a scaled or unscaled system.Once we agree on these changes, I will update the unit tests and docstrings.