pub struct Atom {
pub name: AtomStr,
pub resname: AtomStr,
pub resid: i32,
pub resindex: usize,
pub atomic_number: u8,
pub mass: f32,
pub charge: f32,
pub type_name: AtomStr,
pub type_id: u32,
pub chain: char,
pub bfactor: f32,
pub occupancy: f32,
}Expand description
Information about the atom except its coordinates.
Fields§
§name: AtomStrAtom name.
resname: AtomStrResidue name.
resid: i32Residue id (aka residue number). This could be negative!
resindex: usizeResidue index. Assigned when reading the topology. Unique for each contigous span of resid. Starts from zero.
atomic_number: u8Atomic number in the periodic table.
mass: f32Mass in atomic units
charge: f32Charge in electroc charges.
type_name: AtomStrName of the atom type.
type_id: u32Unique id of the atom type.
chain: char§bfactor: f32§occupancy: f32PDB occupancy.
Implementations§
Source§impl Atom
impl Atom
pub fn new() -> Self
pub fn guess_element_from_name(&mut self)
pub fn guess_element_and_mass_from_name(&mut self)
Trait Implementations§
Source§impl AtomLike for Atom
impl AtomLike for Atom
fn set_name(&mut self, name: &str)
Source§fn get_resname(&self) -> &str
fn get_resname(&self) -> &str
Residue name.
fn set_resname(&mut self, resname: &str)
fn set_resid(&mut self, resid: isize)
Source§fn get_resindex(&self) -> usize
fn get_resindex(&self) -> usize
Residue index. Assigned when reading the topology.
Unique for each contiguous span of resid. Starts from zero.
fn set_resindex(&mut self, resindex: usize)
Source§fn get_atomic_number(&self) -> u8
fn get_atomic_number(&self) -> u8
Atomic number in the periodic table.
fn set_atomic_number(&mut self, atomic_number: u8)
fn set_mass(&mut self, mass: f32)
Source§fn get_charge(&self) -> f32
fn get_charge(&self) -> f32
Charge in electric charges.
fn set_charge(&mut self, charge: f32)
Source§fn get_type_name(&self) -> &str
fn get_type_name(&self) -> &str
Name of the atom type.
fn set_type_name(&mut self, type_name: &str)
Source§fn get_type_id(&self) -> u32
fn get_type_id(&self) -> u32
Unique id of the atom type.
fn set_type_id(&mut self, type_id: u32)
fn set_chain(&mut self, chain: char)
Source§fn get_bfactor(&self) -> f32
fn get_bfactor(&self) -> f32
PDB B-factor.
fn set_bfactor(&mut self, bfactor: f32)
Source§fn get_occupancy(&self) -> f32
fn get_occupancy(&self) -> f32
PDB occupancy.
fn set_occupancy(&mut self, occupancy: f32)
Auto Trait Implementations§
impl Freeze for Atom
impl RefUnwindSafe for Atom
impl Send for Atom
impl Sync for Atom
impl Unpin for Atom
impl UnsafeUnpin for Atom
impl UnwindSafe for Atom
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
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>
Converts
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>
Converts
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.