From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jul 14 2010 - 09:32:33 CDT

Bob,
  For this case, you might find it easier to create unique atom selection
macros, and then simply refer to them when you create the representations
that will use them. There isn't currently a way to associate an
existing selection with a representation, so this is the next best thing.
Let us know if you need more help with this.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Jul 14, 2010 at 10:22:09AM -0400, Robert Wohlhueter wrote:
> I would like to be able to refer to (complicated) atomselect variables
> in the "representation" gui of VMD, but can't figure out a syntax for
> doing so. The following commands from within the tcl window would seem
> to do it: set sel [atomselect .....]; mol selection $sel; mol addrep
> 1. This has the effect of writing to the "selection" column in the
> "representation" gui "resid eq $sel" -- which would seem intuitively
> useful (and that syntax is accepted by the gui). BUT the desired
> selection is not made (there's no change in the display window at all),
> nor can I find that "resid eq .." syntax documented anywhere.
>
> Generally my purpose is simply to write a bunch of complex selections to
> a tcl command file, source it, then use the resultant variables in the
> gui. Any hints how to do this?
>
> [I'm running VMD 1.8.7 on 64-bit linux]
>
> Thanks,
>
> Bob Wohlhueter

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078