Skip to content

Add simulation extraction and viewing notebook#226

Open
jthorton wants to merge 16 commits into
mainfrom
traj-view
Open

Add simulation extraction and viewing notebook#226
jthorton wants to merge 16 commits into
mainfrom
traj-view

Conversation

@jthorton
Copy link
Copy Markdown
Contributor

@jthorton jthorton commented Sep 5, 2025

Fixes #223

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 5, 2025

Binder 👈 Launch a binder notebook on branch OpenFreeEnergy/ExampleNotebooks/traj-view

Comment thread simulation_visualisation/simulation_visualisation.ipynb Outdated
@@ -0,0 +1,316 @@
{
Copy link
Copy Markdown
Member

@IAlibay IAlibay Sep 23, 2025

Choose a reason for hiding this comment

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

We should make it clear here what Protocols this applies to, i.e. this is for HybridTop mostly (i.e. the tempfactor stuff is hybridtop only) but also applies for the most part to ABFEs, AHFEs, and SepTop.


Reply via ReviewNB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point, also is it worth adding sections specific to the other protocols to show how to extract the relevant end-state structures?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah that would be a good way to do this cleanly if it's not too much work!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added something for SepTop as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[nit] "any OpenFE free energy protocols"

(It's already implicit in the name of the tutorial, so it's ok to also not do this)

@@ -0,0 +1,316 @@
{
Copy link
Copy Markdown
Member

@IAlibay IAlibay Sep 23, 2025

Choose a reason for hiding this comment

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

Try adding the -nc or --no-clobber argument to wget? That way you won't double download the file.

Also this is a big nc file but the hybrid system doesn't include water. Would it be worth pulling down one of the smaller NC files? (I think we have newer generated ones?)


Reply via ReviewNB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes good idea can you point me to some?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Using a smaller traj now from the openfe_analysis zenodo data

Comment thread simulation_visualisation/simulation_visualisation.ipynb
Comment thread simulation_visualisation/simulation_visualisation.ipynb
@@ -0,0 +1,316 @@
{
Copy link
Copy Markdown
Member

@IAlibay IAlibay Sep 23, 2025

Choose a reason for hiding this comment

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

I'm thinking, in MDAnalysis, it might be easy enough to align the trajectory to the coordinates of the PDB file and write that out. That's technically "centering" for free.

Also I'd be happy with merging this as-is, but opening a separate issue to try to make an MDAnalysis-only solution work. I'm sure it's doable, just needs the right set of transformations.


Reply via ReviewNB

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Centering is now happening using the apply alignment transformation from openfe analysis.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Copy Markdown
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, thanks for doing this!

Added a few comments for things that we should address.

Comment thread simulation_visualisation/simulation_visualisation.ipynb
Comment thread simulation_visualisation/simulation_visualisation.ipynb
Comment thread simulation_visualisation/simulation_visualisation.ipynb
@hannahbaumann hannahbaumann self-assigned this Jun 1, 2026
@review-notebook-app
Copy link
Copy Markdown

review-notebook-app Bot commented Jun 3, 2026

View / edit / reply to this conversation on ReviewNB

IAlibay commented on 2026-06-03T13:14:02Z
----------------------------------------------------------------

Two questions:

1) Could you mention what Transformations are being applied by the method? Also can you mention that there's a separate one for solvent simulations if they want it.

2) Is there anything we can link to regarding when centering is a good idea and when it's not? I can't remember what Justin Lemkhul usually links to. Essentially what I mean here is that it would be good to say "don't center / align if you need to look at how components diffuse over time, etc..."


@review-notebook-app
Copy link
Copy Markdown

review-notebook-app Bot commented Jun 3, 2026

View / edit / reply to this conversation on ReviewNB

IAlibay commented on 2026-06-03T13:14:03Z
----------------------------------------------------------------

"We can fix this, however, using the alignment functions in openfe_analysis"

It would be good to reword this as using a helper method to add a transformation to the MDAnalysis Universe. That way folkls that know MDAnalysis things can easily understand what's going on. For those that don't it would be good to link to the Transformations documentions in MDAnalysis (just so that folks understand what that means). And then in the code block add a comment when you apply the transformation.


@review-notebook-app
Copy link
Copy Markdown

review-notebook-app Bot commented Jun 3, 2026

View / edit / reply to this conversation on ReviewNB

IAlibay commented on 2026-06-03T13:14:04Z
----------------------------------------------------------------

Maybe add a note before this code block that says "look now it's no longer broken"


@review-notebook-app
Copy link
Copy Markdown

review-notebook-app Bot commented Jun 3, 2026

View / edit / reply to this conversation on ReviewNB

IAlibay commented on 2026-06-03T13:14:05Z
----------------------------------------------------------------

This is great!


Copy link
Copy Markdown
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 looking great, just a couple small things and then I think it's good to go :)

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.

OpenFE Analylsis notebook

4 participants