Positioning changing over time

Dear chimera users, I was wondering whether any of you could help me with this simple problem: The aim is to make a movie displaying the evolution of predefined meshes over time (see attached python script). Overall the script works and produces a movie. However the mesh gets displaced slightly between the different time points. This results in an annoying random wiggling. I checked the original .wrl files and the indicated coordinates do have consistent positions (meaning the displacements are produced by chimera). How can I get a smooth movie? Might there be something unexpected happening when I repeatedly call runCommand(“open <file1.wrl>”) and runCommand(“close all”)? Thank you so much in advance! With kind regards, Marvin

Hi Marvin, The problem is that when you open a model and there are no currently open models then Chimera automatically recenters and zooms the camera based on the bounds of the model. So every frame your script is recentering a little bit because the bounding box center for each of your models is slightly different. Unfortunately there isn’t an option to tell Chimera not to recenter. But there are 3 other approaches: 1) open the next model, then close the first model (requires awkward script), 2) Use savepos/reset to save and restore the postion (“savepos current ; close all” and the “open <nextmodel> ; reset current”), or 3) Open a model at the beginning, hide it, and just leave it open (“open <somefile> ; ~modeldisplay #0”, and later “close #1” instead of “close all”). I’d go with solution 2. Tom
On Jul 18, 2016, at 1:54 AM, Marvin Albert wrote:
Dear chimera users,
I was wondering whether any of you could help me with this simple problem: The aim is to make a movie displaying the evolution of predefined meshes over time (see attached python script).
Overall the script works and produces a movie. However the mesh gets displaced slightly between the different time points. This results in an annoying random wiggling. I checked the original .wrl files and the indicated coordinates do have consistent positions (meaning the displacements are produced by chimera).
How can I get a smooth movie?
Might there be something unexpected happening when I repeatedly call runCommand(“open <file1.wrl>”) and runCommand(“close all”)?
Thank you so much in advance! With kind regards, Marvin
<chimera_movie.py>_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Tom, thanks a lot for the advice. It turned out that I was loading in the files and then rotated them. And the rotation each time was around a slightly different center of rotation. Fixing the center fixed the problem. However your solution 2 simplifies a lot of things for me! Thanks again! Best, Marvin
On 18 Jul 2016, at 19:17, Tom Goddard <goddard@sonic.net> wrote:
Hi Marvin,
The problem is that when you open a model and there are no currently open models then Chimera automatically recenters and zooms the camera based on the bounds of the model. So every frame your script is recentering a little bit because the bounding box center for each of your models is slightly different. Unfortunately there isn’t an option to tell Chimera not to recenter. But there are 3 other approaches: 1) open the next model, then close the first model (requires awkward script), 2) Use savepos/reset to save and restore the postion (“savepos current ; close all” and the “open <nextmodel> ; reset current”), or 3) Open a model at the beginning, hide it, and just leave it open (“open <somefile> ; ~modeldisplay #0”, and later “close #1” instead of “close all”). I’d go with solution 2.
Tom
On Jul 18, 2016, at 1:54 AM, Marvin Albert wrote:
Dear chimera users,
I was wondering whether any of you could help me with this simple problem: The aim is to make a movie displaying the evolution of predefined meshes over time (see attached python script).
Overall the script works and produces a movie. However the mesh gets displaced slightly between the different time points. This results in an annoying random wiggling. I checked the original .wrl files and the indicated coordinates do have consistent positions (meaning the displacements are produced by chimera).
How can I get a smooth movie?
Might there be something unexpected happening when I repeatedly call runCommand(“open <file1.wrl>”) and runCommand(“close all”)?
Thank you so much in advance! With kind regards, Marvin
<chimera_movie.py>_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (2)
-
Marvin Albert
-
Tom Goddard