From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Oct 07 2013 - 15:38:17 CDT

Hi,
  I noticed that you have netcdf within angle brackets, which may be
the source of your problem. Do you get any error when you run just the
"mol new" and "mol addfile" commands in your script by hand?

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Oct 07, 2013 at 04:28:04PM -0400, Nupur Bansal wrote:
> Hi,
>
> I have a protein-ligand complex simulated using Amber. Now, I am trying to find the residues closest to the ligand using VMD. The script is giving me an error "No timestep available for 'within' search! " and is selecting all the residues of the protein.
> I don't know why this is happening. Can somebody help me in debugging this error?
>
> This is the script that I am using:
>
> set first 0
> set last 0
>
> set sys [mol new cur1_sb_strip.prmtop]
> mol addfile type <netcdf> cur1_sb_strip.netcdf first$first last$last waitfor all
>
> set all [atomselect $sys all]
> for {set k 0} {$k <= $last} {incr k} {
> molinfo top set frame $k
> $all update
> set sel [atomselect top "protein and (name CA) and within 3 of (resname CUR and not hydrogen)"]
> set num1 [$sel num]
> set resid1 [$sel get resid]
> puts "number=$num1"
> puts "resid=$resid1"
> }
>
> Thanks
> Nupur Bansal
> Graduate Student
> Merz Group
> Michigan State University

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