skultrafast.kinetic_model

This module helps to build a transfer matrix and applying it to an DAS.

Classes

Transition

Represents a transtion between comparments.

Model

Helper class to make a model

Functions

get_comparments(list_trans)

Getting a list of transtions, return the compartments

get_symbols(list_trans)

Return the used symbols

Module Contents

class skultrafast.kinetic_model.Transition(from_comp, to_comp, rate=None, qy=None)[source]

Bases: object

Represents a transtion between comparments.

from_comp[source]
to_comp[source]
qu_yield = None[source]
class skultrafast.kinetic_model.Model[source]

Bases: object

Helper class to make a model

transitions: List[Transition] = [][source]
add_transition(from_comp, to_comp, rate=None, qy=None)[source]

Adds an transition to the model.

Parameters:
  • from_comp (str) – Start of the transition

  • to_comp (str) – Target of the transition

  • rate (str, optional) – Name of the associated rate, by default None, which generates a default name.

  • qy (str of float, optional) – The yield of the transition, by default 1

build_matrix()[source]

Builds the n x n k-matrix as a symbolic representation (list of lists of tuples). Each entry contains a list of (coefficient, rate_name, yield_value) tuples.

build_mat_func()[source]

Creates a function that builds the K matrix from parameter values. Uses fully vectorized numpy operations for maximum speed.

get_compartments()[source]
make_diff_equation()[source]

Creates a representation of the differential equations. Note: Full symbolic differential equation support removed with sympy dependency.

get_trans(y0, taus, t)[source]

Return the solution using vectorized matrix exponential computation.

skultrafast.kinetic_model.get_comparments(list_trans)[source]

Getting a list of transtions, return the compartments

skultrafast.kinetic_model.get_symbols(list_trans)[source]

Return the used symbols