Add custom flags for GROMACS mdrun

Hi all,

I have finally managed to start using BioBB. I’m assembling a basic workflow using GROMACS 2021-2 (and perhaps soon I’ll change it to GROMACS 2022). I would like to add custom flags for mdrun, namely:

-dlb yes -v -nb gpu -pme gpu -bonded gpu -update gpu

which seem to be the best set of flags for the cluster where I’ll run my calculations. Looking at the properties dict of `gromacs.mdrun.Mdrun, only the entry

use_gpu : True/False

is possible. Is there any way of adding the flags I specified above to mdrun?

Best regards,

Marcos

Hi Marcos,

yes, although we try to keep the number of properties for the mdrun building block limited (the number of possible GROMACS mdrun parameters can be cumbersome), we added a hidden property for developers that want to use mdrun parameters that are not included as properties in the building block. The property is called “dev”, and is not present in the documentation on purpose.

Unfortunately, to use this “dev” property, you’ll need to first solve a code bug we recently found. Line 201 of the mdrun.py file that you can find in [anaconda3_install_folder]/envs/[env_name]/lib/python3.7/site-packages/biobb_md/gromacs/mdrun.py should be modified from:

self.cmd += [self.dev.split()]

to

self.cmd += self.dev.split()

After that, you can use the “dev” property like this:

prop = {
‘dev’ : “-dlb yes -v -nb gpu -pme gpu -bonded gpu -update gpu”
}

Hope that helps, sorry about the bug (will be fixed in the next release).

Please keep asking / commenting / suggesting in ask.bioexcel!

Best,

-Adam-

Hi Adam,

Thanks a lot for the fast reply! I’ll have a few other questions, indeed, but I guess it’s good to pose them in a different thread.

Cheers,

Marcos