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 -- mailto:war...@delanoscientific.com Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 > -----Original Message----- > From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users- > ad...@lists.sourceforge.net] On Behalf Of Shu-Hsien Sheu > Sent: Saturday, November 08, 2003 10:58 AM > To: pymol-users@lists.sourceforge.net > Subject: [PyMOL] Accessing PyMol's commands from outside (or without > viewer) > > Hi, > > This should be a trial question though I cannot find a way of doing it. > I have a simple script that looks like this: > (the original commands, rather than cmd.select......) > select ligand, resn XYZ > select protein, ! ligand > select box, protein within 8 of ligand > select box, box or byres box > save box as box.pdb > > I don't need the viewer at all and would be even more efficient if I can > call the PyMol API from the shell. Or, in a python script. > For example, I would like to have something like: > ./pymol select_box.py > > thanks! > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users