From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Sep 06 2002 - 14:51:50 CDT

Marc,
  I've been swamped this week and had put off answering your note because
it requires going into a bit of detail, but here goes:

On Sat, Aug 31, 2002 at 01:14:29PM +0100, Marc Baaden wrote:
> Hi,
>
> well I must admit, since I have my new Spaceball (thanks a lot for all
> the tips you guys gave me on how to get one) I am kind of VMD addicted ..
> .. which is why I am trying to sort out all the little things that make
> working even more fun.

Yeah, the Spaceball rocks...

> So here go the questions:
>
> a) SPACEBALL / INPUT DEVICES
>
> - is it possible (on eg the 2003 model) to attribute often used functions
> to buttons 3 -> 9 ? (eg like stereo on/off, perspective, etc..)
> I guess I would need to re-compile parts/all of VMD to do that ? As you
> mention in the documentation that things are hardcoded
> (ah maybe I should say that I use the Linux version with OpenGl)

We've been planning to extend the interface code so that devices such
as the spaceball could be managed much like the keyboard hot keys, where
extra buttons could be programmed to run arbitrary VMD commands.
At present, we have not finished this work, so the current code only
uses the first two buttons as mentioned in the documentation.
You could definitely modify the code to perform additional functions.
If VMD users have some suggestions for this, I would be happy to add
in some code to use the other buttons for things until such time as we
get the programmable hot key mechanism working. If the buttons are well
thought out, I'm sure they'd be of great use to many VMD users until
we get to a user-programmable method down the road.

> - the three existing modes are great, but I was thinking evtl. of a
> rotation/scaling mode. Would that be difficult to try ?

Should be easy. Pick your favorite axis (Z?) and map that translation
axis to scaling, ignore the other two (X and Y) axes, and then map all three
orientation axes directly to orientation as usual.

> - is it possible to use the wheel of a wheel mouse for something (eg scaling) ?

Not presently. At the moment, VMD doesn't know about wheel mice.
We can probably implement wheel mouse code if someone knows of any other
code out there for this purpose. I suspect that wheel mouse code will be
very system-specific, worse than the current situation with meta keys etc,
but it would be worth doing since tons of people have them now.
This too would be nice to make into a user-customizable thing.

> b) CUSTOMIZATION
>
> - how can I change defaults for the render commands (eg xv -> display) ?
> do I need to re-compile, or can I set it via environment/.vmdrc/..?

You can put things like this using the .vmdrc file, this is easily
done as follows, no need to recompile:
  render options Tachyon {display %s}

> - I have re-defined some keys I use quite often, and was wondering
> whether it is possible to define a shortcut for extending the graphics
> window to full screen and bringing it to the front ?

In the bleeding edge version of VMD we have "display resize" and
"display reposition" commands which could be used for this purpose.
i.e. (my 1280x1024 screen, leaving a little border still:
   user add key i {display resize 1200 1000; display reposition 0 1020}

> c) (TEXT) INFORMATION
>
> - I use picking to identify atoms quite often, now what I have seen in
> other programs is a kind of small display that shows atom name/number/
> resid etc of the atom closes to the mousepointer continually, which I
> find quite useful. Is this easy to implement in VMD ? eg with something
> like tcl trace and a text label ?

Yes, you can have a Tcl trace do something exactly like this.
Paul Grayson wrote some code that does exactly this, though I don't
recall where its at right this moment. I'll ask Paul if he can followup
on this note regarding this specific item.

> - How does one get labels/text that is rendered with eg raster3d, povray, etc ?

At the moment the renderers don't do anything with text. We're working on
revamping some of how the external rendering works, and I'm planning to
give the user some choices such as check boxes to export text as cylinders,
things of that sort. I don't think that this will make it into VMD 1.8,
but I might be able to come up with a way to do this for you sooner if
you really need it badly, I'd probably do something by compositing text
into a rendered image in two steps, this would be pretty general and would
probably look nicer than cylinders anyway.

Let us know if you have more questions about VMD details.

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu

-- 
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