From: Ashar Malik (asharjm_at_gmail.com)
Date: Sat Jul 20 2019 - 05:15:51 CDT

Hi, If your ultimate goal is to put that in the representation panel's
selection I would still use the for loop to list the indices (of atoms
required) then copy them and paste in the representation panel.

If your index is variable and may change from one instance to the next (to
much copy pasting), a solution would be to save the visuals through
commands as well and view later. (Sorry can't offer an easier solution).

/A

On Sat, Jul 20, 2019, 17:40 Philippe Bopp <philippebopp_at_remove_yahoo.com>
wrote:

> 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 https://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/node79.html
> 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
>
> Philippe
>
>
>
> 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")
>
> thanks
>
> Philippe
>
>
> -----------------
> Philippe A. Bopp
> professor of chemistry (retired)
>
> philippebopp AT yahoo.com
> ---------------
>
>