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