-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Create complete model with 3 compartments and 3 species. | ||
Add possible reactions. | ||
Set initial concentrations. | ||
Set rate rules. | ||
Set parameters. | ||
Set compartments. | ||
Set species. | ||
*/ | ||
|
||
// Compartments | ||
comp1 @Compartment .= 1; | ||
comp2 @Compartment .= 1.5; | ||
comp3 @Compartment .= 2; | ||
|
||
// Species | ||
s1 @Species {compartment: comp1} .= 10; | ||
s2 @Species {compartment: comp1} .= 20; | ||
s3 @Species {compartment: comp2} .= 30; | ||
|
||
// Reactions | ||
r1 @Reaction {actors: s1 + s2 -> s3} .= k1 * s1 * s2 * comp1; // mass action | ||
r2 @Reaction {actors: s3 -> s1 + s2} .= k2 * s3 * comp2; // mass action | ||
|
||
// Constants | ||
k1 @Const = 0.1; | ||
k2 @Const = 0.2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
Create a model with 2 compartments and 2 species. | ||
It also has Time event starting at 10 and repeat each 20 time units. | ||
The event changes the rate of the first reaction to 0.5. | ||
*/ | ||
|
||
// Compartments | ||
comp1 @Compartment .= 1; | ||
comp2 @Compartment .= 2; | ||
|
||
// Species | ||
s1 @Species .= 10; | ||
s2 @Species .= 20; | ||
|
||
// Reactions | ||
r1 @Reaction {actors: s1 + s2 -> s3} .= k1 * s1 * s2 * comp1; // mass action | ||
r2 @Reaction {actors: s3 -> s1 + s2} .= k2 * s3 * comp2; // mass action | ||
|
||
// Time event | ||
time_event @TimeEvent {start: 10, period: 20}; | ||
s1 [time_event]= 0.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"scripts": { | ||
"start": "node js/create-prompt.js" | ||
}, | ||
"dependencies": { | ||
"dotenv": "^16.4.5", | ||
"glob": "^10.4.2", | ||
|