Becksteinlab / GromacsWrapper

GromacsWrapper wraps system calls to GROMACS tools into thin Python classes (GROMACS 4.6.5 - 2024 supported).
https://gromacswrapper.readthedocs.org
GNU General Public License v3.0
169 stars 53 forks source link

Using differently named gromacs commands #124

Closed theavey closed 5 years ago

theavey commented 7 years ago

My installation of gromacs has commands named, for example, gmx_mpi (all ending _mpi). These then get used in this tools as, for example, gromacs.grompp_mpi. This normally works fine for me, but when trying to import gromacs.setup, there are two commands that are issues: one on line 585 of cbook.py and one on line 163 of setup.py. One calls tools.Grompp (which for me needed to be tools.Grompp_mpi) and the other calls gromacs.tools.Trjconv (which needed to be gromacs.tools.Trjconv_mpi).

I'm not sure if there is a way to automatically find what these should be called based on how the functions are defined, or if this is just something I need to deal with (and manually fix) because of my differently-named gromacs commands.

orbeckst commented 7 years ago

I can't think of a pretty way to fix this. If you know of a good way to handle this let me know!

However, I can think of a really rough way: Before you start, make aliases for the offending commands:

import gromacs
gromacs.tools.Grompp = gromacs.tools.Grompp_mpi
gromacs.tools.Trjconv = gromacs.tools.Trjconv_mpi

Does this work?

orbeckst commented 6 years ago

Closing (no further feedback).

orbeckst commented 6 years ago

I added your question to https://github.com/Becksteinlab/GromacsWrapper/wiki/Questions-and-Answers

orbeckst commented 5 years ago

Given that @theavey is working on a fix in PR #165 I reopen it.