[−][src]Struct pdbtbx::MtriX
A transformation expressing non-crystallographic symmetry, used when transformations are required to generate the whole asymmetric subunit
Fields
serial_number: usize
The serial number of this transformation
contained: bool
If the coordinates of the molecule are contained in the entry this is true
Implementations
impl MtriX
[src]
pub fn new() -> Self
[src]
Create an empty transformation (identity), not contained, and with a serial number of 0.
pub fn serial_number(&self) -> usize
[src]
The serial number of this transformation
pub fn set_serial_number(&mut self, new_value: usize)
[src]
Set the serial number of this transformation
pub fn contained(&self) -> bool
[src]
The 'contained' status, see wwPDB 3.30 MTRIXn p. 184. If the coordinates of the molecule are contained in the entry this is true.
pub fn set_contained(&mut self, new_value: bool)
[src]
Set the contained status
pub fn transformation(&self) -> &TransformationMatrix
[src]
The transformation
pub fn set_transformation(&mut self, transformation: TransformationMatrix)
[src]
Set the transformation
pub fn set_row(&mut self, row: usize, data: [f64; 4])
[src]
Set a row to the given data, this invalidates all other rows if the MtriX was valid before otherwise it validates the row given. To have a valid MtriX all rows have to be set.
Arguments
row
- 0-based row to fill the data intodata
- the row of data
Example
use pdbtbx::TransformationMatrix; use pdbtbx::MtriX; let mut example = MtriX::new(); example.set_row(1, [0.0, 1.0, 0.0, 0.0]); example.set_row(2, [0.0, 0.0, 1.0, 0.0]); example.set_row(0, [1.0, 0.0, 0.0, 0.0]); // The order does not matter assert_eq!(example.transformation(), &TransformationMatrix::identity()); assert!(example.valid());
pub fn valid(&self) -> bool
[src]
Checks if this MtriX is valid, for this all rows have to be set (also see set_row
).
Mainly used to validate a structure after parsing.
Trait Implementations
impl Clone for MtriX
[src]
impl Debug for MtriX
[src]
impl Default for MtriX
[src]
impl PartialEq<MtriX> for MtriX
[src]
Auto Trait Implementations
impl RefUnwindSafe for MtriX
[src]
impl Send for MtriX
[src]
impl Sync for MtriX
[src]
impl Unpin for MtriX
[src]
impl UnwindSafe for MtriX
[src]
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>,