[gmx-developers] future of installed headers and libraries
rui.fartaria at gmail.com
Mon Jul 7 11:55:52 CEST 2014
I am strongly in favour of a well developed comprehensive API. It really
makes it possible to extend the functionality of GROMACS to applications
that were not envisioned by the original developers.
In our case we wanted to develop a GCMC package that used MD as a
configuration generator. GromPy was an excellent way to start but I soon
realized that I needed do have a much more detailed control of GROMACS
mechanisms. As I wanted to implement an OO approach we decided it would be
better to start from scratch..
So, I extensively mapped, and extended, the existing API to python classes
using ctypes. Using ctypeslib to automatically map required types and
functions really made a difference in terms of developing time. The
automatic code is not very pretty, but, at a development stage is good
enough (can clean it latter).
We are now at the point of benchmarking the first GCMC simulations. The
code performs standard GCMC simulations and also
Continuous-Fractional-Component insertion. Reaction-Ensemble simulations
are almost ready. We would like to present the code in the CCP5 conference
We worked with the 4.6.5 version of GMX but will want to migrate to the C++
version of the code. I expect that a OO code will be much easier to
integrate (mine is already OO) with. Still, I did not have the time to look
at the new code, so I can't say anything yet.
One the biggest problems I had with the C code was that memory management
was simply not there. I fully understand why. Structures were made once,
used, and then the program finished, leaving the task of freeing memory to
the OS. I needed to write "destructors" for most of those. I hope the C++
code, being OO, has destructors implemented. If not, I'll have to do it. ;-)
Thanks for all your hard work, GROMACS is GREAT!!
University of Edinburgh
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gromacs.org_gmx-developers