#bioinformatics #sasa #rust

rust-sasa

RustSASA is a Rust library for computing the absolute solvent accessible surface area (ASA/SASA) of each atom in a given protein structure using the Shrake-Rupley algorithm

4 releases

new 0.2.2 Apr 30, 2024
0.2.1 Apr 12, 2024
0.2.0 Apr 12, 2024
0.1.1 Feb 11, 2024
0.1.0 Feb 11, 2024

#76 in Biology

Download history 8/week @ 2024-02-08 19/week @ 2024-02-15 25/week @ 2024-02-22 24/week @ 2024-02-29 62/week @ 2024-03-07 7/week @ 2024-03-14 6/week @ 2024-03-28 2/week @ 2024-04-04 194/week @ 2024-04-11 10/week @ 2024-04-18 209/week @ 2024-04-25

419 downloads per month

MIT license

82KB
660 lines

RustSASA

GitHub Actions Workflow Status Crates.io Downloads (recent) Crates.io License

RustSASA is a Rust library for computing the absolute solvent accessible surface area (ASA/SASA) of each atom in a given protein structure using the Shrake-Rupley algorithm[1]. It can be used in Rust and Python!

Features:

  • ๐Ÿฆ€ Written in Pure Rust
  • โšก๏ธ 3X Faster than Biopython and ~120% faster than Freesasa
  • ๐Ÿงช Full test coverage

Using in Python ๐Ÿ

You can now utilize RustSasa within Python to speed up your scripts! Take a look at rust-sasa-python!

Installation:

pip install rust-sasa-python

Example:

from rust_sasa_python import calculate_sasa_at_residue_level
residue_sasa_values = calculate_sasa_at_residue_level("path_to_pdb_file.pdb") # Also supports mmCIF files!

See full docs here

Using in Rust ๐Ÿฆ€

use pdbtbx::StrictnessLevel;
use rust_sasa::{Atom, calculate_sasa, calculate_sasa_internal, SASALevel};
let (mut pdb, _errors) = pdbtbx::open(
             "./example.cif",
             StrictnessLevel::Medium
).unwrap();
let result = calculate_sasa(&pdb,None,None,SASALevel::Residue);

Full documentation can be found here

Benchmarking

Benchmarks were performed on an M2 Apple Mac with 8GB of RAM and 8 Cores with the protein AF-A0A2K5XT84-F1 (AlphaFold).

  • Biopython: ~150ms

  • Freesasa: ~90ms

  • RustSASA: ~40ms

Citations:

1: Shrake A, Rupley JA. Environment and exposure to solvent of protein atoms. Lysozyme and insulin. J Mol Biol. 1973 Sep 15;79(2):351-71. doi: 10.1016/0022-2836(73)90011-9. PMID: 4760134.

Dependencies

~8MB
~161K SLoC