[Chimera-users] Creating and saving Multiscale Models using Python functions

Elaine Meng meng at cgl.ucsf.edu
Wed Aug 24 15:08:52 PDT 2016


Hi Jon,
If you can come up with the equivalent Chimera commands, you can use the runcommand method in Python:
<http://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html>

There isn’t necessarily a Chimera command for every GUI action, but it sounds like there may be for what you describe.
- “open" to open PDB file
- “sym” with “surfaces all” option is like making Multiscale surfaces
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/sym.html>
- “export” to export scene file
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/export.html>

You can start up Chimera from the system command line with the nogui option and specify as an input file your python script:
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/startup.html>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/options.html>

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Aug 24, 2016, at 2:45 PM, Jon David <jdavid at cs.unm.edu> wrote:

> Hi Friends,
> 
> I would like to use Python to perform operations equivalent to the following GUI operations; I'd like to be able to do this as a batch script (e.g., I don't want the Chimera GUI to appear because I don't want to have to close it.):
> 
> 1) Open a PDB file (I know how to do this part).
> 
> 2) Tools > Higher-Order Structure > Multiscale Models (this opens the MultiScale Models popup window).
> 
> 3) Click on the "Make models" button.
> 
> 4) File > Export Scene... (this opens the Export Scene popup window)
> 
> 5) In the Export Scene popup window, select File type to be "OBJ [.obj]", enter file name "test.obj"
> 
> 6) Click on the "Save" button.
> 
> I have used Python to open a PDB file, and translate, and rotate it around before.  But I don't know where to begin with selecting Multiscale Models' parameters.  Any tips? Any help would be much appreciated.
> 
> Thanks,
> 
> --Jon





More information about the Chimera-users mailing list