[gmx-developers] Python interface for Gromacs
David van der Spoel
spoel at xray.bmc.uu.se
Thu Sep 9 14:26:13 CEST 2010
On 2010-09-09 13.13, Sébastien Buchoux wrote:
> Hi,
>
> On 09/09/2010 08:38 AM, David van der Spoel wrote:
>> People in the Lindahl group are working on parallellizing analysis
>> tools because they are quickly becoming the bottleneck. We run
>> simulations of large systems on hundreds of processors, and due to
>> checkpointing this can be done largely unattended. Analysis can take a
>> lot of effort, both hardware (CPU, Disk) and organisational. I think
>> the prime advantage of a scripting languagae like Python could be
>> organisational.
>
> From my experience, Python is too slow to really make analysis tools
> (or any heavy computational work) on its own. But it can use C/C++ libs
> like a charm... hence a Python interface! :)
>
>> @portability: I have tried compiling numpy a few times on mac & linux
>> without success. As long as numpy is not in the main python
>> distribution it will not be useful...
>
> Numpy compilation can indeed be... troublesome. but I don't think it is
> mandatory.
> From my experience, Numpy is great for pure Python programming so it
> would be useful for a 100% Python analysis tool. But with the use of C
> to do the hard work, the advantage a Numpy is pretty slim and I think
> that new Python types defined within a C extension are more efficient
> since they allow Python users to access C objects directly (given the
> use of a descent interface).
> This is specially true when dealing with already written C objects that
> are very different from C numarrays (i.e. they would need to be
> "translated" to Numpy arrays prior to use any of the Numpy routines).
> IMHO, the #1 priority of Numpy is much more to ease life of pure Python
> programmers than to be useful to C extension programmers.
>
> Sébastien
>
>
One more option is to work with Konrad Hinsen's suite MMTK
http://dirac.cnrs-orleans.fr/MMTK/. It is very flexible and why not use
it to interface to gromacs? First thing to do would be to open up the
trajectory reading code (for which there is a stand-alone library already).
--
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone: +46184714205.
spoel at xray.bmc.uu.se http://folding.bmc.uu.se
More information about the gromacs.org_gmx-developers
mailing list