Answers.Body: <p>To expand on Matteo Ferla's comment as an answer, there are two approaches to getting these "allowed" contours:</p>
  
  <ol>
  <li><p>From probabilities found in observed crystal structures. You could imagine plotting a Ramachandran plot for the whole PDB and colouring the points by assigned secondary structure from <a href="https://swift.cmbi.umcn.nl/gv/dssp" rel="nofollow noreferrer">DSSP</a>. The contours would then be regions that encompass e.g. 99% of alpha-helical residues, or 99% of all residues. In doing this you would notice for example that glycine can adopt more regions of the Ramachandran space that other amino acids. <a href="https://www.ebi.ac.uk/thornton-srv/software/PROCHECK" rel="nofollow noreferrer">PROCHECK</a> is software that scores a protein based partly on the likelihood of the phi/psi angles of each residue.</p></li>
  <li><p>From reasoning about the chemistry of the secondary structure of proteins. Only certain phi/psi combinations allow the i -> i + 4 pattern in an alpha-helix or the alternating up/down sidechain pattern in a beta-strand.</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-06T14:04:27.843Z
Answers.Text: Thanks @jgreener! The plot above is a portion of PDB, but captures something on the order of 10^5 proteins. I can already make out what appears to match the secondary structures. I'm curious how I can rigorously derive the probability distributions from crystal structures, as an exercise!
Answers.UserDisplayName: batlike
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-01T09:55:45.447Z
Answers.LastActivityDate: 2020-04-01T09:55:45.447Z
Answers.UserDisplayName: jgreener
Body: <p>I'm a beginner to structural biology and for fun, calculated the tortional angles of some 100, 000 proteins. Here is my Ramachandran plot:  <a href="https://i.sstatic.net/UxBRk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UxBRk.png" alt="enter image description here"></a></p>
  
  <p>When I went to look for "canonical" Ramachandran plots, I discovered most researchers overlay a "contour" plot of allowed torsional angles (see below). My two questions are:</p>
  
  <ul>
  <li>How are the distributions (ie. <strong>countours</strong>) of protein secondary structures calculated/derived? (ie. How do I "cluster" these into beta-sheets, alpha helices?)</li>
  <li>How can I derive them myself?</li>
  </ul>
  
  <p><a href="https://i.sstatic.net/uWdUk.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uWdUk.jpg" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-30T16:02:20.933Z
