pub struct System { /* private fields */ }Implementations§
Source§impl System
impl System
Sourcepub fn temperature(self, t: f64) -> Self
pub fn temperature(self, t: f64) -> Self
Set the temperature in Kelvin.
Sourcepub fn monomer(self, name: &str, total_concentration: f64) -> Self
pub fn monomer(self, name: &str, total_concentration: f64) -> Self
Add a monomer species with a given total concentration (molar).
Sourcepub fn complex(
self,
name: &str,
composition: &[(&str, usize)],
delta_g: f64,
) -> Self
pub fn complex( self, name: &str, composition: &[(&str, usize)], delta_g: f64, ) -> Self
Add a complex with the given composition and standard free energy of formation.
§Arguments
name— unique identifier for this complex (must not collide with monomer names)composition— slice of(monomer_name, count)pairs specifying how many of each monomer strand appear in the complexdelta_g— ΔG° in kcal/mol at a 1 M standard state. This is the standard free energy of complex formation from its constituent monomers. Values from NUPACK or other tools that use a water-molarity standard state need a correction of+(n-1)·RT·ln(c_water)wherenis the number of strands.
Sourcepub fn get_temperature(&self) -> f64
pub fn get_temperature(&self) -> f64
Current temperature in Kelvin.
Sourcepub fn monomer_count(&self) -> usize
pub fn monomer_count(&self) -> usize
Number of monomers added so far.
Sourcepub fn complex_count(&self) -> usize
pub fn complex_count(&self) -> usize
Number of complexes added so far.
Sourcepub fn equilibrium(&self) -> Result<Equilibrium, EquilibriumError>
pub fn equilibrium(&self) -> Result<Equilibrium, EquilibriumError>
Solve for equilibrium concentrations.
Validates all inputs and returns an error if any are invalid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for System
impl RefUnwindSafe for System
impl Send for System
impl Sync for System
impl Unpin for System
impl UnsafeUnpin for System
impl UnwindSafe for System
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<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.