VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Mar 23 2007 - 14:01:05 CDT
- Next message: John Stone: "Re: script to visualize NMR constrains?"
- Previous message: jacopo.sgrignani_at_unifi.it: "hbond"
- In reply to: Fred Moore: "coloring names"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Fred,
We've slowly been evolving VMD to separate out atom coloring by
their atomic elements from coloring based on their string names, since
there are many cases like the one you've described where one wants to
color them based on their string name, since there are many naming
conventions out there and no single rule set can deal with them all.
The first part of the transition was to add a new "element" coloring mode
which is already in the new versions of VMD, but the second step is to
make the "name" and "type" coloring modes use the actual string name rather
than guessing the atomic element based on the string name, which was what
they do presently, which is what is causing your difficulty.
In the short term, one way to deal with this is to create separate
representations and selections for CL1, CL2, CL3, and H, and color them
using the ColorID coloring method. Alternatively, you could use atom
selections and rename either their "name" or "type" so they get assigned
to different color table entries which you can then control as you wish.
If you're not using the "type" field with data from PSF files or other such
information, I would suggest setting the "type" field and using that, e.g.:
set sel [atomselect top "name CL1"]
$sel set type "A"
set sel [atomselect top "name CL2"]
$sel set type "B"
set sel [atomselect top "name CL3"]
$sel set type "C"
set sel [atomselect top "name H"]
$sel set type "D"
You can then color by "type", and assign any colors you like.
This same technique can be used on any of the per-atom data fields,
whether string based or numeric, do a varying degree.
John Stone
vmd_at_ks.uiuc.edu
On Fri, Mar 23, 2007 at 11:24:37AM -0700, Fred Moore wrote:
> Greetings from a newbie to VMD.
>
> I'm running the latest version on a macintosh pb 12" powerpc with the
> latest osx.
>
> I'm trying to view and animate a .pdb file full of chloroform
> molecules. The .pdb file names the atoms in each molecule:
>
> C1, CL1, CL2, CL3, H
>
> Those names show up properly when I go to Graphics->Representations
> and look under "keyword". The values are: C1, CL1, CL2, CL3, H
>
> I'd like to be able to color those atoms differently. The default
> coloring has the Hydrogen as white, and this is what the:
>
> Graphics->Colors...
>
> menu shows. However the names menu under
>
> Graphics->Colors...
>
> doesn't show these (C1, CL1, CL2, CL3, H) names and the only one that
> I seem to be able to control is "H". As far as the Color Controls
> menu is concerned
> C1, CL1, CL2, CL3 are all the same name and it colors them uniformly.
>
> Is this behavior normal?
>
> If so, is there a menu based way to color my atoms ((C1, CL1, CL2,
> CL3, H) differently?
>
> thanks in advance!
>
> Fred M.
-- 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
- Next message: John Stone: "Re: script to visualize NMR constrains?"
- Previous message: jacopo.sgrignani_at_unifi.it: "hbond"
- In reply to: Fred Moore: "coloring names"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]