Hi Doug,
Check out these pages on integrating PyMOL into a python script. Essentially you will write a python script that imports pymol. From there you can do things like load objects, align them, or anything else.

http://www.pymolwiki.org/index.php/Python_Integration
http://www.pymolwiki.org/index.php/Launching_From_a_Script

The key part is that you pass the parameters '-qc' to pymol. 'q' is for quiet, to supress some of Pymol's output, and 'c' is for command line versions, i.e. don't launch the GUI.

####
import __main__
__main__.pymol_argv = [ 'pymol', '-*qc*' ]

# Importing the PyMOL module will create the window.
import pymol

# Call the function below before using any PyMOL modules.
pymol.finish_launching()

from pymol import cmd

#now your commands
cmd.fetch('1YCR')

#########


You may also want to check out these pages on scripting:

http://www.pymolwiki.org/index.php/Simple_Scripting
http://www.pymolwiki.org/index.php/Advanced_Scripting


On 11/11/2014 02:56 PM, Douglas Houston wrote:
Hi all,

Does anyone know if there's a way of accessing Pymol's API without the
GUI? There are some useful functions in there and my loops would
iterate a lot faster if the GUI didn't fire up every time.

cheers,
Doug
_____________________________________________________
Dr. Douglas R. Houston
Lecturer
Institute of Structural and Molecular Biology
Room 3.23, Michael Swann Building
King's Buildings
University of Edinburgh
Edinburgh, EH9 3JR, UK
Tel. 0131 650 7358
http://tinyurl.com/douglasrhouston


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to