Hi,<div><br></div><div>one very useful way to utilize Python is for prototyping. I find it often more efficient for my time, to first test out algorithms in Python and then after I found a good algorithm, implement that in C, instead of directly implementing an algorithm in C. And of course a good algorithm is usually more important than a fast implementation. Thus some of the analysis tools with a better implementation (e.g. using grids instead of N^2) could run faster in Python than their current C implementation. Another case in which Python would be very useful even if it would run much slower, are analysis tools which would not be used very often. For those the developers time is much more valuable than the CPU time. </div>

<div><br></div><div>In case you have trouble to compile NumPy you can always use the Entought distribution which is free for academic use:</div><div><a href="http://www.enthought.com/products/edudownload.php">http://www.enthought.com/products/edudownload.php</a></div>

<div>For analysis tools which can be formulated as Vector-Matrix problem, NumPy allows one to get similar performance than comparable C implementation. </div><div><br></div><div>Roland</div><div><br></div><div><br><div class="gmail_quote">

On Thu, Sep 9, 2010 at 8:26 AM, David van der Spoel <span dir="ltr">&lt;<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div></div><div>On 2010-09-09 13.13, Sébastien Buchoux wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
On 09/09/2010 08:38 AM, David van der Spoel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
People in the Lindahl group are working on parallellizing analysis<br>
tools because they are quickly becoming the bottleneck. We run<br>
simulations of large systems on hundreds of processors, and due to<br>
checkpointing this can be done largely unattended. Analysis can take a<br>
lot of effort, both hardware (CPU, Disk) and organisational. I think<br>
the prime advantage of a scripting languagae like Python could be<br>
organisational.<br>
</blockquote>
<br>
 From my experience, Python is too slow to really make analysis tools<br>
(or any heavy computational work) on its own. But it can use C/C++ libs<br>
like a charm... hence a Python interface! :)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
@portability: I have tried compiling numpy a few times on mac &amp; linux<br>
without success. As long as numpy is not in the main python<br>
distribution it will not be useful...<br>
</blockquote>
<br>
Numpy compilation can indeed be... troublesome. but I don&#39;t think it is<br>
mandatory.<br>
 From my experience, Numpy is great for pure Python programming so it<br>
would be useful for a 100% Python analysis tool. But with the use of C<br>
to do the hard work, the advantage a Numpy is pretty slim and I think<br>
that new Python types defined within a C extension are more efficient<br>
since they allow Python users to access C objects directly (given the<br>
use of a descent interface).<br>
This is specially true when dealing with already written C objects that<br>
are very different from C numarrays (i.e. they would need to be<br>
&quot;translated&quot; to Numpy arrays prior to use any of the Numpy routines).<br>
IMHO, the #1 priority of Numpy is much more to ease life of pure Python<br>
programmers than to be useful to C extension programmers.<br>
<br>
Sébastien<br>
<br>
<br>
</blockquote></div></div>
One more option is to work with Konrad Hinsen&#39;s suite MMTK <a href="http://dirac.cnrs-orleans.fr/MMTK/" target="_blank">http://dirac.cnrs-orleans.fr/MMTK/</a>. 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).<div>


<br>
<br>
-- <br>
David van der Spoel, Ph.D., Professor of Biology<br>
Dept. of Cell &amp; Molec. Biol., Uppsala University.<br>
Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.<br>
<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>    <a href="http://folding.bmc.uu.se" target="_blank">http://folding.bmc.uu.se</a><br>
-- <br></div><div><div></div><div>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
Please don&#39;t post (un)subscribe requests to the list. Use the www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov" target="_blank">cmb.ornl.gov</a><br>865-241-1537, ORNL PO BOX 2008 MS6309<br>
</div>