-
Notifications
You must be signed in to change notification settings - Fork 30
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 more informative info to system_checker #228
Conversation
The first failure is happening because there is no minimization prior to simulation here. Looks like the second failure is the same reason. |
Yes, as in #223 . Apparently something changed in the not-too-distant past in OpenMM which made it so simulations which would formerly simulate without being minimized first now cannot. I've run into this in many many places here and elsewhere, where there was old code (from Kyle I think) which would previously run but now does not. My failure to reproduce in #223 was due to the fact that I still had an older OpenMM on my computer so it worked fine for me. I suppose I should fix this as part of this PR, though it's really an unrelated issue. |
You sure it isn't packmol? |
Would be great if you could! You can add simulation.minimizeEnergy() |
Yes, definitely not packmol. It's unchanged since the tests were working. Changes on OpenMM side. |
Wow, looks like the initial energy is actually
I'll look into this separately if you want to create an issue and tag me. You can merge this PR, though! |
@jchodera - yeah, I just saw the same thing. Really weird. I was actually going to leave this issue open (hence the [WIP]) until I got a chance to make the debug info more clear, unless there is some reason to merge now. |
No pressing need! |
I can clear up some units, etc., info in these if you can answer this for me: If I have an OpenMM simulation and I loop over forces, like so: for force in simulation0.system.GetForces():
if type(force) == mm.PeriodicTorsionForce:
force0 = force
i0, i1, i2, i3, per, phase, k0 = force0.getTorsionParameters(k)
phase_unit, k0_unit = phase.unit, k0.unit
phase, k0 = phase / phase_unit, k0 / k0_unit
print( per, phase, k0 ) or something along those lines (summarizing some of Kyle's code from system_checker), then what units do I find the whole idea of dividing by units very confusing. It makes sense to me when it's in the context of a print statement, as you're just asking it to print out the value in the corresponding units. But I struggle with the above because the question is what units it was in at the end... Also, if I have The relevant code is basically here: https://github.com/choderalab/openmoltools/pull/228/files#diff-75c255d30df61e86edf538dbaf4b6f58R460 |
If you have a quantity q, you don't want to compute q/q.unit and then guess the units since this defeats the point of using units. Instead, ask for things in the units you want. If you want kcal/mol, you can get a dimensionless number with q/unit.kilocalories_per_mole. The periodicity is unitless, and k has units compatible with kilocalories_per_mole. |
John, On Mon, Jul 4, 2016 at 5:49 PM, John Chodera [email protected]
Right, and phase should be compatible with radians... :) DM
David Mobley |
No! The barrier heights |
Ah, I see what you mean. Odd. Weird to use notation of an angle (i.e. |
Whoops, right you are!
|
Merging this, as I've fixed a bunch of units and debugging info, and I haven't broken any of the tests which weren't already broken. |
Adding more informative output information to
system_checker
for comparing details ofOpenMM
systems, as per #227 .So far I just added additional info for periodic torsional forces. I'll be adding this in the order in which I need it.