forked from RuleWorld/nfsim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nfevent.schema.json
152 lines (151 loc) · 6.36 KB
/
nfevent.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/RuleWorld/nfsim/ASinanSaglam/issue35/nf.schema.json",
"title": "NFsim simulation",
"description": "Output from a NFsim simulation",
"type": "object",
"properties": {
"simulation": {
"type": "object",
"properties": {
"info": {
"description": "Information regarding the simulation",
"type": "object",
"properties": {
"name": {
"description": "Name of our simulation",
"type": "string"
},
"global_molecule_limit": {
"description": "Number of global molecules allowed for the simulation",
"type": "number"
},
"number_of_molecule_types": {
"description": "Number of total molecule types defined",
"type": "number"
},
"number_of_molecules": {
"description": "Number of total starting molecules",
"type": "number"
}
},
"required": [ "name" ]
},
"molecule_types": {
"description": "Molecule types in a simulation",
"type": "array",
"items": { "$ref": "#/$defs/molecule_type" },
"minItems": 1,
"uniqueItems": true
},
"initialState": {
"description": "Initial state of the simulation",
"type": "object",
"properties": {
"molTypes": {
"description": "A run-length encoded array of molecule type IDs for the starting state",
"type": "array",
"items": { "$ref": "#/$defs/molType" },
"minItems": 0,
"uniqueItems": false
},
"ops": {
"description": "A set of operations that need to be performed on the initial molecules to get the inital state",
"type": "array",
"items": { "$ref": "#/$defs/operation" },
"minItems": 0,
"uniqueItems": false
}
},
"required": [ "molTypes", "ops" ]
},
"firings": {
"description": "All firings in the simulation",
"type": "array",
"items": { "$ref": "#/$defs/firing" },
"minItems": 0,
"uniqueItems": false
}
},
"required": [ "info", "molecule_types", "initialState", "firings" ]
}
},
"$defs": {
"molecule_type": {
"description": "Description of each molecule type, their names, IDs and components",
"type": "object",
"properties": {
"name": {
"description": "Name of the molecule type",
"type": "string"
},
"typeID": {
"description": "Internal ID used for the molecule type, every operation refers to this ID",
"type": "number"
},
"components": {
"description": "Names of each component for the molecule type",
"type": "array",
"items": { "type": "string" },
"minItems": 0
},
"componentStates": {
"description": "Names of each component states, by default the first state is used upon initialization",
"type": "array",
"minItems": 0,
"items": {
"type": "array",
"items": { "type": "string" },
"minItems": 0
}
}
},
"required": [ "name", "typeID", "components", "componentStates" ]
},
"molecule_array": {
"description": "This is an item in a run-length encoded array, first item is the molecule type index, second item is how many times it repeats",
"type": "array",
"prefixItems": [
{"type": "number"},
{"type": "number"}
],
"items": false,
"uniqueItems": false
},
"operation": {
"description": "Array fully describing an operation and what it operates on. Each operation has different inputs.",
"type": "array",
"prefixItems": [
{"enum": ["Add", "Delete", "StateChange", "AddBond", "DeleteBond", "IncrementState", "DecrementState", "DecrementPopulation"] },
{"type": "number"}
],
"items": { "type": "number" },
"minItems": 2,
"maxItems": 5,
"uniqueItems": false
},
"firing": {
"description": "Full description of a single event in the simulation.",
"type": "object",
"properties": {
"props": {
"description": "The name of the reaction that fired, the global event number followed by the internal time it happened",
"type": "array",
"prefixItems": [
{"type": "string"},
{"type": "number"},
{"type": "number"}
],
"items": false,
"uniqueItems": false
},
"ops": {
"description": "The set of operations that occured during the event.",
"type": "array",
"items": { "$ref": "#/$defs/operation" }
}
},
"required": [ "props", "ops" ]
}
}
}