<p>This looks like a python problem and not a “biopython”problem.</p>
<p>Check your file structures. Try giving a full path for 16pk.pdb</p>
<p>These might help. <a href="https://stackoverflow.com/questions/17658856/why-am-i-getting-a-filenotfounderror">https://stackoverflow.com/questions/17658856/why-am-i-getting-a-filenotfounderror</a></p>
<p><a href="https://stackoverflow.com/questions/18757127/windowserror-error-2-the-system-cannot-find-the-file-specified-is-not-resol">https://stackoverflow.com/questions/18757127/windowserror-error-2-the-system-cannot-find-the-file-specified-is-not-resol</a></p>

CC BY-SA 4.0
2021-09-20T17:31:15.930Z
Up-voted to offset a highly incorrect down-vote.
Devon Ryan
CC BY-SA 4.0
2021-09-20T10:09:19.370Z
2021-09-20T10:09:19.370Z
jayesh saha
<p>Ok so this might not provide a solution, but here's a couple things someone might find useful;</p>
<ul>
<li>First, Biopython does not automatically contain DSSP, which you have to download as mentioned in the comments below (from here swift.cmbi.umcn.nl/gv/dssp)</li>
<li>Secondly, DSSP within Biopython, for whatever reason, accepts the path to the file, not the file itself. I see you have that correctly (<code>dssp = DSSP(model, &quot;16pk.pdb&quot;)</code>), but just pointing it ou</li>
<li>Third, DSSP originally had <code>dssp</code> executable, but the newer version has <code>mkdssp</code> executable, so you might need to do <code>dssp = DSSP(model, &quot;16pk.pdb&quot;, dssp=&quot;mkdssp&quot;)</code>, so it knows what to associate it with. This was the problem I had, because without specifying the <code>dssp</code>, it is not able to launch DSSP.</li>
</ul>

CC BY-SA 4.0
2022-06-07T10:41:01.247Z
2022-06-07T10:41:01.247Z
kormi
<p>I have the following settings in PyCharm:</p>
<p><a href="https://i.sstatic.net/WbEgo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WbEgo.png" alt="enter image description here" /></a></p>
<p>BioPython is properly installed:</p>
<p><a href="https://i.sstatic.net/LVf7F.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LVf7F.png" alt="enter image description here" /></a></p>
<p><strong>dssp_test.py</strong></p>
<pre><code>from Bio.PDB import PDBParser
from Bio.PDB.DSSP import DSSP
p = PDBParser()
structure = p.get_structure(&quot;16PK&quot;, &quot;16pk.pdb&quot;)
model = structure[0]
dssp = DSSP(model, &quot;16pk.pdb&quot;)
a_key = list(dssp.keys())[2]
print(dssp[a_key])
</code></pre>
<p><strong>Output</strong></p>
<pre><code>C:\ProgramData\Miniconda3\python.exe C:/Users/pc/source/repos/DSSP_algoritm_test/dssp_test.py
Traceback (most recent call last):
  File &quot;C:\Users\pc\source\repos\DSSP_algoritm_test\dssp_test.py&quot;, line 6, in &lt;module&gt;
    dssp = DSSP(model, &quot;16pk.pdb&quot;)
  File &quot;C:\ProgramData\Miniconda3\lib\site-packages\Bio\PDB\DSSP.py&quot;, line 437, in __init__
    dssp_dict, dssp_keys = dssp_dict_from_pdb_file(in_file, dssp)
  File &quot;C:\ProgramData\Miniconda3\lib\site-packages\Bio\PDB\DSSP.py&quot;, line 231, in dssp_dict_from_pdb_file
    p = subprocess.Popen(
  File &quot;C:\ProgramData\Miniconda3\lib\subprocess.py&quot;, line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File &quot;C:\ProgramData\Miniconda3\lib\subprocess.py&quot;, line 1416, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Process finished with exit code 1
</code></pre>
<p>Why am I unable to execute DSSP algorithm from BioPython?</p>

CC BY-SA 4.0
2021-09-20T13:20:02.983Z
Just in the offchange, you install the DSSP binary (https://swift.cmbi.umcn.nl/gv/dssp/) as described in the BioPython documentation, right?
Matteo Ferla
CC BY-SA 4.0
2021-09-20T14:37:37.160Z
@MatteoFerla, Yes. Check the newly added screenshot.
user366312
CC BY-SA 4.0
2021-09-20T17:31:49.520Z
Installing biopython does not magically install DSSP.
Devon Ryan
<python><secondary-structure>
Unable to execute DSSP algorithm from BioPython
# Unable to execute DSSP algorithm from BioPython

(Asked by: username_0 on 2021-09-18)

I have the following settings in PyCharm:

BioPython is properly installed:

dssp_test.py
from Bio.PDB import PDBParser
from Bio.PDB.DSSP import DSSP
p = PDBParser()
structure = p.get_structure("16PK", "16pk.pdb")
model = structure[0]
dssp = DSSP(model, "16pk.pdb")
a_key = list(dssp.keys())[2]
print(dssp[a_key])

Output
C:\ProgramData\Miniconda3\python.exe C:/Users/pc/source/repos/DSSP_algoritm_test/dssp_test.py
Traceback (most recent call last):
  File "C:\Users\pc\source\repos\DSSP_algoritm_test\dssp_test.py", line 6, in 
    dssp = DSSP(model, "16pk.pdb")
  File "C:\ProgramData\Miniconda3\lib\site-packages\Bio\PDB\DSSP.py", line 437, in __init__
    dssp_dict, dssp_keys = dssp_dict_from_pdb_file(in_file, dssp)
  File "C:\ProgramData\Miniconda3\lib\site-packages\Bio\PDB\DSSP.py", line 231, in dssp_dict_from_pdb_file
    p = subprocess.Popen(
  File "C:\ProgramData\Miniconda3\lib\subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\ProgramData\Miniconda3\lib\subprocess.py", line 1416, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Process finished with exit code 1

Why am I unable to execute DSSP algorithm from BioPython?

**Tags:** python, secondary-structure
> **Comments:**
> **username_1**: Just in the offchange, you install the DSSP binary (https://swift.cmbi.umcn.nl/gv/dssp/) as described in the BioPython documentation, right?  
> **username_0**: @MatteoFerla, Yes. Check the newly added screenshot.  
> **username_2**: Installing biopython does not magically install DSSP.  

---

## 2 answers

### Answer by username_3 on 2021-09-20. Score: 1

This looks like a python problem and not a “biopython”problem.

Check your file structures. Try giving a full path for 16pk.pdb

These might help. <https://stackoverflow.com/questions/17658856/why-am-i-getting-a-filenotfounderror>

<https://stackoverflow.com/questions/18757127/windowserror-error-2-the-system-cannot-find-the-file-specified-is-not-resol>

> **Comments:**
> **username_2**: Up-voted to offset a highly incorrect down-vote.  

---

### Answer by username_4 on 2022-06-07. Score: 1

Ok so this might not provide a solution, but here's a couple things someone might find useful;

* First, Biopython does not automatically contain DSSP, which you have to download as mentioned in the comments below (from here swift.cmbi.umcn.nl/gv/dssp)
* Secondly, DSSP within Biopython, for whatever reason, accepts the path to the file, not the file itself. I see you have that correctly (`dssp = DSSP(model, "16pk.pdb")`), but just pointing it ou
* Third, DSSP originally had `dssp` executable, but the newer version has `mkdssp` executable, so you might need to do `dssp = DSSP(model, "16pk.pdb", dssp="mkdssp")`, so it knows what to associate it with. This was the problem I had, because without specifying the `dssp`, it is not able to launch DSSP.


---

