From: Bennion, Brian (bennion1_at_llnl.gov)
Date: Thu Jun 02 2016 - 12:53:41 CDT

if you placed a puts $polar_carbon after it is set, do you get output? or does the script die there?
________________________________
From: owner-vmd-l_at_ks.uiuc.edu [owner-vmd-l_at_ks.uiuc.edu] on behalf of Ky Wildermuth [kywildermuth_at_gmail.com]
Sent: Wednesday, June 01, 2016 7:52 PM
To: vmd-l_at_ks.uiuc.edu
Subject: vmd-l: Running a source script from a C shell

Hello,

I have a VMD tcl script that works perfectly fine when I run it directly from the command line on Linux using the following syntax:

set vmd = /lustre/home/jbklauda/vmd/vmd-1.9.2/exec/vmd
$vmd -dispdev text -e defect_tachyon_scav.tcl

However, when I run the exact same command through a C shell (to pass it to an HPC cluster) VMD starts up as expected but closes early. Basically, it loads the molecule successfully and defines some variables (such as number of frames in the dcd file) but vmd closes before making atom selections. It closes at the same point every time.

The script is kind of lengthy so I don't want to post the whole thing here, but this is the line of code where it seems to stop according to the output file:

mol modselect 0 0 (resname DOPC or resname DOPS) and name $polar_carbon

with the variable $polar_carbon defined earlier in the script. Note that this exact tcl script works fine when I run from the command line directly - that is what confuses me the most.

The output file from the shell submission ends with this:

..
152
Info) VMD for LINUXAMD64, version 1.9.2 (December 29, 2014)
Info) Exiting normally.

(with 152 being the number of frames in the dcd)
When I run the source script directly from the command line it continues like this:

..
152
vmd > atomselect0
atomselect1
atomselect2
atomselect3
..

That is why I think it is the atom selection that is killing the script.
The vmd > is curious to me; what is the significance of this?

After doing a bit of troubleshooting and browsing here in the mailing list, I've tried a few different syntax methods of calling vmd and the code, I changed the code a bit, and added quit to the end of the tcl code, but to no avail.

Does anyone have any experience running vmd source scripts through a Unix shell? Is there a trick? Any insight on why I am having this problem?

Thank you in advance!

Kyle Wildermuth