pub struct BioMetadata {
pub atom_info: Vec<AtomResidueInfo>,
pub target_ph: Option<f64>,
}Expand description
Collection of biological metadata for all atoms in a system.
Stores per-atom biological annotations in a vector that parallels
the atom indices in a System. Each entry provides
PDB/mmCIF-style information about the atom’s residue context.
§Examples
use dreid_forge::{AtomResidueInfo, BioMetadata, ResidueCategory, ResiduePosition};
let mut metadata = BioMetadata::with_capacity(100);
let info = AtomResidueInfo::builder("N", "ALA", 1, "A")
.category(ResidueCategory::Standard)
.position(ResiduePosition::NTerminal)
.build();
metadata.atom_info.push(info);
assert_eq!(metadata.atom_info.len(), 1);
// Set target pH for charge assignment
metadata.target_ph = Some(7.0);Fields§
§atom_info: Vec<AtomResidueInfo>Per-atom biological annotations, indexed by atom order.
target_ph: Option<f64>Target pH for protonation state determination.
Implementations§
Source§impl BioMetadata
impl BioMetadata
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an empty BioMetadata container.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a BioMetadata with pre-allocated capacity.
§Arguments
capacity— Number of atoms to pre-allocate space for
Sourcepub fn effective_ph(&self) -> f64
pub fn effective_ph(&self) -> f64
Returns the target pH, defaulting to physiological pH (7.4) if not set.
Trait Implementations§
Source§impl Clone for BioMetadata
impl Clone for BioMetadata
Source§fn clone(&self) -> BioMetadata
fn clone(&self) -> BioMetadata
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 BioMetadata
impl Debug for BioMetadata
Source§impl Default for BioMetadata
impl Default for BioMetadata
Source§fn default() -> BioMetadata
fn default() -> BioMetadata
Returns the “default value” for a type. Read more
Source§impl PartialEq for BioMetadata
impl PartialEq for BioMetadata
impl Eq for BioMetadata
Auto Trait Implementations§
impl Freeze for BioMetadata
impl RefUnwindSafe for BioMetadata
impl Send for BioMetadata
impl Sync for BioMetadata
impl Unpin for BioMetadata
impl UnwindSafe for BioMetadata
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> Pointable for T
impl<T> Pointable for T
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.