Package Bio :: Package PDB :: Module DSSP'
[hide private]
[frames] | no frames]

Module DSSP'

source code

Use the DSSP program to calculate secondary structure and accessibility.

You need to have a working version of DSSP (and a license, free for academic use) in order to use this. For DSSP, see

The following Accessible surface area (ASA) values can be used, defaulting to the Sander and Rost values:

Miller et al. 1987
Sander and Rost 1994
Tien et al. 2013

The DSSP codes for secondary structure used here are:

Code Structure
H Alpha helix (4-12)
B Isolated beta-bridge residue
E Strand
G 3-10 helix
I Pi helix
T Turn
S Bend
- None


The DSSP class can be used to run DSSP on a pdb file, and provides a handle to the DSSP secondary structure and accessibility.

Note that DSSP can only handle one model, and will only run calculations on the first model in the provided PDB file.


>>> p = PDBParser()
>>> structure = p.get_structure("1MOT", "1mot.pdb")
>>> model = structure[0]
>>> dssp = DSSP(model, "1mot.pdb")

Note that the recent DSSP executable from the DSSP-2 package was renamed from dssp to mkdssp. If using a recent DSSP release, you may need to provide the name of your DSSP executable:

>>> dssp = DSSP(model, '1mot.pdb', dssp='mkdssp')

DSSP data is accessed by a tuple - (chain id, residue id):

>>> a_key = list(dssp.keys())[2]
>>> a_key
('A', (' ', 251, ' '))
>>> dssp[a_key]
(3, 'A', 'H', 0.7075471698113207, -61.2, -42.4,
 -2, -0.7, 4, -3.0, 1, -0.2, 5, -0.2)

The dssp data returned for a single residue is a tuple in the form:

Tuple Index Value
0 DSSP index
1 Amino acid
2 Secondary structure
3 Relative ASA
4 Phi
5 Psi
6 NH-->O_1_relidx
7 NH-->O_1_energy
8 O-->NH_1_relidx
9 O-->NH_1_energy
10 NH-->O_2_relidx
11 NH-->O_2_energy
12 O-->NH_2_relidx
13 O-->NH_2_energy
Classes [hide private]
Run DSSP and parse secondary structure and accessibility.
Functions [hide private]
Internal function used by mask_dssp_dict (PRIVATE).
source code
dssp_dict_from_pdb_file(in_file, DSSP='dssp')
Create a DSSP dictionary from a PDB file.
source code
DSSP dictionary mapping identifers to properties.
source code
Secondary structure symbol to index.
source code
Variables [hide private]
  __package__ = 'Bio.PDB'
  _dssp_cys = re.compile(r'[a-z]')
  residue_max_acc = {'Miller': {'ALA': 113.0, 'ARG': 241.0, 'ASN...
Function Details [hide private]


source code 

Internal function used by mask_dssp_dict (PRIVATE).

Return a DSSP dictionary that maps (chainid, resid) to an amino acid, secondary structure symbol, solvent accessibility value, and hydrogen bond information (relative dssp indices and hydrogen bond energies) from an open DSSP file object.


handle : file
the open DSSP output file handle

dssp_dict_from_pdb_file(in_file, DSSP='dssp')

source code 

Create a DSSP dictionary from a PDB file.


>>> dssp_dict=dssp_dict_from_pdb_file("1fat.pdb")
>>> aa, ss, acc=dssp_dict[('A', 1)]


in_file : string
pdb file
DSSP : string
DSSP executable (argument to os.system)


(out_dict, keys) : tuple
a dictionary that maps (chainid, resid) to amino acid type, secondary structure code and accessibility.


source code 

DSSP dictionary mapping identifers to properties.

Return a DSSP dictionary that maps (chainid, resid) to aa, ss and accessibility, from a DSSP file.


filename : string
the DSSP output file


source code 

Secondary structure symbol to index.

H=0 E=1 C=2

Variables Details [hide private]


{'Miller': {'ALA': 113.0,
            'ARG': 241.0,
            'ASN': 158.0,
            'ASP': 151.0,
            'CYS': 140.0,
            'GLN': 189.0,
            'GLU': 183.0,
            'GLY': 85.0,