Skip to main content

Lightweight Python library for large-scale PDB structural analysis

Project description

libraryPDB

libraryPDB is a lightweight Python library for searching, downloading, parsing, cleaning and analyzing protein structures from the Protein Data Bank (PDB).

The library is designed for large-scale bioinformatics analyses, with a strong focus on:

  • transparency
  • reproducibility
  • dependency-free workflows
  • coarse-grained, interpretable structural descriptors

Unlike full-featured molecular modeling toolkits, libraryPDB deliberately avoids heavy object models and external dependencies, making it suitable for high-throughput structural screening and exploratory data analysis.


Key features

  • 🔍 Programmatic search and download of PDB structures (RCSB PDB Search v2 API)
  • 🧹 Lightweight PDB cleaning and normalization
  • 🧬 Simple PDB parsing without external parsers
  • 📐 Cα-based structural descriptors
  • ✅ Structural integrity and quality checks
  • 📊 Single-call structure summary for large datasets
  • 🚀 Designed for batch processing and big data analysis

Installation

From GitHub (current version)

pip install git+https://github.com/CJ438837/libraryPDB.git

After installation:

import libraryPDB

Design philosophy

  • No heavy object-oriented models
  • No external bioinformatics dependencies
  • Direct manipulation of standard PDB text files
  • Explicit and reproducible heuristics
  • Functional, script-friendly API
  • Suitable for thousands of structures

This library is not intended to replace tools such as PyMOL, MDTraj, or Biopython, but to provide a fast and transparent first-pass structural analysis toolkit.


PDB search and download

libraryPDB provides simple wrappers around the official RCSB PDB Search v2 REST API.

Metadata-based search

from libraryPDB import advanced_search_and_download_pdb

pdb_files = advanced_search_and_download_pdb(
    save_dir="pdb_kinases",
    keywords=["kinase"],
    organisms=["Homo sapiens"],
    methods=["X-RAY DIFFRACTION"],
    max_results=100
)

print(len(pdb_files))

PDB parsing and basic handling

All parsing functions operate directly on PDB files and return simple Python data structures.

Parse atoms

from libraryPDB import parse_atoms

atoms = parse_atoms("protein.pdb")
print(atoms[0])

High-level structure summary

from libraryPDB import pdb_summary

summary = pdb_summary("protein.pdb")

Typical applications

  • Large-scale PDB dataset screening
  • Structural diversity analysis
  • Dataset curation and quality control
  • Feature extraction for statistics or machine learning
  • Rapid characterization of predicted structures (e.g. AlphaFold)

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

librarypdb-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

librarypdb-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file librarypdb-0.1.0.tar.gz.

File metadata

  • Download URL: librarypdb-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for librarypdb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 720edf7b08acb97807346a026434c857196cfcd9027aa2baa7c03cfbf8416ce0
MD5 cb9b116121efecc3067e0e3ccfe6f0b7
BLAKE2b-256 51510417cc68a039576e789e1edec6b895ce9aef775f43032a64607a8ccc86dc

See more details on using hashes here.

File details

Details for the file librarypdb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: librarypdb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for librarypdb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fae8039fa21f48a6ae0437a9be4e8b0c1b45e99f7906b4eb5fb1f4bd1d005d6
MD5 4c0bbfd396c505fb4b808bd90f7a154f
BLAKE2b-256 77edef22d8eae3259a84880fe149dc1da96212bebacfdede8483633e9427845c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page