From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Oct 08 2013 - 16:43:34 CDT

Hi Brian,
  I just read the source code to be sure I'm being accurate:
The 'measure contacts' command looks for atom pairs in two selections
and returns the indices of the atoms within the distance in the results
lists. Why two lists? Because the command allows you to mix selections
that are associated with different molecules, which means that the indices
are specific to the particular molecule they originated from. Additionally,
in the case of atoms in the same molecule, the 'measure contacts'
command ignores atoms that are known to be bonded, and does not list them.

I just read the description in the User's Guide after first, and it
seems fairly complete to me. If the only point of confusion is why
there are two result lists rather than one, I can add a new comment that
points out that this ensures that this is due to the fact that it allows
you to specify selections from different molecules, unlike most other
'measure' commands.

The output of 'measure contacts' should really be though of more like this:
  { Mol1ContactAtomIdx1 Mol1ContactAtomIdx2 ... Mol1ContactAtomIdxN }
  { Mol2ContactAtomIdx1 Mol2ContactAtomIdx2 ... Mol2ContactAtomIdxN }

Does that make sense?

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Oct 08, 2013 at 03:24:22PM +0000, Bennion, Brian wrote:
> Hello John
> This is a command that I have used and have been a little confused about. Unfortunately I don't understand the two sentence documentation that goes with it. For instance I have two residues that I would like to measure the contacts between. Two lists are returned. { atmIndx1Res1 atmindx2Res1 ... } { atm1indxRes2 atm2indxRes2 ...}. now if I had three residues in my selection would the third set of numbers still be a list of atoms that were within a cutoff distance of residue 1 that reside in residue 3?
>
> Brian
>
> ________________________________________
> From: owner-vmd-l_at_ks.uiuc.edu [owner-vmd-l_at_ks.uiuc.edu] on behalf of John Stone [johns_at_ks.uiuc.edu]
> Sent: Tuesday, October 08, 2013 6:51 AM
> To: Olaf Lenz
> Cc: VMD Mailing List
> Subject: Re: vmd-l: Finding particles that are close
>
> Olaf,
> How about using "measure contacts"?
> You can provide a specific distance criteria for measure contacts,
> and that might do the trick.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Tue, Oct 08, 2013 at 10:31:45AM +0200, Olaf Lenz wrote:
> > Hi!
> >
> > For a tutorial, I wanted my students to visualize all pairs of particles
> > in a system that are closer than a given distance $a$. I thought this to
> > be a simple application of "within" selection, something like:
> >
> > exwithin 1 of all
> >
> > Unfortunately, this will not show anything. Finally, I noticed that it
> > is not actually that simple, and I was not able to solve the problem.
> > Does anybody have an idea how to do that? It would be really useful!
> >
> > Olaf
> > --
> > Dr. rer. nat. Olaf Lenz
> > Institut für Computerphysik, Allmandring 3, D-70569 Stuttgart
> > Phone: +49-711-685-63607
>
>
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/