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

Add explanation for translation entropy constants #1077

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TyBalduf
Copy link
Contributor

@TyBalduf TyBalduf commented Aug 6, 2024

Worked out the constants following the expressions for translation entropy given (among other places) here

Signed-off-by: Ty Balduf <ty.balduf@schrodinger.com>
src/thermo.f90 Show resolved Hide resolved
@marcelmbn
Copy link
Member

marcelmbn commented Aug 7, 2024

Would fix also #649 and #1052.

@marcelmbn marcelmbn added the documentation Improvements or additions to documentation label Aug 7, 2024
Signed-off-by: Ty Balduf <ty.balduf@schrodinger.com>
@TyBalduf
Copy link
Contributor Author

TyBalduf commented Aug 8, 2024

So I rewrote the translation entropy equation and it gives approximately the same result (free energy differs by ~10^-5 kcal/mol)

If I work out the equivalent of magic4 and magic5, they come out to:

  • magic4 = 2.2879 (previously 2.2869)
  • magic5 = 2.3149 (previously 2.3135)

As best I can tell, these must have been originally been worked out with slightly different definitions of the constants. Not all the constants used in xTB correspond to their exact current value. For example in thermo, these values are defined:

   real(wp),parameter :: R = 1.98726D0    ! GAS CONSTANT IN CALORIES/(MOLE*K) (should be 1.9872*04*)

@marcelmbn Not sure if this is an acceptable difference and tests should be updated or this is too large a change and we just stick with the current magic constants, just providing some documentation on how they were likely calculated.

@marcelmbn
Copy link
Member

marcelmbn commented Aug 9, 2024

Thanks for the correct implementation of the constant!

  1. Currently, the tests fail due to a ~10-5 value mismatch in the thermo unit tests, which is not very surprising.
  2. I've checked your point regarding the gas constant and came to the same result. The right way to do it would probably be to update all necessary constants (if necessary) to their most recent SotA value and then update the reference unit test results with the updated values. IMHO, there's no reason to stick with old fixed numbers based on slightly wrong fundamental constants. EDIT: Regarding the SotA fundamental constants: If we update them anyway, it is probably a good idea to give a reference for the value (paper, reference data collection, ...).
  3. Finally, we should move all constants from thermo.f90 into mctc/mctc_constants.f90 and just use them at the beginning of thermodyn. Moreover, I'd also delete the old code, i.e. magic4, magic5, s_tr_old, ... as people could still look it up in the git history and we don't need it in the active code base.

Thank you in advance for your work on this project!

src/mctc/convert.f90 Outdated Show resolved Hide resolved
@marcelmbn
Copy link
Member

@TyBalduf Just wanted to ping you again on this topic. We'd be very grateful if you find the time to update the related points in the code to the SotA standard you suggested, including the correct ab initio constants, so that we can integrate everything into the main branch. 😊
If you are no longer working on it, a short note would also be nice.

@TyBalduf
Copy link
Contributor Author

TyBalduf commented Oct 4, 2024

I've been a little preoccupied of late and won't have a chance to work on this too soon. I can probably get to it eventually, its mainly a matter of updating tests. But I'm not actively working on it so if someone else wanted to take this on, there wouldn't be conflicting work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hess and ohess don't support diatomic molecules? Translational entropy calculations
2 participants