pub struct Air(/* private fields */);Expand description
Represents the Air (Ambiguous Interaction Restraints) structure.
This struct holds a collection of interactors and provides methods to find interaction partners and generate tables.
Implementations§
Source§impl Air
impl Air
Sourcepub fn new(interactors: Vec<Interactor>) -> Self
pub fn new(interactors: Vec<Interactor>) -> Self
Sourcepub fn find_partners(&self, interactor: &Interactor) -> Vec<&Interactor>
pub fn find_partners(&self, interactor: &Interactor) -> Vec<&Interactor>
Sourcepub fn gen_tbl(&self) -> Result<String, &str>
pub fn gen_tbl(&self) -> Result<String, &str>
Generates a table representation of the AIR data.
This method validates all interactors and creates a string representation of the AIR data, including interaction blocks for each valid interactor with partners.
§Returns
Ok(String)- A string containing the generated table.Err(&str)- An error message if any interactor is invalid.
pub fn gen_pml(&self, output_f: &str, structure: Option<&str>)
Auto Trait Implementations§
impl Freeze for Air
impl RefUnwindSafe for Air
impl Send for Air
impl Sync for Air
impl Unpin for Air
impl UnsafeUnpin for Air
impl UnwindSafe for Air
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> 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.