From: Sergei Izrailev (sergei_at_3dp.com)
Date: Fri Apr 23 1999 - 10:50:40 CDT

Dear Dr. Milius:

Robert Milius wrote:
> I'm having trouble coloring a molecule the way I want it.
>
> In the "Color Controls" there are categories called Name and Type
> which contain identical entries (ie H,O,N,C,S,P,Z).
> How can I enter my own Names or Types?

Presently, the only way to do it (except for changing VMD code),
is to name atoms differently in the PDB/PSF files.

> In fact, with regards to the "Color Controls", what's
> the difference between "Name" and "Type"?

Technically, the Name is derived from the name of the atom
in the PDB file, whereas Type is derived from the type of
atom in the PSF file. If there is no type information
(no PSF file), the Name and Type are identical.

In practice, however, both Name and Type are simply the
first letter of the atom name and type, which almost
always happen to be the same. The only advantage that
having both gives you is that you can redefine the coloring,
for example, by Type, and have two sets of colors for the
same atoms.

> It seems to me the "Name" should be the atom names as read
> in the PDB file, but it doesn't appear to be.

I agree. At least, Name and Type should be different.
I came across the same problem some time ago, and did not come
up with an easy solution. Later, changing this wasn't the highest
priority. John Stone, who is now the main VMD developer, could
tell you more regarding the current VMD development schedule
- I already left the Theoretical Biophysics Group.
 
> Using the "Coloring Method" of "ColorID", I can't seem to get
> Black. How can I change this? It'll take ID numbers from 0 to 15
> and black happens to be 16.

It's also "one of those things we never came around to change".
The way I dealt with it when preparing pictures was redefining
another color to be black and then using its color id to color
whatever I needed. As a side comment, it is very convinient to
redefine all colors the way you like (e.g., a gray scale), save
these definitions in a script, and then load the script when
needed. This way you are guaranteed to use the same color scheme
for all figures in a paper or a presentation.

> Let's say I have a molecule with a residue that contains a chain of
> C atoms, each atom named named C1, C2,..., C9 and I want the
> entire chain to be gray licorice rendering, but have C5 atom
> black with half bonds (not balls/spheres). How do I do this?

I am not sure what you mean exactly. I take it that you don't
want to represent C5 atom as VDW sphere, but you do want it to be
licorice, which includes a small sphere representing the atom.
(Another interpretation I can think of is that you want to have
C5 represented as "Bonds", i.e., without a small sphere at the
bond crossing.) Assuming the former, there are two ways to go.

To do exactly what you want, you'd have to rename C5 into,
say, M5 and define the color for the Name to be black. That
would draw a smooth chain with one atom and half-bonds coming
to it colored black.

To color the whole bond lengths black, without renaming the atom,
you can use two selections, one including all atoms except C5
("all and not name C5"), and another including atoms C4, C5, C6.
("name C4 C5 C6"). You need two more atoms in order for the
bonds between the atoms to be drawn. Color the first selection
gray licorice, and the second selection black. To make the
overlapping spheres representing atoms C4 and C6 and coming from
both selections look correctly, you should play with the size,
resolution of the spheres, and the order in which the selections
appear in the list in the Graphics form.

I realize that this is not a general solution, but I hope it will
help you to obtain the image you want.

Sincerely,

Sergei Izrailev, Ph.D.
Research Scientist
3-Dimensional Pharmaceuticals, Inc. e-mail: sergei_at_3dp.com
665 Stockton Dr., Suite 104 tel.: (610) 458-5264 ext 6570
Exton, PA 19341, USA fax: (610) 458-8249

http://www.ks.uiuc.edu/~sergei/