Skip to content

In order to organize and store the information about workflows we employ Exabyte Data Convention as explained elsewhere in this documentation.

Example Representation

Below is an example JSON representation a of a workflow. It contains five subworkflows, each of which contains a number of units in turn. The workflow demonstrates implements a many-body (GW) calculation of an electronic band gap with VASP:

  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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
{
    "name": "Single-shot G0W0 Band Gap",
    "subworkflows": [
        {
            "_id": "17b7404f8f8dbecb7278c4f8",
            // information about the application (or simulation engine) used in this subworkflow (SW)
            "app": {
                "build": "Default",
                "name": "vasp",
                "summary": "VASP",
                "version": "5.3.5"
            },
            // whether to omit storing the resulting properties in database (eg. during prototyping)
            "isDraft": false,
            // model used inside this SW
            "model": {
                "method": {
                    "subtype": "us",
                    "type": "pseudopotential"
                },
                "subtype": "gga",
                "type": "dft"
            },
            // SW name
            "name": "SCF",
            // materials properties extracted in this SW
            "properties": [
                "total_energy",
                "total_energy_contributions",
                "pressure",
                "fermi_energy",
                "atomic_forces",
                "total_force",
                "stress_tensor",
                "band_gaps",
                "fermi_energy"
            ],
            // units that constitute this SW
            "units": [
                {
                    "name": "vasp",
                    "execution": {
                        "app": {
                            "build": "Default",
                            "exec": "vasp",
                            "flavor": "vasp",
                            "name": "vasp",
                            "summary": "VASP",
                            "version": "5.3.5"
                        },
                        // contains the input files/templates for simulation engine
                        "input": [
                            {
                                // input file name (will be stored under it in filesystem)
                                "name": "KPOINTS",
                                // Jinja template to be used for producing the input in Workflow Designer
                                "content": "Automatic mesh\n0\nGamma\n  {% for d in kgrid.dimensions %}{{ d/2 }} {% endfor %}\n  {% for s in kgrid.shifts %}{{s}} {% endfor %}\n",
                                // Final input file content after render in Workflow Designer
                                //     May still contain template variables to be rendered at runtime
                                "rendered": "Automatic mesh\n0\nGamma\n  5 5 5 \n  0 0 0 \n"
                            },
                            {
                                "content": "ISMEAR = 0\nSIGMA  = 0.05\n",
                                "isManuallyChanged": false,
                                "name": "INCAR",
                                "rendered": "ISMEAR = 0\nSIGMA  = 0.05\n"
                            },
                            {
                                "content": "{{ POSCAR }}",
                                "isManuallyChanged": false,
                                "name": "POSCAR",
                                "rendered": "Silicon FCC\n1.0\n   3.348920000\t   0.000000000\t   1.933500000\n   1.116307000\t   3.157392000\t   1.933500000\n   0.000000000\t   0.000000000\t   3.867000000\nSi\n2\ndirect\n   0.000000000    0.000000000    0.000000000 Si\n   0.250000000    0.250000000    0.250000000 Si"
                            }
                        ]
                    },
                    // Important settings for this unit (k-point grid)
                    "important": {
                        "kgrid": {
                            "dimensions": [
                                10,
                                10,
                                10
                            ],
                            "shifts": [
                                0,
                                0,
                                0
                            ]
                        }
                    },
                    "monitors": [
                        {
                            "name": "standard_output"
                        },
                        {
                            "name": "convergence_electronic"
                        }
                    ],
                    "postProcessors": [],
                    "preProcessors": [],
                    "results": [
                        {
                            "name": "total_energy"
                        },
                        {
                            "name": "total_energy_contributions"
                        },
                        {
                            "name": "pressure"
                        },
                        {
                            "name": "fermi_energy"
                        },
                        {
                            "name": "atomic_forces"
                        },
                        {
                            "name": "total_force"
                        },
                        {
                            "name": "stress_tensor"
                        }
                    ],
                    "status": "idle",
                    "type": "execution"
                }
            ]
        },
        {
            "_id": "e230f0ee0ed5074211c47715",
            "app": {
                "build": "Default",
                "name": "shell",
                "summary": "Shell Script",
                "version": "4.2.46"
            },
            "model": {
                "method": {
                    "subtype": "unknown",
                    "type": "unknown"
                },
                "subtype": "unknown",
                "type": "unknown"
            },
            "name": "Grep NBANDS",
            "properties": [],
            "units": [
                {
                    "execution": {
                        "app": {
                            "build": "Default",
                            "exec": "sh",
                            "flavor": "sh",
                            "name": "shell",
                            "summary": "Shell Script",
                            "version": "4.2.46"
                        },
                        "input": [
                            {
                                "content": "#!/bin/bash\n\n# grep the maximum number of plane-wave allowed for the basis set with chosen ENCUT \ngrep \"maximum and minimum number of plane-waves\" OUTCAR | tail -1 | awk '{print $10}' ",
                                "isManuallyChanged": false,
                                "name": "script.sh",
                                "rendered": "#!/bin/bash\n\n# grep the maximum number of plane-wave allowed for the basis set with chosen ENCUT \ngrep \"maximum and minimum number of plane-waves\" OUTCAR | tail -1 | awk '{print $10}' "
                            }
                        ]
                    },
                    "important": {},
                    "monitors": [
                        {
                            "name": "standard_output"
                        }
                    ],
                    "name": "shell",
                    "postProcessors": [],
                    "preProcessors": [],
                    "results": [],
                    "status": "idle",
                    "type": "execution"
                }
            ]
        },
        {
            "_id": "52ff2b4d94c26a3787c4ef8d",
            "app": {
                "build": "Default",
                "name": "vasp",
                "summary": "VASP",
                "version": "5.3.5"
            },
            "model": {
                "method": {
                    "subtype": "us",
                    "type": "pseudopotential"
                },
                "subtype": "gga",
                "type": "dft"
            },
            "name": "SCF many bands",
            "properties": [],
            "units": [
                {
                    "execution": {
                        "app": {
                            "build": "Default",
                            "exec": "vasp",
                            "flavor": "vasp_nscf",
                            "name": "vasp",
                            "summary": "VASP",
                            "version": "5.3.5"
                        },
                        "input": [
                            {
                                "content": "ISMEAR = 0\nSIGMA = 0.05\nNBANDS = {%raw%} {{shell.stdout}} {%endraw%} \nALGO = EXACT # does exact diagonalization of Kohn-Sham Hamiltonian \nNELM = 1 # 1 electronic step is enough\nLOPTICS = .TRUE. # long-wave limit q->0 to write WAVEDER file  \n",
                                "isManuallyChanged": false,
                                "name": "INCAR",
                                "rendered": "ISMEAR = 0\nSIGMA = 0.05\nNBANDS =  {{shell.stdout}}  \nALGO = EXACT # does exact diagonalization of Kohn-Sham Hamiltonian \nNELM = 1 # 1 electronic step is enough\nLOPTICS = .TRUE. # long-wave limit q->0 to write WAVEDER file  \n"
                            },
                            {
                                "content": "Automatic mesh\n0\nGamma\n  {% for d in kgrid.dimensions %}{{d/2}} {% endfor %}\n  {% for s in kgrid.shifts %}{{s}} {% endfor %}\n",
                                "isManuallyChanged": false,
                                "name": "KPOINTS",
                                "rendered": "Automatic mesh\n0\nGamma\n  5 5 5 \n  0 0 0 \n"
                            },
                            {
                                "content": "{{ POSCAR }}",
                                "isManuallyChanged": false,
                                "name": "POSCAR",
                                "rendered": "Silicon FCC\n1.0\n   3.348920000\t   0.000000000\t   1.933500000\n   1.116307000\t   3.157392000\t   1.933500000\n   0.000000000\t   0.000000000\t   3.867000000\nSi\n2\ndirect\n   0.000000000    0.000000000    0.000000000 Si\n   0.250000000    0.250000000    0.250000000 Si"
                            }
                        ]
                    },
                    "important": {
                        "kgrid": {
                            "dimensions": [
                                10,
                                10,
                                10
                            ],
                            "shifts": [
                                0,
                                0,
                                0
                            ]
                        },
                        "kpath": [
                            {
                                "point": "Г",
                                "steps": 10
                            },
                            {
                                "point": "X",
                                "steps": 10
                            }
                        ]
                    },
                    "monitors": [
                        {
                            "name": "standard_output"
                        },
                        {
                            "name": "convergence_electronic"
                        }
                    ],
                    "name": "vasp_nscf",
                    "postProcessors": [],
                    "preProcessors": [],
                    "results": [
                        {
                            "name": "band_gaps"
                        },
                        {
                            "name": "fermi_energy"
                        }
                    ],
                    "status": "idle",
                    "type": "execution"
                }
            ]
        },
        {
            "_id": "b053d1575dffe7e1a7ba6fac",
            "app": {
                "build": "Default",
                "name": "shell",
                "summary": "Shell Script",
                "version": "4.2.46"
            },
            "model": {
                "method": {
                    "subtype": "us",
                    "type": "pseudopotential"
                },
                "subtype": "gga",
                "type": "dft"
            },
            "name": "extract NBANDS",
            "properties": [],
            "units": [
                {
                    "execution": {
                        "app": {
                            "build": "Default",
                            "exec": "sh",
                            "flavor": "sh",
                            "name": "shell",
                            "summary": "Shell Script",
                            "version": "4.2.46"
                        },
                        "input": [
                            {
                                "content": "#!/bin/bash\n\n# PUT YOUR CODE BELOW\ngrep NBANDS OUTCAR| tail -1 | awk '{print $15}' ",
                                "isManuallyChanged": false,
                                "name": "script.sh",
                                "rendered": "#!/bin/bash\n\n# PUT YOUR CODE BELOW\ngrep NBANDS OUTCAR| tail -1 | awk '{print $15}' "
                            }
                        ]
                    },
                    "important": {},
                    "monitors": [
                        {
                            "name": "standard_output"
                        }
                    ],
                    "name": "sh",
                    "postProcessors": [],
                    "preProcessors": [],
                    "results": [],
                    "status": "idle",
                    "type": "execution"
                }
            ]
        },
        {
            "_id": "4039e61d74ebf977036459de",
            "app": {
                "build": "Default",
                "name": "vasp",
                "summary": "VASP",
                "version": "5.3.5"
            },
            "model": {
                "method": {
                    "subtype": "us",
                    "type": "pseudopotential"
                },
                "subtype": "gga",
                "type": "dft"
            },
            "name": "G0W0 step",
            "properties": [],
            "units": [
                {
                    "execution": {
                        "app": {
                            "build": "Default",
                            "exec": "vasp",
                            "flavor": "vasp",
                            "name": "vasp",
                            "summary": "VASP",
                            "version": "5.3.5"
                        },
                        "input": [
                            {
                                "content": "ISMEAR = 0\nSIGMA  = 0.05\nLORBIT = 11\nALGO = GW0 ; NELM = 1 ! one-shot GW calculation, ie G0W0\nNOMEGA = 100 \n",
                                "isManuallyChanged": false,
                                "name": "INCAR",
                                "rendered": "ISMEAR = 0\nSIGMA  = 0.05\nLORBIT = 11\nALGO = GW0 ; NELM = 1 ! one-shot GW calculation, ie G0W0\nNOMEGA = 100 \n"
                            },
                            {
                                "content": "Automatic mesh\n0\nGamma\n  {% for d in kgrid.dimensions %}{{d/2}} {% endfor %}\n  {% for s in kgrid.shifts %}{{s}} {% endfor %}\n",
                                "isManuallyChanged": false,
                                "name": "KPOINTS",
                                "rendered": "Automatic mesh\n0\nGamma\n  5 5 5 \n  0 0 0 \n"
                            },
                            {
                                "content": "{{ POSCAR }}",
                                "isManuallyChanged": false,
                                "name": "POSCAR",
                                "rendered": "Silicon FCC\n1.0\n   3.348920000\t   0.000000000\t   1.933500000\n   1.116307000\t   3.157392000\t   1.933500000\n   0.000000000\t   0.000000000\t   3.867000000\nSi\n2\ndirect\n   0.000000000    0.000000000    0.000000000 Si\n   0.250000000    0.250000000    0.250000000 Si"
                            }
                        ]
                    },
                    "important": {},
                    "monitors": [
                        {
                            "name": "standard_output"
                        },
                        {
                            "name": "convergence_electronic"
                        }
                    ],
                    "name": "vasp",
                    "postProcessors": [],
                    "preProcessors": [],
                    "results": [
                        {
                            "name": "total_energy"
                        },
                        {
                            "name": "total_energy_contributions"
                        },
                        {
                            "name": "band_gaps"
                        }
                    ],
                    "status": "idle",
                    "type": "execution"
                }
            ]
        }
    ],
    // container for workflow (top-level) units
    //  each member is a subworkflow in the current document
    "units": [
        {
            "type": "subworkflow"
        },
        {
            "type": "subworkflow"
        },
        {
            "type": "subworkflow"
        },
        {
            "type": "subworkflow"
        },
        {
            "type": "subworkflow"
        }
    ],
    // global id of this material inside Exabyte Database
    "exabyteId": "QTCfaBWmpZsgH9HsN",
    "createdAt": "2017-10-11T03:22:10.376Z",
    "updatedAt": "2017-10-13T15:09:51.009Z"
}

Note: JSON does not support inclusion of inline commentaries, we only left them above for clarity.

Notes

There are a few notable points to emphasize from the example above.

Nested data

We use top-level workflow as a "container" and separate the details of each individual section of calculation inside a subworkflow.

Execution Units

For physics-based modeling engines the execution unit is the main one. It contains the information about the input parameters and runtime environment for the specific simulation engine.

Templating

We allow for using Jinja templates 1 inside the input to individual units. This way we can decouple material-specific information from workflow-specific. The latter lets us apply a workflow for multiple materials at the same time without having to adjust it extensively. More inside units section.

Properties

"properties" section serves as an aggregator of all the properties that are extracted at each level (workflow/subworkflow). "results" key serves the same purpose for unit.