pub struct CrystalRecord {
pub a: f32,
pub b: f32,
pub c: f32,
pub alpha: f32,
pub beta: f32,
pub gamma: f32,
pub space_group: String,
pub z: u32,
}
Expand description
Represents a CRYST1 record containing crystallographic unit cell parameters.
This record specifies the unit cell parameters and space group for the crystal structure. It is essential for understanding the crystallographic context of the atomic coordinates.
§Fields
a
,b
,c
: Unit cell dimensions in Ångströmsalpha
,beta
,gamma
: Unit cell angles in degreesspace_group
: Space group symbolz
: Number of polymeric chains in the unit cell
§Example
use knuckles_parse::records::crystal::CrystalRecord;
let line = "CRYST1 52.000 58.600 61.900 90.00 90.00 90.00 P 21 21 21 8";
let crystal = CrystalRecord::from(line);
assert_eq!(crystal.a, 52.0);
assert_eq!(crystal.space_group, "P 21 21 21");
Fields§
§a: f32
Unit cell dimension a in Ångströms
b: f32
Unit cell dimension b in Ångströms
c: f32
Unit cell dimension c in Ångströms
alpha: f32
Unit cell angle alpha in degrees
beta: f32
Unit cell angle beta in degrees
gamma: f32
Unit cell angle gamma in degrees
space_group: String
Space group symbol
z: u32
Number of polymeric chains in the unit cell
Implementations§
Source§impl CrystalRecord
impl CrystalRecord
Sourcepub fn new(str: &str) -> CrystalRecord
pub fn new(str: &str) -> CrystalRecord
Trait Implementations§
Source§impl Clone for CrystalRecord
impl Clone for CrystalRecord
Source§fn clone(&self) -> CrystalRecord
fn clone(&self) -> CrystalRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CrystalRecord
impl Debug for CrystalRecord
Auto Trait Implementations§
impl Freeze for CrystalRecord
impl RefUnwindSafe for CrystalRecord
impl Send for CrystalRecord
impl Sync for CrystalRecord
impl Unpin for CrystalRecord
impl UnwindSafe for CrystalRecord
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
Mutably borrows from an owned value. Read more
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 more