Valdes-Tresanco-MS / gmx_MMPBSA

gmx_MMPBSA is a new tool based on AMBER's MMPBSA.py aiming to perform end-state free energy calculations with GROMACS files.
https://valdes-tresanco-ms.github.io/gmx_MMPBSA/
GNU General Public License v3.0
226 stars 66 forks source link

[ENH]: Add CLI argument for Gromacs executable suffix/version #394

Closed gabrielctn closed 1 year ago

gabrielctn commented 1 year ago

In which tool?

gmx_MMPBSA

New Feature

Give the path to our Gromacs executable or give a suffix to gmx_MMPBSA command line argument.

Description

I have to manage several versions of Gromacs in parallel using modules. Therefore, I give the version as suffix to the executables, for example gmx_2022.5 or gmx_2023.1 instead of just gmx. Right now, gmx_MMPBSA checks if Gromacs is installed by executing which: https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/blob/c99f0b4cdc781f770addb15186f866c915e0f0e6/GMXMMPBSA/utils.py#L762 on the classical gmx executables: https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/blob/c99f0b4cdc781f770addb15186f866c915e0f0e6/GMXMMPBSA/utils.py#L742

What would be nice is to be able to give the path to our gromacs executable, or give a suffix to gmx_MMPBSA command line argument.

Relevance

high

Difficulty to implement

low

Valdes-Tresanco-MS commented 1 year ago

For testing purposes, I have about 6 versions of Gromacs installed. To activate one or the other, I source the GMXRC file of each installation using an alias, for example:

alias gmx21.5="source /home/mario/programs/gromacs2021.5/bin/GMXRC"

This way, the executable of this version is the one that registers in the PATH. If I want to change the version, I run the alias for that version, and so on. Does this solve this problem? Then I would not have to modify any variable

Valdes-Tresanco-MS commented 1 year ago

I assume my suggestion worked. I'm closing the issue, but feel free to open it again if you need to.