pub struct PdbAtom {
pub serial: u32,
pub name: String,
pub res_name: String,
pub chain_id: char,
pub res_seq: u32,
pub x: f64,
pub y: f64,
pub z: f64,
pub occupancy: f64,
pub temp_factor: f64,
pub element: String,
pub is_hetatm: bool,
}Expand description
Represents a single atom record in PDB format.
Fields§
§serial: u32Atom serial number.
name: StringAtom name (e.g., “CA”, “N”).
res_name: StringResidue name (e.g., “ALA”, “GLY”).
chain_id: charChain identifier (single character, e.g., ‘A’).
res_seq: u32Residue sequence number.
x: f64X coordinate in angstroms.
y: f64Y coordinate in angstroms.
z: f64Z coordinate in angstroms.
occupancy: f64Occupancy factor.
temp_factor: f64Temperature (B) factor.
element: StringElement symbol.
is_hetatm: boolWhether this is a HETATM record (vs ATOM).
Implementations§
Source§impl PdbAtom
impl PdbAtom
Sourcepub fn new(
serial: u32,
name: String,
res_name: String,
chain_id: char,
res_seq: u32,
x: f64,
y: f64,
z: f64,
occupancy: f64,
temp_factor: f64,
element: String,
) -> Self
pub fn new( serial: u32, name: String, res_name: String, chain_id: char, res_seq: u32, x: f64, y: f64, z: f64, occupancy: f64, temp_factor: f64, element: String, ) -> Self
Create a PdbAtom from all required fields.
Sourcepub fn distance_to(&self, other: &PdbAtom) -> f64
pub fn distance_to(&self, other: &PdbAtom) -> f64
Compute distance to another atom.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PdbAtom
impl RefUnwindSafe for PdbAtom
impl Send for PdbAtom
impl Sync for PdbAtom
impl Unpin for PdbAtom
impl UnsafeUnpin for PdbAtom
impl UnwindSafe for PdbAtom
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<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.