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

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Steven Roeters
10/22/12 5:11pm

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.

Attachment: 1PPT_NoZincHeteroAtom.pdb, URL: http://www.rcsb.org/pdb/download/downloadFile.do?fileFormat=\pdb&compression=NO&structureId=1PPT,

Subject (listing for 'How to color protein residues with an array?')
Author Date Posted
How to color protein residues with an array? Steven Roeters 10/21/12 6:46pm
Re: How to color protein residues with an array? Bill Simpson 10/22/12 2:13pm
Re: Re: How to color protein residues with an a... Steven Roeters 10/22/12 5:11pm
< Previous CommentHelp | Reply To Comment | Reply To Topic