From: Kei Sit (kei.sit_at_qut.edu.au)
Date: Tue Apr 10 2012 - 19:24:56 CDT

Hi Jose,

I have a feeling the 'waitfor all' needs to be on the second line so that VMD actually waits for all of the trajectory to be read before writing anything.

Kei Sit (Jacky) | PhD Student | Faculty of Health | School of Biomedical Sciences
Queensland University of Technology | Level 6/60 Musk Avenue | Kelvin Grove campus
Ph: 3138 6410 | Email: kei.sit_at_qut.edu.au

From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf Of Jose Borreguero
Sent: Wednesday, 11 April 2012 8:32 AM
To: vmd-l
Subject: vmd-l: saving dcd file different if by script or by interactive mode

Dear VMD users,

I have the following little script that reads an AMBER dcd trajectory and outputs a dcd trajectory formatted by VMD:

mol new system.top type parm7
animate read dcd amber.dcd beg 0 end 9
animate write dcd vmd.dcd beg 0 end 9 waitfor all

The script works well when entering the commands one by one in the main vmd window. However, if submitted as a script ( vmd -dispdev none -e script.tcl ), it will only save the first frame, that is, vmd.dcd will contain only the first frame.

I am new to scripting with VMD, I really don't know what I am missing here. Any help is greatly appreciated.

Best regards,
Jose