Metadata-Version: 2.4
Name: salp-rs
Version: 0.2.0
Requires-Dist: patchelf>=0.17.2.4
Requires-Dist: twine>=6.1.0
Summary: A Rust library with a python wrapper that allows fetching and (processing) big PDB data via queries by communicating with the RCSB API 
Author-email: fragilefort <>
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# salp
![Salp](./assets/salp_colony.png)
*Original image credit: By Peter Southwood - Own work, CC BY-SA 3.0*

A Python library for querying and fetching protein structures from the RCSB PDB, written in Rust.

## Installation

```bash
pip install salp-rs
```

With uv:

```bash
uv add salp-rs
```

## Example usage

```python
from salp import Query, search, fetch_and_save
# btw these are the only 2 functions you got

query = Query.and_([
    Query.organism("Homo sapiens"),
    Query.max_resolution(2.5),
    Query.keyword("kinase"),
])

# This returns the total count and list of PDB IDs
# RCSB returns up to 10 results by default. Control this with `start` and `rows`:
total, ids = search(query, start=0, rows=50)
print(f"Found {total} structures, fetching first {len(ids)}")

# Fetch and save, filter_proteins removes non-protein atoms
fetch_and_save(ids, filter_proteins=True, output_dir="./structures")
```
## Contributing

Issues and PRs welcome on [GitHub](https://github.com/fragilefort/salp-rs).

