pub struct Residue {
pub name: String,
pub seq_num: i32,
pub i_code: Option<char>,
pub atoms: Vec<Atom>,
}Expand description
A residue (amino acid or nucleotide) in a chain.
Fields§
§name: StringThree-letter residue name (e.g. “ALA”, “GLY”).
seq_num: i32Sequence number from the PDB file.
i_code: Option<char>Insertion code.
atoms: Vec<Atom>Atoms belonging to this residue.
Implementations§
Source§impl Residue
impl Residue
Sourcepub fn get_atom(&self, name: &str) -> Option<&Atom>
pub fn get_atom(&self, name: &str) -> Option<&Atom>
Get an atom by name, returning the first match.
Sourcepub fn get_alpha_carbon(&self) -> Option<&Atom>
pub fn get_alpha_carbon(&self) -> Option<&Atom>
Get the alpha carbon atom.
Sourcepub fn backbone_atoms(&self) -> Vec<&Atom>
pub fn backbone_atoms(&self) -> Vec<&Atom>
Return all backbone atoms (N, CA, C, O).
Sourcepub fn center_of_mass(&self) -> Point3D
pub fn center_of_mass(&self) -> Point3D
Geometric center of mass (unweighted) of all atoms.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Residue
impl RefUnwindSafe for Residue
impl Send for Residue
impl Sync for Residue
impl Unpin for Residue
impl UnsafeUnpin for Residue
impl UnwindSafe for Residue
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