Hi Aida,
I don't think you want to use "info distmat" because it will give you all N X N distances for the N atoms (not just between drug atoms and protein atoms), and there is no cutoff option. It would always give you ALL of the distances. Your second command is the one with correct syntax, but it will make such a huge output you can't easily look at it in the Log and so it would be better to also use the saveFile option. However, it is not the right command to use for what you want to do.
Instead you should use the "contacts" command, because then you can define the two separate sets of atoms and only get the distances between them, and you can give a cutoff value. There was a very similar example in a recent post to chimerax-users:
<https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/message/LP5IZ7V7DMSEOFFZBXHTSFEYEAVOY4NR/>
In your case it would be something like this to list distances in the Log
contacts (protein & sideonly) restrict :dex distanceOnly 4.0 log true make false
If you wanted to save the results to a file, you would also include something like "saveFile distances.txt"
If you wanted to draw lines on the 3D structure and label them with distance, you would use options "make true" and "showDist true"
The command and its options are described in the help:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html>
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Resource for Biocomputing, Visualization, and Informatics
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Sep 25, 2024, at 8:50 AM, NUR AIDA SAKINAH via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> Hi ChimeraX teams,
> Can you guide me to use the atoms-spec for info distmat command.
> I want the output in chimerax log to list out distances between drug compound and the amino acids side chains and only display the distances below than 4 A.
>
> For now, what i have got, the output include distances between atoms in the drug itself and atoms in the amino acids itself. The command that i have try are:
> •
> info distmat (protein & sideonly) | :dex ::num_distance< 4
> • info distmat (protein & sideonly) | :dex
> • info distmat (protein & sideonly) & (:dex) distance < 4
>
> Hope you could help me with this.
>
> Regards with thanks,
> Aida.