<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>

CC BY-SA 4.0
2021-10-19T18:53:37.603Z
what does it mean by `i` and `j` in case of beta-sheets?
user366312
CC BY-SA 4.0
2021-10-20T09:35:24.443Z
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...
Matteo Ferla
CC BY-SA 4.0
2021-10-19T18:43:08.127Z
2021-10-20T09:27:26.560Z
2021-10-20T09:27:26.560Z
Matteo Ferla
<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>

<python><proteins><protein-structure>
How can I calculate the distance w.r.t. a beta sheet?
# 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. 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...  

---

