<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div>Thanks so much Elaine. I appreciate it.</div>
<div>Shubham.</div>
<br>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Elaine Meng <meng@cgl.ucsf.edu><br>
<b>Sent:</b> April 21, 2022 6:13 PM<br>
<b>To:</b> Shubham Devesh Ramgoolam <sdramgoolam@uwaterloo.ca><br>
<b>Cc:</b> chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu><br>
<b>Subject:</b> Re: [Chimera-users] Command for measuring distance between centroids and to show dotted lines depicting the measurement</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Shubham,<br>
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.
<br>
<br>
Method A is to make dummy atoms, like you suggested, but requires using GUI (not everything is a command):<br>
<br>
(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:<br>
<br>
Centroids<br>
centroid name, ID, center<br>
centroid: c1 ( 19.957, 25.991, 5.700)<br>
centroid: c2 ( 18.002, 9.464, 7.965)<br>
<br>
(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<br>
<br>
(3) hide or remove centroids, select the new atoms (Ctrl-click, Shift-Ctrl-click in on them in the graphics window), then use command:<br>
distance sel<br>
<br>
Method B:<br>
<br>
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.
<br>
<<a href="https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/measure.html#center">https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/measure.html#center</a>><br>
<br>
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<br>
<br>
There is also a method C: <br>
...using ChimeraX instead of Chimera, since ChimeraX will show a dashed line for a distance between centroids. Example commands in ChimeraX:<br>
<br>
open 1zik<br>
define centroid /A:17@cg,cd?,ce?,cz<br>
define centroid /B:17@cg,cd?,ce?,cz<br>
[... this createst two centroid models #1.1 and #1.2, as shown in the model panel]<br>
distance #1.1 #1.2<br>
<br>
I hope this helps,<br>
Elaine<br>
-----<br>
Elaine C. Meng, Ph.D.<br>
UCSF Chimera(X) team<br>
Department of Pharmaceutical Chemistry<br>
University of California, San Francisco<br>
<br>
> On Apr 21, 2022, at 12:02 PM, Shubham Devesh Ramgoolam via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:<br>
> <br>
> Hi,<br>
> I hope you are doing well.<br>
> Is there a command in chimera that allows us to measure the distance between centroids and also to show dotted lines depicting the measurement?<br>
> I used the command distance but no lines were shown for centroids.<br>
> 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.<br>
> Regards,<br>
> Shubham<br>
<br>
</div>
</span></font></div>
</body>
</html>