From: Axel Kohlmeyer (
Date: Thu Feb 16 2012 - 12:46:48 CST

On Thu, Feb 16, 2012 at 12:23 PM, Salvatore Mario Cosseddu
<> wrote:
> Dear all,
> using the command source I run the command in the script within the actual
> tcl instance (Is it the right terminology?), freezing everything until the
> calculation is finished.
> I'd like to create children instances, similar to what happens when running
> a bash script or a tcl script from bash.
> The problem would be easily solved in tcl (calling a new tclsh session) but
> I don't know how to do it in VMD.
> This would be very useful to use all my cores with my scripts.

some comments:

a) you cannot have two Tcl scripts run inside the same instance
of VMD at the same time, since VMD is not thread-safe. so the
easiest way to deal with running multiple (independent!) scripts
at the same time is to run multiple copies of VMD (you can use
-dispdev text to avoid the overhead of the GUI).

b) if it is just about running multiple external commands at the
same time, you can try using pipes, e.g. set fp [open "| command" r]
and open multiple of those at the same time.


> May you suggest any solution?
> Regards
> Salvatore
> --
> Salvatore Cosseddu
> PhD student
> Centre for Scientific Computing and School of Engineering
> University of Warwick
> Coventry CV4 7AL
> United Kingdom
> email:

Dr. Axel Kohlmeyer
College of Science and Technology
Temple University, Philadelphia PA, USA.