[Chimera-users] command line mode

Eric Pettersen pett at cgl.ucsf.edu
Thu Feb 28 16:41:01 PST 2008

On Feb 27, 2008, at 2:32 PM, Elaine Meng wrote:

> Hi S,
> If you enter Chimera commands, for example
>       command:  addh
>       command:  col byatom
> you can save them from the Command History either as the original
> Chimera commands or their Python translations.  Open Command History
> (click black triangle to the right side of the command line, choose
> "Command History").  In the Command History, choose the lines you
> want to save, then click "Record..."
> This brings up another dialog for saving to a file.  Choose the
> option to "Record as Python commands" and save the file.  In this
> example, the file contains
> import Midas
> from Midas.midas_text import makeCommand
> makeCommand('addh')
> makeCommand('col byatom')

While the above certainly works, the preferred Python equivalent  
nowadays would be:

from chimera import runCommand
runCommand('col byatom')

I have updated the Command History widget to output the "modern"  
equivalent now (it was my fault it didn't).

It seems you figured out your hydrogen-adding and minimizing issues...


                         Eric Pettersen
                         UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20080228/2e2474c4/attachment.html>

More information about the Chimera-users mailing list