strahs at msvax.mssm.edu (Dan Strahs) wrote:
> I have several structures I would like to superimpose and graphically
> display with a ribbon backbone. Quite simple, really, and a variety of
> programs will readily perform this task.
>> However, I would like to blend the colors of the superimposed backbones,
> such that when the ribbons of the different structures merge, their
> color merges. For example, if I display two similar proteins with a blue
> ribbon and a red ribbon, I would like the portions of the ribbons that
> occupy the same space to be assigned a color of purple with a
> brightness/saturation approximately twice that of the individual protein's
> ribbons.
Midas certainly doesn't have this exact capability, though you can "fake
it" to some degree. If you have the structures open as model 1 and 2,
colored blue and red respectively, the first thing you would do is create
an intermediate color with:
colordef mixed 1.0 0.0 1.0
then color "mixed" those parts of model 2 within, say, 1 angstrom of model
1 with:
color mixed #2 & #1 za<1
and those parts of model 1 within an angstrom of model 2 with:
color mixed #1 & #2 za<1
You could create a color gradient by creating several intermediate colors
and applying them in successively "color" commands with decreasing zone
distances. To create a fairly smooth gradient you would probably need at
least 12 gradient steps, so you would probably make an external file with
the commands and then use "source" to execute them. Perhaps a perl script
could generate the command file (or be executed directly, see the "run"
command). Each color would need a unique name, because redefining the
same name causes atoms colored with that name to change to the new color.
If you are using _three_ or more structures, then that's another whole can
of worms and this approach won't really work, since then you truly need
multi-way blending. Unless the structures only intersect two at a time,
in which case the approach would still work.
As an aside, fully saturated blue and red is magenta.
---
Eric Pettersen
UCSF Computer Graphics Lab
pett at cgl.ucsf.edu (NeXTmail capable)
http://cgl.ucsf.edu/cgl