Skip to content

Re-structure the cookbooks - #2319

Merged
hannahbaumann merged 26 commits into
mainfrom
restructure-cookbooks
Nov 4, 2026
Merged

hannahbaumann merged 26 commits into
mainfrom
restructure-cookbooks

Conversation

@hannahbaumann

@hannahbaumann hannahbaumann commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution:

  • No
  • Yes: Claude was used for rst formatting advice

Checklist

  • Read the AI Policy and filled in the AI-generated code disclosure.
  • Adhered to the contribution guidelines
  • All new code is appropriately documented (user-facing code must have complete docstrings).
  • Ran pre-commit: you can run pre-commit locally or comment on this PR with pre-commit.ci autofix.
  • Added a news entry, or the changes are not user-facing.

Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).

Developers certificate of origin

Comment thread docs/cookbook/index.rst

The typical way to use the Python API is to load a number of molecules you want to calculate free energies of, construct a :class:`LigandNetwork` connecting them in an efficient way, and then combine that with information for how each ligand should be simulated to construct an :class:`AlchemicalNetwork`, which specifies the entire simulation campaign. This provides a lot of flexibility in how molecules are specified, mapped, connected, and simulated, without exposing a great deal of complexity. OpenFE recommends this workflow for most users.

.. container:: deflist-flowchart

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.

I moved this to the introduction to the user guide instead, though the same chart is also in the under the hood, which we can revisit when we re-organize the user guide maybe?

@hannahbaumann
hannahbaumann marked this pull request as ready for review October 30, 2026 10:42
Comment thread docs/cookbook/index.rst
A network of ligand transformations.
loading_molecules
user_charges
bespoke_parameters

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It is pulling the recap heading out of the bespokefit guide and making it an entry here, can we stop it here or do we need to use a smaller heading in that guide?

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.

I think we have to do that in the ExampleNotebooks repo. Maybe in a separate PR there we can also update some of the titles of the cookbooks since some of these are not great.

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.

@jthorton I updated the titles here: OpenFreeEnergy/ExampleNotebooks#351
I mostly tried to make them a bit shorter and better suited for display in a side bar, please let me know what you think!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we build the docs against it here by changing

branch="main",
so we can see how this looks?

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.

Targeting the rename branch for now.

Comment thread docs/cookbook/index.rst Resolved
Comment thread docs/cookbook/index.rst Outdated

Cookbook
========
How-to guides

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we rename the file as well?

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.

I was thinking of doing that in a follow up PR as it would also mean renaming things in different links, but I could also already do that here!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'll leave it up to you happy for either.


.. admonition:: How-to guides

* :doc:`/cookbook/dumping_transformation`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this one be in the execution/index.rst page?

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, I think this could either be in the user guide or we could also have a notebook that looks at saving and inspecting json files and combines the two notebooks?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah I like the idea of a single notebook on working with the JSON files. In the meantime, we could just add this one to the how-to-guide links on the execution page its currently just a TODO?

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.

Done!

.. TODO make figure
.. .. figure:: ???
:alt: Setup -> (AlchemicalNetwork) -> Execution -> (ProtocolResults) -> Gather
.. container:: deflist-flowchart

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The formatting seems to have got messed up with this one.

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.

I changed this again! Not sure though yet if this is too much detail for the intro page.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is working now and does show a nice flow of the workflow so I think it would be okay to keep. I think the section names should match those in the list above so users can match them up.

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.

Changed the section names!

@jthorton jthorton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some minor optional points but this is looking much better thanks @hannahbaumann !

@hannahbaumann hannahbaumann self-assigned this Nov 2, 2026
Comment thread docs/cookbook/index.rst Resolved
@atravitz

atravitz commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

this looks so much better!

image

Nitpick: could we make the following changes so all the titles are consistent and fit the "How To ___" structure?

  • Dumping a Transformation to JSON become Dump a Transformation to JSON
  • Using jq to inspect OpenFE JSONs becomes Use jq to inspect OpenFE JSONs

Comment thread docs/cookbook/index.rst Resolved
Comment thread docs/cookbook/index.rst Resolved
Comment thread docs/cookbook/index.rst Outdated

.. rst-class:: arrow-down
*
repairing_broken_networks

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.

I don't feel super strongly about this, but it makes more sense to me to have "Working with Results" before "Repairing and extending", since it's likely a user would inspect results before deciding to repair or extend.

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.

I agree, moved this to after the results.

hannahbaumann and others added 3 commits November 3, 2026 08:51
Co-authored-by: Alyssa Travitz <31974495+atravitz@users.noreply.github.com>

@atravitz atravitz left a comment

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.

LGTM! just a reminder to merge OpenFreeEnergy/ExampleNotebooks#351 first and change this back to point to main!

Comment thread docs/conf.py Resolved
@hannahbaumann
hannahbaumann merged commit fe4a716 into main Nov 4, 2026
3 checks passed
@hannahbaumann
hannahbaumann deleted the restructure-cookbooks branch November 4, 2026 09:03
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.

3 participants