From: maria goranovic (mariagoranovic_at_gmail.com)
Date: Wed Aug 15 2007 - 04:09:32 CDT

Hello,

I had posted this earlier on the NAMD list, and was suggested to take it to
the correct (vmd) forum.

http://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l/6392.html

I have a peculiar problem while working with bigdcd.tcl which I downloaded
off the website, and stored in the directory ~/NAMD_SCRIPTS. Here is the
problem:

The number of frames that is accessed by my procedure using bigdcd is the
same as the number of new line characters that appear after the last line in
the tcl script below. Why would this happen ? THE PROBLEM ONLY APPEARS IF I
USE VMD ON THE COMMAND LINE. The script runs fine interactively inside a vmd
console.

Here is the script with 2 example inputs and corresponding outputs. Please
note that the 2 input scripts only differ in the number of empty lines after
the last line of the script.

INPUT1:
#########################3
source ~/NAMD_SCRIPTS/bigdcd.tcl
mol load pdb waterprotcharmm.pdb
proc displacement {frame} {
     puts $frame
}

bigdcd displacement waterprot-10k.dcd
#########################3

OUTPUT1:

#########################3
Info) VMD for LINUX, version 1.8.5 (August 25, 2006)
Info) http://www.ks.uiuc.edu/Research/vmd/
Info) Email questions and bug reports to
vmd_at_ks.uiuc.edu<vmd_at_ks.uiuc.edu?Subject=Re:%20Very%20peculiar%20problem%20while%20using%20bigdcd.%20Help%20%21>
Info) Please include this reference in published work using VMD:
Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
Info) -------------------------------------------------------------
Info) Multithreading available, 2 CPUs detected.
after#0
psfplugin) Detected a Charmm31 PSF file
Info) Using plugin psf for structure file waterprotcharmm.psf
Info) Analyzing structure ...
Info) Atoms: 65594
Info) Bonds: 65802
Info) Residues: 17818
Info) Waters: 16810
Info) Segments: 9
Info) Fragments: 16818 Protein: 4 Nucleic: 0
0
dcdplugin) detected standard 32-bit DCD file of native endianness
dcdplugin) CHARMM format DCD file (also NAMD 2.1 and later)
Info) Using plugin dcd for coordinates from file waterprot-10k.dcd
1
Info) VMD for LINUX, version 1.8.5 (August 25, 2006)
Info) Exiting normally

INPUT2:
#########################
source ~/NAMD_SCRIPTS/bigdcd.tcl
mol load pdb waterprotcharmm.pdb
proc displacement {frame} {
     puts $frame
}

bigdcd displacement waterprot-10k.dcd

#########################
OUTPUT2: (same as output 1, except that more frames are accessed
#########################
...
...
1
2
3
4
Info) VMD for LINUX, version 1.8.5 (August 25, 2006)
Info) Exiting normally
#########################

Maria G.
Technical University of Denmark
Copenhagen