From: M K (mahyar.karimi20_at_gmail.com)
Date: Mon Jan 25 2016 - 03:35:42 CST

I was wondering if "exwhithin" command can be used here. For example:

exwithin 5 of "name "H.*"

Does it work for Monika's purpose?

Bests

On Mon, Jan 25, 2016 at 6:09 PM, Norman Geist <
norman.geist_at_uni-greifswald.de> wrote:

> You may not nest quotes, without escaping them.
>
>
>
> set sel1 [atomselect $mol "name \"H.*\" and
> sqrt(sqr(x-$x1)+sqr(y-$y1)+sqr(z-$z1)) < 5"]
>
>
>
> or use single quotes within double quotes:
>
>
>
> set sel1 [atomselect $mol "name ‘H.*’ and
> sqrt(sqr(x-$x1)+sqr(y-$y1)+sqr(z-$z1)) < 5"]
>
>
>
>
>
> Norman Geist
>
>
>
> *Von:* owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] *Im
> Auftrag von *Monika Madhavi
> *Gesendet:* Montag, 25. Januar 2016 06:31
> *An:* vmd-l_at_ks.uiuc.edu
> *Betreff:* vmd-l: select atoms within a sphere - atomselect
>
>
>
> Dear all,
>
>
>
> I want to select all the inter-molecular hydrogen atoms within a sphere of
> radius 5A from a central hydrogen atom. Coordinates of the central atom are
> x1,y1,z1. I tried this atomselect command.
>
>
>
> set sel1 [atomselect $mol "name "H.*" and
> sqrt(sqr(x-$x1)+sqr(y-$y1)+sqr(z-$z1)) < 5"]
>
>
>
> this gives me an error saying "extra characters after quoted text"
>
>
>
> Please help me to resolve this problem.
>
>
>
> Thank you.
>
> Monika
>
> --
>
> W.A.Monika Madhavi
>
> Lecturer (Probation),
>
> Department of Physics,
>
> University of Colombo.
>