From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Wed Aug 15 2007 - 10:47:46 CDT

On Wed, 15 Aug 2007, maria goranovic wrote:

MG> Hello,
MG>
MG> I had posted this earlier on the NAMD list, and was suggested to take it to
MG> the correct (vmd) forum.
MG>
MG> http://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l/6392.html
MG>
MG> I have a peculiar problem while working with bigdcd.tcl which I downloaded
MG> off the website, and stored in the directory ~/NAMD_SCRIPTS. Here is the
MG> problem:

maria,

your problem is not peculiar and has been discussed before.
bigdcd processes in the background, since it hooks into the
trajectory loading procedure. if you run in console mode
you will exit the vmd session before the analysis is done.

if i remember correctly, the solution was to put a
sufficiently long sleep into the script or use
after idle { quit } and then have the script not
exit at eof or explicitely. you may want to search
through the archives for details.

cheers,
   axel.

MG>
MG> The number of frames that is accessed by my procedure using bigdcd is the
MG> same as the number of new line characters that appear after the last line in
MG> the tcl script below. Why would this happen ? THE PROBLEM ONLY APPEARS IF I
MG> USE VMD ON THE COMMAND LINE. The script runs fine interactively inside a vmd
MG> console.
MG>
MG> Here is the script with 2 example inputs and corresponding outputs. Please
MG> note that the 2 input scripts only differ in the number of empty lines after
MG> the last line of the script.
MG>
MG> INPUT1:
MG> #########################3
MG> source ~/NAMD_SCRIPTS/bigdcd.tcl
MG> mol load pdb waterprotcharmm.pdb
MG> proc displacement {frame} {
MG> puts $frame
MG> }
MG>
MG> bigdcd displacement waterprot-10k.dcd
MG> #########################3
MG>
MG> OUTPUT1:
MG>
MG> #########################3
MG> Info) VMD for LINUX, version 1.8.5 (August 25, 2006)
MG> Info) http://www.ks.uiuc.edu/Research/vmd/
MG> Info) Email questions and bug reports to
MG> vmd_at_ks.uiuc.edu<vmd_at_ks.uiuc.edu?Subject=Re:%20Very%20peculiar%20problem%20while%20using%20bigdcd.%20Help%20%21>
MG> Info) Please include this reference in published work using VMD:
MG> Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
MG> Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
MG> Info) -------------------------------------------------------------
MG> Info) Multithreading available, 2 CPUs detected.
MG> after#0
MG> psfplugin) Detected a Charmm31 PSF file
MG> Info) Using plugin psf for structure file waterprotcharmm.psf
MG> Info) Analyzing structure ...
MG> Info) Atoms: 65594
MG> Info) Bonds: 65802
MG> Info) Residues: 17818
MG> Info) Waters: 16810
MG> Info) Segments: 9
MG> Info) Fragments: 16818 Protein: 4 Nucleic: 0
MG> 0
MG> dcdplugin) detected standard 32-bit DCD file of native endianness
MG> dcdplugin) CHARMM format DCD file (also NAMD 2.1 and later)
MG> Info) Using plugin dcd for coordinates from file waterprot-10k.dcd
MG> 1
MG> Info) VMD for LINUX, version 1.8.5 (August 25, 2006)
MG> Info) Exiting normally
MG>
MG> INPUT2:
MG> #########################
MG> source ~/NAMD_SCRIPTS/bigdcd.tcl
MG> mol load pdb waterprotcharmm.pdb
MG> proc displacement {frame} {
MG> puts $frame
MG> }
MG>
MG> bigdcd displacement waterprot-10k.dcd
MG>
MG>
MG>
MG>
MG> #########################
MG> OUTPUT2: (same as output 1, except that more frames are accessed
MG> #########################
MG> ...
MG> ...
MG> 1
MG> 2
MG> 3
MG> 4
MG> Info) VMD for LINUX, version 1.8.5 (August 25, 2006)
MG> Info) Exiting normally
MG> #########################
MG>
MG>
MG> Maria G.
MG> Technical University of Denmark
MG> Copenhagen
MG>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.