Code Monkey home page Code Monkey logo

rustsasa's Introduction

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
  • ๐Ÿ Can be used in Python

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

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

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.

rustsasa's People

Contributors

maxall41 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.