From: debra ragland (ragland.debra_at_REMOVE_yahoo.com)
Date: Tue Sep 01 2015 - 07:49:25 CDT

Hello,
I am trying to use this script to calculate distances between atoms in my trajectory from the command line VMD 1.9.2. When I execute vmd -e VMD_distance.vmd, everything runs fine but I get an error at the end stating;
couldn't read file "distance.tcl": no such file or directoryinvalid command name "distance"
The input from the script is:
mol new {MD_5172_mc_anayl/HCV_5172_mc_15-in.cms} type {mae} first 0 last -1 step 1 waitfor allanimate style Loopmol addfile {MD_5172_mc_anayl/HCV_5172_mc_15_trj/clickme.dtr} type {dtr} first 0 last -1 step 40 waitfor all 0
# mol new 4A4B_template.pdb# use frame 0 for the referenceset reference [atomselect 0 "chain A and name CA"] # the frame being comparedset compare [atomselect 0 "all"]set target [atomselect 0 "chain A and name CA"]
#set out2DataFile [open "HCV_5172_mc_rmsd_alphac.txt" w]
set num_steps [molinfo 0 get numframes]for {set frame 0} {$frame < $num_steps} {incr frame} {# get the correct frame$compare frame $frame$target frame $frame# compute the transformationset trans_mat [measure fit $target $reference]# do the alignment$compare move $trans_mat# compute the RMSD#set rmsd [measure rmsd $target $reference]# print the RMSD#puts "RMSD of $frame is $rmsd"#animate write #puts $out2DataFile "$frame $rmsd"
}#set outDataFile [open "HCV_5172_mc_rmsf_alphac.txt" w]#set rmsf [measure rmsf $target first 0 last -1 step 1]#puts $outDataFile "$rmsf"
#close $outDataFile#close $out2DataFile

#set alignedcomplex [atomselect 0 "protein and not hydrogen or resname T3P and not hydrogen or resname ZN"]#animate write crd janet_md_15_aligned.crd beg 0 end -1 skip 1 waitfor all sel $alignedcomplex 0#animate write pdb janet_md_15_aligned.pdb beg 0 end 0 skip 1 waitfor all sel $alignedcomplex 0#animate write pdb janet_md_15_aligned501.pdb beg 1 end -1 skip 1 waitfor all sel $alignedcomplex 0
#Get 150-Loop distancessource distance.tcl
distance "protein and name OD2 and resid 1168 and chain A" "protein and name NE and resid 1155 and chain A" 10 HCV_5172mc_1168OD2-1155NE-r.dat HCV_5172mc_1168OD2-1168NE1-d.dat
distance "protein and name OD2 and resid 1168 and chain A" "protein and name NH2 and resid 1155 and chain A" 10 HCV_5172mc_1168OD2-1155NH2-r.dat HCV_5172mc_1168OD2-1168NH2-d.dat
distance "protein and name OD1 and resid 1168 and chain A" "protein and name NH2 and resid 1155 and chain A" 10 HCV_5172mc_1168OD1-1155NH2-r.dat HCV_5172mc_1168OD1-1168NH2-d.dat
#distance "protein and name CA and resid 452 and chain B" "protein and name CA and resid 734 and chain B" 10 3B7E_B_Apo_149_431-r.dat 3B7E_B_Apo_149_431-d.dat#distance "protein and name CA and resid 837 and chain C" "protein and name CA and resid 1119 and chain C" 10 3B7E_C_Apo_149_431-r.dat 3B7E_C_Apo_149_431-d.dat#distance "protein and name CA and resid 1222 and chain D" "protein and name CA and resid 1504 and chain D" 10 3B7E_D_Apo_149_431-r.dat 3B7E_D_Apo_149_431-d.dat
quit