[gmx-developers] Python interface for Gromacs
Martin Höfling
martin.hoefling at gmx.de
Sun Mar 29 13:14:11 CEST 2009
Am Samstag, den 28.03.2009, 17:55 -0400 schrieb Roland Schulz:
> Hi,
>
> I think it is good start. But as you say the python looks a lot like
> c.
Well, it's more a quick hack to process trajectories. A maintained
library looks different.
> I would be interested in collaborating in extending it to make it
> pytonic by e.g. creating classes , writing iterators, and converting
> all c data structures into best fitting NumPy/Python data structure,
> writing __str__ methods, raising exceptions instead of returning
> errorcode,...
>
> I think this can be done pretty quickly because the number of function
> which make sense to export is not that large.
>
> Is someone else interested in that?
Besides me - Daniel Seeliger who wrote pymacs might be. He also has more
expertise in writing ugly c-wrappers for python objects. I only did it
the ctypes way so far and numpy is a different story...
Apart from that, the embedding of a python interpreter into mdrun
would be very interesting, which actually shouldn't be too hard.
then start mdrun with something like:
mpirun -np 64 mdrun_mpi -v -npy 10000 -py do_nasty_things_in_python.py
Doing a normal mdrun and calls an external script every 10000 steps.
...just a fancy idea.
Best
Martin
More information about the gromacs.org_gmx-developers
mailing list