[Chimera-users] Is there a way to determine the "screen" window coordinates (x, y) of an "atom-spec"

Elaine Meng meng at cgl.ucsf.edu
Thu Jul 30 09:29:33 PDT 2020

Hi Stephen,
One suggestion if you want to specify an arrow in the coordinate system of the structure is to create it as a 3D object instead of using 2D labels.  In general, if using 2D labels you would position them interactively, not try to do some automatic calculation that figures out the position.

For 3D objects: You can create a simple BILD-format file (plain text giving coordinates of objects), name the file something.bild, and then open it Chimera to show the objects.  For example, opening the attached file XYZ-axes.bild in Chimera will show some 3D arrows.

BILD format described here:

Or, since it is a separate model, you can just create the 3D object with any coordinates and then (after opening the BILD file), move the arrow manually to the position you want relative to the atomic structure.  Moving models separately:

I hope this helps,
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

-------------- next part --------------
A non-text attachment was scrubbed...
Name: XYZ-axes.bild
Type: application/octet-stream
Size: 296 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200730/d9bc9474/attachment.obj>
-------------- next part --------------

> On Jul 30, 2020, at 8:58 AM, Chin-Bow, Stephen <stephen.chin-bow at yale.edu> wrote:
> Hello,
> It has been only a few weeks since I first started learning Chimera 1.14 (build 42094) on a Linux64 system with X11.  I hope my experiences will help you improve both Chimera and ChimeraX.  Earlier today, I reported a situation which results in an unexpected handling of a "divide by zero" bug.
> I am using the experience to also learn some Python.  I am sure there are better ways, but I edited your playmorph.py code to record an animation with a morphing sequence played in reverse.
> I admit that I still do not understand the different coordinate systems used in Chimera.
> I have a question which can simply be answered using a ruler, but I am hoping there is another more elegant solution.
> "2D Labels" arrow ends are specified as a percentage of the screen width and screen height (range 0.0 to 1.0).  I would like to draw an arrow whose end (x,y) is specified with precision.
> After I can specify the windowsize
> Is there a way to request the "window-screen" coordinates of a specific atom-spec?  This is useful, because if I have set the windowsize then I can simply divide the coordinates by the window dimensions to get the desired end for the arrow.
> Many thanks,
> Stephen

More information about the Chimera-users mailing list