pub struct MdcrdReader<R: BufRead> {
pub natom: usize,
pub has_box: bool,
/* private fields */
}Expand description
Reader for AMBER ASCII trajectory files (mdcrd).
Format:
title
x1 y1 z1 x2 ... (10 values per line, 8.3 format)
[box a b c] (optional, if IFBOX > 0)Fields§
§natom: usizeNumber of atoms in each frame.
has_box: boolWhether each frame includes a periodic box record.
Implementations§
Source§impl<R: BufRead> MdcrdReader<R>
impl<R: BufRead> MdcrdReader<R>
Sourcepub fn new(reader: R, natom: usize, has_box: bool) -> Self
pub fn new(reader: R, natom: usize, has_box: bool) -> Self
Create a new MdcrdReader.
natom– number of atoms per framehas_box– set totrueif the trajectory includes box records
Sourcepub fn read_frame(&mut self) -> Result<Option<MdcrdFrame>, AmberIoError>
pub fn read_frame(&mut self) -> Result<Option<MdcrdFrame>, AmberIoError>
Read the next frame and return coordinates (and optionally box).
Returns Ok(None) at end of file.
Auto Trait Implementations§
impl<R> Freeze for MdcrdReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for MdcrdReader<R>where
R: RefUnwindSafe,
impl<R> Send for MdcrdReader<R>where
R: Send,
impl<R> Sync for MdcrdReader<R>where
R: Sync,
impl<R> Unpin for MdcrdReader<R>where
R: Unpin,
impl<R> UnsafeUnpin for MdcrdReader<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for MdcrdReader<R>where
R: UnwindSafe,
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<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.