Answers.Body: <p>The documentation for the PDB module in biopython, which you have tagged, is very clear about how distances are measured between two given Cα atoms.</p>
  <p>To find out the secondary structure and interactions between strands of a sheet, you may want to look at the <strong>header</strong> of the PDB. This is the stuff before the <code>ATOM</code>/<code>HETATM</code> entries. <strong><code>SHEET</code> entries</strong> are what you are after. Please read the <a href="https://www.wwpdb.org/documentation/file-format-content/format33/sect5.html" rel="nofollow noreferrer">PDB format specifications for secondary structure</a>. Biopython PDB does not parse headers well, but reading the file and finding the SHEET entry and positionally splicing out the strings of interest from the entry is beyond straightforward.</p>
  <p>Example take from the above link:</p>
  <pre><code>         1         2         3         4         5         6         7         8
  12345678901234567890123456789012345678901234567890123456789012345678901234567890
  SHEET    1   A 5 THR A 107  ARG A 110  0
  SHEET    2   A 5 ILE A  96  THR A  99 -1  N  LYS A  98   O  THR A 107
  SHEET    3   A 5 ARG A  87  SER A  91 -1  N  LEU A  89   O  TYR A  97
  SHEET    4   A 5 TRP A  71  ASP A  75 -1  N  ALA A  74   O  ILE A  88
  SHEET    5   A 5 GLY A  52  PHE A  56 -1  N  PHE A  56   O  TRP A  71
  SHEET    1   B 5 THR B 107  ARG B 110  0
  SHEET    2   B 5 ILE B  96  THR B  99 -1  N  LYS B  98   O  THR B 107
  SHEET    3   B 5 ARG B  87  SER B  91 -1  N  LEU B  89   O  TYR B  97
  SHEET    4   B 5 TRP B  71  ASP B  75 -1  N  ALA B  74   O  ILE B  88
  SHEET    5   B 5 GLY B  52  ILE B  55 -1  N  ASP B  54   O  GLU B  73
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-19T18:53:37.603Z
Answers.Text: what does it mean by `i` and `j` in case of beta-sheets?
Answers.UserDisplayName: user366312
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T09:35:24.443Z
Answers.Text: It likely depends on the context of the paper or textbook... But in the PDB format snippet above sheet A is composed of 5 strands, so the mean distance between the closest C&alpha; atoms in strand _i_ and those in _j_ varies depending on their adjacency...
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-19T18:43:08.127Z
Answers.LastActivityDate: 2021-10-20T09:27:26.560Z
Answers.LastEditDate: 2021-10-20T09:27:26.560Z
Answers.UserDisplayName: Matteo Ferla
Body: <p>Suppose, I have a protein (say, 16PK).</p>
  <p>and, I want to calculate</p>
  <ol>
  <li>the distance between one of its alpha-carbons and the nearest beta-sheet.</li>
  <li>the distance between two strands in a beta-sheet (i, j).</li>
  </ol>
  <p>How should I proceed to achieve this?</p>
  
Tags: <python><proteins><protein-structure>
Title: How can I calculate the distance w.r.t. a beta sheet?
ThreadText: # How can I calculate the distance w.r.t. a beta sheet?
  
  (Asked by: username_0 on 2021-10-19)
  
  Suppose, I have a protein (say, 16PK).
  
  and, I want to calculate
  
  1. the distance between one of its alpha-carbons and the nearest beta-sheet.
  2. the distance between two strands in a beta-sheet (i, j).
  
  How should I proceed to achieve this?
  
  **Tags:** python, proteins, protein-structure
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-10-19. Score: 1 | Accepted answer
  
  The documentation for the PDB module in biopython, which you have tagged, is very clear about how distances are measured between two given Cα atoms.
  
  To find out the secondary structure and interactions between strands of a sheet, you may want to look at the **header** of the PDB. This is the stuff before the `ATOM`/`HETATM` entries. **`SHEET` entries** are what you are after. Please read the [PDB format specifications for secondary structure](https://www.wwpdb.org/documentation/file-format-content/format33/sect5.html). Biopython PDB does not parse headers well, but reading the file and finding the SHEET entry and positionally splicing out the strings of interest from the entry is beyond straightforward.
  
  Example take from the above link:
  
  ```
           1         2         3         4         5         6         7         8
  12345678901234567890123456789012345678901234567890123456789012345678901234567890
  SHEET    1   A 5 THR A 107  ARG A 110  0
  SHEET    2   A 5 ILE A  96  THR A  99 -1  N  LYS A  98   O  THR A 107
  SHEET    3   A 5 ARG A  87  SER A  91 -1  N  LEU A  89   O  TYR A  97
  SHEET    4   A 5 TRP A  71  ASP A  75 -1  N  ALA A  74   O  ILE A  88
  SHEET    5   A 5 GLY A  52  PHE A  56 -1  N  PHE A  56   O  TRP A  71
  SHEET    1   B 5 THR B 107  ARG B 110  0
  SHEET    2   B 5 ILE B  96  THR B  99 -1  N  LYS B  98   O  THR B 107
  SHEET    3   B 5 ARG B  87  SER B  91 -1  N  LEU B  89   O  TYR B  97
  SHEET    4   B 5 TRP B  71  ASP B  75 -1  N  ALA B  74   O  ILE B  88
  SHEET    5   B 5 GLY B  52  ILE B  55 -1  N  ASP B  54   O  GLU B  73
  
  ```
  
  > **Comments:**
  > **username_0**: what does it mean by `i` and `j` in case of beta-sheets?  
  > **username_1**: It likely depends on the context of the paper or textbook... But in the PDB format snippet above sheet A is composed of 5 strands, so the mean distance between the closest C&alpha; atoms in strand _i_ and those in _j_ varies depending on their adjacency...  
  
  ---
  
  