On 10/28/06, Douglas Kojetin <[EMAIL PROTECTED]> wrote:
Here is the an example of how to do this in Tcl:

set PYMOL [open "|pymol -pq " w]
puts $PYMOL "viewport 400,400"
[ snip ]
flush $PYMOL


Here is a page describing the command line options:

http://www.pymolwiki.org/index.php/Command_Line_Options

I used -p and -q above.  From the above link:

   -q   Quiet launch. Suppress splash screen & other chatter.
   -p   Listen for commands on standard input.

One can use the normal PyMOL commands/settings as well.  See the
PyMOLWiki for more info, such as this list of settings:

http://www.pymolwiki.org/index.php/Settings

Brilliant!!!  The '-p' flag is all that is necessary to get relax to
talk to PyMOL.  This is exactly the same way that relax talks to
Molmol (using the python command: popen("molmol -f -", "w", 0)).
Tomorrow I might copy the file 'prompt/molmol.py' to 'prompt/pymol.py'
and the file 'generic_fns/molmol.py' to 'generic_fns/pymol.py'.
Changing the contents shouldn't be much work.

Once this is done, the question is what do we then do with PyMOL?  Has
anyone created PyMOL representations of their data?


I'm sure there at Python equivalents for Tcl's open, puts and flush.
I could try to figure these out if you would like.

The above pipe command creates a file object, say 'self.pymol', which
you then simply write to:

   self.pymol.write("show ribbon\n")

This will instantly run the command.

Edward

_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to