[chimera-dev] Changing guide atom - repost

Conrad Huang conrad at cgl.ucsf.edu
Tue Oct 21 13:19:06 PDT 2008

The reason your code did not work is that "ribbonData" is recomputed 
whenever the molecule representation is changed (thereby wiping out your 
changes).  The attribute that actually controls the atoms being used for 
ribbon representation is in "ribbonResidueClass" (the name made sense 
when I wrote the code :-).  Attached is a script that changes the guide 
atom for all residues to "C".  Please let me know if you have any 
questions or suggestions.


Patrick Ladam wrote:
> Hello list,
> I received an answer concerning this topic but via the chimera menus
> which I tested in the first place and works fine.
> Actually I want to do this from the python shell, so here is my repost:
> -----------------------------------------------------------------------
> I'd like to change the guide atom in
> res.ribbonData to use C instead of CA as an example.
> Here is what I did:
> for r in mol.residues:
>   for a in r.atoms:
>     if a.name == 'C':
>       r.ribbonData.guide = a		# Set C as guide Atom
>       if r.isHelix: 			# Update the display 
> 	r.ribbonDisplay = True
> 	r.ribbonDrawMode = chimera.Residue.Ribbon_Round
> This does not seem to redisplay/recompute the helix through C Atoms,
> the helix still goes through CA but not C atoms.
> I am not confident with the way I altered the guide Atom or maybe is it
> another problem like updating the ribbon or so...
> If someone can help...
> Thanks to all
> PL
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: changeRibbon.py
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20081021/8bd22ff7/attachment.ksh>

More information about the Chimera-dev mailing list