pub struct SASAOptions<T> { /* private fields */ }Expand description
Options for configuring SASA (Solvent Accessible Surface Area) calculations.
This struct provides configuration options for SASA calculations at different levels
of granularity (atom, residue, chain, or protein level). The type parameter T
determines the output type and processing behavior.
§Type Parameters
T- The processing level, which must implementSASAProcessor. Available levels:AtomLevel- Returns SASA values for individual atomsResidueLevel- Returns SASA values aggregated by residueChainLevel- Returns SASA values aggregated by chainProteinLevel- Returns SASA values aggregated for the entire protein
§Fields
probe_radius- Radius of the solvent probe sphere in Angstroms (default: 1.4)n_points- Number of points on the sphere surface for sampling (default: 100)parallel- Whether to use parallel processing (default: true)
§Examples
use rust_sasa::options::{SASAOptions, ResidueLevel};
use pdbtbx::PDB;
// Create options with default settings
let options = SASAOptions::<ResidueLevel>::new();
// Customize the configuration
let custom_options = SASAOptions::<ResidueLevel>::new()
.with_probe_radius(1.2)
.with_n_points(200)
.with_parallel(true);
// Process a PDB structure
let result = custom_options.process(&pdb)?;Implementations§
Source§impl<T> SASAOptions<T>
impl<T> SASAOptions<T>
Sourcepub fn new() -> SASAOptions<T>
pub fn new() -> SASAOptions<T>
Create a new SASAOptions with the specified level type
Sourcepub fn with_probe_radius(self, radius: f32) -> Self
pub fn with_probe_radius(self, radius: f32) -> Self
Set the probe radius (default: 1.4 Angstroms)
Sourcepub fn with_n_points(self, points: usize) -> Self
pub fn with_n_points(self, points: usize) -> Self
Set the number of points on the sphere for sampling (default: 100)
Sourcepub fn with_parallel(self, parallel: bool) -> Self
pub fn with_parallel(self, parallel: bool) -> Self
Enable or disable parallel processing (default: true)
Source§impl SASAOptions<AtomLevel>
impl SASAOptions<AtomLevel>
pub fn atom_level() -> Self
Source§impl SASAOptions<ResidueLevel>
impl SASAOptions<ResidueLevel>
pub fn residue_level() -> Self
Source§impl SASAOptions<ChainLevel>
impl SASAOptions<ChainLevel>
pub fn chain_level() -> Self
Source§impl SASAOptions<ProteinLevel>
impl SASAOptions<ProteinLevel>
pub fn protein_level() -> Self
Source§impl<T: SASAProcessor> SASAOptions<T>
impl<T: SASAProcessor> SASAOptions<T>
Sourcepub fn process(&self, pdb: &PDB) -> Result<T::Output, SASACalcError>
pub fn process(&self, pdb: &PDB) -> Result<T::Output, SASACalcError>
This function calculates the SASA for a given protein. The output type is determined by the level type parameter. Probe radius and n_points can be customized, defaulting to 1.4 and 100 respectively. If you want more fine-grained control you may want to use calculate_sasa_internal instead.
§Example
use pdbtbx::StrictnessLevel;
use rust_sasa::options::{SASAOptions, ResidueLevel};
let (mut pdb, _errors) = pdbtbx::open("./pdbs/example.cif").unwrap();
let result = SASAOptions::<ResidueLevel>::new().process(&pdb);Trait Implementations§
Source§impl<T: Clone> Clone for SASAOptions<T>
impl<T: Clone> Clone for SASAOptions<T>
Source§fn clone(&self) -> SASAOptions<T>
fn clone(&self) -> SASAOptions<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Debug> Debug for SASAOptions<T>
impl<T: Debug> Debug for SASAOptions<T>
Source§impl Default for SASAOptions<ResidueLevel>
impl Default for SASAOptions<ResidueLevel>
Auto Trait Implementations§
impl<T> Freeze for SASAOptions<T>
impl<T> RefUnwindSafe for SASAOptions<T>where
T: RefUnwindSafe,
impl<T> Send for SASAOptions<T>where
T: Send,
impl<T> Sync for SASAOptions<T>where
T: Sync,
impl<T> Unpin for SASAOptions<T>where
T: Unpin,
impl<T> UnwindSafe for SASAOptions<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.