force-h2020 / force-bdss-plugin-gromacs

Gromacs BDSS data sources, as well as a stand-alone wrappers around Gromacs tools.
MIT License
0 stars 0 forks source link

BUG: Subprocess Error handling if Gromacs not installed #18

Closed flongford closed 4 years ago

flongford commented 4 years ago

At the moment, the following error is raised if a Gromacs_genbox object tries to run without a Gromacs version (<= 4.6) installed:

FileNotFoundError: [Errno 2] No such file or directory: 'genbox': 'genbox'

The error handling in BaseGromacsCommands classes is currently designed to capture any subprocess errors and process them to reporting back to the user. Therefore, we should expect to see

RuntimeError: Gromacs ('genbox') did not run correctly. Error code: 127 executable 'genbox' was not found

With the standard error message from the subprocess call also appended.

This should be fixed and include a unit test to ensure the corrected response is raised.