From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Feb 01 2012 - 13:58:00 CST

Joe,
  You can't change the information that VMD displays by default,
but you can catch mouse picking events, and have your own script emit whatever
structure information you want.
You can use that same mechanism to update a Tk GUI or trigger
other scripts if you like. The script below is a simple example of
how you can watch various VMD callbacks to trigger printing of
messages and such:

##
## Example script that watches all VMD Tcl callbacks and prints
## messages as events occur
##
proc printtrace {varname args} {
  upvar #0 $varname var
  puts "CALLBACK: $varname was updated to be \"$var\""
}

proc printtracem {varname mol rw} {
  puts "CALLBACK: $varname was updated for molecule $mol"
}

proc enabletrace {} {
  global vmd_molecule
  set cblist { ::vmd_quit ::vmd_logfile ::vmd_pick_shift_state ::vmd_pick_mol ::vmd_pick_atom ::vmd_pick_client ::vmd_pick_mol_silent ::vmd_pick_atom_silent ::vmd_pick_graphics ::vmd_pick_selection ::vmd_pick_value ::vmd_mouse_mode ::vmd_mouse_submode }
  set mcblist { ::vmd_frame ::vmd_molecule ::vmd_initialize_structure ::vmd_timestep ::vmd_trajectory_read }

  foreach cb $cblist {
    puts "adding trace on: $cb"
    eval "trace variable $cb w printtrace"
  }

  foreach mcb $mcblist {
    puts "adding trace on: $mcb"
    eval "trace variable $mcb w printtracem"
  }
}

proc disabletrace {} {
  set cblist { ::vmd_quit ::vmd_logfile ::vmd_pick_shift_state ::vmd_pick_mol ::vmd_pick_atom ::vmd_pick_client ::vmd_pick_mol_silent ::vmd_pick_atom_silent ::vmd_pick_graphics ::vmd_pick_selection ::vmd_pick_value ::vmd_mouse_mode ::vmd_mouse_submode }
  set mcblist { ::vmd_frame ::vmd_molecule ::vmd_initialize_structure ::vmd_timestep ::vmd_trajectory_read }

  foreach cb $cblist {
    eval "trace vdelete $cb w printtrace"
  }

  foreach mcb $mcblist {
    eval "trace vdelete $mcb w printtracem"
  }
}

enabletrace

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Jan 31, 2012 at 09:32:40AM -0500, Joseph Bylund wrote:
> Dear all,
> Is there a way to change the information which is displayed in the
> terminal when I "query" an atom (press 1 on the keyboard, then mouse
> left click the atom)? Specifically it would be helpful to display the
> occupancy in the output.
> thanks,
> -Joe
> apologies for sending to the wrong address previously

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