Skip to content

Add advice on running plainMD to troubleshooting - #2326

Merged
jthorton merged 7 commits into
mainfrom
docs/plainmd_trouble
Nov 3, 2026
Merged

jthorton merged 7 commits into
mainfrom
docs/plainmd_trouble

Conversation

@jthorton

@jthorton jthorton commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Fixes #2309.

Also cleans up some of the example error messages to render them in a clearer way.

LLM / AI generated code disclosure

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

  • No
  • Yes: [If yes, please provide details here]
    Small clean up edits of my draft by GPT-6 Luna

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

@hannahbaumann hannahbaumann 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.

Thanks @jthorton , lgtm, just left some small comments!

Comment thread docs/guide/protocols/plainmd.rst Resolved
Comment thread docs/guide/troubleshooting.rst Resolved
Comment thread docs/guide/troubleshooting.rst Resolved
Comment thread docs/guide/troubleshooting.rst Outdated
Many of the errors above (e.g. parameter assignment failures, ``NaN`` errors during simulation, box size errors) are due problems with the input structures which are not identified until protocol execution.
A quick way to check this *before* running an expensive free energy protocol is to run a short, MD simulation of your system with the :class:`.PlainMDProtocol` (see the :doc:`Plain MD protocol guide <protocols/plainmd>`).

This confirms that:

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.

Maybe something like This helps check that since it does not necessarily confirm that the system won't crash in equilibration, e.g. as we saw the more careful equilibration in the MD protocol can remove some clashed with close waters that lead to Nans in the RBFE protocol.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point changed this.

Comment thread docs/guide/troubleshooting.rst Resolved
Comment thread docs/guide/troubleshooting.rst Outdated
dag,
shared_basedir=output_dir,
scratch_basedir=output_dir,
keep_shared=False,

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.

would the users want to keep files to inspect in case it crashes or since it's so short it wouldn't be worth it?

@jthorton jthorton Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think all they would get by default is the pdbs as the default write frequency is 20 ps would could change this though?

@IAlibay IAlibay left a comment

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.

Couple of small things, otherwise lgtm

Comment thread docs/guide/troubleshooting.rst Outdated
This confirms that:

- The receptor can be parameterized together with the ligand (e.g. no missing residues, caps or unsupported chemistry) by the same force fields you intend to use in your production protocol.
- The system can be minimized and equilibrated producing a stable simulation without clashes or ``NaN`` errors.

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.

"non alchemical system" - this might be a repeat of what Hannah suggested though

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added this.

Comment thread docs/guide/troubleshooting.rst Resolved
Comment thread docs/guide/troubleshooting.rst Resolved
Comment thread docs/guide/troubleshooting.rst Outdated
from openfe.protocols.openmm_md.plain_md_methods import PlainMDProtocol
import pathlib

ligand = openfe.SmallMoleculeComponent.from_sdf_file("ligand.sdf")

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] because it's documentation, adding a comment here about loading their own files (and maybe the example including a cofactor), could be useful.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good idea added.

jthorton and others added 3 commits November 2, 2026 10:14

@IAlibay IAlibay left a comment

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.

lgtm, thanks!

@hannahbaumann hannahbaumann 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.

Thanks @jthorton , lgtm!

@jthorton
jthorton enabled auto-merge (squash) November 3, 2026 08:48
@jthorton
jthorton disabled auto-merge November 3, 2026 08:49
@jthorton
jthorton merged commit 24c0999 into main Nov 3, 2026
3 checks passed
@jthorton
jthorton deleted the docs/plainmd_trouble branch November 3, 2026 08:50
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.

Add running short MD to the troubleshooting guide

3 participants