Re: [Chimera-users] Chimera-users Digest, Vol 38, Issue 12

Thanks to all for the quick responses on interpolation. Here's a quick example showing what I was concerned about: arrows.bld ------------------ .color red .arrow 0 0 0 1 0 0 .color green .arrow 0 0 0 0 1 0 .color blue .arrow 0 0 0 0 0 1 ------------------ matrix2 ----------------- Model 0.0 0.505641 0.433743 -0.745785 -2.58211 -0.807506 0.542275 -0.232105 2.90884 0.303746 0.719587 0.624446 -0.194334 ----------------- matrix3 ---------------- Model 0.0 0.60158 -0.458982 0.653787 0.653219 0.190507 -0.712397 -0.675423 5.48737 0.775763 0.530872 -0.341124 0.0103466 ---------------- The first matrix is just unity. The 'reset'-based interpolation works great for going between 1 and 3 or 1 and 2 in both directions, as well as 3 to 2, but fails from 2 to 3. Since all this is new to me, I can't say for certain that this is due to gimbal lock, but that was my first guess. I haven't had the opportunity yet to try out Tom's axis-angle approach, but that should rule out any Euler problems. The other problem for me is that all my current methods are based upon a stepwise approach via commands (ungainly, but very functional when combined with shell scripts, imagemagick etc), and this is incompatible with the 'reset' interpolation. Perhaps it was misleading to mention the use of 'matrixset'. I appreciate that it is more trouble to deal with external files, but if it is not possible to easily implement the interpolation I'm looking for dynamically within Chimera's Python (due to required math libraries, etc) then I would have to hard-code the interpolation matrices into the .py script file anway, defeating the purpose. Thanks for the help: I'd love to hear about any future development in this area.

Hi Jonathan, I'm confused about what you want for defining motion in animations. You lost me in this paragraph:
Perhaps it was misleading to mention the use of 'matrixset'. I appreciate that it is more trouble to deal with external files, but if it is not possible to easily implement the interpolation I'm looking for dynamically within Chimera's Python (due to required math libraries, etc) then I would have to hard-code the interpolation matrices into the .py script file anway, defeating the purpose.
In order to cause an interpolated model motion from a script I envision a command like: movemodel #1 -0.0111371 0.570901 0.820943 -117.863 0.640072 -0.626684 0.444493 -121.042 0.768233 0.530413 -0.358438 -132.976 0.067350 0.359127 0.930855 -94.4361 0.783716 -0.596423 0.173398 -121.535 0.617456 0.717847 -0.321623 -142.360 30 Ugly yes. It has the model number, followed by 12 values for the starting 3 by 4 matrix, followed by 12 values for the destination matrix, followed by a frame count (30 in the example). Maybe it would be neater to name the matrices but the Chimera command language does not have variables so it would require an additional special command. The example handles just the case of an absolute motion (not relative to another model). Perhaps another model id number could be added to treat the matrices as relative to another model's position. Determining these matrices would use another new command to print the current model matrices (or matrixget which writes them to a file). The interpolation I used in the myosin animation moves the center of the bounding box of the moved model in a straight line from starting position to ending position, and simultaneously rotates about the moving center from the initial orientation to final orientation. This type of interpolation requires some definition of a "model center". The reset command does something different and I'll let Greg Couch the author of that command explain. Tom

I've fixed the "reset" code so that it does work between all the positions you provided. I'm sending it as an attachment in a separate mail (since this is going to the list). It will also be in the snapshot release we are making next week. As for 'reset' not being compatible with a stepwise approach, couldn't you put all your saved positions in a session and have your script work with a session file? --Eric On Jun 16, 2006, at 3:15 PM, Jonathan Hilmer wrote:
Thanks to all for the quick responses on interpolation.
Here's a quick example showing what I was concerned about:
arrows.bld ------------------ .color red .arrow 0 0 0 1 0 0 .color green .arrow 0 0 0 0 1 0 .color blue .arrow 0 0 0 0 0 1 ------------------
matrix2 ----------------- Model 0.0 0.505641 0.433743 -0.745785 -2.58211 -0.807506 0.542275 -0.232105 2.90884 0.303746 0.719587 0.624446 -0.194334 -----------------
matrix3 ---------------- Model 0.0 0.60158 -0.458982 0.653787 0.653219 0.190507 -0.712397 -0.675423 5.48737 0.775763 0.530872 -0.341124 0.0103466 ----------------
The first matrix is just unity.
The 'reset'-based interpolation works great for going between 1 and 3 or 1 and 2 in both directions, as well as 3 to 2, but fails from 2 to 3. Since all this is new to me, I can't say for certain that this is due to gimbal lock, but that was my first guess. I haven't had the opportunity yet to try out Tom's axis-angle approach, but that should rule out any Euler problems. The other problem for me is that all my current methods are based upon a stepwise approach via commands (ungainly, but very functional when combined with shell scripts, imagemagick etc), and this is incompatible with the 'reset' interpolation.
Perhaps it was misleading to mention the use of 'matrixset'. I appreciate that it is more trouble to deal with external files, but if it is not possible to easily implement the interpolation I'm looking for dynamically within Chimera's Python (due to required math libraries, etc) then I would have to hard-code the interpolation matrices into the .py script file anway, defeating the purpose.
Thanks for the help: I'd love to hear about any future development in this area. _______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (3)
-
Eric Pettersen
-
Jonathan Hilmer
-
Thomas Goddard