[chimerax-users] Possible to measure the shortest distance between two models?

Elaine Meng meng at cgl.ucsf.edu
Tue Sep 28 08:19:17 PDT 2021


Hi Matthias,
The "contacts" or "clashes" command gives all-by-all distances (and VDW overlaps) between two sets of atoms.  You can write all the info to a file or to a log.  It does not automatically only give you the shortest distance, but it sorts the output so that the shortest is first.

For example (these structures are nonphysically on top of each other, but work for illustrating the commands):

open 1zik
open 1gcn
contacts #1 restrict #2 distanceOnly 5 log true

...shows in the log all the pairwise distances between the two sets of atoms that are within 5 angstroms, with the shortest distance first.
  
See measurements:
<https://rbvi.ucsf.edu/chimerax/docs/user/measurements.html>

Clashes or contacts command:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html>

For scripting, instead of "log" you could use "saveFile" to get an output file for each structure pair.  What you get in the Log or file looks like this:

Ignore distances between atoms separated by 4 bonds or less
Detect intra-residue distances: False
Detect intra-molecule distances: True

3030 distances
       atom1                 atom2          overlap  distance
1gcn #1/A ARG 18 CZ   1zik #2/A LYS 15 O     4.767    0.233
1gcn #1/A LYS 12 O    1zik #2/A VAL 9 CA     4.568    0.432
1gcn #1/A ARG 18 CD   1zik #2/A LYS 16 CA    4.540    0.460
1gcn #1/A ALA 19 O    1zik #2/B LYS 15 CB    4.449    0.551
1gcn #1/A TRP 25 CE3  1zik #2/B GLU 22 CB    4.415    0.585
1gcn #1/A SER 8 OG    1zik #2/A LYS 3 CE     4.407    0.593
1gcn #1/A PHE 22 CE2  1zik #2/B HIS 18 N     4.392    0.608
1gcn #1/A LYS 12 NZ   1zik #2/A LEU 5 CB     4.356    0.644
1gcn #1/A LYS 12 CD   1zik #2/A LEU 5 O      4.335    0.665
1gcn #1/A GLN 20 CA   1zik #2/B LYS 15 CD    4.309    0.691
[... etc. ...]

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

> On Sep 28, 2021, at 2:15 AM, Vorländer,Matthias Kopano via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
> 
> Dear all, 
> I am interested in measuring the shortest distance between two models (PDBs) without a priori knowledge of which atoms will be the closest ones. I am planning to do this for a large number of model pairs, therefore it would be great if this would be scriptable. Is this possible using ChimeraX?
> Thanks a lot in advance, 
> Best,
> Matthias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210928/b41a1f50/attachment.html>


More information about the ChimeraX-users mailing list