-
Notifications
You must be signed in to change notification settings - Fork 18
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
Use openmm.LangevinMiddleIntegrator
#588
Conversation
I am quite annoyed that I can't pass named arguments to these SWIG-generated functions: In [1]: from openmm import LangevinMiddleIntegrator
In [2]: LangevinMiddleIntegrator(1, 1, 1)
Out[2]: <openmm.openmm.LangevinMiddleIntegrator; proxy of <Swig Object of type 'OpenMM::LangevinMiddleIntegrator *' at 0x107e67e40> >
In [3]: LangevinMiddleIntegrator(temperature=1, frictionCoeff=1, stepSize=1)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 LangevinMiddleIntegrator(temperature=1, frictionCoeff=1, stepSize=1)
TypeError: LangevinMiddleIntegrator.__init__() got an unexpected keyword argument 'temperature'
|
I think they should be -- not only are the units and default argument the same, but the collision_rate is converted to |
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.
LGTM -- thanks for the quick fix @mattwthompson!
My only thought -- does this need tests of some kind, e.g. to check the temperature issue? But that might be out of scope and a lot more work for a one-line change, happy to defer to you.
Agree it would be useful but I don't know a quick way to test that right now |
Description
Implements #587
Todos
Notable points that this PR has either accomplished or will accomplish.
openmmtools.integrators.LangevinIntegrator
->openmm.LangevinMiddleIntegrator
Questions
Status