As a simple example, the following procedure calls the ``mol_weight'' command (in the previous section).
proc mol_weight_trace_fctn {args} { mol_weight }(This function is needed because the functions registered with trace take three arguments, but ``mol_weight'' only takes one.)
The trace function is registered as:
trace variable vmd_pick_atom w mol_weight_trace_fctnAnd now the residue masses will be printed automatically when an atom is picked. To turn this off,
trace vdelete vmd_pick_atom w mol_weight_trace_fctn