
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('addh') 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 Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu