
Hi, I have 2 questions: 1. Is it possible to use send python scripts (with arguments) to an already running Chimera instance? I know that it is possible to use to use the --send feature, however I wasn't able to send argument in with my python script (http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/options.html). I want to be able to pass arguments to a already running instance of chimera similar to the --script feature (but this feature forces a new instance of chimera to open). 2. Along the same lines as the first question, is it possible to use terminal and python commands to manipulate color, rotation, etc. in place of using the IDLE? Currently I am working on a project to that requires communicating with a computer running Chimera through "ssh"ing into the computer. I want to be able to use terminal commands to do basic manipulations of the molecules from the other machine. Thanks for all your help in advanced, Chris

Hi Chris, I was hoping the others would answer, since I'm not a programmer. However, I'll take a stab at this and maybe they can correct or add to the answer as needed. 1. There is a relatively new command (in daily builds but not the 1.3 release) "runscript" for running python scripts with arguments. This is used as a Chimera command, not in IDLE, but see #2... <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/runscript.html> 2. There is a "ReadStdin" feature (start by choosing it from the Tools... Utilities menu) that allows you to feed in Chimera commands through standard input. I guess you could combine it with the above. <http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/readstdin/ readstdin.html> I'm not sure if these will meet your needs, however. Programmers, feel free to pipe up! Elaine ----- Elaine C. Meng, Ph.D. meng@cgl.ucsf.edu UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco http://www.cgl.ucsf.edu/home/meng/index.html On May 28, 2009, at 11:10 PM, cdlau@ucsd.edu wrote:
Hi, I have 2 questions:
1. Is it possible to use send python scripts (with arguments) to an already running Chimera instance? I know that it is possible to use to use the --send feature, however I wasn't able to send argument in with my python script (http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/options.html). I want to be able to pass arguments to a already running instance of chimera similar to the --script feature (but this feature forces a new instance of chimera to open).
2. Along the same lines as the first question, is it possible to use terminal and python commands to manipulate color, rotation, etc. in place of using the IDLE? Currently I am working on a project to that requires communicating with a computer running Chimera through "ssh"ing into the computer. I want to be able to use terminal commands to do basic manipulations of the molecules from the other machine.
Thanks for all your help in advanced,
Chris

Hi Chris, Would be nice if you could use --send and pass a script and script arguments but it's not possible now. The --send mechanism was intended for a web browser to send a PDB file to Chimera. You could go the more cumbersome route of writing a one line file "runscript myscript.py [args...]" and send that file with chimera --send. If you had to do this a lot you might make a script in a language of your choice "sendtochimera myscript.py [args...]" that writes the one line temporary file and does the chimera --send. For question 2) the ReadStdin is closest to what you want. It allows you to enter Chimera commands from a shell where you started Chimera. It doesn't allow you to send Python code to Chimera. If you need to run python scripts you can write them to a file on the machine where Chimera is running and then use the "runscript" command via the ReadStdin mechanism. There is currently no way to type Python code in an operating system shell and have it directly interpreted by Chimera. Tom -------- Original Message -------- Subject: Re: [Chimera-users] Python -send command and IDLE From: Elaine Meng <meng@cgl.ucsf.edu> To: cdlau@ucsd.edu Date: 5/29/09 3:48 PM
Hi Chris, I was hoping the others would answer, since I'm not a programmer. However, I'll take a stab at this and maybe they can correct or add to the answer as needed.
1. There is a relatively new command (in daily builds but not the 1.3 release) "runscript" for running python scripts with arguments. This is used as a Chimera command, not in IDLE, but see #2... <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/runscript.html>
2. There is a "ReadStdin" feature (start by choosing it from the Tools... Utilities menu) that allows you to feed in Chimera commands through standard input. I guess you could combine it with the above. <http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/readstdin/ readstdin.html>
I'm not sure if these will meet your needs, however. Programmers, feel free to pipe up! Elaine ----- Elaine C. Meng, Ph.D. meng@cgl.ucsf.edu UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco http://www.cgl.ucsf.edu/home/meng/index.html
On May 28, 2009, at 11:10 PM, cdlau@ucsd.edu wrote:
Hi, I have 2 questions:
1. Is it possible to use send python scripts (with arguments) to an already running Chimera instance? I know that it is possible to use to use the --send feature, however I wasn't able to send argument in with my python script (http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/options.html). I want to be able to pass arguments to a already running instance of chimera similar to the --script feature (but this feature forces a new instance of chimera to open).
2. Along the same lines as the first question, is it possible to use terminal and python commands to manipulate color, rotation, etc. in place of using the IDLE? Currently I am working on a project to that requires communicating with a computer running Chimera through "ssh"ing into the computer. I want to be able to use terminal commands to do basic manipulations of the molecules from the other machine.
Thanks for all your help in advanced,
Chris
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (3)
-
cdlau@ucsd.edu
-
Elaine Meng
-
Tom Goddard