From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Feb 20 2008 - 13:32:03 CST

Hi,
  One can also use the Tcl "format" command to generate an atom selection
string that you can pass to the atomselect command if you have complex Tcl
evaluations you want use to drive the selections.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Feb 20, 2008 at 01:05:29PM -0500, Axel Kohlmeyer wrote:
> On Wed, Feb 20, 2008 at 11:22 AM, Pavan Ghatty <pavan.vmd_at_gmail.com> wrote:
> > Hello All,
> > Why wont the following selection work in VMD? I want to look at water
> > molecules whose x>min_x of the protein. I will then add further constraints
> > to the box.
> > I typed
> > expr [lindex [lindex [measure minmax [atomselect top protein]] 0] 0] in the
> > TCL console and got say, -23.22
> > I then typed
> > water and x> expr -23 {I could have used x>-23} in the graphical
> > representations and that worked fine. So expr -23 returns a number and not a
> > string.
> > But neither,
> > water and x> expr [lindex [lindex [measure minmax [atomselect top protein]]
> > 0] 0]
> > nor
>
> the selection text field accepts a selection string but is not evaluating
> tcl code, so what you want to do cannot be done this way. you need
> to find some other way to hook the calculation into the animation loop,
> this can be done with tracing $vmd_frame($molid).
> see http://www.theochem.rub.de/~axel.kohlmeyer/cpmd-vmd/part4.html#chap6_sect3
> for a couple of examples.
>
> cheers,
> axel.
> a look at what is done at
>
>
> > water and x> [lindex [lindex [measure minmax [atomselect top protein]] 0] 0]
> > nor
> > water and x> lindex [lindex [measure minmax [atomselect top protein]] 0] 0
> >
> > worked. Could you please help me out with this or suggest an alternative?
> >
> > Thanks!
> > Pavan
> >
>
>
>
> --
> =======================================================================
> Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu
> Center for Molecular Modeling -- University of Pennsylvania
> Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
> tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
> =======================================================================
> If you make something idiot-proof, the universe creates a better idiot.

-- 
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