
Hi, I want to include Chimera python packages in my program under Solaris. Concretely, I want to use the UnitCell-related packages to construct the crystal unit cell from PDB files. I read through the mailing list and I know it's not possible to get chimera for solaris now. But is there any other method I can use to invoke related packages, e.g. import chimera, in my python program in solaris? Thanks in advance! -- Macro Zhu macrozhu@gmail.com

Hi Hongbo, If you want to use the crystallographic unit cell capabilities of Chimera in your own Python program you can use the Python module chimera/share/PDBmatrices. This module contains code to use the MTRIX and CRYST1 records and SMTRY remarks in PDB files to produce the correct tranformation matrices to position asymmetric units. The chimera/share/UnitCell Python module is almost entirely Chimera-specific user interface that you will not be able to use outside of Chimera. But it will be worth looking at the make_unit_cell_cb() and transforms() routines in chimera/share/UnitCell/__init__.py to see how the PDBmatrices module is used. The PDBmatrices module is independent of all other Chimera code except for some routines to convert between 3 by 4 matrices, and Chimera's Xform object which you will not need. Several PDBmatrices routines expect to get the PDB file headers as a Python dictionary where the key is the first word of a PDB header line (eg. CRYST1, MTRIX, ...), and the value is a list of all header lines having that first word. Chimera provides this dictionary of headers, but you will not be able to use that part of Chimera (written in C++) on Solaris so your own code will need to be able to read PDB files to make the dictionary of headers. Also the PDBmatrices module only produces the needed transformation matrices. You would have to read PDB coordinates and apply those matrices to get the unit cell coordinates. Tom
participants (2)
-
Hongbo Zhu
-
Thomas Goddard