"bigdcd" Read Big DCD Files 2.0
--------------------------------------
REQUIREMENTS: VMD Version 1.8 or greater

DESCRIPTION:

Use this script to analyze one or more trajectory files that don't fit 
into memory.  The script will arrage for your analysis function to be 
called each time a frame is loaded, then delete the frame from memory.

As of version 2.0 BigDCD accepts an (optional) second argument that 
defines the trajectory file format. Possible format names are all that
are allowed by type flag of "mol new" or "mol addfile". Its default 
is "auto", i.e. VMD guesses based on the file name.

The analysis script must accept one argument; BigDCD will keep track of how
many timesteps have been loaded and call your script with that number.

By default the script returns to the prompt and processes the trajectory
in the background. For batch execution this is not desirable, as the
script will terminate prematurely long before the analysis is finished. 
In that case you can call "bigdcd_wait" and the script will wait until
the last frame is processed.

How to include this function: either source the script directory, or 
(better) place the script in one of the directories in your auto_path 
variable and include "package require bigdcd" in your script.

PROCEDURES:

        bigdcd procname dcd1 ?dcd2? ...

EXAMPLE USAGE:

#
# Example 1: 
# This computes the center of mass for each frame in the DCD file.
#
proc mycenter { frame } {
  global all
  puts "$frame: [measure center $all weight mass]"
}
set $mol [mol new psf alanin.psf waitfor all]
set all [atomselect $mol all]
$all global
bigdcd mycenter alanin.dcd
# this is quivalent to: bigdcd mycenter auto alanin.dcd
#                   or: bigdcd mycenter dcd alanin.dcd


# Example 2:
# This computes the RMS distance between each frame in a sequence of
# .xyz files and a reference pdb file. The script is set up for
# batch processing, i.e. it waits for the analysis to complete
# and then exits.
#
proc myrmsd { frame } {
  global ref sel all
  $all move [measure fit $sel $ref]
  puts "$frame: [measure rmsd $sel $ref]"
}
set mol [mol new psf protein.psf type psf waitfor all]
set all [atomselect $mol all]
set ref [atomselect $mol "name CA" frame 0]
set sel [atomselect $mol "name CA"]
mol addfile protein.pdb type pdb waitfor all
bigdcd myrmsd xyz eq01.xyz  eq02.xyz eq03.xtz
bigdcd_wait
quit

DOWNLOAD THE FILE:
	bigdcd.tcl

AUTHORS:
	Justin Gullingsrud 
        Axel Kohlmeyer