-
Notifications
You must be signed in to change notification settings - Fork 17
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
Uses correct conversion from kcal/mol -> kj/mol #825
Conversation
timemachine/fe/utils.py
Outdated
@@ -65,7 +67,7 @@ def convert_uM_to_kJ_per_mole(amount_in_uM): | |||
Binding potency in kJ/mol. | |||
|
|||
""" | |||
return 0.593 * np.log(amount_in_uM * 1e-6) * 4.18 | |||
return 0.593 * np.log(amount_in_uM * 1e-6) * constants.KCAL_TO_KJ |
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.
Based on prior notes, I think 0.593 is intended to be molar gas constant * temperature
, in units of kcal/mol, but
(1) the temperature may be inconsistent with DEFAULT_TEMP = 300
kelvin
(2) there may be precision loss.
https://www.wolframalpha.com/input?i=molar+gas+constant+*+300+kelvin = 0.5962 kcal/mol
https://www.wolframalpha.com/input?i=molar+gas+constant+*+298+kelvin = 0.5922 kcal/mol
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.
RT
is from the table
https://en.wikipedia.org/wiki/KT_(energy) (measured in kcal/mol)
Note that the T
here should probably be consistent with experimental temperatures, not simulation temperatures, if converting labelled data.
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.
Should we parameterize this to take in an experimental temperature?
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.
probably but lets default it to the IUPAC convention of 298.15 Kelvin
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.
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.
We don't have to change this now, but should project-wide DEFAULT_TEMP
also be changed from 300 to 298.15?
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.
(Irrelevant to current PR -- moved to Issue #827 for later reminder)
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.
yes
* Sets default temperature to 298, which is the same as what it was before * Makes one method call the other, to avoid duplication
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.
Nice changes and addition of constants.MOLAR_GAS_CONSTANT
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
No description provided.