From: John Stone (johns_at_ks.uiuc.edu)
Date: Sat May 23 2020 - 09:49:22 CDT

Hi,
  Since VMD doesn't yet support appending trajectories (and even
when it does, not all file formats will be supported), you'll
currently need to write all of your trajectory frames out at once,
or use an external tool like catdcd to stitch them together.

Best regards,
  John Stone
  vmd_at_ks.uiuc.edu

On Sat, May 23, 2020 at 05:57:08PM +0530, HEMANTH H wrote:
> Sir,
> Thanks for your response. This is exactly what is happening with my
> script. It would be helpful if I could get some way to get it done.
> Best,
> Hemanth
> On Sat, 23 May 2020, 12:47 John Stone, <[1]johns_at_ks.uiuc.edu> wrote:
>
> Hi,
> When you're writing out the DCD trajectory, you'll want to
> add the options "waitfor all" to the end of the command
> to ensure it completes fully. Also, VMD does not currently
> allow you to append to the end of an existing trajectory, so
> your script below likely simply overwrites whatever existing
> file you have.
>
> Best,
> John Stone
> [2]vmd_at_ks.uiuc.edu
>
> On Thu, May 21, 2020 at 10:48:46AM +0530, HEMANTH H wrote:
> > Dear All,
> > I am trying to write out a few frames from my namd dcd file using
> the
> > following tcl script. I am able to write out the frames to the
> dcd file,
> > but it is overwriting the previous dcd frame written. Any
> suggestions are
> > welcome.
> > if {$nbasedist < 3.8} {
> > if {$angle < 30.1 || $angle > 149.9}
> > then {
> > animate write dcd $stacked beg $f end $f
> > }
> > else
> > {
> > animate write dcd $unstacked beg $f end $f
> > }
> > }
> > else
> > {
> > animate write dcd $unstacked beg $f end $f
> > }
> >
> > }
> > This the part of the script that fails.
> > --
> > Hemanth H 18310019
> > Research Scholar
> > IIT Gandhinagar
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> [3]http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> [4]http://www.ks.uiuc.edu/Research/vmd/
>
> References
>
> Visible links
> 1. mailto:johns_at_ks.uiuc.edu
> 2. mailto:vmd_at_ks.uiuc.edu
> 3. http://www.ks.uiuc.edu/~johns/
> 4. http://www.ks.uiuc.edu/Research/vmd/

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