From: Eduard Schreiner (eduard.schreiner_at_theochem.ruhr-uni-bochum.de)
Date: Fri May 06 2005 - 06:57:18 CDT

nordgren_at_sas.upenn.edu wrote:
> Hello all,
>
> I would like to generate a series of coordinate frames using VMD (based upon
> manipulations of a single reference configuration) and then analyze the
> relative potential energies of the various configurations (using NAMD).
>
> I think the latter part of this will be simple (just do a loop inside NAMD
> to read one frame at a time from a DCD file and "run 0" to compute the
> energies), but the first part, to my surprise, has proven tricky.
>
> Here is what I tried:
> --------
> mol load psf $start_psf pdb $start_pdb
> set whole [atomselect top all]
> set frame 0
> for {set z $start_z} {$z >= $final_z} {set z [expr $z - $delta]} {
>
> (modify my coordinates)
>
> molinfo top set frame $frame
> # $whole frame $frame
> $whole writedcd $final_dcd
> incr frame
> }
> --------
> This script runs, but the resulting DCD file contains only one frame.
>
> If I un-comment the "$whole frame $frame" line, then the script aborts
> on its second trip through the loop; I get an error of:
> atomsel: frame 1 out of range for molecule 0
> So I guess my idea of setting the frame number in order to append it
> to my DCD output file doesn't work either.
>
> I re-read the VMD manual for the "writeXXX" command (subset of the
> "atomselect" command) but there's no detail about how to append frames
> one at a time.
>
> I'm sure there's an easier way to do this... can anyone help?
>
> thanks much,
> Erik
>
> C. Erik Nordgren, Ph.D.
> Department of Chemistry
> University of Pennsylvania
>
>
Hey Erik,
does $start_pdb contain a trajectory ?
The error
"atomsel: frame 1 out of range for molecule 0"
sounds that there is only one frame loaded.

Eddi

-- 
--
=======================================================================
Eduard Schreiner                        e-mail: eduard.schreiner_at_rub.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-22121
Ruhr-Universitaet Bochum - NC 03/52         Fax:   ++49 (0)234/32-14045
D-44780 Bochum                               http://www.theochem.rub.de
=======================================================================