pub struct SimpleXtcWriter {
pub frames: Vec<XtcFrame>,
}Expand description
In-memory XTC-like writer.
Fields§
§frames: Vec<XtcFrame>All frames accumulated so far.
Implementations§
Source§impl SimpleXtcWriter
impl SimpleXtcWriter
Sourcepub fn add_frame(&mut self, step: i32, time: f32, positions: Vec<[f32; 3]>)
pub fn add_frame(&mut self, step: i32, time: f32, positions: Vec<[f32; 3]>)
Append a frame. The box matrix is set to an identity-like 3 nm cube.
Sourcepub fn add_frame_with_box(
&mut self,
step: i32,
time: f32,
positions: Vec<[f32; 3]>,
box_matrix: [[f32; 3]; 3],
)
pub fn add_frame_with_box( &mut self, step: i32, time: f32, positions: Vec<[f32; 3]>, box_matrix: [[f32; 3]; 3], )
Append a frame with a custom box matrix.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Number of frames currently stored.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimpleXtcWriter
impl RefUnwindSafe for SimpleXtcWriter
impl Send for SimpleXtcWriter
impl Sync for SimpleXtcWriter
impl Unpin for SimpleXtcWriter
impl UnsafeUnpin for SimpleXtcWriter
impl UnwindSafe for SimpleXtcWriter
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.