DSSP (Dictionary of Secondary Structure)

repository·trunk·Indexed 42 days ago

https://github.com/pdb-redo/dssp

A tool for standardizing secondary structure assignments for protein entries in the Protein Data Bank (PDB). Version 4.6 provides full mmCIF support, defines Poly-Proline helices, and includes a Python module for extracting secondary structure information and residue statistics. It provides the mkdssp command-line tool to calculate assignments based on H-bond energies rather than predicting structure.

Tokens
1.8K
Snippets
6
Records
10
Agent score
55%

What's inside DSSP

  1. Overview of DSSP 4.6

    trunk

    DSSP (Dictionary of Secondary Structure) is a tool designed to standardize secondary structure assignment for protein entries.

    Key features of version 4.6 include:

    • Full mmCIF support: By default, it writes an annotated mmCIF file, storing secondary structure information in the _struct_conf category.
    • Poly-Proline helices: This version now defines Poly-Proline helices.

    Note: DSSP calculates secondary structure assignments based on existing data; it does not predict secondary structure.

  2. Understand DSSP and mmCIF secondary structure codes

    trunk

    The DSSP algorithm assigns secondary structure based on H-bond energy. The following table maps DSSP codes to their corresponding mmCIF codes and descriptions:

    DSSP CodemmCIF CodeDescription
    HHELX_RH_AL_PAlphahelix
    BSTRNBetabridge
    ESTRNStrand
    GHELX_RH_3T_PHelix_3
    IHELX_RH_PI_PHelix_5
    PHELX_LH_PP_PHelix_PPII
    TTURN_TY1_PTurn
    SBENDBend
    ' ' (space)OTHERLoop
  3. Build and install the DSSP Python module

    trunk

    Since version 4.5.2, DSSP includes a Python module that allows you to work with DSSP information directly within Python scripts. To build and install this module, you must enable the BUILD_PYTHON_MODULE flag during the CMake configuration step.

    Run the following commands to build and install the module:

    git clone https://github.com/PDB-REDO/dssp.git
    cd dssp
    cmake -S . -B build -DBUILD_PYTHON_MODULE=ON
    cmake --build build
    sudo cmake --install build
  4. Build the mkdssp program from source

    trunk

    To build the standalone mkdssp program, you need a modern compiler that supports C++20 features. The build process uses CMake and automatically handles downloading and building all necessary requirements.

    Follow these steps to clone, build, and install the program:

    git clone https://github.com/PDB-REDO/dssp.git
    cd dssp
    cmake -S . -B build
    cmake --build build
    cmake --install build
  5. Use the mkdssp CLI to assign secondary structure

    trunk

    mkdssp is a command-line tool used to calculate secondary structure assignments from protein entries (PDB or mmCIF format). It does not predict structure but calculates it based on H-bond energies.

    Usage

    mkdssp [OPTION] input [output]

    Input/Output Rules

    • Input: Supports mmCIF or PDB formats. Files may be gzip compressed. PDB files must contain a CRYST1 record.
    • Output: If no output file is specified, results are written to stdout.
    • Compression: If the output filename ends in .gz or .bz2, the output will be compressed automatically.
    • Format Selection: By default, the extension of the output filename determines the format. If the extension is unclear, mmcif is used. Use --output-format to force a specific format.
    # Example: Convert a PDB file to a compressed mmCIF file
    mkdssp input.pdb output.mmcif.gz
    
    # Example: Force old DSSP fixed-column format to stdout
    mkdssp input.pdb --output-format=dssp
  6. Use the DSSP Python module in a script

    trunk

    Once the Python module is installed, you can import dssp from the mkdssp package. You can pass the contents of a CIF file (e.g., from a .cif.gz archive) directly to the dssp constructor to extract secondary structure information and residue statistics.

    from mkdssp import dssp
    import os
    import gzip
    
    file_path = os.path.join("..", "test", "1cbs.cif.gz")
    
    with gzip.open(file_path, "rt") as f:
        file_content = f.read()
     
    # Initialize dssp with file content
    dssp = dssp(file_content)
     
    # Access residue statistics
    print("residues: ", dssp.statistics.residues)
    
    # Iterate through residues to access properties
    for res in dssp:
        print(res.asym_id, res.seq_id, res.compound_id, res.type)
  7. Reference mkdssp CLI options

    trunk
    OptionDescription
    --output-format=[dssp|mmcif]Force output in either the old fixed column DSSP format or the new annotated mmCIF format.
    --no-dssp-categoriesWhen writing mmCIF files, suppress the output of all dssp_ categories.
    --min-pp-stretchDefine the minimal number of residues with PHI/PSI angles within the range required to assign a PP helix.
    --write-otherUse this flag to change the default behavior of not writing structure information for OTHER in the new format.
    --components [file]Override the default CCD components.cif file used for compound knowledge.
    --extra-compounds [file]Add additional CCD or CCP4 restraints files in addition to the standard components.cif.
    --mmcif-dictionary [file]Override the default mmCIF dictionary file.
  8. Reference mkdssp CLI options

    trunk

    A complete list of available command-line options for mkdssp.

    --output-format=[dssp|mmcif]
    --no-dssp-categories
    --min-pp-stretch
    --write-other
    --components
    --extra-compounds
    --mmcif-dictionary
  9. Configure PPII helix and compound data

    trunk

    Advanced configuration for helix assignment and compound knowledge:

    • --min-pp-stretch: Defines the minimal number of residues with PHI/PSI angles within the required range to assign a PPII (Polyproline II) helix.
    • --components: Specifies a custom CCD file to load compound knowledge. This overrides the default components.cif installed by libcifpp.
    • --extra-compounds: Allows adding additional files (in CCD format or CCP4 restraints format) to the standard components.cif file.
    • --mmcif-dictionary: Specifies a custom mmCIF dictionary file, overriding the default installed by libcifpp.
  10. Configure mkdssp output formats and categories

    trunk

    Use the following options to control the format and content of the generated secondary structure files:

    • --output-format=[dssp|mmcif]: Forces the output format. Use dssp for the old fixed-column format or mmcif for the new annotated mmCIF format.
    • --no-dssp-categories: When writing mmCIF files, this suppresses the output of all dssp_ categories.
    • --write-other: By default, the mmCIF format does not write structure information for the OTHER category. Use this flag to include it.
    mkdssp --output-format=dssp input.pdb output.dssp
    
    mkdssp --output-format=mmcif --write-other input.cif output.cif