Skip to content

Conversation

@dwhswenson
Copy link
Member

@dwhswenson dwhswenson commented Aug 8, 2022

The prepare command in external engines can be used to, e.g, create input for a given trajectory. For example, in Gromacs, this runs the grompp command to incorporate snapshot-independent information in the mdp with the specific trr snapshot.

Previously, there was no catch for an error in prepare. This meant that the engine would try to run the trajetory, and, not finding required files, would fail with the unhelpful message "engine died unexpectedly." This PR provides a clearer error message in the case that the prepare step fails.

It provides a specific error for the Gromacs engine, and a generic error for any engine that returns a non-zero result code from prepare, but which hasn't already raised the error.

EDIT: Waiting on some test coverage here, although the actual gmx is outside our normal coverage since we don't install gmx in the test env. That said, I think we need some mechanism for also testing gmx integration in CI. I think there was no official conda-forge package when we first started with gmx integration, but there is now. (We have tests that test the integration, but they skip if there's no gmx in the $PATH.)

The `prepare` command in external engines can be used to, e.g,
create input for a given trajectory. For example, in Gromacs,
this runs the grompp command to incorporate snapshot-independent
information in the mdp with the specific trr snapshot.

Previously, there was no catch for an error in `prepare`. This
meant that the engine would try to run the trajetory, and, not
finding required files, would fail with the unhelpful message
"engine died unexpectedly." This PR provides a clearer error
message in the case that the `prepare` step fails.

It provides a specific error for the Gromacs engine, and a
generic error for any engine that returns a non-zero result code
from `prepare`, but which hasn't already raised the error.
@dwhswenson dwhswenson changed the title Fail fast if prepare fails in external engines [WIP] Fail fast if prepare fails in external engines Aug 8, 2022
@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #1118 (d384179) into master (965d8a2) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master    #1118      +/-   ##
==========================================
- Coverage   81.75%   81.75%   -0.01%     
==========================================
  Files         142      142              
  Lines       15612    15614       +2     
==========================================
+ Hits        12764    12765       +1     
- Misses       2848     2849       +1     
Impacted Files Coverage Δ
openpathsampling/engines/gromacs/engine.py 95.70% <ø> (ø)
openpathsampling/engines/external_engine.py 84.00% <75.00%> (-0.40%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

1 participant