[Chimera-users] Save measured distances

Elaine Meng meng at cgl.ucsf.edu
Tue Nov 13 09:55:41 PST 2018

Hi Joshi,
The distance command doesn’t have a save-to-file option.  However, you can use the “findclash” command to find all pairwise distances among a set of 2 or more atoms, and it does have a save-to-file option.

You could either first select all the atoms you want and then use “sel” in the findclash command, or just list all the atoms you want directly in the findclash command, as in the example below.  The trick to get all pairwise distances and not just short clash distances is to use a large negative overlap cutoff in the command, something like:

findclash #0:13,48,129 at ca  test self  overlap -100000  saveFile /Users/meng/Desktop/distances.txt

There are several other options, including line width and color, and “log true” to show in the Reply Log the same thing that would be written to the saved file.  See:

The results are something like the following.  You could ignore the overlap column and just look at the distance(s) in the last column:

3 contacts
atom1  atom2  overlap  distance
ASP 13.A CA   GLN 48.A CA   -11.493  15.253
ASP 13.A CA   ALA 129.A CA  -32.639  36.399
ALA 129.A CA  GLN 48.A CA   -43.052  46.812

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

> On Nov 13, 2018, at 12:30 AM, Dhananjay <dhananjay.c.joshi at gmail.com> wrote:
> Dear all,
> I am calculating distance between CA atoms as follows:
> sel #0:13 at CA, #0:129 at CA 
> color red selection
> distance #0:13 at CA #0:129 at CA
> I want to save the measured distance between residue 13 at CA and 129 at CA in a file. I can do it using GUI. How can I do this within the command line ?
> Any help would be appreciated !!
> Thank you
> -- Joshi

More information about the Chimera-users mailing list