pub struct ResidueTable { /* private fields */ }Expand description
The residues of a structure.
Implementations§
Source§impl ResidueTable
impl ResidueTable
Sourcepub fn push(
&mut self,
record: ResidueRecord,
atoms: Range<u32>,
) -> Result<ResidueIndex, TableError>
pub fn push( &mut self, record: ResidueRecord, atoms: Range<u32>, ) -> Result<ResidueIndex, TableError>
Appends a residue covering a range of atoms.
§Errors
Returns TableError for a reversed range or exhausted index space.
Sourcepub fn set_atoms(
&mut self,
residue: ResidueIndex,
atoms: Range<u32>,
) -> Result<(), TableError>
pub fn set_atoms( &mut self, residue: ResidueIndex, atoms: Range<u32>, ) -> Result<(), TableError>
Replaces the atoms a residue covers.
A reader that discovers a residue’s extent only after reading its last atom needs this; nothing else should reach for it, because moving a residue’s atoms without moving its neighbours’ breaks the tiling.
§Errors
Returns TableError for a reversed range or absent residue index.
Sourcepub fn atoms(&self, residue: ResidueIndex) -> Option<Range<u32>>
pub fn atoms(&self, residue: ResidueIndex) -> Option<Range<u32>>
The atoms this residue contains.
Sourcepub fn label_comp_id(&self, residue: ResidueIndex) -> Option<SymbolId>
pub fn label_comp_id(&self, residue: ResidueIndex) -> Option<SymbolId>
The normalised component code.
Sourcepub fn auth_comp_id(&self, residue: ResidueIndex) -> Option<SymbolId>
pub fn auth_comp_id(&self, residue: ResidueIndex) -> Option<SymbolId>
The depositor’s component code, if the file carried one.
Sourcepub fn label_seq_id(&self, residue: ResidueIndex) -> Option<i32>
pub fn label_seq_id(&self, residue: ResidueIndex) -> Option<i32>
The sequence position within the entity, absent for a non-polymer.
Sourcepub fn set_label_seq_id(
&mut self,
residue: ResidueIndex,
seq: i32,
) -> Result<(), TableError>
pub fn set_label_seq_id( &mut self, residue: ResidueIndex, seq: i32, ) -> Result<(), TableError>
Replaces the sequence position of one residue.
§Errors
Returns TableError when the residue does not exist.
Sourcepub fn auth_seq_id(&self, residue: ResidueIndex) -> Option<i32>
pub fn auth_seq_id(&self, residue: ResidueIndex) -> Option<i32>
The depositor’s residue number.
Sourcepub fn ins_code(&self, residue: ResidueIndex) -> Option<SymbolId>
pub fn ins_code(&self, residue: ResidueIndex) -> Option<SymbolId>
The insertion code.
Part of identity: 163, 163A and 163B are three residues, and an
antibody numbering scheme depends on that entirely.
Sourcepub fn is_het(&self, residue: ResidueIndex) -> bool
pub fn is_het(&self, residue: ResidueIndex) -> bool
Whether the file recorded this residue as a heterogen.
Sourcepub fn containing(&self, atom: u32) -> Option<ResidueIndex>
pub fn containing(&self, atom: u32) -> Option<ResidueIndex>
The residue containing atom, found by searching the offsets.
The offsets ascend, so this is a binary search. Chunks carry a denser mapping for the case where this question is asked per atom.
Trait Implementations§
Source§impl Clone for ResidueTable
impl Clone for ResidueTable
Source§impl Debug for ResidueTable
impl Debug for ResidueTable
Auto Trait Implementations§
impl Freeze for ResidueTable
impl RefUnwindSafe for ResidueTable
impl Send for ResidueTable
impl Sync for ResidueTable
impl Unpin for ResidueTable
impl UnsafeUnpin for ResidueTable
impl UnwindSafe for ResidueTable
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 more