pub struct SelBound<'a> { /* private fields */ }Expand description
Read only selection that borrows its index Implements only read-only analysis traits
Implementations§
Source§impl SelBound<'_>
impl SelBound<'_>
Sourcepub fn select(
&self,
def: impl SelectionDef,
) -> Result<SelOwnBound<'_>, SelectionError>
pub fn select( &self, def: impl SelectionDef, ) -> Result<SelOwnBound<'_>, SelectionError>
Create new owned sub-selection based on provided definition.
pub fn select_as_index( &self, def: impl SelectionDef, ) -> Result<Sel, SelectionError>
pub fn clone_index(&self) -> Sel
Trait Implementations§
Source§impl AtomPosAnalysis for SelBound<'_>
impl AtomPosAnalysis for SelBound<'_>
fn atoms_ptr(&self) -> *const Atom
fn coords_ptr(&self) -> *const Pos
Source§fn split_par<F, R>(&self, func: F) -> Result<ParSplit, SelectionError>
fn split_par<F, R>(&self, func: F) -> Result<ParSplit, SelectionError>
Creates a parallel split based on provided closure.
A closure takes a Particle and returns a distinct value for each piece.
New selection is created whenever new return value differes from the previous one.
fn split<RT, F>(&self, func: F) -> impl Iterator<Item = Sel>
fn split_resindex(&self) -> impl Iterator<Item = Sel>
Source§fn whole_attr<T>(&self, attr_fn: fn(&Atom) -> &T) -> Sel
fn whole_attr<T>(&self, attr_fn: fn(&Atom) -> &T) -> Sel
Creates an “expanded” selection that includes all atoms with the same attributes as encountered in current selection.
Provided closure takes an Atom and returns an “attribute” value (for example resid, resindex, chain).
All atoms in the parent [Topology] that have the same attribute as any atom of the current selection will be selected.
Functionally this method is equivalent to “same as” selections in VMD or Gromacs. Read more
Source§fn whole_residues(&self) -> Sel
fn whole_residues(&self) -> Sel
Selects whole residiues present in the current selection (in terms of resindex)
Source§fn whole_chains(&self) -> Sel
fn whole_chains(&self) -> Sel
Selects whole chains present in the current selection
Source§fn sasa(&self) -> SasaResults
fn sasa(&self) -> SasaResults
Computes the Solvet Accessible Surface Area (SASA).
Source§impl IndexProvider for SelBound<'_>
impl IndexProvider for SelBound<'_>
unsafe fn get_index_unchecked(&self, i: usize) -> usize
fn iter_index(&self) -> impl Iterator<Item = usize> + Clone
fn first_index(&self) -> usize
fn last_index(&self) -> usize
Source§impl NonAtomPosAnalysis for SelBound<'_>
impl NonAtomPosAnalysis for SelBound<'_>
fn top_ptr(&self) -> *const Topology
fn st_ptr(&self) -> *const State
Source§fn split_mol_iter(&self) -> impl Iterator<Item = Sel>where
Self: Sized,
fn split_mol_iter(&self) -> impl Iterator<Item = Sel>where
Self: Sized,
Splits by molecule and returns an iterator over them.
If molecule is only partially contained in self then only this part is returned (molecules are clipped).
If there are no molecules in [Topology] return an empty iterator.
Source§impl SaveTopologyState for SelBound<'_>
impl SaveTopologyState for SelBound<'_>
Source§impl Selectable for SelBound<'_>
impl Selectable for SelBound<'_>
Source§fn select(&self, def: impl SelectionDef) -> Result<Sel, SelectionError>
fn select(&self, def: impl SelectionDef) -> Result<Sel, SelectionError>
Create new unbound sub-selection based on provided definition.
impl SaveState for SelBound<'_>
impl SaveTopology for SelBound<'_>
Auto Trait Implementations§
impl<'a> Freeze for SelBound<'a>
impl<'a> RefUnwindSafe for SelBound<'a>
impl<'a> Send for SelBound<'a>
impl<'a> Sync for SelBound<'a>
impl<'a> Unpin for SelBound<'a>
impl<'a> UnwindSafe for SelBound<'a>
Blanket Implementations§
Source§impl<T> AtomIterProvider for Twhere
T: AtomPosAnalysis,
impl<T> AtomIterProvider for Twhere
T: AtomPosAnalysis,
fn iter_atoms(&self) -> impl AtomIterator<'_>
Source§impl<T> BondIterProvider for Twhere
T: NonAtomPosAnalysis,
impl<T> BondIterProvider for Twhere
T: NonAtomPosAnalysis,
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> BoxProvider for Twhere
T: NonAtomPosAnalysis,
impl<T> BoxProvider for Twhere
T: NonAtomPosAnalysis,
Source§fn get_box(&self) -> Option<&PeriodicBox>
fn get_box(&self) -> Option<&PeriodicBox>
Get reference to the periodic box or
None if there is no box.Source§fn require_box(&self) -> Result<&PeriodicBox, PeriodicBoxError>
fn require_box(&self) -> Result<&PeriodicBox, PeriodicBoxError>
Get reference to the periodic box or an error if there is no box.
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>
Converts
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>
Converts
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 moreSource§impl<T> MassIterProvider for Twhere
T: AtomIterProvider,
impl<T> MassIterProvider for Twhere
T: AtomIterProvider,
fn iter_masses(&self) -> impl Iterator<Item = f32>
Source§impl<T> MeasureMasses for Twhere
T: AtomPosAnalysis,
impl<T> MeasureMasses for Twhere
T: AtomPosAnalysis,
Source§fn center_of_mass(&self) -> Result<Pos, MeasureError>
fn center_of_mass(&self) -> Result<Pos, MeasureError>
Calculates the center of mass
Source§fn inertia(&self) -> Result<(Vector3f, Matrix3f), MeasureError>
fn inertia(&self) -> Result<(Vector3f, Matrix3f), MeasureError>
Calculates the moments and axes of inertia
Source§fn principal_transform(&self) -> Result<IsometryMatrix3<f32>, MeasureError>
fn principal_transform(&self) -> Result<IsometryMatrix3<f32>, MeasureError>
Computes transformation to principal axes of inertia
fn fit_transform(
&self,
other: &impl MeasureMasses,
) -> Result<IsometryMatrix3<f32>, MeasureError>where
Self: Sized,
Source§fn fit_transform_at_origin(
&self,
other: &impl MeasureMasses,
) -> Result<IsometryMatrix3<f32>, MeasureError>where
Self: Sized,
fn fit_transform_at_origin(
&self,
other: &impl MeasureMasses,
) -> Result<IsometryMatrix3<f32>, MeasureError>where
Self: Sized,
Like fit_transform but assumes both selections are centered at origin
Source§fn rmsd_mw(&self, other: &impl MeasureMasses) -> Result<f32, MeasureError>where
Self: Sized,
fn rmsd_mw(&self, other: &impl MeasureMasses) -> Result<f32, MeasureError>where
Self: Sized,
Calculates the mass-weighted Root Mean Square Deviation between two selections
Source§impl<T> MeasurePeriodic for Twhere
T: AtomPosAnalysis + NonAtomPosAnalysis,
impl<T> MeasurePeriodic for Twhere
T: AtomPosAnalysis + NonAtomPosAnalysis,
fn center_of_mass_pbc(&self) -> Result<Pos, MeasureError>
fn center_of_mass_pbc_dims(&self, dims: PbcDims) -> Result<Pos, MeasureError>
fn center_of_geometry_pbc(&self) -> Result<Pos, MeasureError>
fn center_of_geometry_pbc_dims( &self, dims: PbcDims, ) -> Result<Pos, MeasureError>
fn gyration_pbc(&self) -> Result<f32, MeasureError>
fn inertia_pbc(&self) -> Result<(Vector3f, Matrix3f), MeasureError>
fn principal_transform_pbc(&self) -> Result<IsometryMatrix3<f32>, MeasureError>
Source§impl<T> MeasurePos for Twhere
T: AtomPosAnalysis,
impl<T> MeasurePos for Twhere
T: AtomPosAnalysis,
Source§fn min_max(&self) -> (Pos, Pos)
fn min_max(&self) -> (Pos, Pos)
Returns the minimum and maximum coordinates across all dimensions
Source§fn center_of_geometry(&self) -> Pos
fn center_of_geometry(&self) -> Pos
Calculates the geometric center (centroid) of all positions
fn rmsd<S>(&self, other: &S) -> Result<f32, MeasureError>where
Self: Sized,
S: MeasurePos,
Source§impl<T> MeasureRandomAccess for Twhere
T: AtomPosAnalysis,
impl<T> MeasureRandomAccess for Twhere
T: AtomPosAnalysis,
Source§fn lipid_tail_order(
&self,
order_type: OrderType,
normals: &Vec<Vector3f>,
bond_orders: &Vec<u8>,
) -> Result<DVector<f32>, LipidOrderError>
fn lipid_tail_order( &self, order_type: OrderType, normals: &Vec<Vector3f>, bond_orders: &Vec<u8>, ) -> Result<DVector<f32>, LipidOrderError>
Computes order parameter of the lipid tail. Each position in Self is
supposed to represent a carbon atom of a single lipid tail. The size of the array
of normals is either
1 or N-2, where N is the number of position in Self.
In the first case the same normal is used for all bonds, in the second case each
bond in the range 1..N-1 has its own normal.
bonds_orders should contain either 1 or 2 for all N-1 bonds.
Formulas are taken from: Read moreSource§impl<T> MoleculeIterProvider for Twhere
T: NonAtomPosAnalysis,
impl<T> MoleculeIterProvider for Twhere
T: NonAtomPosAnalysis,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PosIterProvider for Twhere
T: AtomPosAnalysis,
impl<T> PosIterProvider for Twhere
T: AtomPosAnalysis,
fn iter_pos(&self) -> impl PosIterator<'_>
Source§impl<T> RandomAtomProvider for Twhere
T: AtomPosAnalysis,
impl<T> RandomAtomProvider for Twhere
T: AtomPosAnalysis,
Source§impl<T> RandomBondProvider for Twhere
T: NonAtomPosAnalysis,
impl<T> RandomBondProvider for Twhere
T: NonAtomPosAnalysis,
Source§impl<T> RandomMoleculeProvider for Twhere
T: NonAtomPosAnalysis,
impl<T> RandomMoleculeProvider for Twhere
T: NonAtomPosAnalysis,
Source§impl<T> RandomParticleProvider for Twhere
T: AtomPosAnalysis,
impl<T> RandomParticleProvider for Twhere
T: AtomPosAnalysis,
unsafe fn get_particle_unchecked(&self, i: usize) -> Particle<'_>
fn first_particle(&self) -> Particle<'_>
fn last_particle(&self) -> Particle<'_>
fn get_particle(&self, i: usize) -> Option<Particle<'_>>
Source§impl<T> RandomPosProvider for Twhere
T: AtomPosAnalysis,
impl<T> RandomPosProvider for Twhere
T: AtomPosAnalysis,
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.