OpenBioSim / biosimspace

An interoperable Python framework for biomolecular simulation.
https://biosimspace.openbiosim.org
GNU General Public License v3.0
71 stars 11 forks source link

Customizing the gmx mdrun Parameters #316

Closed ErikZhang-9762 closed 1 month ago

ErikZhang-9762 commented 1 month ago

Is your feature request related to a problem? Please describe. When using gromacs, define some parameters to speed up the simulation

Describe the solution you'd like I would like to be able to add the following customized parameters to the gromacs command afterwards for example:

gmx mdrun -v -deffnm gromacs  -ntmpi 1 -ntomp 28 -gpu_id 0 -pin on -pinstride 1 -pinoffset 0 -update gpu -bonded gpu

Describe alternatives you've considered None

Additional context None

Is there currently any way to do this?

lohedges commented 1 month ago

Yes, there are multiple ways to do this. You can either use the extra_args kwarg when creating your process object, or the setArg and setArgs methods on an existing process. The command-line arguments take the form of an ordered dictionary. You can use getArgs on an existing process to see how this is formatted. This is all documented in the API docs, e.g. here

https://biosimspace.openbiosim.org/api/generated/BioSimSpace.Process.Gromacs.html

lohedges commented 1 month ago

Closing since the question has been answered.