From: Ryan Woltz (
Date: Sat Jan 21 2023 - 21:47:48 CST

Dear Ashar and community,

Please see my previous emails I'm referencing for the solutions.

         As an edit to my previous email, solution 1 doesn't work very well
[subprocess.Popen()]. It does what is suggested, however, it doesn't wait
for vmd to finish it's analysis and saving of files before moving on. So
it'll immediately open vmd, error on the analysis of the vmd output files
since they are not found then open another vmd session etc so 5 vmd
sessions are running and failing all at once since none of them can find
the files they need or the files are blank. If there is a "wait" option for
subprocess.Popen() than this would work. That being said, solution 2 does work as this waits for vmd to finish. Again it will
complain about the new shell part but it does function so far. Apologies
for not catching solution 1 errors, I had run it on a simulation with the
output files already generated, but when I ran it on a new analysis, this
is when it failed.

Ryan you for your help,


On Sat, Jan 21, 2023 at 3:26 PM Ryan Woltz <> wrote:

> Dear Ashar,
> Thank you for your advice, the main reason I don't write it in
> python is I haven't had time to learn it, it's been on my agenda since May.
> Regardless, I did identify the error and a solution for future users. First
> the error:
> If you call a python script inside a bash script and that python script
> calls another bash command via subprocess like this:
> import subprocess as sp
>['/bin/bash', '-i', '-c', 'vmd -dispdev text -e quit.tcl'],
> stdin=sp.PIPE)
> it'll stop and need to be restarted with fg X with X being the job number--000000000000135ef605f2d226dc--