From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Feb 01 2007 - 16:53:24 CST

Justin asked me to forward this on, as his web mail client
had trouble with your address:
> Hi,
>
> In case the email John mentioned doesn't solve your problem, it seems
> that you're also missing the required "-args" option to send command
> line arguments to a script. See this message:
>
> http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/5438.html
>
> Cheers,
> Justin

On Thu, Feb 01, 2007 at 09:39:20PM +0200, " politr"@huji.ac.il wrote:
> 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.
> Regina
>
> 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
> $peptide
>
> 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

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078