Date: Thu Feb 01 2007 - 13:39:20 CST

Dear VMD users and developers,
I'm interested to call my tcl script from perl when I want to transfer
some arguments to tcl. How can I do it?
Let say I want to transfer name of the file and in tcl script I want to
open this file for writing. Does anybody knows how to do it?
In the code attached I have also sent psf and dcd name and it is working
but when I'm trying to send an addition argument (name) it doesn't work
as well as as I can't use argument to open file for writing. All the red
part is not working. I hope somebody can hep me. Thank you very much.

set psf [lindex $argv 0]
set dcd [lindex $argv 1]
set psf_filename $psf
set dcd_filename $dcd
mol load psf $psf_filename
animate read dcd $dcd_filename waitfor all
set peptide [atomselect top protein]

set name [lindex $argv 2]
set pdb_peptide /usr/people/$name
animate write pdb $pdb_peptide beg 0 end $final_frame waitfor all sel

set sasa_file_name [lindex $argv 3]
set sasa_file [open /usr/people/$sasa_file_name w]

from perl:
vmd -dispdev text -eofexit < my.tcl $psf_name $dcd_name $name
$sasa_file_name> output.log