From: Shu-Hsien S. <sh...@bu...> - 2003-10-08 21:06:11
|
Dear Dr.DeLano, Thanks! That really helps! Two more questions: Does the 'pymol -qc' takes command line variables (os.argv in python)? For example, the first line of my script would be: cmd.do('load %s' %os.argv[1]) Second question might be off a little bit. Is it possible to wrap PyMol as a module of Python? I know can be installed as a Python module, but that doesn't seem to be able to let me do things like: # Sample Python script import PyMol PyMol.cmd.do('......') distance = PyMol.cmd.do('distance ......') Does it make any difference whether or not I installed PyMol independant of Python? I am a bit confused with cmd.do vs cmd.select. So, if I am writing a script for running in PyMol(using @some_script.py), I should use: import PyMol cmd.select('...') If I am writing a script for running PyMol in command line, I should use: from PyMol import cmd cmd.do('...') Kind of confused... -shuhsien >Shu-hsien > >Sure, instead of cmd.select, use > >cmd.do("select ligand, resn XYZ") >cmd.do("select protein, ! ligand ") > >etc. > >./pymol -qc select_box.py > >Is the command line mode of PyMOL. "pymol -qc" can be used like >"python" in most cases. > >Cheers, >Warren > > |