From: Sofya Lushchekina (burunduk_at_gmail.com)
Date: Wed Dec 04 2013 - 10:34:47 CST

Dear VMD users,

I need to find which atoms of my system are within certain spatial region
along the trajectory. I have this region as a set of dots (dummy atoms),
forming altogether a dummy molecule. I'm using bigdcd.tcl script to
process each frame of the trajectory and Topotools plugin to combine the
frame with dummy atoms. After merging I select atoms of the molecule nearby
the dummy atoms and print them. The script below works OK just with the
first frame and creates exactly what I need. But after processing of the
first frame of trajectory VMD crushes (output below the input). Apparently,
bigdcd.tcl cannot load the second frame. Any ideas how to improve this
script, or alternate solutions of the problem are needed.

Thank you in advance,
Sofya

*Script:*

set dcd trajectory.dcd
set psf molecule.psf
set pdb molecule.pdb
set prefix molecule-dummy-overlap-atoms
#
source bigdcd.tcl
package require topotools 1.1
#
proc moldumover { frame } {
  global prefix molec
  set midlist {}
### Adding current frame to the list
  lappend midlist $molec
### Loading dummy molecule defining region of interest and adding to the
list
  set dummy [mol new dummy.psf waitfor all]
  mol addfile dummy.pdb
  lappend midlist $dummy
### Merging current frame and dummy molecule
  set hybrmol [::TopoTools::mergemols $midlist]
### Finding atoms within the region and writing them down
  set overlap [atomselect $hybrmol "(not name DUM) and (within 1 of name
DUM)"]
  $overlap writepdb $prefix-$frame.pdb
### Deleting loaded dummy molecule and created merged molecule
### The idea is to leave just the molecule of interest alone to load the
next frame of the trajectoy
   mol delete 1
   mol delete 2
}
### Loading the molecule of interest
 set molec [mol new $psf waitfor all]
mol addfile $pdb type pdb waitfor all
### Running procedure over the trjectory
bigdcd moldumover $dcd
bigdcd_wait
#
exit

*Output*

Info) VMD for WIN32, version 1.9.1 (February 1, 2012)
Info) http://www.ks.uiuc.edu/Research/vmd/
Info) Email questions and bug reports to vmd_at_ks.uiuc.edu
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, 4 CPUs detected.
Info) Free system memory: 1343MB (45%)
Info) Creating CUDA device pool and initializing hardware...
Info) Detected 1 available CUDA accelerator:
Info) [0] GeForce 310M 2 SM_1.2 @ 1.47 GHz, 1.0GB RAM, KTO, OIO, ZCP
Info) No joysticks found. Joystick interface disabled.
Info) Dynamically loaded 69 plugins in directory:
Info) C:/Program Files (x86)/University of
Illinois/VMD/plugins/WIN32/molfile
trajectory.dcd
molecule.psf
molecule.pdb
molecule-dummy-overlap-atoms
1.2
Info) Using plugin psf for structure file molecule.psf
Info) Analyzing structure ...
Info) Atoms: 56537
Info) Bonds: 40546
Info) Angles: 31350 Dihedrals: 22567 Impropers: 1486 Cross-terms: 532
Info) Bondtypes: 0 Angletypes: 0 Dihedraltypes: 0 Impropertypes: 0
Info) Residues: 16652
Info) Waters: 15283
Info) Segments: 12
Info) Fragments: 16119 Protein: 1 Nucleic: 0
0
Info) Using plugin pdb for coordinates from file molecule.pdb
Info) Finished with coordinate file molecule.pdb.
0
Info) Using plugin dcd for coordinates from file trajectory.dcd
Info) Using plugin psf for structure file dummy.psf
Info) Analyzing structure ...
Info) Atoms: 12712
Info) Bonds: 0
Info) Angles: 0 Dihedrals: 0 Impropers: 0 Cross-terms: 0
Info) Bondtypes: 0 Angletypes: 0 Dihedraltypes: 0 Impropertypes: 0
Info) Residues: 12712
Info) Waters: 0
Info) Segments: 2
Info) Fragments: 12712 Protein: 0 Nucleic: 0
Info) Using plugin pdb for coordinates from file dummy.pdb
end of frames
bigdcd_done
Info) Analyzing structure ...
Info) Atoms: 69249
Info) Bonds: 40546
Info) Angles: 31350 Dihedrals: 22567 Impropers: 1486 Cross-terms: 0
Info) Bondtypes: 1 Angletypes: 1 Dihedraltypes: 1 Impropertypes: 1
Info) Residues: 29364
Info) Waters: 15283
Info) Segments: 15
Info) Fragments: 28831 Protein: 1 Nucleic: 0
Info) Opened coordinate file molecule-dummy-overlap-atoms-1.pdb for writing.
Info) Finished with coordinate file molecule-dummy-overlap-atoms-1.pdb.
after#0
Info) VMD for WIN32, version 1.9.1 (February 1, 2012)
Info) Exiting normally.
vmd > dcdplugin) detected standard 32-bit DCD file of native endianness
dcdplugin) CHARMM format DCD file (also NAMD 2.1 and later)
psfplugin) Detected a Charmm31 PSF file
psfplugin) WARNING: no bonds defined in PSF file.
psfplugin) WARNING: no angles defined in PSF file.
psfplugin) WARNING: no dihedrals defined in PSF file.
psfplugin) WARNING: no impropers defined in PSF file.
psfplugin) no cross-terms defined in PSF file.