[gmx-developers] How to utilize the index file in code? GROMACS 4.6.3

Anton Feenstra k.a.feenstra at vu.nl
Thu Nov 28 11:27:00 CET 2013

On 28/11/13 10:58, Jheng Wei Li wrote:
> Hmmm, actually I modify it to do the Bsin Hopping,
> so outside the mainloop I add a for_loop to do that and also change the
> geometry...
> That's why I need to trouble myself with that..

You may be interested in the grompy python interface we (mainly work of 
René Pool and Martin Hoefling IIRC) made for mdrunner. It splits 
mdrunner into three functions: init, run and finalize, which can be 
called from python. It allows multiple calls of the 'run' part, so you 
can do your coordinate modification inbetween. It avoids nearly all of 
the overhead one would have through scripting and repeated grompp; we 
measured about 1.5% overhead doing plain MD through python calls 
compared to vanilla mdrun.

Drawback is, it was developed on gromacs 4.0.7, so would need some 
porting to work with newer versions of gromacs. There are more people 
interested in that (e.g., some of the guys in Groningen), so it will be 
a good idea to combine efforts here.

This is what René wrote about it earlier on the list:
You may want to have a look at grompy 
(https://github.com/GromPy/GromPy). This is a python wrapper around the 
gromacs 4.0.7 library, using direct C-library calls. One current 
application is sampling the grand-canonical ensemble using a hybrid MC 

The application is published here:


  _____________ _______________________________________________________
|             |                                                       |
|  _   _  ___,| K. Anton Feenstra                                     |
| / \ / \'| | | IBIVU/Bioinformatics - Vrije Universiteit Amsterdam   |
|(   |   )| | | De Boelelaan 1081 - 1081 HV Amsterdam - Netherlands   |
| \_/ \_/ | | | Tel +31 20 59 87783 - Fax +31 20 59 87653 - Room P136 |
|             | Feenstra at few.vu.nl - www.few.vu.nl/~feenstra/         |
|             | "You Crashed Into the Swamps" (Silicon Graphics)      |

More information about the gromacs.org_gmx-developers mailing list