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 AHFE tutorial #100

Merged
merged 11 commits into from
Mar 26, 2024
Merged

Add AHFE tutorial #100

merged 11 commits into from
Mar 26, 2024

Conversation

hannahbaumann
Copy link
Contributor

No description provided.

Copy link

Binder 👈 Launch a binder notebook on branch OpenFreeEnergy/ExampleNotebooks/ahfe_tutorial

@@ -0,0 +1,842 @@
{
Copy link
Member

@IAlibay IAlibay Mar 4, 2024

Choose a reason for hiding this comment

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

To be discussed - I think some kind of diagramatic representation of the transformation might be worth it here? Like some kind of thermodynamic cycle figure?


Reply via ReviewNB

@@ -0,0 +1,842 @@
{
Copy link
Member

@IAlibay IAlibay Mar 4, 2024

Choose a reason for hiding this comment

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

(I know it's in the inline comment, but maybe it would be worth moving it here under a sub-heading?): we should mention what the endstates are in terms of chemicalsystems, i.e. hydration free energy of ligand is ligand+water to water.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this!

@@ -0,0 +1,842 @@
{
Copy link
Member

@IAlibay IAlibay Mar 4, 2024

Choose a reason for hiding this comment

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

Would it be worth adding an in-line explanation of what the setting is?


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this!

@@ -0,0 +1,842 @@
{
Copy link
Member

@IAlibay IAlibay Mar 4, 2024

Choose a reason for hiding this comment

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

It would be good to offer a short overview of what the default settings are and what we are changing here. Nothing too fancy, just a "by default we run N repeats with solvent & vacuum simulation lengths of Y and Z over L lambda windows, to speed things up here we instead do...".

Maybe also worth bringing down the number of repeats to 1 to speed up the notebook?


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this!

@@ -0,0 +1,842 @@
{
Copy link
Member

@IAlibay IAlibay Mar 4, 2024

Choose a reason for hiding this comment

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

You should be able to just call settings here and get the pprint dictionary output.


Reply via ReviewNB

@@ -0,0 +1,842 @@
{
Copy link
Member

@IAlibay IAlibay Mar 4, 2024

Choose a reason for hiding this comment

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

We don't have a way to gather results from CLI right now. Maybe it's worth saving the Python API results to disk and then here we re-load them? Not sure if that's too complicated for users though.


Reply via ReviewNB

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

Overall looks good! Just added some early comments (I know it's still WIP).

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@IAlibay
Copy link
Member

IAlibay commented Mar 6, 2024

@hannahbaumann I've added the results json by quick-running the benzene.json that was already there, just checking if this is what you needed?

@hannahbaumann
Copy link
Contributor Author

I added a short thing about reloading a json file, does this look good @IAlibay ?

@hannahbaumann hannahbaumann changed the title [WIP] Add AHFE tutorial Add AHFE tutorial Mar 25, 2024
@@ -0,0 +1,930 @@
{
Copy link
Member

@IAlibay IAlibay Mar 26, 2024

Choose a reason for hiding this comment

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

  1. [enhancement] Something I found out recently, apparently you can use greek alphabet in jupyter notebooks using the \ command, so \Delta might work (I never tried it in practice).
  2. re: "decoupled", I'm not sure if it would be too complicated for readers so feel free to say no - do you think that setting this as "partially decoupled (annihilated coulombics, decoupled Lennard-Jones)" might be worth it? (it makes it quite the sentence, so maybe not)

Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a sentence describing this.

@@ -0,0 +1,930 @@
{
Copy link
Member

@IAlibay IAlibay Mar 26, 2024

Choose a reason for hiding this comment

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

This is amazing!


Reply via ReviewNB

@@ -0,0 +1,930 @@
{
Copy link
Member

@IAlibay IAlibay Mar 26, 2024

Choose a reason for hiding this comment

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

I've been trying to think about the information flow here, how about something like this:

"

Finally now that we've run our simulations, let's go ahead and gather the free energies for both phases.

Python API

If you executed the simulations using the Python API, you will have generated a dag_results object. You can analyze these results by calling the Protocols' gather() method. This takes a list of completed DAG results and returns a AbsoluteSolvationProtocolResult which can return a free energy estimate and uncertainty by calling the get_estimate() and get_uncertainty() methods."


Reply via ReviewNB

@@ -0,0 +1,930 @@
{
Copy link
Member

@IAlibay IAlibay Mar 26, 2024

Choose a reason for hiding this comment

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

Then above this cells we could say:

"You can save the AbsoluteSolvationProtocolResult to a JSON output file in the following manner:"


Reply via ReviewNB

@@ -0,0 +1,930 @@
{
Copy link
Member

@IAlibay IAlibay Mar 26, 2024

Choose a reason for hiding this comment

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

And here above this one:

"

CLI / Quickrun

If you ran the simulation using the CLI (i.e. by calling openfe quickrun ) you will end up with the same JSON output file as the one created in the previous cell. To get your simulation results you can load them back into Python in the following manner:

"


Reply via ReviewNB

@IAlibay
Copy link
Member

IAlibay commented Mar 26, 2024

This is looking great! Just a couple of text suggestions for the last section (mostly trying to be a bit more verbose).

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

@IAlibay
Copy link
Member

IAlibay commented Mar 26, 2024

Just in case - I pushed 1fc6666 to update the settings outputs (the checkpoint default value changed)

@IAlibay IAlibay merged commit 556705f into main Mar 26, 2024
4 checks passed
@IAlibay IAlibay deleted the ahfe_tutorial branch March 26, 2024 13:56
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.

2 participants