Comments.Text: You have already calculated you &psi; and &phi; angles, hence your plot and you simply wish to do a contour map, correct? A contour map is a 2D histogram basically. There are many plotting programs. I use plotly, eg. [plotly/contour](https://plotly.com/python/2d-histogram-contour/).
  Your scatter plot looks like it's in MS Excel blue, but with Matlab style ticks set outwards. For the former, I have zero idea, while for the latter there is a function called [contour](https://www.mathworks.com/help/matlab/ref/contour.html). So could you specify the program?
Comments.UserDisplayName: Matteo Ferla
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-30T16:06:07.873Z
Comments.Text: Alternative, a commonly done thing is setting the alpha of the markers to something like 0.2 so that the overlapping ones are shown better. And also worth mentioning, that hexbin plots are becoming increasing popular this year for 2D histograms (via ggplots or py matplotlib)
Comments.UserDisplayName: Matteo Ferla
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-30T18:31:49.443Z
Comments.Text: Hi @MatteoFerla, thanks for your response. To clarify, the plot was generated in matplotlib. I have a better appreciation for how the plot is generated, but my question is: how do I know which cluster belongs to alpha helix, beta pleated sheets, etc.
Comments.UserDisplayName: batlike
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-30T20:30:59.227Z
Comments.Text: It is derived from the crystal structure and is a known variable. It can be spotted by eye by plotting the scatter plot (or hexbin plot...) with the data filtered by secondary structure. There is no fancy k-mer clustering of similar needed. Alternatively it can be argued _a priori_: residues on a &beta; sheet go up-down so the &psi; must be about 180&deg;, while the turn on a helix is 3 and a bit, so must be about 60 &deg;...
Comments.UserDisplayName: Matteo Ferla
Tags: <structural-biology>
Title: How did researchers derive the Ramachandran "validation" contours?
ThreadText: # How did researchers derive the Ramachandran "validation" contours?
  
  (Asked by: username_0 on 2020-03-29)
  
  I'm a beginner to structural biology and for fun, calculated the tortional angles of some 100, 000 proteins. Here is my Ramachandran plot: [![enter image description here](https://i.sstatic.net/UxBRk.png)](https://i.sstatic.net/UxBRk.png)
  
  When I went to look for "canonical" Ramachandran plots, I discovered most researchers overlay a "contour" plot of allowed torsional angles (see below). My two questions are:
  
  * How are the distributions (ie. **countours**) of protein secondary structures calculated/derived? (ie. How do I "cluster" these into beta-sheets, alpha helices?)
  * How can I derive them myself?
  
  [![enter image description here](https://i.sstatic.net/uWdUk.jpg)](https://i.sstatic.net/uWdUk.jpg)
  
  **Tags:** structural-biology
  
  > **Comments:**
  > **username_1**: You have already calculated you &psi; and &phi; angles, hence your plot and you simply wish to do a contour map, correct? A contour map is a 2D histogram basically. There are many plotting programs. I use plotly, eg. [plotly/contour](https://plotly.com/python/2d-histogram-contour/). Your scatter plot looks like it's in MS Excel blue, but with Matlab style ticks set outwards. For the former, I have zero idea, while for the latter there is a function called [contour](https://www.mathworks.com/help/matlab/ref/contour.html). So could you specify the program?  
  > **username_1**: Alternative, a commonly done thing is setting the alpha of the markers to something like 0.2 so that the overlapping ones are shown better. And also worth mentioning, that hexbin plots are becoming increasing popular this year for 2D histograms (via ggplots or py matplotlib)  
  > **username_0**: Hi @username_1, thanks for your response. To clarify, the plot was generated in matplotlib. I have a better appreciation for how the plot is generated, but my question is: how do I know which cluster belongs to alpha helix, beta pleated sheets, etc.  
  > **username_1**: It is derived from the crystal structure and is a known variable. It can be spotted by eye by plotting the scatter plot (or hexbin plot...) with the data filtered by secondary structure. There is no fancy k-mer clustering of similar needed. Alternatively it can be argued _a priori_: residues on a &beta; sheet go up-down so the &psi; must be about 180&deg;, while the turn on a helix is 3 and a bit, so must be about 60 &deg;...  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-04-01. Score: 3
  
  To expand on username_1 username_1's comment as an answer, there are two approaches to getting these "allowed" contours:
  
  1. From probabilities found in observed crystal structures. You could imagine plotting a Ramachandran plot for the whole PDB and colouring the points by assigned secondary structure from [DSSP](https://swift.cmbi.umcn.nl/gv/dssp). The contours would then be regions that encompass e.g. 99% of alpha-helical residues, or 99% of all residues. In doing this you would notice for example that glycine can adopt more regions of the Ramachandran space that other amino acids. [PROCHECK](https://www.ebi.ac.uk/thornton-srv/software/PROCHECK) is software that scores a protein based partly on the likelihood of the phi/psi angles of each residue.
  2. From reasoning about the chemistry of the secondary structure of proteins. Only certain phi/psi combinations allow the i -> i + 4 pattern in an alpha-helix or the alternating up/down sidechain pattern in a beta-strand.
  
  > **Comments:**
  > **username_0**: Thanks @username_2! The plot above is a portion of PDB, but captures something on the order of 10^5 proteins. I can already make out what appears to match the secondary structures. I'm curious how I can rigorously derive the probability distributions from crystal structures, as an exercise!  
  
  ---
  
  