VMD-L Mailing List
From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Wed Jun 03 2015 - 14:03:58 CDT
- Next message: lecan: "PSF file generation"
 - Previous message: Thomas C. Bishop: "Re: playing legos with peptide segments"
 - In reply to: Francesco Pietra: "bigdcd for distance problems"
 - Next in thread: Francesco Pietra: "Re: bigdcd for distance problems"
 - Reply: Francesco Pietra: "Re: bigdcd for distance problems"
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
 
Read the error message again. For once the TCL error message is quite 
clear, you told it to look for a variable "sel", but you define a "sel1" 
and "sel2".
-Josh
On 6/3/15 12:08 PM, Francesco Pietra wrote:
> Hello:
> I could successfully run centermass, rmsd and rgyr with bigdcd.tcl and 
> vmd in text mode. In contrast, with distance.tcl I was unsuccessful.
> The distance.tcl script reads
>
> source bigdcd.tcl
>
> proc distance { frame } {
>    global all sel1 sel2 coord1 coord2 outfile
>    set coord1 [lindex [$sel1 get {x y z}] 0]
>    set coord2 [lindex [$sel2 get {x y z}] 0]
>    puts $outfile "$frame: [vecdist $coord1 $coord2]" "[measure rgyr $sel]"
>  }
> set outfile [open distance.dat w];
> # set mol [mol new protein.psf waitfor all]
> set mol [mol new blg.psf waitfor all]
> # mol addfile protein.pdb type pdb waitfor all
> mol addfile blg.pdb type pdb waitfor all
> # set sel1 [atomselect $mol "protein and resid 1 and alpha"]
> # set sel2 [atomselect $mol "protein and resid 2 and alpha"]
> set sel1 [atomselect $mol "protein and resid 34 and alpha"]
> set sel2 [atomselect $mol "protein and resid 36 and alpha"]
> # bigdcd distance eq-0.dcd eq-1.dcd
> bigdcd distance blg.dcd
> bigdcd_wait
> close $outfile
>
> The terminal output reads:
>
> $ vmd -e distance.tcl -dispdev none > distance.txt
> bigdcd aborting at frame 1
> can't read "sel": no such variable
>
> while distance.txt reads:
>
> Info) VMD for LINUXAMD64, version 1.9.1 (February 1, 2012)
> Info) http://www.ks.uiuc.edu/Research/vmd/ 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ks.uiuc.edu_Research_vmd_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=zFfoK61upjM5BwyoRAsX8dLq7rwWm8aw7r7dqtjgcCE&m=g6p7HdYglOj0-ooifNizxiz58OT7_hj4SD4MtUs-Vqo&s=-pJlm3G--yiCmhSxKqfdhSBERZOYaO3oM3-V46EqQZs&e=> 
>
> Info) Email questions and bug reports to vmd_at_ks.uiuc.edu 
> <mailto: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: 7074MB (89%)
> Warning) Detected a mismatch between CUDA runtime and GPU driver
> Warning) Check to make sure that GPU drivers are up to date.
> Info) No CUDA accelerator devices available.
> Info) Dynamically loaded 2 plugins in directory:
> Info) /usr/local/lib/vmd/plugins/LINUXAMD64/molfile
> loading bigdcd...
> bigdcd loaded...
> file4
> Info) Using plugin psf for structure file blg.psf
> psfplugin) no cross-terms defined in PSF file.
> Info) Analyzing structure ...
> Info)    Atoms: 25366
> Info)    Bonds: 17736
> Info)    Angles: 12120  Dihedrals: 6544  Impropers: 384 Cross-terms: 0
> Info)    Bondtypes: 0  Angletypes: 0  Dihedraltypes: 0 Impropertypes: 0
> Info)    Residues: 7802
> Info)    Waters: 7644
> Info)    Segments: 3
> Info)    Fragments: 7651   Protein: 1   Nucleic: 0
> 0
> Info) Using plugin pdb for coordinates from file blg.pdb
> Info) Finished with coordinate file blg.pdb.
> 0
> atomselect0
> atomselect1
> dcdplugin) detected standard 32-bit DCD file of native endianness
> dcdplugin) CHARMM format DCD file (also NAMD 2.1 and later)
> dcdplugin) Warning: DCD header claims 140 frames, file size indicates 
> there are actually 141 frames
> Info) Using plugin dcd for coordinates from file blg.dcd
> bigdcd_done
> after#0
> vmd > Info) Finished with coordinate file blg.dcd.
>
> and distance.dat is empty.
>
> Thanks a lot for pointing out what is wrong in the tcl script
>
> francesco pietra
>
- Next message: lecan: "PSF file generation"
 - Previous message: Thomas C. Bishop: "Re: playing legos with peptide segments"
 - In reply to: Francesco Pietra: "bigdcd for distance problems"
 - Next in thread: Francesco Pietra: "Re: bigdcd for distance problems"
 - Reply: Francesco Pietra: "Re: bigdcd for distance problems"
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
 



