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
[BUG] Incorrect application of friction coefficient in SOMD #48
Comments
In fact, as with most of the default SOMD configuration output, the specification for
Gives:
Gives:
Using |
@jmichel80: Could you clarify the units for |
I think this was overlooked as historically simulations were done with a Verlet Integrator. This thread discusses recommended settings for the LangevinMiddle integrator. openmm/openmm#2520 |
Thanks, that agrees with my default setting. Should we fix SOMD so that it inverts the value before passing to OpenMM, or should I just do this in BioSimSpace, i.e. treat the configuration parameter as the actual friction coefficient? I just wonder if changing it in Sire might have unintended consequences for anyone using old SOMD configuration files. |
Yes this may not be explicitly set by the users so could surprise someone, I would do this in BioSimSpace. |
I've reported this in BioSimSpace here and fixed here. Feel free to close as required. It's still obviously incorrect in the actual SOMD code, but most users will interface with this via BioSImSpace and it probably is something we can address with the re-write. Since the problem is now documented, things should be okay. Cheers. |
I will close this as it has been fixed in BioSimSpace. We will refer back to this when somd2 development ramps up, to make sure that it is correct in the new code. |
SOMD via
OpenMMD.py
specifies andinverse friction
coefficient with units of picoseconds, e.g. here. The default value can be found via:This is set in the
OpenMMFrEnergyST
object by usingsetFriction(inverse_friction.val)
. This is then applied to the OpenMM integrator as the friction coefficient directly, which should be in units of inverse picoseconds:Here's the OpenMM docs showing that it should be in inverse picoseconds.
The unit for the inverse friction coefficient is correct (picoseconds) but the value is not being inverted when creating the integrator. To work around this in BioSimSpace I have applied the thermostat time constant in an inverse fashion to the other engines, but have incorrectly stripped the unit which is causing SOMD to crash on load.
The text was updated successfully, but these errors were encountered: