0
$\begingroup$

I have the following settings in PyCharm:

enter image description here

BioPython is properly installed:

enter image description here

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

$\endgroup$
3
  • $\begingroup$ Just in the offchange, you install the DSSP binary (swift.cmbi.umcn.nl/gv/dssp) as described in the BioPython documentation, right? $\endgroup$ Commented Sep 20, 2021 at 13:20
  • $\begingroup$ @MatteoFerla, Yes. Check the newly added screenshot. $\endgroup$
    – user366312
    Commented Sep 20, 2021 at 14:37
  • 1
    $\begingroup$ Installing biopython does not magically install DSSP. $\endgroup$
    – Devon Ryan
    Commented Sep 20, 2021 at 17:31

2 Answers 2

1
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ Up-voted to offset a highly incorrect down-vote. $\endgroup$
    – Devon Ryan
    Commented Sep 20, 2021 at 17:31
1
$\begingroup$

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.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.