From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Mar 30 2010 - 15:12:28 CDT

On Tue, 2010-03-30 at 13:17 -0600, Willie Maddox wrote:
> Hello,

hi!

> I am trying to find a software package that will allow me to
> manipulate the colouring of bonds between atoms based on the bond
> length.
>
> For example, if the ideal bond length in a particular crystal is say
> 2.0 angstroms and I perform a slab relaxation, I would like to display
> the bonds that got stretched with one colour (say blue), and the bonds
> that got compressed, with another (red maybe).
>
> In addition, I would like to be able to map the range of bond lengths
> in this relaxed crystal to the red/blue colour gradient, or any other
> colour gradient for that matter. In other words, a bond length of 2.2
> Angstroms would appear "more" blue than a neighbouring bond 2.1
> Angstroms long. Vice versa for the reds of course.
>
> Question: Does VMD have this ability, or can VMD be programmed to do
> this?

i think in principle this would be possible with VMD,
but not without any scripting and it depends a bit on
how many bonds per atom you have. to explain:
you can color items by assigning numbers to certain
properties of atoms and use a color gradient across
those properties, or you can overlay multiple representations
of subsets of your system and assign an individual color
to each of them, or a combination of the two.

the main complication is, that the color of bonds is
determined by the color of the two participating atoms
(actually bonds are drawn as two halves). so that would
require some smart scripting so that each atom has the
different color codes stored in different properties.

a second, more involved way would be to implement a
coloring scheme that uses the already existing bondorder
parameter as reference for the color. that would require
changes to the VMD source, and i don't know how many and
by when this could be done, or you would need it. in that
case the main effort would be to determine the numbers
that you want to assign to each bond in a script and set them.

hope this helps,
    axel.

> Thanks in advance!
>
> -Willie Maddox

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com
http://sites.google.com/site/akohlmey/
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.