Managing window visibility through scripts?
Hi, I have made scripts in which various models are rendered by mavConservation taken from different alignments. As the scripts proceed, the multialignment viewer windows remain at the front, and I haven't been able to figure out how to bring the main molecular graphics window back to the front (except by clicking). I am aware that the problem would go away if I made the whole thing into a movie, but I would like to run the script in our research group meeting and leave the displayed models available for manual rotations. Are there commands to bring windows behind or in front of other Chimera windows? I run the production version of Chimera 1.14 under Windows 7. Part of my code follows. #single chains of ca6, ca9, ca12, and ca14 as #0-3, superimposed by mmaker, and their copies as #4-7 tile #0-7 columns 4 range kdHydrophobicity min cyan 0 white max maroon novalue green #0-3 open ca6.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #4 open ca9.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #5 open ca12.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #6 open ca14.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #7 surface #0-7 & protein Cheers, -Martti -- Martti Tolvanen Lecturer in Bioinformatics U of Turku, Finland
Hi Martti, Unfortunately, you have to resort to Python to do this. On the other hand, doing so isn’t that hard. The following lines of Python code will raise the main graphics window: from chimera import tkgui import CGLtk CGLtk.raiseWindow(tkgui.app) If you put the above lines in a file whose name ends in .py, then you can just use the “open” command with that file to run the script and raise the main graphics window as needed. I hope this helps. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Jun 4, 2020, at 2:01 AM, Martti Tolvanen <martti.tolvanen@utu.fi> wrote:
Hi,
I have made scripts in which various models are rendered by mavConservation taken from different alignments. As the scripts proceed, the multialignment viewer windows remain at the front, and I haven't been able to figure out how to bring the main molecular graphics window back to the front (except by clicking). I am aware that the problem would go away if I made the whole thing into a movie, but I would like to run the script in our research group meeting and leave the displayed models available for manual rotations. Are there commands to bring windows behind or in front of other Chimera windows?
I run the production version of Chimera 1.14 under Windows 7. Part of my code follows.
#single chains of ca6, ca9, ca12, and ca14 as #0-3, superimposed by mmaker, and their copies as #4-7 tile #0-7 columns 4
range kdHydrophobicity min cyan 0 white max maroon novalue green #0-3 open ca6.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #4 open ca9.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #5 open ca12.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #6 open ca14.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #7
surface #0-7 & protein
Cheers, -Martti
-- Martti Tolvanen Lecturer in Bioinformatics U of Turku, Finland
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Thanks, this works, but not quite as expected. The side effect is that the window remains stuck at the foreground, so that tools opened from the menus will later only appear as buttons in the Active Dialogs list in the "lightning window", and I cannot find a way to bring them to the foreground any more, except after restarting Chimera. Any undo commands for CGLtk.raiseWindow(tkgui.app)? Cheers, -Martti -- Martti Tolvanen Lecturer in Bioinformatics U of Turku, Finland -----Original Message----- From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] mSent: 4. kesäkuuta 2020 20:15 To: Martti Tolvanen <martti.tolvanen@utu.fi> Cc: chimera-users@cgl.ucsf.edu Subject: Re: [Chimera-users] Managing window visibility through scripts? Hi Martti, Unfortunately, you have to resort to Python to do this. On the other hand, doing so isn’t that hard. The following lines of Python code will raise the main graphics window: from chimera import tkgui import CGLtk CGLtk.raiseWindow(tkgui.app) If you put the above lines in a file whose name ends in .py, then you can just use the “open” command with that file to run the script and raise the main graphics window as needed. I hope this helps. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Jun 4, 2020, at 2:01 AM, Martti Tolvanen <martti.tolvanen@utu.fi> wrote:
Hi,
I have made scripts in which various models are rendered by mavConservation taken from different alignments. As the scripts proceed, the multialignment viewer windows remain at the front, and I haven't been able to figure out how to bring the main molecular graphics window back to the front (except by clicking). I am aware that the problem would go away if I made the whole thing into a movie, but I would like to run the script in our research group meeting and leave the displayed models available for manual rotations. Are there commands to bring windows behind or in front of other Chimera windows?
I run the production version of Chimera 1.14 under Windows 7. Part of my code follows.
#single chains of ca6, ca9, ca12, and ca14 as #0-3, superimposed by mmaker, and their copies as #4-7 tile #0-7 columns 4
range kdHydrophobicity min cyan 0 white max maroon novalue green #0-3 open ca6.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #4 open ca9.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #5 open ca12.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #6 open ca14.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #7
surface #0-7 & protein
Cheers, -Martti
-- Martti Tolvanen Lecturer in Bioinformatics U of Turku, Finland
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
What kind of machine are you running on? I cannot reproduce the behavior you describe. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Jun 5, 2020, at 1:43 AM, Martti Tolvanen <martti.tolvanen@utu.fi> wrote:
Thanks, this works, but not quite as expected. The side effect is that the window remains stuck at the foreground, so that tools opened from the menus will later only appear as buttons in the Active Dialogs list in the "lightning window", and I cannot find a way to bring them to the foreground any more, except after restarting Chimera. Any undo commands for CGLtk.raiseWindow(tkgui.app)?
Cheers, -Martti
-- Martti Tolvanen Lecturer in Bioinformatics U of Turku, Finland
-----Original Message----- From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] mSent: 4. kesäkuuta 2020 20:15 To: Martti Tolvanen <martti.tolvanen@utu.fi> Cc: chimera-users@cgl.ucsf.edu Subject: Re: [Chimera-users] Managing window visibility through scripts?
Hi Martti, Unfortunately, you have to resort to Python to do this. On the other hand, doing so isn’t that hard. The following lines of Python code will raise the main graphics window:
from chimera import tkgui import CGLtk CGLtk.raiseWindow(tkgui.app)
If you put the above lines in a file whose name ends in .py, then you can just use the “open” command with that file to run the script and raise the main graphics window as needed.
I hope this helps.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 4, 2020, at 2:01 AM, Martti Tolvanen <martti.tolvanen@utu.fi> wrote:
Hi,
I have made scripts in which various models are rendered by mavConservation taken from different alignments. As the scripts proceed, the multialignment viewer windows remain at the front, and I haven't been able to figure out how to bring the main molecular graphics window back to the front (except by clicking). I am aware that the problem would go away if I made the whole thing into a movie, but I would like to run the script in our research group meeting and leave the displayed models available for manual rotations. Are there commands to bring windows behind or in front of other Chimera windows?
I run the production version of Chimera 1.14 under Windows 7. Part of my code follows.
#single chains of ca6, ca9, ca12, and ca14 as #0-3, superimposed by mmaker, and their copies as #4-7 tile #0-7 columns 4
range kdHydrophobicity min cyan 0 white max maroon novalue green #0-3 open ca6.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #4 open ca9.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #5 open ca12.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #6 open ca14.fasta range mavConservation 0.1 dodger blue 0.55 white 1 orange red novalue green #7
surface #0-7 & protein
Cheers, -Martti
-- Martti Tolvanen Lecturer in Bioinformatics U of Turku, Finland
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (2)
-
Eric Pettersen
-
Martti Tolvanen