From: Philippe Bopp (
Date: Sat Jul 20 2019 - 04:09:27 CDT

    dear Axel and Ashar (and others)

  many thanks to Axel (Gruss aus Bordeaux) and Ashar.
 Axel wrote
>please try exwithin instead of within
 I did , but without succes:
according to

| exwithin | str | 'exclusive within'; equivalent to (within 3 of X) and not X. |

so "name X and exwithin A of name X" is "name X and (within A of name X) and not name X"which, unsurprisingly, finds nothing.
so probably with a selection that contains only one atom,e.g. index by index, with a tcl-loop. see below

Ashar wrote:

>Have you tried using the keyword "index"?
 yes, and in test cases I got something with
 index I and within ....... and not same as index I

 However, the problem is that I do not know the indices a-priori

 This is why I thought I could come up with a tcl script (not done yet) to do it: a) find the indices of all X b) loop over the indices and find what I need
 The question was whether this could be squeezed in one line I might use in the representation panel

    thanks again

  Hi all
 I cannot find this described anywhere: Is there a way to atomselect pais of identical atoms with a given distance as a one-line atomselect command (ie without scripting)?
 "name X and within A of name Y" is fine, but "name X and within A of name X" also selects distance zero, ie.self, ie. just name X
 (something like "name X and within A of ANOTHER name X". Couldn't make it work with "same")


Philippe A. Bopp
professor of chemistry (retired)

philippebopp  AT