From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jun 21 2005 - 17:42:11 CDT

Erik,
  The 'animate readdel' command was eliminated back in January 2002 but the
individual that made the change to the VMD source code didn't update
the documentation at the same time. I had to dig a bit to figure out
when this change got made in order to answer your question.
The built-in interactive command help VMD is returning which doesn't list
'readdel' as a valid option is correct in this case. I'll fix the
documentation momentarily...

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Jun 15, 2005 at 09:15:10AM -0400, nordgren_at_sas.upenn.edu wrote:
> OK, I answered my own question... partially...
>
> It turns out that the same functionality alleged to be performed by the
> "animate readdel" command can be easily accomplished using the combination
> of commands: "animate delete" and "mol addfile".
>
> However, I'm still curious as to why the "animate readdel" command is
> broken....
>
> - Erik
>
> C. Erik Nordgren, Ph.D.
> Department of Chemistry
> University of Pennsylvania
>
>
> > Hi folks,
> >
> > OK, it took me a couple days before I could try this out, and sure enough,
> > Axel was again correct. Thanks! Yes indeed, a race condition seems to
> > have been resulting from my omission of the "waitfor all" option -- even
> > though I was only writing a single frame. (I had previously thought that
> > this option was only important when reading/writing multiple frames.)
> >
> > I still have one issue to resolve, however: at the end of the loop in my
> > script, I wanted to use the "animate readdel" command, in order to read
> > in a new set of coordinates, overwriting the old coordinates. But when
> > I tried this:
> > animate readdel $out_name.coor beg $frame end $frame
> > VMD complains:
> > Valid options are: reverse, rev, forward, for, prev, next, pause,
> > read, write, delete, and dup.
> > So even though the "readdel" option is documented in the user guide, it
> > doesn't seem to be recognized by the VMD program! Anybody know what's
> > going
> > on here? Again, I'm running VMD1.8.3 on IRIX.
> >
> > Alternatively, is there some other way to do what I want? I tried simply
> > using the "animate read" command:
> > animate read pdb $out_name.coor beg $frame end $frame waitfor all
> > but in this case the new coordinates do not overwrite the old ones; the
> > command apparently simply fails (silently!) to do anything, if I try
> > reading
> > coords into a frame that already has coords. I also tried:
> > animate delete beg $frame end $frame
> > animate read pdb $out_name.coor beg $frame end $frame waitfor all
> > but in this case VMD complains:
> > ERROR) molecule_dupframe: frame out of range
> > ERROR) Illegal frames requested for coordinate file I/O
> >
> > Assistance greatly appreciated as always...
> >
> > - Erik
> >
> > C. Erik Nordgren, Ph.D.
> > Department of Chemistry
> > University of Pennsylvania
> >
> >
> > Quoting Axel Kohlmeyer <axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de>:
> >
> > > On Thu, 9 Jun 2005 nordgren_at_sas.upenn.edu wrote:
> > >
> > > erik,
> > >
> > > EN> Unfortunately, I'm still having difficulty of a more subtle nature.
> > > Now
> > > EN> that I know someone is reading :) I'll elaborate a bit more.
> > > Basically,
> > >
> > > ok. great.
> > >
> > > EN> what I want to do is use VMD to force a rescaling of the distance
> > > between
> > > EN> certain parts of my system, and then call NAMD to do some brief
> > energy
> > > EN> minimization of the coordinates, and then repeat the process in a
> > loop
> > > EN> over my scaling parameter. At each step, a new coord frame is
> > > generated,
> > > EN> and at the end the entire trajectory is saved. Here is the skeleton
> > > of the
> > > EN> VMD script I'm trying to get to work (where the scaling is given by
> > > "L")...
> > > EN>
> > > EN>
> > >
> > ---------------------------------------------------------------------------
> > > EN> mol load psf $start_psf pdb $start_pdb
> > > EN> set frame 0
> > > EN> # initial coords are left as-is in frame 0; begin minimizing in next
> > > frame
> > > EN> for {set L [expr $max - $del]} {$L >= $min} {set L [expr $L - $del]}
> > {
> > > EN>
> > > EN> # add new frame to the trajectory, with coords copied from
> > current
> > > frame
> > > EN> animate dup frame $frame 0
> > > EN> incr frame
> > > EN> animate goto $frame
> > > EN>
> > > EN> # (modify coords of new frame...)
> > > EN>
> > > EN> # call NAMD to energy-minimize the new coords
> > > EN> animate write pdb $temp_pdb beg $frame end $frame
> > >
> > > i think here could be the problem. you should add 'waitfor all'
> > > to the 'animate write' command, or else VMD will start writing the
> > > files and _immediately_ continue executing the script thus creating
> > > a race condition. i assume during the first loop this is not
> > > biting you, since the parser needs more time to evaluate the
> > > script, but from them on it should take advantage of the internal
> > > caching of preparse code and thus the writing of the pdb file may
> > > not be finished when your script calls NAMD the second time.
> > >
> > > EN> set cell_size [expr 4.0 * $L]
> > > EN> exec env NAMD_psf=$start_psf \
> > > EN> NAMD_pdb=$temp_pdb \
> > > EN> NAMD_outfile=$out_name \
> > > EN> NAMD_minsteps=$namd_minsteps \
> > > EN> NAMD_cell=$cell_size \
> > > EN> namd2 +p1 $namd_configfile
> > > EN>
> > > EN> # replace coords of current frame with new (minimized) coords
> > > EN> animate read pdb $out_name.coor beg $frame end $frame
> > >
> > > for safety and the sake of consistency you should add an
> > > 'waitfor all' here as well.
> > >
> > > EN>
> > > EN> }
> > >
> > > best regards,
> > > axel.
> > >
> > >
> > > --
> > > =======================================================================
> > > Dr. Axel Kohlmeyer e-mail: axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de
> > > Lehrstuhl fuer Theoretische Chemie Phone: ++49 (0)234/32-26673
> > > Ruhr-Universitaet Bochum - NC 03/53 Fax: ++49 (0)234/32-14045
> > > D-44780 Bochum http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
> > > =======================================================================
> > > 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