pub struct ConnectRecord {
pub serial: u32,
pub connected: [Option<u32>; 4],
}
Expand description
Represents a CONECT record specifying connectivity between atoms.
CONECT records specify the bonds between atoms that are not implied by the chemical structure. These are particularly important for hetero-compounds, metal coordination, and disulfide bonds.
§Fields
serial
: Serial number of the first atom in the connectivityconnected
: Array of up to 4 connected atom serial numbers
§Example
use knuckles_parse::records::connect::ConnectRecord;
let line = "CONECT 413 412 414 ";
let connect = ConnectRecord::from(line);
assert_eq!(connect.serial, 413);
assert_eq!(connect.connected[0], Some(412));
assert_eq!(connect.connected[1], Some(414));
Fields§
§serial: u32
Serial number of the atom for which connectivity is being specified
connected: [Option<u32>; 4]
Array of up to 4 connected atom serial numbers
Implementations§
Source§impl ConnectRecord
impl ConnectRecord
Sourcepub fn new(str: &str) -> ConnectRecord
pub fn new(str: &str) -> ConnectRecord
Trait Implementations§
Source§impl Clone for ConnectRecord
impl Clone for ConnectRecord
Source§fn clone(&self) -> ConnectRecord
fn clone(&self) -> ConnectRecord
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 ConnectRecord
impl Debug for ConnectRecord
Auto Trait Implementations§
impl Freeze for ConnectRecord
impl RefUnwindSafe for ConnectRecord
impl Send for ConnectRecord
impl Sync for ConnectRecord
impl Unpin for ConnectRecord
impl UnwindSafe for ConnectRecord
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