[−][src]Struct xdrfile::Frame
A frame represents a single step in a trajectory.
Fields
step: usize
Trajectory step
time: f32
Time step (usually in picoseconds)
box_vector: [[f32; 3]; 3]
3x3 box vector
coords: Vec<[f32; 3]>
3D coordinates for N atoms where N is num_atoms
Implementations
impl Frame
[src]
pub fn new() -> Frame
[src]
Creates an empty frame with a capacity of 0
pub fn with_len(num_atoms: usize) -> Frame
[src]
Creates a frame with the given capacity
pub fn filter_coords(self: &mut Frame, indeces: &[usize])
[src]
Filters the frame by removing all atoms not matching the given indeces.
pub fn len(self: &Frame) -> usize
[src]
Length of the frame (number of atoms)
pub fn num_atoms(self: &Frame) -> usize
[src]
The number of atoms in the frame
pub fn resize(&mut self, num_atoms: usize)
[src]
Resize the frame to have exactly num_atoms
atoms, filling coords with zeros if necessary
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,