VMD-L Mailing List
From: Lars Bruno Hansen (lhansen_at_fysik.dtu.dk)
Date: Thu Oct 28 2004 - 05:04:06 CDT
- Next message: Axel Kohlmeyer: "Re: vmd customization"
- Previous message: angelo vargas: "vmd customization"
- Maybe in reply to: Lars Bruno Hansen: "python2.3 and vmd"
- Next in thread: Justin Gullingsrud: "Re: python2.3 and vmd"
- Reply: Justin Gullingsrud: "Re: python2.3 and vmd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
>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?
>
>
>
>
Hi Justin,
We are in a small way using the python prompt in a tool which can display
our trajectory format. From the python command you have methods for showing
the force vectors and writing back the atoms to a new trajectory file,
methods which are specific to the tool.
But more important, you have also access to the atoms and can
use any methods on these, eg. you can set new positions for
them and vmd's graphics window will follow, or the other way around
you can move the atoms using the mouse and see the change
in the python atoms, or if you have a tool for rotating a subset of
the atoms you can use that etc etc.
This flexibility, it may not be use very much, but it is there if needed,
and is a big advantage to a graphical user interface, with a fixed
set of posibilities.
I was thinking about the vmd/python build problem.
Would it be an idea to build the python interface on top of vmd's tcl
scripts
interface.
The tcl interface I understand from the discussion is easier to maintain
within
vmd. A ordinary vmd-python module could be installed by the user ,
using the regular python iterpreter. This vmd-python module would contain
the current code, modified on the lowest level.
VMD would have to start the external python and load the vmd-python module.
The communication between vmd's tcl interface and python could be via a
pipe.
The vmd-python module could have the same version number as vmd, being
only
dependent on vmd's tcl script interface. In main vmd one would now only
have to
maintain one script interface. The python callback method could be a
problem.
with best regards
Lars
-- Lars Bruno Hansen CAMP, Dept. of Physics, Building 307, DTU, DK-2800 Lyngby, Denmark Phone: +45 45 25 32 16 Fax: +45 45 93 23 99 E-mail: lhansen_at_fysik.dtu.dk
- Next message: Axel Kohlmeyer: "Re: vmd customization"
- Previous message: angelo vargas: "vmd customization"
- Maybe in reply to: Lars Bruno Hansen: "python2.3 and vmd"
- Next in thread: Justin Gullingsrud: "Re: python2.3 and vmd"
- Reply: Justin Gullingsrud: "Re: python2.3 and vmd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]