[Chimera-users] Command Line Inquiry

Eric Pettersen pett at cgl.ucsf.edu
Wed Feb 22 16:47:08 PST 2012

On Feb 22, 2012, at 2:06 PM, Kevin D. Walker wrote:

> I want to change the geometry of a selected atom by executing a  
> command line script. I would like to proceed as follows:
> 1) select [atom-id] (this is the easy part)
> ...then I want to apply a script for the following interpretation
> 2) modify structure; set Element to 'C'; bonds to '4'; geometry to  
> 'tetrahedral'
> Is there a command script for this series?

Well, there is no command version of this part of Build Structure.   
Nonetheless everything is doable by calling the underlying Python.   
I've attached a Python script that does exactly what you requested  
above.  It's got some explanatory comments.  You would definitely want  
to look through it before running it because it offers some options  
for how you want the modified atom named.

You would run the Python script from a regular command script with  
"open ~/c4.py" (assuming you named it c4.py and put it in your home  


                         Eric Pettersen
                         UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20120222/a1976615/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c4.py
Type: text/x-python-script
Size: 667 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20120222/a1976615/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20120222/a1976615/attachment-0001.html>

More information about the Chimera-users mailing list