[Chimera-users] chimera error message

Tom Goddard goddard at cgl.ucsf.edu
Fri Apr 10 12:03:19 PDT 2009

Hi Michael,

  The error message is that the "Molecule" is missing.  That suggests 
that you closed the molecule (e.g using File / Close Session or the 
Model Panel dialog).  You can't close the molecule and still access it 
from Python.

  To show the color name use:

    >>> red.name()

If you type just red.name as you did it says that is a "built-in 
method", in other words a function, so you have to call the function by 
adding the parentheses ().


Michael Zimmermann wrote:
> Dear Chimera Staff,
> I have been trying to learn to use your object model.  My goal is to 
> read in an electron density map in CCP4 format downloaded from 
> emdatabank.org <http://emdatabank.org> and parse out the 3D matrix of 
> electron density values.  However, to get started I was trying to just 
> access atomic information in a sample PDB format file (like atomic 
> coordinates).  Running through a few of your examples though has 
> proven confusing to me.  The following are commands that I have 
> entered into the IDLE.  I am using alpha version 1.3 build 2577.
> >>> import chimera
> >>> opened = 
> chimera.openModels.open('C:\DOCUME~1\Administrator\MYDOCU~1\MATLAB\\ribosome\\70s.pdb')
> >>> mol = opened[0]
> >>> from chimera.colorTable import getColorByName
> >>> red = getColorByName('red')
> >>> mol.color = red
> Traceback (most recent call last):
>   File "<pyshell#42>", line 1, in <module>
>     mol.color = red
> ValueError: underlying C++ Molecule object is missing
> Why is there a module missing?  How do I find out what module is 
> missing and add it?
> >>> red.name <http://red.name>
> <built-in method name of _chimera.MaterialColor object at 0x0F1AAF38>
> >>> red.rgba
> <built-in method rgba of _chimera.MaterialColor object at 0x0F1AAF38>
> What if I want the value displayed rather than the object's ID?  Is 
> there a get method that has to be invoked?  What would the syntax be?
> >>> ATOMS = mol.atoms
> Traceback (most recent call last):
>   File "<pyshell#54>", line 1, in <module>
>     ATOMS = mol.atoms
> ValueError: underlying C++ Molecule object is missing
> Again, why is a module missing, how do I find out what module is 
> missing, and how do I add it?
> Thank you,
> Michael Z
> ------------------------------------------------------------------------
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users

More information about the Chimera-users mailing list