From: Axel Kohlmeyer (
Date: Thu Oct 27 2011 - 12:42:02 CDT

On Thu, Oct 27, 2011 at 12:43 PM, 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 ?

topo getbondlist
should give you an easily digestable list of bonds

and then you just need to do a loop and generate the
labels using the "label" command.

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?

so you would have to do something like this
(off the top of my head and completely untested)

set mol [molinfo top]
foreach {b1 b2} [topo getbondlist none] {
  label add Bonds "$mol/$b1" "$mol/$b2"

good luck,

> Many thanks,
> Mike

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.