From: John Stone (johns_at_ks.uiuc.edu)
Date: Sun Jan 20 2008 - 20:59:51 CST

Hi,
  Before jumping off and adding Lua bindings, I would strongly
suggest learning how to use VMD via Tcl so you have something to
compare with that you're familiar with. In order to effectively
control VMD from Lua, you would either need to add Lua bindings of
all of the key VMD commands. See the cmd_*.C, py_*.C, Tcl*.C,
and Cmd*.C source files for the existing Tcl/Python bindings.
You'll also want to take a good look at the *TextInterp.* source files.

Regarding the OSX build process: Basically, building on OSX is
most easily done by just compiling the vmd_MACOSXX86 binary,
and inserting it into an existing/already-prepared VMD.app bundle.
I haven't bothered putting the distribution scripts that build our
application bundles into the CVS tree as they are complex and do
lots of site-specific operations which would have to be genericized.
It's far easier to just do these operations by hand if you're not
doing massive numbers of MacOS X builds, or customizing things
that go much further than the VMD binary itself. If you started
from one of our released VMD.app bundles, they already contain
the FLTK resource and everything else you need. If you have
more specific questions about how to to create Lua bindings,
let me know and I'll try and answer your questions.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sun, Jan 20, 2008 at 01:51:06PM -0800, Wesley Smith wrote:
> Hi,
> I've embedded VMD inside a Lua module. I have it loading plugins and
> reading data files. What I'm trying to figure out right now is how to
> get it to actually draw something. In the Lua script I'm reading in
> data into VMD with, I am also creating an OpenGL context. What's the
> simplest way to tell VMD to draw a Molecule? The file I'm loading has
> 4 volume representations that I want to draw with the Isosurface
> technique. I can get the molid and repids as well as pointers to the
> VolumetricData classes but I suspect there is a higher level interface
> that passing this directly to a DrawMolItem that somehow goes through
> TCL commands. Any pointers are greatly appreciated. I would do a
> trace in a proper VMD app, but the build I was able to make on OSX
> craps out for some reason. The build steps on OSX are IMHO incomplete
> and don't seem to produce the polished binary distribution available
> from the website. It would be nice if this was improved. I had to do
> a lot of searching to find support libs and the FLTK resource file but
> I'm still left with a half working app. Anyway, I'm more interested
> in embedding VMD so it's not a big deal.
>
> best,
> wes

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