[gmx-developers] Python interface for Gromacs
nizamov.shawkat at gmail.com
nizamov.shawkat at gmail.com
Sat Mar 28 05:35:50 CET 2009
Hi all!
It looks like there is a plenty of developers trying to create a Python
interface for this or that particular function of Gromacs. There is
fairly functional (and stable?) pymacs package. I didn't look much in
it, but it goes directly extending Python with manually crafted C
wrapper. Others are creating some useful wrappers using ctypes (previous
message in the list). Lately I also did some work in this area, but
wasn't interested in discussing it before some actual results obtained.
But as surprisingly much effort of different researchers got devoted to
Pythonic interface, maybe it's time to discuss before reinventing the wheel?
Last week I created a single SWIG wrapper around all 3 libraries -
libgmx, libmd and libgmxana. As a proof of concept I also successfully
(but implemented only partially) ported gmxdump.c to Python using this
wrapper. Rewriting gmxdump.c in pure Python was straightforward. I hope,
that there will be no large obstacles for using other library routines
also. The task of creating wrapper for scripting language is on
developers section of Gromacs wiki right after the task of moving
analyzing functions to core library (libgmxana). But it is not clear -
if scripting interface with Python wrapper is going to be mainline tool
for analyzing data, converting to and from different formats (XML and
gnuplot are also mentioned on developers section), setup the simulation,
interfacing with user, etc? That means that in the long term Gromacs
will be strictly dependent on Python and its bindings and only a
simulation core will remain in pure C and available mostly as a library.
Did I get the idea correctly?
Practical question is - how can different developers collaborate on such
Python wrapper for Gromacs ? I would spend some of my spare time for
improving SWIG wrapper (that is already usable) for my own research, but
working in a team makes much more sense in the open-source world.
WBR
Shawkat
More information about the gromacs.org_gmx-developers
mailing list