From: snoze pa (snoze.pa_at_gmail.com)
Date: Tue Jul 05 2011 - 18:12:31 CDT

Dear VMD users,

I need some help to calculate the distance between atoms. I am using
multiple large dcd files and would appreciate your help to get the corrected
distance between two CA atoms of residue 13 and 18 along trajectory. I want
to use bigdcd because large multiple dcd files. I am not expert in tcl
programming but trying hard to get it.

Thank you.

source bigdcd.tcl

proc myrmsd { frame } {
 global ref sel all
 $all move [measure fit $sel $ref]
  puts "$frame: [measure bond [list [list $ind1 $mol] [list $ind2 $mol]]
frame all]"
}

set mol [mol new solvated_ionised.psf waitfor all]
set all [atomselect $mol all]
set ref [atomselect $mol "protein and resid 13 and name CA"]
set sel [atomselect $mol "protein and resid 18 and name CA"]
set ind1 [join [$ref get index]]
set ind2 [join [$sel get index]]

mol addfile solvated_ionised.pdb type pdb waitfor all
bigdcd myrmsd dcd solvated_ionised4.dcd solvated_ionised5.dcd
bigdcd_wait
#quit