From: Bennion, Brian (bennion1_at_llnl.gov)
Date: Fri Jan 23 2015 - 14:31:44 CST

________________________________
From: Bennion, Brian
Sent: Friday, January 23, 2015 12:31 PM
To: bishop_at_latech.edu
Subject: RE: vmd-l: within command

Hello,

I don't know if I completely understand what you are trying to accomplish, however, it might be that you have to iterate over each molecule/atom separately?

First take a list of all O and foreach element of that list get the index and then

set sel [atomselect top "(not index) and same residue as within 3 of name O"]

Just guessing...
Brian

________________________________
From: owner-vmd-l_at_ks.uiuc.edu [owner-vmd-l_at_ks.uiuc.edu] on behalf of Thomas C. Bishop [bishop_at_latech.edu]
Sent: Friday, January 23, 2015 11:04 AM
To: vmd-l_at_ks.uiuc.edu
Subject: vmd-l: within command

Dear VMD,
I"m looking for a quick way to generate a list of atom pairs that are within a specified distance of each other.
e.g find oxygen atoms that are within say 3A of each other.

I thought I could use the within command
set sel [atomselect top "within 3 of name O" ]

This selects all atoms within the specified distance (in Å) from a selection,
BUT ALSO INCLUDES THE SELECTION ITSELF.

So the above sel includes ALL atoms named O b/c each oxygen is within 3 of itself :-)

Maybe it's just Friday but I dont' see a simple solution here.
This selection is being used to highlight various pairs associated with a radial distribution analysis.

Any tips,tricks or solutions greatly appreciated.
Is it worthwhile to suggest a " -self" option be added to the within command

Thanks in advance,
Tom.

--
*******************************
   Thomas C. Bishop
    Tel: 318-257-5209
    Fax: 318-257-3823
   www.latech.edu/~bishop<http://www.latech.edu/~bishop>
********************************