--- id: pydssp version: "0.9.1" license: MIT license_treatment: permissive maintenance: aging --- # pydssp — A simplified implementation of DSSP algorithm for PyTorch and NumPy License: permissive · Maintenance: aging · Downloads: 99.4K/mo ## What it is and what it does PyDSSP is a Python implementation of the DSSP (Dictionary of Secondary Structure of Protein) algorithm that classifies each residue in a protein backbone as alpha-helix (H), beta-strand (E), or loop (-). It takes 3D atomic coordinates as input and outputs secondary structure assignments. The package is not a complete reimplementation of the original 1983 DSSP algorithm—it simplifies some parts, such as omitting β-bulge annotation and using slightly different hydrogen-placement parameters—but achieves over 97% agreement with the original on average. The main innovation is support for both NumPy arrays and PyTorch tensors, with the latter enabling differentiable computation. PyDSSP can output hydrogen-bond matrices as continuous values in [0, 1] rather than binary assignments, making it suitable for machine learning pipelines where gradients flow through structure prediction. It includes a command-line tool for batch processing PDB files and a Python API for programmatic use. Use it for: - Assign secondary structure to protein backbones in molecular dynamics simulations or structure prediction pipelines. - Generate differentiable hydrogen-bond matrices for neural network training on protein structure tasks. - Batch-process multiple PDB files to extract C3 secondary structure annotations via the command-line tool. - Compute continuous hydrogen-bond scores for structure validation or quality assessment workflows. - Integrate structure assignment into deep learning models where gradients must flow through secondary structure computation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyDSSP assigns protein secondary structure (alpha-helix, beta-strand, or loop) from backbone coordinates using a simplified DSSP algorithm, with support for both NumPy and differentiable PyTorch tensors. Yes, if you need secondary structure assignment for protein backbones and can work with a simplified DSSP that omits β-bulge annotation. The 97% agreement with original DSSP is suitable for most applications. Install friction is low and the package is actively maintained. No security vulnerabilities are known. Choose this if you need PyTorch differentiability or batch processing; otherwise, consider the original DSSP or STRIDE for full feature parity. ## Install pip install pydssp uv add pydssp poetry add pydssp ## Installing pydssp Before you install: Low friction: pure Python wheel with four runtime dependencies (numpy, torch, einops, tqdm). Last release was 2025-02-24 and repository is active, though maintenance status is aging with no release in the past 536 days. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects. Quickstart: pip install pydssp import torch import pydssp coord = torch.randn([10, 100, 4, 3]) # batch, length, atoms (N,CA,C,O), xyz dssp = pydssp.assign(coord, out_type='c3') # returns ['-', 'H', 'E', ...] Requires PyTorch and NumPy installed; coordinates must be shaped as (batch, length, 4 or 5, 3) where atoms are N, CA, C, O backbone atoms (and optionally H). Verify before relying: - Whether the 97% agreement with original DSSP is sufficient for your specific downstream application. - Performance characteristics on large protein structures or batches beyond typical use. - Whether simplified parameters (hydrogen placement, no β-bulge support) affect your research domain. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 99.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags protein secondary structure prediction, DSSP algorithm python, protein backbone annotation, hydrogen bond detection protein, alpha helix beta strand assignment, protein structure analysis, differentiable DSSP torch, protein-structure, bioinformatics, differentiable-computing [View on SkillFed](https://skillfed.io/packages/pydssp) · [View on PyPI](https://pypi.org/project/pydssp/)