PDBRust
A comprehensive Rust library for parsing and analyzing PDB (Protein Data Bank) files. This library provides a robust and efficient way to work with protein structure data in PDB format.
Features
-
Complete Record Support
- ATOM/HETATM records with full coordinate and metadata support
- MODEL/ENDMDL for multi-model structures
- SEQRES records for sequence information
- CONECT records for connectivity data
- SSBOND records for disulfide bonds
- REMARK records with categorization
- HEADER and TITLE metadata
-
Robust Error Handling
- Custom error types for different parsing scenarios
- Detailed error messages for debugging
- Safe handling of malformed PDB files
-
Utility Functions
- Chain identification and analysis
- Residue sequence extraction
- Connectivity analysis
- Model-based structure organization
- Disulfide bond analysis
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Usage
Basic Structure Loading
use PdbStructure;
Chain and Residue Analysis
use PdbStructure;
Connectivity Analysis
use PdbStructure;
Parallel Processing
use PdbStructure;
use parallel;
Geometric Analysis
use PdbStructure;
use geometry;
Features
PDBRust supports several optional features that can be enabled in your Cargo.toml:
[]
= { = "0.1.0", = ["parallel", "geometry"] }
parallel: Enables parallel processing capabilities using Rayongeometry: Adds geometric analysis functions using nalgebra
Contributing
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Setup
-
Clone the repository:
-
Install dependencies:
-
Run tests:
-
Run benchmarks:
Code Style
- Follow the Rust standard style guide
- Run
cargo fmtbefore committing - Run
cargo clippyto check for linting issues - Ensure all tests pass with
cargo test - Add tests for new functionality
- Update documentation as needed
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- The Protein Data Bank (PDB) for providing the standard format
- The Rust community for excellent tools and libraries
- All contributors to this project