From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Sat Jun 30 2012 - 10:32:04 CDT

On Sat, Jun 30, 2012 at 10:29 AM, Prof. Eddie <eackad_at_siue.edu> wrote:
> Thanks, but is there no easy way to do this with vmd's naming such as:
> label add Bonds 1/(residue 101 and name ca) 1/(residue 125 and name ca)
> ?

as such, this kind of syntax would not make a lot of sense,
since atom selections can have also have no or multiple atoms,
however, the label command requires exactly one atom.

however, you can easily emulate this by writing a small script
that builds the selection(s), gets the corresponding atom indices
and then generates the labels.

> This would be much easier than displaying the atom, then selecting it using
> the mouse and reading off its index every time.

like with other programming environments, you first
have to break down a complex problem into smaller
tasks until you can do them with the "primitives" the
programming language provides and then you can
assemble those pieces back to something useful
and convenient. VMD is particularly flexible and
powerful, due to its large number of primitives, but
that also requires users to spend a little effort to
be able to use them for their purpose. in many cases,
these are one-off things, i.e. there is only one
person that needs this specific kind of feature,
so it would be inefficient to overload VMD with
having this all preprogrammed.

cheers,
     axel.

> Thanks,
> Eddie
>
>
> --
> _________________________________________________________
> Edward Ackad, Ph.D
> Assistant Professor of Physics
> Computational Nanophotonics
> Southern Illinois University Edwardsville
> (618) 650-2390

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.