Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
maxall41 committed Apr 12, 2024
1 parent 85c889c commit 08da4ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,27 @@
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].
## Features:
- 🦀 Written in Pure Rust
- ⚡️ 3X Faster than Biopython
- ⚡️ 3X Faster than Biopython and ~120% faster than Freesasa
- 🧪 Full test coverage

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

Biopython: ~150ms

RustSasa: ~50ms
Freesasa: ~90ms

RustSasa: ~40ms

## Example Usage with `pdbtbx`:
```rust
use nalgebra::{Point3, Vector3};
use pdbtbx::StrictnessLevel;
use rust_sasa::{Atom, calculate_sasa};
use rust_sasa::{Atom, calculate_sasa, calculate_sasa_internal, SASALevel};
let (mut pdb, _errors) = pdbtbx::open(
"./example.cif",
StrictnessLevel::Medium
"./example.cif",
StrictnessLevel::Medium
).unwrap();
let mut atoms = vec![];
for atom in pdb.atoms() {
atoms.push(Atom {
position: Point3::new(atom.pos().0 as f32, atom.pos().1 as f32, atom.pos().2 as f32),
radius: atom.element().unwrap().atomic_radius().van_der_waals.unwrap() as f32,
id: atom.serial_number()
})
}
let sasa = calculate_sasa(&atoms, None, None);
let result = calculate_sasa(&pdb,None,None,SASALevel::Residue);
```

## Documentation:
Expand Down

0 comments on commit 08da4ce

Please sign in to comment.