@datagrok/deqs v1.0.0
Deqs
Deqs is a package for the Datagrok platform. It provides in-browser tools for solving intial value problem for systems of ordinary differential equations (ODE).
- Go to Apps and run EquaSleek X
- Enter formulas or modify template
- Press Run button on the top panel
The solver takes a set of the differential equations in a declarative form, and creates a UI that solves the equations, visualizes the results, and lets you change parameters on the fly.
Quick start
Datagrok provides intuitive tools for the rapid solving ODEs.
- Run the solver:
- Go to Apps and run EquaSleek X
- Press Run button on the top panel
- Modify a template:
- Edit formulas or add new ones
- Click F5 or Run button
- Use an advanced template:
- Rigth click and select Templates > Advanced...
- Modify formulas and click F5
- Save formulas in a local file:
- Rigth click and select Save...
- Find the file in Downloads
- Load equations from a local file:
- Rigth click and select Load...
- Select a file with formulas
Create model from template
Start from one of these templates:
Template | Features |
---|---|
Basic | the simplest model |
Advanced | extra math features, including expressions, constants, parameters and tolerance specification |
Extended | the annotating feature for extended UI generation |
Use cases
The solver has built-in use cases. Get access to them via the context menu. You can use them as a template.
Chem reactions
- simulates mass-action kinetics
- illustrates annotation of inputs
Robertson's model
- Robertson’s chemical reaction model
- stiff equations example
- shows how Datagrok solves complicated ODEs
Fermentation
- models the kinetics of the biochemical reactions in fermentation
- shows the usage of the
runOnOpen
andrunOnInput
meta-features
PK-PD
- simulates pharmacokinetics (PK), pharmacodynamics (PD), and their relationship
- illustrates the usage of the
loop
feature for dosing specification
Acid production
- models gluconic acid production by Aspergillus niger
- shows the usage of the
update
feature for multi-stage simulation
Nimotuzumab
- models population pharmacokinetic for nimotuzumab
- demonstrates the
output
feature
Datagrok's ODEs suite has tools for solving both stiff and non-stiff equations. It provides a numerical solution.
Model structure
A model defines initial value problem. It contains name, differential equations, initial values and argument specifications:
#name: My ODEs
#equations:
dx/dt = x + y + exp(t)
dy/dt = x - y - cos(t)
#argument: t
initial = 0
final = 1
step = 0.01
#inits:
x = 2
y = 5
Use the following sections to specify various problems:
Control block | Features |
---|---|
#name | Defines a name. |
#equations | Differential equation specification |
#argument | Independent variable specification |
#inits | Initial values specification |
#constants | Constants specification |
#parameters | Parameters specification |
#expressions | Defines auxiliary compuations. |
#output | Defines output columns and their captions |
#tags | Specifies tags (model , app , etc.). |
#description | Defines description of the model. |
#meta.runOnOpen | Provides computations immediately upon application launch after the model is exported to JavaScript script. |
#meta.runOnInput | Updates results immediately upon input changes after the model is exported to JavaScript script. |
#comment | Specifies comments block. |
Platform applications
Once you are satisfied with the result, you can convert your model to a Datagrok application. To do so:
- Press Export button on the top panel
- Press SAVE button
- Script is created, and can be found in the "Scripts" section of the platform
Improve usability. Use #tags: model
to add your model to Model Catalog
. Provide a description in the #description
-line:
#name: Bioreaction
#tags: model
#description: Complex bioreaction simulation
Apply annotations to get better UI. Append them, when defining parameters, initial values and argument.
Group inputs by specifying their category
:
#parameters:
P1 = 1 {category: Parameters}
P2 = -1 {category: Parameters}
Add units
:
#inits:
x = 2 {units: C; category: Initial values}
y = 0 {units: C; category: Initial values}
Define the desired caption
:
#argument: t
start = 0 {caption: Initial; units: min; category: Time}
finish = 2 {caption: Final; units: min; category: Time}
step = 0.01 {caption: Initial; units: min; category: Time}
Provide hints in brackets [ ]
:
P1 = 1 {category: Parameters} [P1 parameter tooltip]
Apply scripting tools to get:
- non-elementary and special functions' use
- Datagrok packages' functions call
See also
1 year ago