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 simulate.py #179
base: main
Are you sure you want to change the base?
Update simulate.py #179
Conversation
this commit fix #177 |
Added options to pass in key word arguments to the update_sigma_fn in Brownian Dynamics simulation
I have a few unorganized thoughts
|
In response to @cpgoodri 's comment. Rolling back to the original definition to ensure backward compatibility, and updated the documentation to clarify the definition of gamma. Also, added the option for user to pass in gamma in the apply_fn similarly to how temperature can be passed in.
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.
This looks great. Sorry I'm getting to the PR so late, it arrived during our performance review season and I'm just catching back up now. Thanks also for your comments @cpgoodri. I had one very minor comment about the naming of the function in quantity.py
, but otherwise I think this change looks great.
As a final minor point, can you try to keep column lengths to within 80 characters? Thanks!
@@ -470,3 +470,15 @@ def update_fn(state: PHopState, position: Array) -> PHopState: | |||
return PHopState(buff, phop) # pytype: disable=wrong-arg-count | |||
|
|||
return init_fn, update_fn | |||
|
|||
def gamma_from_stokes_law_3d(eta, radii, mass): |
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.
Would it make sense to rename this to be something a little bit more descriptive for someone who doesn't know what gamma is? Perhaps something like spherical_stokes_friction
? This isn't really my area of expertise, so feel free to pick something else!
Also, it seems like you'll need to sign the CLA before I am able to merge. |
updated Brownian simulation to keep track of radius instead of mass of particles.