Skip to content

Commit

Permalink
Change formating and add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
maxall41 committed Sep 14, 2024
1 parent bf47e1e commit ce86b3a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,21 @@ pub enum SASALevel {

#[derive(Debug, PartialEq)]
pub struct ChainResult {
/// Chain name
pub name: String,
/// Chain SASA value
pub value: f32,
}

#[derive(Debug, PartialEq)]
pub struct ResidueResult {
/// Residue serial number
pub serial_number: isize,
/// SASA value for residue
pub value: f32,
//// The name of the residue. Format: {Chain ID}_{Name}_{Serial Number}
pub name: String,
/// Wether the residue is polar
pub is_polar: bool,
}

Expand Down Expand Up @@ -353,7 +359,7 @@ pub fn calculate_sasa(
serial_number: residue.serial_number(),
value: sum,
is_polar: POLAR_AMINO_ACIDS.contains(&name),
name: format!("{}-{}-{}", chain.id(), name, residue.serial_number()),
name: format!("{}_{}_{}", chain.id(), name, residue.serial_number()),
})
}
}
Expand Down

0 comments on commit ce86b3a

Please sign in to comment.