VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Oct 27 2011 - 12:42:54 CDT
- Next message: J. Nathan Scott: "Adding a three letter residue name to VMD's protein recognition"
- Previous message: Axel Kohlmeyer: "Re: Is it possible to automatically label all bonds?"
- In reply to: Mike Wykes: "Is it possible to automatically label all bonds?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
You can do this with some scripting. Here is a simple example
that creates labels for all of the atoms. Doing this for all of
the bonds would be similar:
proc label_atoms { molid seltext } {
set sel [atomselect $molid $seltext]
set atomlist [$sel list]
foreach {atom} $atomlist {
set atomlabel [format "%d/%d" $molid $atom]
label add Atoms $atomlabel
}
$sel delete
}
Cheers,
John Stone
vmd_at_ks.uiuc.edu
On Thu, Oct 27, 2011 at 05:43:18PM +0100, Mike Wykes wrote:
> Hi there,
>
> I am a VMD novice and would greatly appreciate some help.
>
> Could someone tell me if it is possible to label all the
> covalent/coordinate bonds in a system (i.e. bonds shown by VMD when
> using the lines/bonds drawing method) without having to manually click
> every pair of bonded atoms ?
>
> I imagine this must somehow be possible via the tcl command line, but
> I have no idea where to start.
>
> Could someone possibly point me in the right direction on how to go
> about generating the required command?
>
> Many thanks,
>
> Mike
-- 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
- Next message: J. Nathan Scott: "Adding a three letter residue name to VMD's protein recognition"
- Previous message: Axel Kohlmeyer: "Re: Is it possible to automatically label all bonds?"
- In reply to: Mike Wykes: "Is it possible to automatically label all bonds?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]