[MMTK] object or module for molecule-centered grid

Konrad Hinsen konrad.hinsen at cea.fr
Mon Mar 27 11:28:18 CEST 2006

On Mar 24, 2006, at 18:49, Andrew D. Fant wrote:

> 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?

Ultimately ScientificPython and MMTK will support NumPy, but I won't  
promise a date because I expect this will involve a lot of work, in  
particular for testing.

>>>> 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
> centerAndMomentOfInertia
>     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.

r is None if and only if an atom in the molecule has an undefined  
position. This is the case for all atoms in heme because the heme  
definition does not provide any default conformation. It was made to  
be used with a PDB file that supplies the conformation.

If you try the same example with Molecule('water') it should work.

> 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.

Since the time when I wrote the VRML modules, enthusiasm for VRML has  
waned to the point that today's VRML viewers are less numerous and  
less stable than their predecessors. I haven't tried freewrl for a  
while, but last time I did it was too buggy to be used routinely.

Another problem with VRML viewers is that they are designed for  
virtual reality scenes. The navigation modes they propose are much  
less useful for viewing molecules than those implemented in dedicated  
molecular viewers.

VMD is in my opinion a much better choice, but if you want to use non- 
molecule graphics objects, you should use VMD 1.6 or earlier. Later  
versions use a different colour management system which no longer  
permits scripts to define objects in arbitrary colours.

PyMOL support is still a bit incomplete. In part this just requires  
more work on the interface module than I can handle at the moment  
(e.g. for defining cubes and cones in terms of OpenGL primitives),  
and in part it requires a better API in PyMOL for defining molecules  
from Python code.

Konrad Hinsen
Laboratoire Léon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: konrad.hinsen at cea.fr

More information about the mmtk mailing list