[MMTK] new FF terms: bug in Python implementation

Qadir Timerghazin qadir.timerghazin at gmail.com
Tue Apr 14 18:19:17 UTC 2009

> Unfortunately not. This has been a known problem for a while, although it is
> not as consistent as you found it to be: when I developed the code using
> Python 2.2, it worked under Linux but not on several other systems. At the
> time they were written, all the examples in the MMTK distribution worked
> fine on my development system.
> When the first reports of crashes came in, I started analyzing them and came
> to the conclusion that the crashes were somehow related to memory
> management. However, I couldn't find anything in the implementation that
> could be responsible for this, but for lack of time I had to drop the
> investigation. Apparently it is not trivial to have Python code called from
> an extension module.
> Since then, Pyrex has provided another way to write force field terms
> without having to resort to writing C code. Debugging is less convenient
> because of the compile cycle, but on the other hand there are clear
> performance advantages to using Pyrex rather than Python.

Thank you - we will try to use the Pyrex solution, it seems to be much
more convenient than making a pure C extension. Do you think this
problem has a similar origin with the dihedral harmonic restraint
problem I reported recently?


Dr. Qadir K. Timerghazin,
NSERC Postdoctoral Fellow

Department of Chemistry
University of Waterloo
200 University Avenue West
Waterloo, ON, Canada N2L 3G1

More information about the mmtk mailing list