pub struct ContactMap {
pub chain_id: char,
pub size: usize,
pub distances: Vec<f64>,
}Expand description
A symmetric distance matrix for residue-residue contacts.
Fields§
§chain_id: charChain identifier.
size: usizeNumber of residues (matrix is size × size).
distances: Vec<f64>Row-major n×n distance matrix.
Implementations§
Source§impl ContactMap
impl ContactMap
Sourcepub fn count_contacts(&self, cutoff: f64) -> usize
pub fn count_contacts(&self, cutoff: f64) -> usize
Count residue pairs with distance below the cutoff (excluding diagonal).
Sourcepub fn contacts_below(&self, cutoff: f64) -> Vec<(usize, usize)>
pub fn contacts_below(&self, cutoff: f64) -> Vec<(usize, usize)>
Return (i, j) pairs of residues in contact below the cutoff.
Sourcepub fn contact_density(&self, cutoff: f64) -> f64
pub fn contact_density(&self, cutoff: f64) -> f64
Contact density: fraction of possible pairs below the cutoff.
Trait Implementations§
Source§impl Clone for ContactMap
impl Clone for ContactMap
Source§fn clone(&self) -> ContactMap
fn clone(&self) -> ContactMap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContactMap
impl Debug for ContactMap
Source§impl Summarizable for ContactMap
impl Summarizable for ContactMap
Auto Trait Implementations§
impl Freeze for ContactMap
impl RefUnwindSafe for ContactMap
impl Send for ContactMap
impl Sync for ContactMap
impl Unpin for ContactMap
impl UnsafeUnpin for ContactMap
impl UnwindSafe for ContactMap
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
Mutably borrows from an owned value. Read more