From: Nima Nouri (
Date: Sun Mar 16 2014 - 16:59:58 CDT

Dear Experts

I am using a C++ code to generate a binary file (with DAT extension) from
my MD simulations that includes some custom atom properties like Centro
symmetry, common neighbor analysis, virial stress. when I am going to load
this data file in VMD I use the following tcl code in vmd tcl console:

set molid [molinfo top]
set sel [atomselect top all]
# read in input data this may take from a few seconds to a few hours
depending on the file size
puts "reading data"
set fp [open "example.dat" r]
fconfigure $fp -translation binary
set inBinData [read $fp [file size "example.dat"]];
close $fp
binary scan $inBinData iu1a* checknum inBinData
binary scan $inBinData a4a* filetype inBinData
binary scan $inBinData iu1a* numframes inBinData
binary scan $inBinData iu1a* starttimestep inBinData
binary scan $inBinData iu1a* period inBinData
binary scan $inBinData iu1a* timestep inBinData
binary scan $inBinData iu1a* numdata inBinData
binary scan $inBinData a160a* textheader inBinData
binary scan $inBinData iu1a* numatoms inBinData

for {set i 0} {$i < $numframes} {incr i} {
$sel frame $i
for {set j 0} {$j < $numdata} {incr j} {
if {$j == 0} {
    binary scan $inBinData r${numatoms}a* temp inBinData
    $sel set user $temp
} else {
    set n [expr {$j+1}]
    binary scan $inBinData r${numatoms}a* temp inBinData
    $sel set user$n $temp

As it may be apparent I am reading the data from the file and loading them
into the VMD user coloring variable. The problem is divided into three main

1-First of all I am using 64bit windows so the only VMD version I have
access is a 32bit version for windows. This cause me the problem of a
maximum 4GB file size on 32bit addressing. and cause the VMD to crash when
loading big DCD and DAT files.
I would be glad if anyone could give me some hint on how to minimize my
memory use for better access to VMD. I also can't describe how glad I would
be if VMD developers make a win64 installation binary available for
download in their website.(A million thanks in advance)

2-I tried to compile VMD in windows 64bit environment and I was almost
succeeded. The only problem is after compilation when I issue the make
install command. there is no VMD.exe (or any other windows executable
file) generated in the installation directory. So I would be glad if
someone could help me to create a VMD.exe file from my compiled library.
( I should add that I checked the library that has been created with
dependency walker and it has no errors so I assume that I have compiled it

3-I have also tried to use VMD64bit on Linux and load my trajectory files.
a mol2 structure file with about 30MB size.
a dcd file with about 3GB size. (loaded in 30sec)
a dat file (my custom output binary) with about 3GB size.
but the tcl script I used took about 2 hours to load the dat file into VMD.
I am wondering if there is a better (more efficient) way of doing this or
Is there any custom input reader like dcd reader so that I can use it
to create dat files for example in dcd file format conventions and read it
more efficiently?

A billion thanks in advance

Best Regards