From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Fri Feb 01 2008 - 09:46:30 CST

On Fri, 1 Feb 2008, MW Van der Kamp, School of Chemistry wrote:

MK> Hello all,

hello marc,

MK> A quick question.
MK> I was reading in the user guide about the measure command
MK> (<http://www.ks.uiuc.edu/Research/vmd/current/ug/node124.html>).
MK> As one of the options, it lists 'bond':
MK> bond atom_list [options]: Returns the distance of the two specified atoms
MK>
MK> However, when I run vmd-1.8.5, this option doesn't seem to exist.
MK> (It is not included in the list that comes up when just entering 'measure')

well, you are referring to the user's guide of the "current"
version (i.e. 1.8.6) and as luck has it. measure bond was
implemented during the 1.8.6 development, i.e. it is not present
in 1.8.5. there is many other good things in 1.8.6, so an upgrade
will be worth it.

MK>
MK> So, am I right in thinking this option is not available in vmd-1.8.5, and
MK> the best option is to use something like
MK>
MK> label add Bonds <index> <index>
MK> label graph Bonds <output>

nope you need something like this (untested):

label add Bonds <molid>/<atomindex> <molid>/<atomindex>
set blist [label graph Bonds 0] ; # assuming this is the first bonds label

set fp [open "blist.dat" w]
for {set i 0} {$i < [llength $blist]} {incr i} {
  puts "$i [lindex $blist $i]"
}
close $fp

MK>
MK> to measure distances instead?
MK> Does the 'measure bond' option work in vmd-1.8.6?

yes.

cheers,
    axel.

MK>
MK> Thanks,
MK> Marc
MK> PS I think there's a little error in the user guide under 'measure bond'; in
MK> the examples of usage, it is said that 'measure bond {3 5}' returns the bond
MK> *energy*, not the distance...
MK> ---------------------------------------------------
MK> Marc van der Kamp, PhD-student
MK> School of Chemistry, Research group of Dr. Adrian Mulholland
MK> University of Bristol
MK> E-mail: Marc.vanderKamp_at_bristol.ac.uk
MK>
MK>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.