From: Norman Geist (norman.geist_at_uni-greifswald.de)
Date: Wed Jun 22 2016 - 10:58:55 CDT

Have you tried „exwithin“ instead?

 

Norman Geist

 

Von: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] Im Auftrag von Simon Dürr
Gesendet: Mittwoch, 22. Juni 2016 15:43
An: VMD list <vmd-l_at_ks.uiuc.edu>
Betreff: vmd-l: Selecting atoms of same type in a certain distance (between X and Y angstroms away)

 

Hi,

 

I'm using VMD to search through some PDB files to see if there are other atoms present in a certain distance range.

 

Unfortunately this atomselect command does not work:

atomselect top "element Zn and within 5 of type ZN and not within 2 of type ZN"

 

it seems like the atom I'm comparing to is counted also by the within select method which makes the within part of the statement useless.

 

For example "atomselect top "type ZN and within 0 of type ZN" " is the same as "atomselect top "type ZN""

I would expect the first command to return zero results as there is not another atom of this type at exact the same place as the current atom

 

Is there any method to easily use atomselect commands to select atoms that are in a certain distance range of an atom of the same type or element?

The command that I'm searching for would be "atomselect top "type ZN and within X of ANOTHER type ZN"

 

I also tried the same commands with indexes but was only partly successful:

index 123 and within 5 of index 177 (gives me a result if the ion is 5 angstroms close)

index 123 and not within 5 of index 177 (gives me a result if the ion is not 5 angstroms close)

 

index 123 and within 5 of index 177 and not within 2 of index 177 ( gives me no result although ions are 4.5 angstroms apart)

index 123 and not within 2 of index 177 and within 4 of index 177 ( gives me a result although ions are 4.5 angstroms apart)

 

I'm using VMD 1.9.2 in the LINUX_64 OpenGL, CUDA version

​. ​

 

 

Cheers,

Simon