VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Jul 17 2003 - 20:14:25 CDT
- Next message: John Stone: "New VMD-L subject lines..."
- Previous message: John Stone: "Re: superposition"
- In reply to: Bartek Dobrzelecki: "Labels (atom type, partial charge)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Dear Bartek,
At present there's not a way to edit the atom labels that
VMD displays when you select atoms. You can however add your own
arbitrary labels using the "graphics" and/or "draw" commands to
draw text in the molecule (same as what is done for labels but
you can do it in any size font, in any color, with any text etc..)
Here's a simple Tcl script that draws a timer in VMD based on the
current frame of a trajectory, you can of course substitute atom
coordinates in for the hard-coded {10 10 10} that's coded into that script,
but its a reasonable example and since I had it sitting around I thought
it'd be useful to you. (script follows, save it to a file and source it,
then do "enabletrace"...)
Thanks,
John Stone
vmd_at_ks.uiuc.edu
proc enabletrace {} {
global vmd_frame;
trace variable vmd_frame([molinfo top]) w drawcounter
}
proc disabletrace {} {
global vmd_frame;
trace vdelete vmd_frame([molinfo top]) w drawcounter
}
proc drawcounter { name element op } {
global vmd_frame;
draw delete all
# puts "callback!"
draw color white
set psperframe 1.03
set time [format "%8.3f ps" [expr $vmd_frame([molinfo top]) * $psperframe]]
draw text {10 10 0} "$time"
}
On Thu, Jul 17, 2003 at 01:00:22PM +0200, Bartek Dobrzelecki wrote:
> Is it possible to modify atom labels in such a way that only atom type
> or nicely formatted partial charge will be visible?
>
> Regards,
> Bartek D.
-- 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
- Next message: John Stone: "New VMD-L subject lines..."
- Previous message: John Stone: "Re: superposition"
- In reply to: Bartek Dobrzelecki: "Labels (atom type, partial charge)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]