From: Gustavo Mercier (gamercier_at_yahoo.com)
Date: Wed Oct 27 2004 - 07:59:54 CDT

Hi!
 
Just my 2 cents worth of "selfish" opinion...

 
I've been following this thread with some interest as a vmd newbie.
 
I think that when a developer wants to incorporate an interpreter the choice will be guided by several factors. Some of these are relevant to the developer, ie. ease of implementing within the existing code, while others may be reflect the needs of the of the end-users.
 
However, "end-users" come in several flavors. For example, Konrad sees VMD as a large module for his python work. In this sense he is another code developer that is extending VMD. There are others that are simply applying VMD in their work and are not developers. Their needs are different.
 
They are likely to only develop simple scripts for their work. They depend on the modules constructed by developers to shield them from the details associated with lower end programming. Their scripts are simply a clever collection of commands with some limited application of control structures.
 
I am closer to the latter group. As such I reap the benefits of scripting languages like python that are object oriented, have a clear structure, and contain a plethora of modules since their inception. This is a personal choice I made several years ago when I had to move from awk to something else, and saw what Konrad had done with MMTK.
 
At first I thought I made the wrong choice because everyone was working with perl, etc. However, it was interesting to see that one of my colleagues that teaches bioinformatics now considers my choice one that was ahead of its time. After teaching college and grad students bioinformatics using perl for many years, he is now moving to python, etc.
 
I am sure that tcl was a good choice for an interpreter for vmd when the decision was made. Times change and software changes. Incorporating a python interpreter into VMD was also a good idea. It means VMD is keeping up with the new developments in scripting languages and what newer end-users are learning in school. It is not an easy task, but I certainly welcome it and encourage its development. To make it easier for end-users so they can focus in their work and not the computer is also wise. It means more people will benefit from the software and that keeps it alive.
 
In my own work, I need to customize many things because my interest is in metalloporphyrins and their derivatives. For example, I now work with a metalloporphyrin linked to four helices, a mimic of tetraphyllin. So, the standard "protein oriented" software does not work out-of-the box. I am constantly building charges, getting new parameters, and building topology files (prep files in amber), etc. This is ardous and not really very amenable to automation.
 
VMD is a great asset in this area because I am doing computations with APBS. However, I now find my self learning tcl. I made this choice rather than building python in my home directory because I am afraid that to take advantage of VMD in the long run, I need to learn this scripting language. It is the one that seems favored by the developers. (The discussion about stubs seems to give additional support to my view!) Indeed, the developers of APBS have written many modules in python, but the ones that they supply for use with VMD are written with tcl! You may ask Nathan (the developer of APBS) why he did not use python. (The APBS plugin was written by the VMD crew, so I can see why it is in tcl.)
 
I never mind learning, so this is not so painful. Just time consuming! :-)
 
Once again I commend the developers of VMD, and I encourage them to keep up with the good work. I also use MMTK (another terrific software) and would love to see more integration of MMTK with VMD or Pymol. For example, the visualization of vector fields would be a plus for my work.
 
Take care!
Gustavo Mercier, MD,PhD

Justin Gullingsrud <justinrocks_at_gmail.com> wrote:
Hi,

On Tue, 26 Oct 2004 18:07:07 +0200, hinsen_at_llb.saclay.cea.fr
wrote:

> The question is: why do people use Python within VMD? If most users
> just want to script VMD and happen to prefer Python to Tcl, that
> approach would help. If, on the other hand, most users are Python
> programmers who see VMD as "yet another Python module", then they
> wouldn't be interested: they would most certainly want to use the copy
> of Python they already have fine-tuned for their needs with added
> modules.

This actually raises another question in my mind: does the ability to
run Python commands interactively within VMD come in handy to any of
you? Or would it be sufficient to tell VMD to run a pre-written
Python script, and trigger Python-scripted callbacks? VMD jumps
through some minor hoops to allow the user to script from the console
in Python as easily as Tcl, but I haven't seen too much evidence that
this is a needed feature. Even if console access to the VMD Python
interface were abolished, one could still script Python interactively
by running Idle or some other Tkinter-based widget from within VMD
(I've done it; I think it required some small modification to Idle).
Thoughts on this?

> Either that, or have interpreters in separate processes that
> communicate over sockets.

There is, of course, nothing stopping anyone from implementing this
sort of interface. You can even control VMD from a web browser using
this approach; see
http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/webvmd/ for
an example.

Cheers,
Justin

-- 
The spirit of Plato dies hard. We have been unable to escape the
philosophical tradition that what we can see and measure in the world
is merely the superficial and imperfect representation of an
underlying reality.
-- S.J. Gould, "The Mismeasure of Man"
--
Gustavo A. Mercier, Jr. MD,PhD
Baylor University Medical Center
Radiology
American Radiology Associates
712 N. Washington, Suite 101
Dallas, TX 75246
214-826-8822
214-826-9792 fax
gamercier_at_yahoo.com