Hi Christian,
I would only add a couple of points to Eric's suggestion to use the "bfactor" attribute.  These may or may not be relevant to your situation:

(1) Coloring by attribute is particularly nice for continuous-valued things, because they can be mapped to continuous gradations of color.  I can't tell whether you want continuous coloring (e.g. red gradually shading to blue from one value to another) or discrete (e.g. exactly red for one group, exactly blue for another group).  In the Render by Attribute tool, your value distribution will be shown in a histogram.  One way to achieve discrete coloring would be to bracket each value with two thresholds (the vertical colored sliders that define the color mapping on the histogram) of the same color.  Or, you could use commands something like

color hot pink @/bfactor=1
color orange @/bfactor=2

(2) Attributes could also be assigned with a separate input file, instead of the PDB file.  It is a simple tab-separated column format, description and examples here:
<http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/defineattrib.html#attrfile>

That allows assigning multiple different attributes without having to make more PDB files. These attributes can be of different value types (float, integer, boolean, color, character string), they can be named anything you want instead of just bfactor, and if they are floating-point numbers of high precision you can use more digits than are available in the bfactor field in standard PDB format.
Elaine
----------
Elaine C. Meng, Ph.D. 
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Sep 16, 2010, at 11:08 AM, Eric Pettersen wrote:

Hi Christian,
I'm happy you like Chimera enough to mis-use in in this way! :-)  However, I don't think "rainbow" is the way to go here.  Rainbow only affects connected strings of residues.  For example, if you rainbow a protein system, waters and ligands will retain their original colors (and for your system, Chimera really has no way of knowing that your "residues" aren't peptide ligands).
SInce you are creating your own PDB files anyway, what I suggest is that your put your "grouping info" into the bfactor field.  Then you can use the Render by Attribute tool (or the rangecolor command) to color your points based on their bfactor.

--Eric

                        Eric Pettersen
                        UCSF Computer Graphics Lab
                        http://www.cgl.ucsf.edu

On Sep 16, 2010, at 9:21 AM, Christian Schudoma wrote:

Dear Chimera-devs and community,

I am "abusing" the 3D-rendering capabilities of Chimera to visualise 3D
coordinates that do not actually represent molecular data.
(Why do I do that? Because I love using Chimera for visualising
molecular data and I needed a quick way to display (+ rotate/zoom) 3D
data without hassle. I'm sure there are other solutions out there but I
found it easier to convert my data to PDB than find a decent tool or
code one myself.)

I convert my xyz coordinates into PDB-format, using Hydrogen atoms and
GLY as residue name (or, alternatively XXX - which wouldn't work
either). I use the residue index (resSeq) to identify groups of points
that belong together.
This of course results in a complete nonsense-"protein" (with
GLY-residues consisting of nothing but 100's of hydrogen atoms), which
is nevertheless in syntactically correct (I hope) PDB format and both
readable as well as displayable by Chimera (as a point cloud using
wire-representation).

Now to the problem I encountered:
I would like to colour my "atoms" by their residue index.
I can colour the individual "atoms" manually, using Select-operations or
Ctrl-click and then the Color-menu. The Rainbow tool, however, does not
work to colour my point cloud. It simply doesn't do anything.

My question is, whether Rainbow performs some plausibility checking of
the data (and if so, then whether it is necessary to do that? It would
seem that Rainbow only needs to access either the residue, chain, or
model indices to do what it's supposed to do, i.e. to assign colour)?

Of course I am aware that my problem is kinda homemade and Rainbow works
fine for normal PDB structures. I am also not saying that Chimera's
buggy (although it seems to have a problem processing weird data in some
situations (Rainbow) but not in others (manual colouring)). However, I'd
like to understand why things don't work as expected ;)

Cheers,
Christian

---
Christian Schudoma, M.Sc.
Ph.D. Student

Bioinformatics Group
Max Planck Institute of Molecular Plant Physiology
Am Muehlenberg 1
14476 Potsdam-Golm
Germany

phone: +49 (331) 567-8624
email: schudoma@mpimp-golm.mpg.de
http://rloom.mpimp-golm.mpg.de

_______________________________________________
Chimera-users mailing list
Chimera-users@cgl.ucsf.edu
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users



_______________________________________________
Chimera-users mailing list
Chimera-users@cgl.ucsf.edu
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users