mdtraj.compute_dssp(traj, simplified=True)

Compute Dictionary of protein secondary structure (DSSP) secondary structure assignments


A trajectory

simplifiedbool, default=True

Use the simplified 3-category assignment scheme. Otherwise the original 8-category scheme is used.

assignmentsnp.ndarray, shape=(n_frames, n_residues), dtype=S1

The assignments is a 2D array of character codes (see below), giving the secondary structure of each residue in each frame.


The DSSP assignment codes are:

  • ‘H’ : Alpha helix

  • ‘B’ : Residue in isolated beta-bridge

  • ‘E’ : Extended strand, participates in beta ladder

  • ‘G’ : 3-helix (3/10 helix)

  • ‘I’ : 5 helix (pi helix)

  • ‘T’ : hydrogen bonded turn

  • ‘S’ : bend

  • ‘ ‘ : Loops and irregular elements

The simplified DSSP codes are:

  • ‘H’ : Helix. Either of the ‘H’, ‘G’, or ‘I’ codes.

  • ‘E’ : Strand. Either of the ‘E’, or ‘B’ codes.

  • ‘C’ : Coil. Either of the ‘T’, ‘S’ or ‘ ‘ codes.

A special ‘NA’ code will be assigned to each ‘residue’ in the topology which isn’t actually a protein residue (does not contain atoms with the names ‘CA’, ‘N’, ‘C’, ‘O’), such as water molecules that are listed as ‘residue’s in the topology.

Our implementation is based on DSSP-2.2.0, written by Maarten L. Hekkelman and distributed under the Boost Software license.



Kabsch W, Sander C (1983). “Dictionary of protein secondary structure: pattern recognition of hydrogen-bonded and geometrical features”. Biopolymers 22 (12): 2577-637. doi:10.1002/bip.360221211