Open orbeckst opened 5 years ago
For checking if input is legal: run gromacs.grompp()
with an empty empty.mdp
and then parse the resulting default mdout.mdp
for all parameters that are legal with this version of Gromacs.
Actually, we should just create these lists for supported versions of Gromacs so that the function can also be used without gmx
being available.
As pointed out in PR #164 , the
edit_mdp()
function should use the MDP parser.This would also reduce extremely cryptic errors such as
gmx grompp: -include is not an option
, which happens when a custom template MDP file is used withgromacs.setup.MD()
but the template does not contain aninclude = ...
line, whichedit_mdp()
tries to replace but fails. The failed replacement is then interpreted as a commandline option forgromacs.grompp
. Although that's pretty hacky/crappy code logic in the https://github.com/Becksteinlab/GromacsWrapper/blob/cda0874a6469238197e1bef2bd51274b5c80f641/gromacs/setup.py#L796 function, writing a betteredit_mdp()
(which could, for instance, insert variables as opposed to a simple search and replace, or could check if they are legal variables) would help.