From: Anthony Cruz (acb15885_at_uprm.edu)
Date: Thu Mar 23 2006 - 10:20:13 CST

I was trying to use it with a xtc and gro file. I trying to edit the scrip to
use xtc so I replace the dcd for xtc and the psf to gro:

proc bigxtc { script args } {
  global bigxtc_frame bigxtc_proc bigxtc_firstframe vmd_frame
  
  set bigxtc_frame 0
  set bigxtc_firstframe [molinfo top get numframes]
  set bigxtc_proc $script
  
  uplevel #0 trace variable vmd_frame w bigxtc_callback
  foreach xtc $args {
    animate read xtc $xtc waitfor 0
  }
}

proc bigxtc_callback { name1 name2 op } {
  global bigxtc_frame bigxtc_proc bigxtc_firstframe vmd_frame
 
  # If we're out of frames, we're also done
  set thisframe $vmd_frame($name2)
  if { $thisframe < $bigxtc_firstframe } {
    bigxtc_done
    return
  }
 
  incr bigxtc_frame
  if { [catch {uplevel #0 $bigxtc_proc $bigxtc_frame} msg] } {
    puts stderr "bigxtc aborting at frame $bigxtc_frame\n$msg"
    bigxtc_done
    return
  }
  animate delete beg $thisframe end $thisframe
  return $msg
}

proc bigxtc_done { } {
  puts "bigxtc_done"
  after idle uplevel #0 trace vdelete vmd_frame w bigxtc_callback
}
  

And then I load the bigxtc.tcl and use the following script:

proc sol_in { frame } {
  #global mydata
    set prot [atomselect top "protein" $frame ]
    set rg [measure rgyr $prot]
    set com [measure center $prot weight mass]
    set xcom [lindex $com 0]
    set ycom [lindex $com 1]
    set zcom [lindex $com 2]
    set r2 [expr $rg*$rg]
    set sol2keep [atomselect top "(same residue as
((sqr(x-$xcom)+sqr(y-$ycom)+sqr(z-$zcom)) <= $r2)) and resname MeCN"]
    set nummolP [$sol2keep num]
    set nummolR [expr $nummolP/5]
    #lappend mydata "$frame $nummolR"
    puts "$frame $nummolR"
}

#close $outfile

#analyze sol_in

mol load gro 1scnbxac_ion_PRD.gro
bigxtc sol_in complete_mv1.xtc

The the trajectory start to load completly and the tcl console shows:

all) 17 % source bigxtc.tcl
>Main< (all) 18 % source testbig_solin.tcl
bigxtc aborting at frame 1
usage: atomselect <command> [args...]

Creating an Atom Selection:
  <molId> <selection text> [frame <n>] -- creates an atom selection function
  list -- list existing atom selection functions
  (type an atomselection function to see a list of commands for it)

Getting Info about Keywords:
  keywords -- keywords for selection's get/set commands
  symboltable -- list keyword function and return types

Atom Selection Text Macros:
  macro <name> <definition> -- define a new text macro
  delmacro <name> -- delete a text macro definition
  macro [<name>] -- list all (or named) text macros

bigxtc_done
>Main< (all) 19 %

Which could be the problem???

Anthony
On Wednesday 08 March 2006 9:55 am, John Stone wrote:
> Check out the "bigdcd" script, which is intended for exactly this
> scenario:
> http://manitoba.ks.uiuc.edu/Research/vmd/script_library/scripts/bigdcd/
>
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Wed, Mar 08, 2006 at 12:37:21PM -0700, Anthony Cruz wrote:
> > Hi:
> > I want to know if is possible to make an analysis to a trajectory on the
> > fly with out loading all the trajectory in to the memory because the
> > trajectory file that I want to analyze have 4 gb and my computer have
> > only 2 gb of ram.
> >
> > Best regards
> > Anthony