[MMTK] object or module for molecule-centered grid

Andrew D. Fant fant at pobox.com
Fri Mar 24 18:49:31 CET 2006

Konrad Hinsen wrote:
> On Mar 23, 2006, at 21:23, Andrew D. Fant wrote:
>> 1) Is it me, or is the eigenvectors routine either painfully slow  or
>> broken?  I

> Actually, I have heard of such a problem on recent Linux systems that 
> have GCC 4. Apparently GCC 4 does not compile some of the LAPACK code 
> in Numeric correctly. As a workaround, you can reinstall Numeric with 
> an additional compiler option:
>     CFLAGS='-ffloat-store' python setup.py build
> instead of the simple
>     python setup.py build
> However, this is reported to somewhat slow down all LAPACK routines. 
> Perhaps there is a better fix by now.

Well, my copy of Numeric was compiled with gcc-3.4.5, but adding the
-ffloat-store made things work.

This reminds me, there is work underway to reunify the work done on Numeric and
Numarry and deal with the performance issues in NumPy.  Is this something we may
see in ScientificPython and MMTK, or will things depend on Numeric for the
foreseeable future?

>> 2)  Could someone show or help me see how to convert this example  to
>> work with a
>>  non-protein molecule (such as the heme example in the database)?  
>> Most of what
>> I want to do with MMTK is small-molecule oriented, and the protein 
>> class isn't
>> quite what I want, but I need more than just a collection of atoms 
>> and bonds.
> Just replace
>     protein = Protein('insulin')
> by
>     molecule = Molecule('heme')

Ahh, ok.  I was expecting there to be a Molecule module that needed to be
imported somewhere and was getting hung up with trying to translate the "from
MMTK.Proteins import Protein" statement.

I'm hitting a slightly different problem now, a little further down.  I'm using
the 2.5 development tree, so if this a known problem, feel free to tell me to go
away. When I try to orient the heme molecule, like insulin is oriented in the
example it get:

>>> center, inertia = molecule.centerAndMomentOfInertia()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/MMTK/Collections.py", line 112, in
    mr = mr + ma*r
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'

I don't see how r remains undefined after the if block immediately preceding it,
but I did want to ask about this.

> and replace "protein" by "molecule" everywhere in the script. Then  make
> up some reasonable graphics for that molecule, e.g.
>     graphics = molecule.graphicsObjects(graphics_module = module,
> model='wireframe',
>                                                              color =
> 'blue')

I'm able to do this, and when I call scene.view, freewrl pops up, but I don't
actually get any objects.  I'm going to look at your scripts and see about using
pymol or vmd to view instead, but I was wondering if there was a known problem
with using freewrl as the vmrl viewer. It's about the only one I have easy
access to on Linux.

Thanks again for all your patience and help.  It's a lot faster getting up to
speed when there's someone who is willing to answer questions as they arise.


Andrew Fant    | And when the night is cloudy    | This space to let
Molecular Geek | There is still a light          |----------------------
fant at pobox.com | That shines on me               | Disclaimer:  I don't
Boston, MA     | Shine until tomorrow, Let it be | even speak for myself

More information about the mmtk mailing list