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

Use of try option with gmx insert-molecules? #219

Closed dpadula85 closed 2 years ago

dpadula85 commented 2 years ago

Hello,

I am using gmx insert-molecules through GromacsWrapper. I would need to use the -try option of the program, to increaase the number of attempts needed to introduce a new residue. However, I cannot do

gromacs.insert_molecules( f=my_file1, ci=my_file2, try=100)

because try is a python command. I also tried gromacs.insert_molecules( f=my_file1, ci=my_file2, input=('-try 100')

but apparently does not work. Any suggestion on how to do it?

orbeckst commented 2 years ago

Hi @dpadula85 , try prefixing with underscore:

gromacs.insert_molecules( f=my_file1, ci=my_file2, _try=100)

This hack is documented under https://gromacswrapper.readthedocs.io/en/latest/gromacs/core/core.html?highlight=underscore#gromacs.core.GromacsCommand but it's not easy to find.

dpadula85 commented 2 years ago

Hi @orbeckst, as usual my bad for not going thoroughly through the docs. Thanks once again for your help, let me take the occasion to say that I'm a big fan of your tools!

Cheers, D.

orbeckst commented 2 years ago

No problem & thank you!

(The docs are not particularly good but I don't have time to improve them — any contributions are welcome ;-) ).