-
Notifications
You must be signed in to change notification settings - Fork 1
Integration of waterEntropy into CodeEntropy
#107
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
Conversation
- Automatically detecting any water molecules in the universe and calling `_calculate_water_entropy` function and changing the `selection_string` to `not water` - `waterEntropy` function is called within `_calculate_water_entropy` and results are logged into `data_logger` - Removal of the `water_entropy` keyword in the `arg_config_manager` as automatic detection is now used - Additional test cases to check the functions are being called in the correct order and sequence - Updated `pyproject.toml` to ensure dependencies are up to date
- More robust way of calculating the total entropy of each molecule if it is water - Refactored how `_finalize_molecule_results` function operates, rather than a call per molecule it is run after all molecules have been processed - Additional test cases to fully capture the refactored `_calculate_water_entropy` function
- Remove duplicated adding and logging results, using `DataLogger` class to exclusivly handle all of the data handling - Restructured how results are diplayed, users will now see the `resname` rather than an arbitary internal counter to differentiate the molecules - Changing of `_args.selection_string` to ensure user's input is not overwritten if selection is not `all` - Updated test cases to reflect the changes made within this commit
jimboid
left a comment
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.
A great PR, it looks like the water entropy is essentially there and would function. I like the automation of detecting water, though I think this opens up the question which is the opposite of what we had before. Instead of not having water implemented and config options were present to turn it on (even though it wasn't implemented). We have the scenario where users have water present but are only wanting to run structural entropy calcs not being able to turn it off.
@jkalayan what are your thoughts on this? I think having the default as auto as it is with an override option to disable would be useful?
Code looks good, but since we have multiple reviewer requests I won't approve just yet so last one of @jkalayan or @skfegan to review can set the approval please, also give your opinion on the above question before merge.
…rent version `v.1.0.3`
…f._data_logger.molecule_data` and `self._data_logger.residue_data` after each level
|
I tried it with only 3 frames, so the water entropy calculation would not take too long. This gives negative eigenvalues for the protein vibrational entropy calculation and may not be well converged for the water entropy values, but it looks like the data from the water entropy code is being returned. |
Can you post the output here so that @jkalayan can take a look, then we can mark this to merge once happy. |
|
Hope this helps, it is a bit messy as we only have the debug file not the final formatted output, until I run it on a longer bit of the trajectory. |
|
Thanks Sarah, looks like the water entropy outputs are in the log file as expected, I'm happy with this integration of WE to CE |
jkalayan
left a comment
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 outputs look correct in Sarah's logfile, happy with this integration
…and `residue_data` after each level
Summary
This PR integrates waterEntropy into
CodeEntropy, enabling automatic detection and entropy calculation of water molecules.Changes
Integration of
waterEntropyintoCodeEntropy:_calculate_water_entropywhen water is detected.selection_stringto exclude water (not water).data_logger.Refactoring and Optimization:
_finalize_molecule_resultsto run once after all molecules are processed, improving efficiency._calculate_water_entropyfor more robust entropy calculations specific to water molecules._log_residue_dataand_log_resultfromEntropyManageras these are duplications of theadd_residue_dataandadd_results_datafunctions in theDataLoggerclass.Configuration and Testing Enhancements:
pyproject.tomlto ensure all dependencies are current.Impact:
CodeEntropyis now capable of calculating the entropy of molecules within aqueous (water-based) solutions.