-
Notifications
You must be signed in to change notification settings - Fork 1
Align CodeEntropy with entropy methods used in 2019 paper #267
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
base: main
Are you sure you want to change the base?
Conversation
…out Sconf calcs for speedier testing
| heavy_bonded, light_bonded = self.find_bonded_atoms(atom.index, system) | ||
| UA = atom + light_bonded | ||
| # UA_all = atom + heavy_bonded + light_bonded | ||
|
|
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.
Are these commented out lines to be removed?
CodeEntropy/axes.py
Outdated
| dimensions, | ||
| ) | ||
| # case4, not used in Jon's code, use case5 instead | ||
| # if len(heavy_bonded) == 2: |
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 these be removed too?
CodeEntropy/axes.py
Outdated
| eigenvalues, _eigenvectors = np.linalg.eig(moment_of_inertia) | ||
| # sort eigenvalues of moi tensor by largest to smallest magnitude | ||
| order = abs(eigenvalues).argsort()[::-1] # decending order | ||
| # principal_axes = principal_axes[order] # PI already ordered correctly |
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.
If principal axes is going to be a user set option, would this being commented out cause issues?
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.
Looks like the changes are good, I placed some questions on the PR source asking about some commented lines of code. Should we keep them or remove them, there was 1 line for principal axes that is commented out, if we are keeping those as a user requested option then is that one commented out line going to cause issues?
We also know from the numerical tests that this is much more accurate than the code it is going to fix.
Thanks James, removed redundant commented lines and functions that were only used to test the custom axes method |
Summary
CodeEntropy has been developed from code that calculated protein entropies, this PR aligns with the entropy methods used in the 2019 pure liquids paper, which compared calculated entropies with experimental values of ~50 pure liquids. To ensure CodeEntropy is comparative with these experimental results, this PR gives the options to use the custom axes and combined force-torque covariance matrix methods used in the 2019 paper.
The 2019 paper used the bonded axes to calculate Srovib at the united-atom (UA) level only, the bonded axes are dependent on what a united atom is bonded to. It also used a variant of the principal axes, where the heavy atom positions and combined united atom masses are used to calculate principal axes. Lastly, the 2019 paper used the combined force-torque covariance matrix to calculate trans- and ro-vibrational entropies at the molecule/highest level only.
This differs from the current CodeEntropy, which uses separate force/torque covariance matrices for all levels and uses the MDA principal_axes() function for axes across all length-scales/levels to rotate forces.
Changes
Update Covariance Matrices :
combined_forcetorqueargument in the config to activate this combined force-torque matrix, instead of using the default case of separate force/torque matrices across all levels.FTmat-TransvibrationalandFTmat-Rovibrational, otherwise the defaultTransvibrationalandRovibrational(using separate force/trque matrices) are displayed on the splashscreenCustom Axes:
customised_axesargument in the config to activate custom axes, instead of the default principal axesDimensions in Universe :
Impact