Skip to content
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

Merged
merged 4 commits into from
Sep 13, 2022

Conversation

badisa
Copy link
Collaborator

@badisa badisa commented Sep 13, 2022

No description provided.

@@ -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
Copy link
Collaborator

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

Copy link
Owner

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.

Copy link
Collaborator Author

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?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in ee688cd and c23e492

Copy link
Collaborator

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?

Copy link
Collaborator

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)

Copy link
Owner

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
Copy link
Collaborator

@maxentile maxentile left a 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

Copy link
Owner

@proteneer proteneer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@badisa badisa enabled auto-merge (squash) September 13, 2022 21:34
@badisa badisa merged commit 49ce343 into master Sep 13, 2022
@badisa badisa deleted the task/fix-up-conversions branch September 28, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants