From: Sébastien Légaré (sebastien.legare.2_at_ulaval.ca)
Date: Wed Oct 09 2013 - 23:42:09 CDT

Hi everyone,

I also get that issue often. I want to set a different color for the carbons of different protein residues in Licorice representation. Adding carbon representations leave the bonds half cyan and changing Type or Name color affects the whole protein. The fastest way I found to do this is the following procedure inspired from Axel Kohlmeyer's vmd init script page.
My script is however not very elegant and I would like to know if there is a better way.

# Script colorsel.tcl
# Works with Coloring Method "Type"
#
# Usage: colorsel [atomselect top "resid xx and carbon"] color
# color can be any of the 33 colors defined in VMD

proc colorsel {selection color} {

# List of the 33 colors in VMD 1.9.1
set colorlist {blue red gray orange yellow tan silver green white pink cyan purple lime \
               mauve ochre iceblue black yellow2 yellow3 green2 green3 cyan2 cyan3 blue2 \
               blue3 violet violet2 magenta magenta2 red2 red3 orange2 orange3}
set num [lsearch $colorlist $color]

# Custom list of 33 characters usually unused as Type
set charlist {A D G J M O Q R T U V W X Y 0 1 2 3 4 5 6 7 8 9 ! @ # $ % ^ & + -}
set char [lindex $charlist $num]

# Create a new type and assign it to selected atoms
$selection set type $char

# Colorize the new type with wanted color
color Type $char $color

}

Regards

Sébastien Légaré
M.Sc. Biochemistry
IBIS, Laval University
Quebec, Canada

> Hi
>
> Thank you all for the suggestions. Axel, I am attaching a link below below.
>
> http://i56.tinypic.com/mwrym8.jpg
>
> the middle panel is the most desired, where i have changed the carbon color
> to pink, and have only a single representation using Mark's
> suggestion. Mark's solution thus works very well, except that it is possible
> that someone wants to color 5 different residues with carbons in different
> colors, in which case, the solution can become quite complicated. Secondly,
> one can alter the vdw radii as per Axel's suggestion, but this would again
> be a global change? Even if it is possible to change vdw radii for each
> selection, the solution will not be as good as the middle panel. Axel, the
> bonds representation does not seem as good as the licorice in your
> suggestion? [right panel vs. left panel]
>
> by god, i hope the above link to the image works,
>
> Maria
>
> On Tue, Jul 19, 2011 at 10:24 PM, Hurt, Darrell (NIH/NIAID) [E] <
> darrellh_at_niaid.nih.gov> wrote:
>
> Great answer, Mark. Thanks!
>
>
>
> Darrell Hurt, Ph.D.
> Section Head, Computational Biology
> Bioinformatics and Computational Biosciences Branch (BCBB)
> OCICB/OSMO/OD/NIAID/NIH
>
> 31 Center Drive, Room 3B62G, MSC 2135
> Bethesda, MD 20892-2135
> Office 301-402-0095
> Mobile 301-758-3559
> http://bioinformatics.niaid.nih.gov (Within NIH)
> http://exon.niaid.nih.gov (Public)
>
> Disclaimer: The information in this e-mail and any of its attachments is
> confidential and may contain sensitive information. It should not be used
> by anyone who is not the original intended recipient. If you have received
> this e-mail in error please inform the sender and delete it from your
> mailbox or any other storage devices. National Institute of Allergy and
> Infectious Diseases shall not accept liability for any statements made
> that are sender's own and not expressly made on behalf of the NIAID by one
> of its representatives.
>
>
>
>
> On 7/19/11 4:19 PM, "Mark Cunningham" <cunningham_at_utpa.edu> wrote:
>
> >Darrell:
> >
> >You can assign different carbon colors to Name and to Type and to Element.
> >You can then color different selections according to Coloring Method:
> >Name or Type or Element.
> >This will give you at least three different representations that color
> >most atoms by
> >their "normal" colors and carbon differently. You can also hijack the
> >other
> >Coloring Methods if you need more than three different colors of carbon
> >but those
> >may require more work to put the other atom colors back to their "normal"
> >colors.
> >
> >Mark
> >________________________________________
> >From: Hurt, Darrell (NIH/NIAID) [E] [darrellh_at_niaid.nih.gov]
> >Sent: Tuesday, July 19, 2011 2:24 PM
> >To: Mark Cunningham; maria goranovic
> >Cc: vmd-l_at_ks.uiuc.edu
> >Subject: Re: vmd-l: shades of licorice representation
> >
> >Hi everyone,
> >
> >Mark's answer is exactly what Maria was asking for and provides a "look
> >and feel" of PyMOL to VMD. However, I wonder if Maria also wants the
> >"PyMOL-like" ability to have different molecules (structures) colored
> >differently in the scheme she has described. I think that Mark's answer
> >will color every "C" name in every molecule the same color (whether the
> >default cyan or some other color), which will make distinguishing
> >different molecules difficult if they are overlaid. Is there some way to
> >color the carbon atoms of one molecule differently than the carbon atoms
> >of another molecule while keeping ALL of the oxygen, nitrogen, sulfur,
> >etc. atoms in every molecule colored in their traditional, default colors?
> >
> >Thanks,
> >Darrell
> >
> >
> >
> >Darrell Hurt, Ph.D.
> >Section Head, Computational Biology
> >Bioinformatics and Computational Biosciences Branch (BCBB)
> >OCICB/OSMO/OD/NIAID/NIH
> >
> >31 Center Drive, Room 3B62G, MSC 2135
> >Bethesda, MD 20892-2135
> >Office 301-402-0095
> >Mobile 301-758-3559
> >http://bioinformatics.niaid.nih.gov (Within NIH)
> >http://exon.niaid.nih.gov (Public)
> >
> >Disclaimer: The information in this e-mail and any of its attachments is
> >confidential and may contain sensitive information. It should not be used
> >by anyone who is not the original intended recipient. If you have
> >received this e-mail in error please inform the sender and delete it from
> >your mailbox or any other storage devices. National Institute of Allergy
> >and Infectious Diseases shall not accept liability for any statements
> >made that are sender's own and not expressly made on behalf of the NIAID
> >by one of its representatives.
> >
> >From: Mark Cunningham <cunningham_at_utpa.edu<mailto:cunningham_at_utpa.edu>>
> >Date: Tue, 19 Jul 2011 12:53:54 -0400
> >To: maria goranovic
> ><mariagoranovic_at_gmail.com<mailto:mariagoranovic_at_gmail.com>>
> >Cc: "vmd-l_at_ks.uiuc.edu<mailto:vmd-l_at_ks.uiuc.edu>"
> ><vmd-l_at_ks.uiuc.edu<mailto:vmd-l_at_ks.uiuc.edu>>
> >Subject: RE: vmd-l: shades of licorice representation
> >
> > Maria:
> >
> >The VMD licorice representation does exactly what you want, or at least
> >exactly what is shown in the figure you sent. To change the carbon color,
> >go to the Graphics..Colors menu. Select the Category Name and Name C,
> >then choose the color you want for carbon. If you select pink for carbon,
> >then VMD will draw a bond that is half pink and half blue (if connected to
> >nitrogen). If it is still somehow cyan, then you have TWO representations
> >that are drawing the bond. Delete the other representation.
> >
> >Mark
> >________________________________
> >From: owner-vmd-l_at_ks.uiuc.edu<mailto:owner-vmd-l_at_ks.uiuc.edu>
> >[owner-vmd-l_at_ks.uiuc.edu<mailto:owner-vmd-l_at_ks.uiuc.edu>] on behalf of
> >maria goranovic
> >[mariagoranovic_at_gmail.com<mailto:mariagoranovic_at_gmail.com>]
> >Sent: Tuesday, July 19, 2011 7:53 AM
> >To: VMD list
> >Subject: vmd-l: shades of licorice representation
> >
> >Hi
> >
> >I am wondering if this feature is already present in VMD?
> >
> >In Pymol, it is possible to color an amino acid residue represented as
> >licorice in say, orange, and yet one can distinguish between different
> >atoms of the residue. For example, all bonds will become pink, but a
> >nitrogen will still appear blue and an oxygen red. If I try to color all
> >carbons in VMD pink, a C-N bond still appears in the cyan color, and the
> >effect is not the same.
> >
> >Such a representation can be very useful in visualization. for example:
> >
> >http://hwmaint.jbc.org/cgi/content/full/285/34/26245/F4
> >
> >--
> >Maria G.
> >Technical University of Denmark
> >Copenhagen
>