SelBound

Struct SelBound 

Source
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<'_>

Source

pub fn select( &self, def: impl SelectionDef, ) -> Result<SelOwnBound<'_>, SelectionError>

Create new owned sub-selection based on provided definition.

Source

pub fn select_as_index( &self, def: impl SelectionDef, ) -> Result<Sel, SelectionError>

Source

pub fn clone_index(&self) -> Sel

Trait Implementations§

Source§

impl AtomPosAnalysis for SelBound<'_>

Source§

fn atoms_ptr(&self) -> *const Atom

Source§

fn coords_ptr(&self) -> *const Pos

Source§

fn split_par<F, R>(&self, func: F) -> Result<ParSplit, SelectionError>
where F: Fn(Particle<'_>) -> Option<R>, R: Default + PartialOrd, Self: Sized,

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.
Source§

fn split<RT, F>(&self, func: F) -> impl Iterator<Item = Sel>
where RT: Default + PartialEq, F: Fn(Particle<'_>) -> Option<RT>,

Source§

fn split_resindex(&self) -> impl Iterator<Item = Sel>

Source§

fn whole_attr<T>(&self, attr_fn: fn(&Atom) -> &T) -> Sel
where T: Eq + Hash + Copy,

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

Selects whole residiues present in the current selection (in terms of resindex)
Source§

fn whole_chains(&self) -> Sel

Selects whole chains present in the current selection
Source§

fn sasa(&self) -> SasaResults

Computes the Solvet Accessible Surface Area (SASA).
Source§

impl<'a> Clone for SelBound<'a>

Source§

fn clone(&self) -> SelBound<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for SelBound<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl IndexProvider for SelBound<'_>

Source§

unsafe fn get_index_unchecked(&self, i: usize) -> usize

Source§

fn iter_index(&self) -> impl Iterator<Item = usize> + Clone

Source§

fn first_index(&self) -> usize

Source§

fn last_index(&self) -> usize

Source§

fn as_gromacs_ndx_str(&self, name: impl AsRef<str>) -> String

Creates a string in Gromacs index format representing self.
Source§

impl LenProvider for SelBound<'_>

Source§

fn len(&self) -> usize

Source§

impl NonAtomPosAnalysis for SelBound<'_>

Source§

fn top_ptr(&self) -> *const Topology

Source§

fn st_ptr(&self) -> *const State

Source§

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<'_>

Source§

fn save(&self, fname: &str) -> Result<(), FileIoError>
where Self: Sized,

Source§

impl Selectable for SelBound<'_>

Source§

fn select(&self, def: impl SelectionDef) -> Result<Sel, SelectionError>

Create new unbound sub-selection based on provided definition.

Source§

impl SaveState for SelBound<'_>

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AtomIterProvider for T
where T: AtomPosAnalysis,

Source§

fn iter_atoms(&self) -> impl AtomIterator<'_>

Source§

impl<T> BondIterProvider for T

Source§

fn iter_bonds(&self) -> impl Iterator<Item = &[usize; 2]>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> BoxProvider for T

Source§

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>

Get reference to the periodic box or an error if there is no box.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> MassIterProvider for T

Source§

fn iter_masses(&self) -> impl Iterator<Item = f32>

Source§

impl<T> MeasureMasses for T
where T: AtomPosAnalysis,

Source§

fn center_of_mass(&self) -> Result<Pos, MeasureError>

Calculates the center of mass
Source§

fn gyration(&self) -> Result<f32, MeasureError>

Calculates the radius of gyration
Source§

fn inertia(&self) -> Result<(Vector3f, Matrix3f), MeasureError>

Calculates the moments and axes of inertia
Source§

fn principal_transform(&self) -> Result<IsometryMatrix3<f32>, MeasureError>

Computes transformation to principal axes of inertia
Source§

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,

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,

Calculates the mass-weighted Root Mean Square Deviation between two selections
Source§

impl<T> MeasurePeriodic for T

Source§

impl<T> MeasurePos for T
where T: AtomPosAnalysis,

Source§

fn min_max(&self) -> (Pos, Pos)

Returns the minimum and maximum coordinates across all dimensions
Source§

fn center_of_geometry(&self) -> Pos

Calculates the geometric center (centroid) of all positions
Source§

fn rmsd<S>(&self, other: &S) -> Result<f32, MeasureError>
where Self: Sized, S: MeasurePos,

Source§

impl<T> MeasureRandomAccess for T
where T: AtomPosAnalysis,

Source§

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 more
Source§

impl<T> MoleculeIterProvider for T

Source§

fn iter_molecules(&self) -> impl Iterator<Item = &[usize; 2]>

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PosIterProvider for T
where T: AtomPosAnalysis,

Source§

fn iter_pos(&self) -> impl PosIterator<'_>

Source§

impl<T> RandomAtomProvider for T
where T: AtomPosAnalysis,

Source§

unsafe fn get_atom_unchecked(&self, i: usize) -> &Atom

Source§

fn get_atom(&self, i: usize) -> Option<&Atom>

Source§

fn first_atom(&self) -> &Atom

Source§

fn last_atom(&self) -> &Atom

Source§

impl<T> RandomBondProvider for T

Source§

fn num_bonds(&self) -> usize

Source§

unsafe fn get_bond_unchecked(&self, i: usize) -> &[usize; 2]

Source§

fn get_bond(&self, i: usize) -> Option<&[usize; 2]>

Source§

impl<T> RandomMoleculeProvider for T

Source§

fn num_molecules(&self) -> usize

Source§

unsafe fn get_molecule_unchecked(&self, i: usize) -> &[usize; 2]

Source§

fn get_molecule(&self, i: usize) -> Option<&[usize; 2]>

Source§

impl<T> RandomParticleProvider for T
where T: AtomPosAnalysis,

Source§

impl<T> RandomPosProvider for T
where T: AtomPosAnalysis,

Source§

unsafe fn get_pos_unchecked(&self, i: usize) -> &OPoint<f32, Const<3>>

Source§

fn get_pos(&self, i: usize) -> Option<&Pos>

Source§

fn first_pos(&self) -> &Pos

Source§

fn last_pos(&self) -> &Pos

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> TimeProvider for T

Source§

fn get_time(&self) -> f32

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V