[Chimera-users] x,y coordinates of the Chimera screen

Jan Kosinski kosinski at embl.de
Tue May 13 12:25:01 PDT 2014


Dear Tom,


>    Chimera uses perspective projection — in other words, the field of view is a cone.  So the width of the screen might be 100 Angstroms at one distance from the camera and 500 Angstroms at a distance 5 times further from the camera.
Yes, but anyway given the current distance from the camera, there is a 
defined range of Angstroms for the screen... So the range changes with 
the distance, but technically should be possible to get the current 
range... Maybe there is some function for this in the Python API?

>   You can use orthographic projection so that the width of the window in Angstroms makes sense.  But it seems to me you are better off positioning the models in a corner or just off screen using the mouse and using savepos to save that position.  Why?  Because if you want to put a molecule in a corner, I guess you want it to be in view, so you need to take into account the exact size of the molecule in its current orientation, likewise if I want it off screen, the size of the molecule in its current orientation will matter.  While you could try to compute that (it is certainly possible using Python Chimera code), it seems like a hard way to setup a movie.
The size of the molecule seems to be not so difficult to take into 
account - I have already seen example code for calculating bounding 
boxes of models in the python code in "tile" function of 
EnsembleMatch/base.py. Maybe it seems hard way, but actually can save me 
lots of time if after setting all the positions I decide to aspect ratio 
or the size of the window or the distance from camera. I am making lots 
of movies these days, so I am looking for maximal automation ;-)

Cheers,
Jan



More information about the Chimera-users mailing list