[chimera-dev] scripting rotation around a bond

Eric Pettersen pett at cgl.ucsf.edu
Wed Apr 29 12:16:06 PDT 2009

On Apr 29, 2009, at 3:34 AM, Jean Didier Pie Marechal wrote:

> Dear all,
> I'd like to generate from my script an ensemble of structures  
> obtained by the rotation of a subgroup of the molecule  around a  
> given bond. Said in another way, I want to do something similar to  
> the  adjust torsion tools without getting to the interfase but  
> defining myself the value of the angle I want to test.
> I can't figure out what is the module to load and how to use it and  
> it seems there is no command line for this (rotation seems to accept  
> only the atom specification for the bond as an argument). Could you  
> give me a hand on this?

Hi JD,
	Basically, given a bond you want to rotate around, you create a  
BondRot instance to do it:

br = chimera.BondRot(bond)

	Then you can change it by a delta (in degrees) from it's _original_  
(not current) position with the angle() method.  You also have to  
specify which side of the bond doesn't move:

br.angle = (10, br.biggerSide())

	You can get back to the original position with br.reset() (or with a  
delta of zero).  Make sure to dispose of the BondRot with br.destroy()  
when you're done with it.
	You probably want to use a daily build here, otherwise the bond- 
rotation GUI will pop up as you work with the BondRot.  Which can be  
kind of cool as the adjustment dial flies around like a movie clock in  
a fast-forward sequence.
> By the way, I wanted to get the to the programmers's guide but I  
> can't. You removed it from your server correct?
> All the best,
> JD

The Programmer's Guide is still there, it's just not a direct link off  
the home page.  Instead you have to click on the "Documentation" link  
and it's in the list on the resulting page.  We removed the auto- 
generated reference section since it was very big and of little utility.


                         Eric Pettersen
                         UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20090429/2868c8a7/attachment.html>

More information about the Chimera-dev mailing list