[Chimera-users] Command for measuring distance between centroids and to show dotted lines depicting the measurement

Elaine Meng meng at cgl.ucsf.edu
Thu Apr 21 14:13:20 PDT 2022


Hi Shubham,
Although the "distance" command in Chimera works for measuring distances between centroids, it does not draw a line.  Below are two workarounds, methods A and B.  

Method A is to make dummy atoms, like you suggested, but requires using GUI (not everything is a command):

(1) use "Save" on the Angles/Planes/Centroids dialog to save a text file that includes the coordinates of the centroids, as in this example:

Centroids
centroid name, ID, center
centroid: c1 ( 19.957,  25.991,   5.700)
centroid: c2 ( 18.002,   9.464,   7.965)

(2) view contents of that file to see xyz coordinates, use Build Structure (in menu under Tools... Structure Editing), Start Structure section, add "atom" at each of those xyz coordinates

(3) hide or remove centroids, select the new atoms (Ctrl-click, Shift-Ctrl-click in on them in the graphics window), then use command:
 distance sel

Method B:
  
If it is OK for the centroid positions to be mass-weighted, instead of using "define centroid" you could use the "measure center" with "mark true" to create markers instead of centroids.  
<https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/measure.html#center>

Markers are dummy atoms, so measuring a distance between them would show the dashed line.  As with the atoms above, you could select them in the graphics window and then use command: distance sel

There is also a method C: 
...using ChimeraX instead of Chimera, since ChimeraX will show a dashed line for a distance between centroids.  Example commands in ChimeraX:

open 1zik
define centroid /A:17 at cg,cd?,ce?,cz
define centroid /B:17 at cg,cd?,ce?,cz
    [... this createst two centroid models #1.1 and #1.2, as shown in the model panel]
distance #1.1 #1.2

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

> On Apr 21, 2022, at 12:02 PM, Shubham Devesh Ramgoolam via Chimera-users <chimera-users at cgl.ucsf.edu> wrote:
> 
> Hi,
> I hope you are doing well.
> Is there a command in chimera that allows us to measure the distance between centroids and also to show dotted lines depicting the measurement?
> I used the command distance but no lines were shown for centroids.
> I am considering of using the coordinates of the centroids to place dummy atoms and then, use distance. However, I do not know if there is a command for placing dummy atoms in specified positions.
> Regards,
> Shubham




More information about the Chimera-users mailing list