Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "How to color protein residues with an array?"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:1+2 =



Original Message (ID '76214') By Steven Roeters:
In Response To 'Re: How to color protein residues with an array?' --------- Dear Bill, Thank you very much for your response. Here is an example of a simple protein (inspired by the Mathematica help file on the pdb-format): Import["http://www.rcsb.org/pdb/download/downloadFile.do?fileFormat=\pdb&compression=NO&structureId=1PPT", "PDB"] (one can also find it via: Import["ExampleData/1PPT.pdb"] ). And the list I want to use to color the residues is very similar to: ColorArray = RandomReal[1, 36] , ie. a list of numbers between 0 and 1 of the same length as number of residues in the protein. I hoped these values could for instance be used in ColorFunction (on of the options in the Import function) via Hue[ColorArray] or RGBColor[0, 0, ColorArray], thereby giving a stronger coloring for a higher value of the element of te list. Because the form (also from the Mathematica manual): Import["ExampleData/1PPT.pdb", ColorFunction -> "Residue"] also requires a loop through the different residues in which they are colored (at a lower level) , I would think/hope that this is also possible for an arbitrary color function or list. Thank you very much in advance for any help! With kind regards, Steven ps. In the case the hetero atom in this pdb-file, that is listed as the 37th residue, would be a problem: I have attached the same pdb-file where the line of the zinc atom is deleted.