From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Dec 02 2009 - 20:36:13 CST

Hi,
  At present, you can only have one active material property for
user-defined graphics objects within a molecule. To draw user-defined
graphics with multiple materials, you have to add them to different
molecules. Each molecule can have its own user-defined graphics material,
so you just need one molecule per material you plan to use. Keep in
mind that the "draw" command automatically targets the "top" molecule.
You can use the lower-level "graphics" command to specifically target
particular molecule IDs, or you can change the top molecule in your
script right before you draw or manipulate material properties for
each target molecule.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Dec 02, 2009 at 06:22:50PM -0800, rainy908_at_yahoo.com wrote:
> Hi John,
>
> Thanks for getting back to me on this. Your suggestion worked. Now only
> to make things more complicated :), what if I want to specify a
> transparent, cylindrical-shaped bond between two beads, as well as an
> opaque, cylindrical-shaped bond between another set of beads? I tried
> setting up my tcl script as:
>
> set pos1 { 0 0 0 }
> set pos2 { 1 1 1 }
> set pos3 { 2 2 2 }
> set pos4 { 3 3 3 }
>
> draw material Transparent
> draw color silver
> draw cylinder $pos1 $pos2 radius 0.3
>
> draw material Opaque
> draw color black
> draw cylinder $pos2 $pos3 radius 0.3
>
> However, when I reset the material to Opaque, the display shows that both
> bonds are opaque. How should I write my script so that both transparent
> and opaque materials are simultaneously shown? I presume I would have to
> make a new representation?
>
> Your resident newbie,
> Lili
>
> 2009/12/2 John Stone <johns_at_ks.uiuc.edu>
>
> Hi,
> Most likely the contents of $pos1 and $pos2 are incorrectly formatted,
> and you didn't set the material properly:
>
> Try this:
> set pos1 { 0 0 0 }
> set pos2 { 1 1 1 }
> draw material Transparent
> draw color silver
> draw cylinder $pos1 $pos2 radius 0.3
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
> On Wed, Dec 02, 2009 at 03:29:24PM -0800, rainy908_at_yahoo.com wrote:
> > Hi,
> >
> > I apologize if this question has been asked previously, but I am
> curious
> > to know if there is a way to draw a silver-colored cylinder in VMD?
> My
> > TCL script so far includes:
> >
> > material Transparent
> > draw color silver
> > draw cylinder $pos1 $pos2 radius 0.3
> >
> > However, my commands only result in an error with no cylinder
> > (representing a bond between 2 beads) drawn.
> > If anybody has any knowledge on this issue, I would be most
> appreciative
> > of your help.
> >
> > Thank you,
> > rainy908
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078