From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Feb 03 2022 - 23:17:21 CST

Just to add more feedback, it will always be faster to do things
like renaming files, and similar file processing operations within
VMD itself using simple Tcl scripting rather than doing it externally
to VMD and having to re-launch it. The launch speed of VMD is hampered
by lots of CPU and GPU hardware initialization, so every time you have
to relaunch it, you're absorbing thoses costs redundantly. If you can
do the file operations within VMD itself, it'll run FAR faster.

Best,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Feb 02, 2022 at 03:55:43PM +0000, Smith, Harper E. wrote:
> Hi David,
> Did you try vmd
> -e? [1]https://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/node192.html
> Harper
>
> --------------------------------------------------------------------------
>
> From: owner-vmd-l_at_ks.uiuc.edu <owner-vmd-l_at_ks.uiuc.edu> on behalf of
> Huebert, David Nicolas <dnh564_at_mun.ca>
> Sent: Wednesday, February 2, 2022 1:19 AM
> To: vmd-l_at_ks.uiuc.edu <vmd-l_at_ks.uiuc.edu>
> Subject: vmd-l: Issue running vmd and tk commands on my computer through
> script
>
> Dear everyone,
> I have quite a bit of data and I am hoping to speed up the analysis of
> many individual vmd runs by automating it; however, I have been having a
> problem with this (and just to note that this is running on an Ubuntu
> 20.04LTS I have and not a server. I created a script which attempts to
> open vmd using specific files, and then run 1 script with a condition
> followed by a second script. Then exits vmd and changes the names of the
> 2 output files. Then it is meant to restart VMD and do this all over
> again. I have tried using (pipes | ) and echos, and tried -args with the
> commands after it and all other routes I could conceive of to achieve this
> but in the end what occurs is that either VMD has errors or most commonly
> it opens vmd, and then it appears that it doesn't read the next line and
> when I manually exit out then it attempts to execute the following lines.
> I am not sure how to get VMD to understand these commands as being for
> it's command line as all of these lines work properly when I put them in
> manually but I cannot get them to work automatically without constant
> involvement on my part. I am sorry if this is a basic issue but I am self
> taught in Molecular Dynamics and as such I find that I often find myself
> jumping in the deep end.
> The script lines
> ----------------------------------------------------------------------------
> #!/bin/bash
> ls
> vmd start_time-Protein.pdb md-Protein-fit-0000-0025.xtc -dispdev none #
> Open VMD with structure and trajectory
> source /media/david/ORIGIN/PhD-Ubuntu/Gromacs\ Work/Work\ Files\ and\
> Programs/sasa.tcl # track residue SASA
> residue 35 # must fill in residue number
> source ./H2O-Protein-Script.tcl
> exit
> mv ./SASA_residue\ 35.dat ./Data-SASA-E-Protein_0000-0025.dat # rename
> SASA Glutamate Data File
> mv ./Data-H2O.xvg ./Data-H2O- Protein-0000-0025.xvg # rename H2O file
> # After this point. the pattern is meant to repeat opening different VMD
> sessions with the same sourcing and similar file name changes etc. For
> thousands of analyses.
> -------------------------------------------------------------------------------------------
> I know I am probably missing out on something minor but I don't understand
> why my commands are not being entered through the VMD command line.
> -David
> Mr. David Nicolas Giuseppe Huebert B.Sc. Ph.D. Candidate
> Immunology and Infectious Diseases.
> Division of Biomedical Sciences, Faculty of Medicine.
> Memorial University of Newfoundland.
> Room 5357, Health Sciences Building.
> 300 Prince Phillip Drive.
> St. John's, NL A1B 3V6
> Tel: 1-(709)-864-6077
>
> References
>
> Visible links
> 1. https://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/node192.html

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