[Chimera-users] Transition from PyMol

Elaine Meng meng at cgl.ucsf.edu
Wed May 14 13:28:59 PDT 2014

Hi Mike!
The shapes are treated as separate entities, not part of the molecule, residues, or atoms (which have the attributes).  I would just show the CA atoms of the residues and then use rangecolor on those atoms.  Normally they are suppressed by ribbon, but you can enable showing both with "ribbackbone" and un-chain the atoms with "setattr", rangecolor, adjust radii, etc.  Example with PDB 2mnr using the existing "bfactor" attribute:

open 2mnr
disp @ca
represent bs
setattr m autochain 0
setattr m ballScale .6
rangecolor bfactor,a min blue max red

A few notes: you could of course display only a subset of the CA atoms, as in your example images.  The ",a" on the rangecolor command specifies coloring only the balls and not the ribbon. I used the ball-and-stick representation, thus CA balls, and then adjusted molecule-model attribute ballScale (fraction of VDW radius used in ball representation) from default 0.25 to 0.6.  Another approach could be changing the VDW radii with "vdwdefine" but that would affect other calculations like molecular surface, clash detection, etc. I prevented the CAs from forming a connected chain by setting the molecule-model "autochain" attribute to 0. You can find out attribute names and values that could be used with the setattr command by mousing over parameters in attribute inspector dialogs (Selection Inspector, etc.) and reading the balloon help:
Commands documentation:

>From looking at a brief description of orient on the pymol wiki, here's one idea for reproducing that in Chimera:

define plane name p1 protein
align p1

... where "protein" could be any Chimera atomspec for the set of atoms you want to use.
I hope this helps.  If I missed anything, feel free to ask.
Elaine C. Meng, Ph.D.                       
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On May 14, 2014, at 10:23 AM, R Michael Sivley wrote:

> I'm attempting to transition from Chimera to PyMol and I'm struggling to reproduce the results of a visualization script. The script maps numeric values onto certain residues in a protein structure. Those residues are marked by spheres, and those spheres are colored by spectrum according to the residue value. 
> In PyMol I overwrite the atom bfactors, and then display the CA of annotated residues as a sphere, colored by spectrum. The PyMol code (post-bfactor overwrite):
> cmd.show(selection="name CA and br. b >%f"%min_score-0.0001,representation="spheres")
> cmd.spectrum("b","blue_red",selection=include,minimum=min_score,maximum=max_score)
> In Chimera I've generated an attribute file, and used defattr to assign values to residues. I get the spheres by creating spheres centered on the CA atom of the annotated residues:
> rc("open %(struct_loc)s"%params)
> rc("defattr %(tempf)s"%params)
> rc("ribcolor dark grey") # temporary
> for resi in params['resis']:
>   rc("shape sphere center %s at CA radius 1 color grey"%resi[0])
> rc("rangecolor %(anno)s %(minval)s blue %(maxval)s red"%params)
> At this point, I can color the residues themselves using their attribute values, but I can't color the spheres, because they don't contain the information necessary to color them. I've uploaded the PyMol and Chimera generated images to imgur here:
> PyMol: http://imgur.com/a/GVfWi#0
> Chimera: http://imgur.com/a/GVfWi#1
> Any help in reproducing the PyMol image in Chimera would be much appreciated. I haven't begun working on orientation (PyMol's `orient` equivalent), but any quick tips there would certainly be helpful as well.
> Thanks!
> Mike

More information about the Chimera-users mailing list