pub enum CoordinateStore {
Single(CoordinateBlock),
Dense {
frames: Vec<CoordinateBlock>,
},
Ragged {
models: Vec<Structure>,
},
}Expand description
Where the positions of each model live.
Variants§
Single(CoordinateBlock)
One model.
Dense
Several models over identical topology, so only positions differ.
This covers ensembles and trajectory frames, where annotations are shared and repeating them per frame would multiply the memory by the frame count.
Fields
frames: Vec<CoordinateBlock>One block per model, each with the same atom count.
Ragged
Models whose atom content genuinely differs.
Padding these into one rectangular block would fabricate atoms that were never modelled and destroy the difference between absent and unrecorded, so they are held as separate structures instead.
Implementations§
Source§impl CoordinateStore
impl CoordinateStore
Sourcepub fn model_count(&self) -> usize
pub fn model_count(&self) -> usize
The number of models.
Sourcepub fn block(&self, model: ModelIndex) -> Option<&CoordinateBlock>
pub fn block(&self, model: ModelIndex) -> Option<&CoordinateBlock>
The positions of one model, where they are held directly.
A ragged ensemble answers None: its models are structures in their own
right and are reached through CoordinateStore::Ragged.
Sourcepub fn ragged_models(&self) -> Option<&[Structure]>
pub fn ragged_models(&self) -> Option<&[Structure]>
The independent structures of a ragged ensemble.
Trait Implementations§
Source§impl Clone for CoordinateStore
impl Clone for CoordinateStore
Auto Trait Implementations§
impl Freeze for CoordinateStore
impl RefUnwindSafe for CoordinateStore
impl Send for CoordinateStore
impl Sync for CoordinateStore
impl Unpin for CoordinateStore
impl UnsafeUnpin for CoordinateStore
impl UnwindSafe for CoordinateStore
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
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> ⓘ
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> ⓘ
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 more