From: Axel Kohlmeyer (
Date: Thu Feb 01 2007 - 15:55:30 CST

On Thu, 1 Feb 2007 wrote:

XX> Dear VMD users and developers,

dear regina,

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

i'm reading mail in plain text (as it is meant to be),
so it is only black on grey for me. ;-).

XX> Regina
XX> set psf [lindex $argv 0]
XX> set dcd [lindex $argv 1]
XX> set psf_filename $psf
XX> set dcd_filename $dcd
XX> mol load psf $psf_filename
XX> animate read dcd $dcd_filename waitfor all
XX> set peptide [atomselect top protein]
XX> set name [lindex $argv 2]
XX> set pdb_peptide /usr/people/$name
XX> animate write pdb $pdb_peptide beg 0 end $final_frame waitfor all sel
XX> $peptide
XX> set sasa_file_name [lindex $argv 3]
XX> set sasa_file [open /usr/people/$sasa_file_name w]
XX> from perl:
XX> $sasa_file_name> output.log

please check the mailing list archive. e.g.,

you want do do:
vmd -dispdev text -eofexit -e my.tcl -args $psf_name $dcd_name $name



Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.