From: John Stone (
Date: Thu Mar 17 2011 - 14:11:30 CDT

  I think that if you check the button state of the mouse or
changes to the mouse mode, you may be able to avoid processing
your routine on every rotation, and instead only process when
the user stops rotating (when they release the mouse button).

The mouse position callback variable is:
The list of values set therein is:
  x y buttons

Let us know if you need any help or want a callback that
behaves differently then the existing ones do.

  John Stone

On Wed, Mar 16, 2011 at 11:45:31AM -0700, Julia Doh wrote:
> Hi,
> I recently wrote a script that calculates all the residues in a protein
> within the maximum y value and the number of angstroms the user inputs. I
> have been using the TCL callback vmd_logfile to have the program update
> automatically whenever the molecule is rotated. However, the procedure is
> executed with every single rotate statement that appears in the
> vmd_logfile when the protein is rotated. This makes the whole thing run
> far too slow to be useful and we are only interested in the top residues
> of the new orientation, not all the orientations in between.
> I was using the callbacks in the VMD manual
> ( to look at
> the available callbacks but I was wondering if there were any more? Are
> there any that listen for mouse events, such as a mouse-release upon
> rotating the protein? If not, suggestions on better callbacks we can use
> would be appreciated.
> Thank you,
> Julia

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:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078