pub struct KineticsCalculator { /* private fields */ }Expand description
Kinetics calculator
Implementations§
Source§impl KineticsCalculator
impl KineticsCalculator
pub fn new() -> Self
Sourcepub fn add_rate_law(&mut self, law: RateLaw)
pub fn add_rate_law(&mut self, law: RateLaw)
Register a rate law under its law_id, replacing any existing entry.
Sourcepub fn get_rate_law(&self, law_id: &str) -> Option<&RateLaw>
pub fn get_rate_law(&self, law_id: &str) -> Option<&RateLaw>
Look up a rate law by id.
Sourcepub fn list_rate_laws(&self) -> Vec<String>
pub fn list_rate_laws(&self) -> Vec<String>
List the ids of all registered rate laws.
Sourcepub fn add_rate_constant(&mut self, constant: RateConstant)
pub fn add_rate_constant(&mut self, constant: RateConstant)
Register a rate constant under its constant_id, replacing any existing entry.
Sourcepub fn get_rate_constant(&self, constant_id: &str) -> Option<&RateConstant>
pub fn get_rate_constant(&self, constant_id: &str) -> Option<&RateConstant>
Look up a rate constant by id.
Sourcepub fn list_rate_constants(&self) -> Vec<String>
pub fn list_rate_constants(&self) -> Vec<String>
List the ids of all registered rate constants.
Sourcepub fn set_reaction_rate(&mut self, reaction_id: &str, rate: f64)
pub fn set_reaction_rate(&mut self, reaction_id: &str, rate: f64)
Record the instantaneous rate for a reaction id.
Sourcepub fn get_reaction_rate(&self, reaction_id: &str) -> Option<&f64>
pub fn get_reaction_rate(&self, reaction_id: &str) -> Option<&f64>
Look up the recorded rate for a reaction id.
Sourcepub fn list_reaction_rates(&self) -> Vec<String>
pub fn list_reaction_rates(&self) -> Vec<String>
List the reaction ids that have a recorded rate.
pub fn initialize(&mut self) -> Result<(), ChemistryError>
Auto Trait Implementations§
impl Freeze for KineticsCalculator
impl RefUnwindSafe for KineticsCalculator
impl Send for KineticsCalculator
impl Sync for KineticsCalculator
impl Unpin for KineticsCalculator
impl UnsafeUnpin for KineticsCalculator
impl UnwindSafe for KineticsCalculator
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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