From: Axel Kohlmeyer (
Date: Fri Apr 16 2010 - 12:03:24 CDT

On Fri, 2010-04-16 at 12:09 -0400, Joshua Anderson wrote:
> I myself ran into this issue a few weeks ago. I dug around in the VMD
> source code and found that while it retains the full type name for
> features such as atom selections, the name is always truncated to the
> first alpha character and then uppercased for coloring by type and
> name. This "feature" is buried deep in the C++ code of VMD and there
> didn't appear to be an option

have you tried using coloring by "Element"?

if this would be sufficient, you can change the default
by putting: mol default color Element
in your .vmdrc or vmd.rc file.

truncating the "name" and "type" fields is a legacy
feature meant to deal with classical bio force fields
where almost always the first character is sufficient
to identify the elements. you typically have only H,
C, N, O, S, P and you don't care about the rest.
VMD has since evolved into something much more versatile
and this is some issue that is worth thinking about.
unfortunately, it is going to be very difficult to
find a solution that would be sufficiently backward
compatible for the large number of people that expect
the current default behavior and seem to be happy with it.


> I setup a script to create many representations (one for each type)
> and color by color ID to work around this problem.
> --------
> Joshua A. Anderson, Ph.D.
> Chemical Engineering Department, University of Michigan
> On Apr 16, 2010, at 9:15 AM, Jennifer Williams wrote:
> >
> >
> > Hi,
> >
> > I have a structure and need to change the colours of certain atoms.
> > In my .pdb file I have SI and S. Both are automatically recognized
> > as S in VMD and given the same colour. I am unable to change this
> > using the colour control in the graphical interface.
> >
> > I know that I could easily do find and replace in my .pdb file but I
> > also have trajectory files which I cannot format.
> >
> > Is there someone around this -perhaps using some script command. Any
> > help greatly appreciated,
> >
> > Jenny
> >
> >
> >
> > --
> > The University of Edinburgh is a charitable body, registered in
> > Scotland, with registration number SC005336.
> >
> >
> >
> >

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.