Subworkflows: Structured Representation

The JSON structured representation of subworkflows, together with an example, is contained below.

  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
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
{
    "schemaId": "workflow/subworkflow",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "subworkflow schema",
    "type": "object",
    "allOf": [
        {
            "schemaId": "workflow/base-flow",
            "title": "subworkflow schema",
            "type": "object",
            "properties": {
                "_id": {
                    "description": "subworkflow identity",
                    "type": "string"
                },
                "name": {
                    "description": "Human-readable name of the subworkflow. e.g. Total-energy",
                    "type": "string"
                },
                "properties": {
                    "description": "Array of characteristic properties calculated by this subworkflow",
                    "type": "array",
                    "items": {
                        "description": "property names, eg. `band_gaps`, `band_structure`",
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "object"
                            }
                        ]
                    }
                },
                "compute": {
                    "description": "Custom keywords prefixed with validate correspond to custom validation methods implemented downstream",
                    "schemaId": "job/compute",
                    "title": "compute arguments schema",
                    "properties": {
                        "queue": {
                            "description": "Name of the submission queues: https://docs.mat3ra.com/infrastructure/resource/queues/. Below enums are for Azure, then AWS circa 2022-08, hence the duplication.",
                            "type": "string",
                            "enum": [
                                "D",
                                "OR",
                                "OF",
                                "OFplus",
                                "SR",
                                "SF",
                                "SFplus",
                                "GPOF",
                                "GP2OF",
                                "GP4OF",
                                "GPSF",
                                "GP2SF",
                                "GP4SF",
                                "OR4",
                                "OR8",
                                "OR16",
                                "SR4",
                                "SR8",
                                "SR16",
                                "GOF",
                                "G4OF",
                                "G8OF",
                                "GSF",
                                "G4SF",
                                "G8SF"
                            ]
                        },
                        "nodes": {
                            "description": "number of nodes used for the job inside the RMS.",
                            "type": "integer",
                            "validateNodes": {}
                        },
                        "ppn": {
                            "description": "number of CPUs used for the job inside the RMS.",
                            "type": "integer",
                            "validatePpn": {}
                        },
                        "timeLimit": {
                            "description": "Wallclock time limit for computing a job. Clock format: 'hh:mm:ss'",
                            "type": "string",
                            "validateTimeLimit": {}
                        },
                        "timeLimitType": {
                            "description": "Convention to use when reasoning about time limits",
                            "type": "string",
                            "default": "per single attempt",
                            "enum": [
                                "per single attempt",
                                "compound"
                            ]
                        },
                        "notify": {
                            "description": "Email notification for the job: n - never, a - job aborted, b - job begins, e - job ends. Last three could be combined.",
                            "type": "string"
                        },
                        "email": {
                            "description": "Email address to notify about job execution.",
                            "type": "string"
                        },
                        "maxCPU": {
                            "description": "Maximum CPU count per node. This parameter is used to let backend job submission infrastructure know that this job is to be charged for the maximum CPU per node instead of the actual ppn. For premium/fast queues where resources are provisioned on-demand and exclusively per user.",
                            "type": "integer"
                        },
                        "arguments": {
                            "description": "Optional arguments specific to using application - VASP, Quantum Espresso, etc. Specified elsewhere",
                            "type": "object",
                            "default": {},
                            "oneOf": [
                                {
                                    "schemaId": "software-directory/modeling/espresso/arguments",
                                    "title": "quantum espresso arguments schema",
                                    "type": "object",
                                    "properties": {
                                        "nimage": {
                                            "description": "Processors can be divided into different `images`, each corresponding to a different self-consistent or linear-response calculation, loosely coupled to others.",
                                            "type": "integer",
                                            "default": 1,
                                            "minimum": 1,
                                            "maximum": 100
                                        },
                                        "npools": {
                                            "description": "Each image can be subpartitioned into `pools`, each taking care of a group of k-points.",
                                            "type": "integer",
                                            "default": 1,
                                            "minimum": 1,
                                            "maximum": 100
                                        },
                                        "nband": {
                                            "description": "Each pool is subpartitioned into `band groups`, each taking care of a group of Kohn-Sham orbitals (also called bands, or wavefunctions).",
                                            "type": "integer",
                                            "default": 1,
                                            "minimum": 1,
                                            "maximum": 100
                                        },
                                        "ntg": {
                                            "description": "In order to allow good parallelization of the 3D FFT when the number of processors exceeds the number of FFT planes, FFTs on Kohn-Sham states are redistributed to `task` groups so that each group can process several wavefunctions at the same time.",
                                            "type": "integer",
                                            "default": 1,
                                            "minimum": 1,
                                            "maximum": 100
                                        },
                                        "ndiag": {
                                            "description": "A further level of parallelization, independent on PW or k-point parallelization, is the parallelization of subspace diagonalization / iterative orthonormalization. Both operations required the diagonalization of arrays whose dimension is the number of Kohn-Sham states (or a small multiple of it). All such arrays are distributed block-like across the `linear-algebra group`, a subgroup of the pool of processors, organized in a square 2D grid. As a consequence the number of processors in the linear-algebra group is given by n2, where n is an integer; n2 must be smaller than the number of processors in the PW group. The diagonalization is then performed in parallel using standard linear algebra operations.",
                                            "type": "integer",
                                            "default": 1,
                                            "minimum": 1,
                                            "maximum": 100
                                        }
                                    },
                                    "additionalProperties": false
                                }
                            ]
                        },
                        "cluster": {
                            "description": "Cluster where the job is executed. Optional on create. Required on job submission.",
                            "type": "object",
                            "properties": {
                                "fqdn": {
                                    "description": "FQDN of the cluster. e.g. master-1-staging.exabyte.io",
                                    "type": "string"
                                },
                                "jid": {
                                    "description": "Job's identity in RMS. e.g. 1234.master-1-staging.exabyte.io",
                                    "type": "string"
                                }
                            }
                        },
                        "errors": {
                            "description": "Computation error. Optional. Appears only if something happens on jobs execution.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "description": "Domain of the error appearance (internal).",
                                        "type": "string",
                                        "enum": [
                                            "rupy",
                                            "alfred",
                                            "celim",
                                            "webapp"
                                        ]
                                    },
                                    "reason": {
                                        "description": "Should be a short, unique, machine-readable error code string. e.g. FileNotFound",
                                        "type": "string"
                                    },
                                    "message": {
                                        "description": "Human-readable error message. e.g. 'File Not Found: /home/demo/data/project1/job-123/job-config.json'",
                                        "type": "string"
                                    },
                                    "traceback": {
                                        "description": "Full machine-readable error traceback. e.g. FileNotFound",
                                        "type": "string"
                                    }
                                }
                            }
                        },
                        "excludeFilesPattern": {
                            "description": "A Python compatible regex to exclude files from upload. e.g. ^.*.txt& excludes all files with .txt suffix",
                            "type": "string"
                        }
                    },
                    "required": [
                        "queue",
                        "nodes",
                        "ppn",
                        "timeLimit"
                    ]
                }
            },
            "required": [
                "name",
                "units"
            ]
        }
    ],
    "properties": {
        "units": {
            "description": "Contains the Units of the subworkflow",
            "type": "array",
            "items": {
                "schemaId": "workflow/unit",
                "title": "workflow unit schema",
                "type": "object",
                "allOf": [
                    {
                        "schemaId": "in-memory-entity/named-defaultable-runtime-items",
                        "title": "Named defaultable runtime items in-memory entity schema",
                        "allOf": [
                            {
                                "schemaId": "in-memory-entity/base",
                                "title": "Base in-memory entity schema",
                                "allOf": [
                                    {
                                        "description": "entity schema version",
                                        "schemaId": "system/schema-version",
                                        "title": "schema version",
                                        "properties": {
                                            "schemaVersion": {
                                                "description": "entity's schema version. Used to distinct between different schemas.",
                                                "type": "string",
                                                "default": "2022.8.16"
                                            }
                                        }
                                    }
                                ],
                                "properties": {
                                    "_id": {
                                        "description": "entity identity",
                                        "type": "string"
                                    },
                                    "slug": {
                                        "description": "entity slug",
                                        "type": "string"
                                    },
                                    "systemName": {
                                        "type": "string"
                                    }
                                }
                            },
                            {
                                "schemaId": "system/name",
                                "title": "timestampable entity schema",
                                "properties": {
                                    "name": {
                                        "description": "entity name",
                                        "type": "string"
                                    }
                                }
                            },
                            {
                                "schemaId": "system/defaultable",
                                "title": "defaultable entity schema",
                                "properties": {
                                    "isDefault": {
                                        "description": "Identifies that entity is defaultable",
                                        "type": "boolean",
                                        "default": false
                                    }
                                }
                            },
                            {
                                "schemaId": "workflow/unit/runtime/runtime-items",
                                "title": "runtime items schema (pre-/post-processors, monitors, results",
                                "type": "object",
                                "properties": {
                                    "preProcessors": {
                                        "description": "names of the pre-processors for this calculation",
                                        "type": "array",
                                        "items": {
                                            "schemaId": "workflow/unit/runtime/runtime-item",
                                            "title": "runtime item schema",
                                            "oneOf": [
                                                {
                                                    "schemaId": "workflow/unit/runtime/-runtime-item-name-object",
                                                    "title": "result schema",
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "description": "The name of this item. e.g. scf_accuracy",
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "name"
                                                    ]
                                                },
                                                {
                                                    "schemaId": "workflow/unit/runtime/-runtime-item-string",
                                                    "title": "result schema",
                                                    "description": "name of runtime item in shortened notation",
                                                    "type": "string"
                                                }
                                            ]
                                        }
                                    },
                                    "postProcessors": {
                                        "description": "names of the post-processors for this calculation",
                                        "type": "array",
                                        "items": {
                                            "schemaId": "workflow/unit/runtime/runtime-item",
                                            "title": "runtime item schema",
                                            "oneOf": [
                                                {
                                                    "schemaId": "workflow/unit/runtime/-runtime-item-name-object",
                                                    "title": "result schema",
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "description": "The name of this item. e.g. scf_accuracy",
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "name"
                                                    ]
                                                },
                                                {
                                                    "schemaId": "workflow/unit/runtime/-runtime-item-string",
                                                    "title": "result schema",
                                                    "description": "name of runtime item in shortened notation",
                                                    "type": "string"
                                                }
                                            ]
                                        }
                                    },
                                    "monitors": {
                                        "description": "names of the monitors for this calculation",
                                        "type": "array",
                                        "items": {
                                            "schemaId": "workflow/unit/runtime/runtime-item",
                                            "title": "runtime item schema",
                                            "oneOf": [
                                                {
                                                    "schemaId": "workflow/unit/runtime/-runtime-item-name-object",
                                                    "title": "result schema",
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "description": "The name of this item. e.g. scf_accuracy",
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "name"
                                                    ]
                                                },
                                                {
                                                    "schemaId": "workflow/unit/runtime/-runtime-item-string",
                                                    "title": "result schema",
                                                    "description": "name of runtime item in shortened notation",
                                                    "type": "string"
                                                }
                                            ]
                                        }
                                    },
                                    "results": {
                                        "description": "names of the results for this calculation",
                                        "type": "array",
                                        "items": {
                                            "schemaId": "workflow/unit/runtime/runtime-item",
                                            "title": "runtime item schema",
                                            "oneOf": [
                                                {
                                                    "schemaId": "workflow/unit/runtime/-runtime-item-name-object",
                                                    "title": "result schema",
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "description": "The name of this item. e.g. scf_accuracy",
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "name"
                                                    ]
                                                },
                                                {
                                                    "schemaId": "workflow/unit/runtime/-runtime-item-string",
                                                    "title": "result schema",
                                                    "description": "name of runtime item in shortened notation",
                                                    "type": "string"
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        ]
                    }
                ],
                "properties": {
                    "_id": {
                        "type": "string"
                    },
                    "isDraft": {
                        "type": "boolean"
                    },
                    "type": {
                        "description": "type of the unit",
                        "type": "string"
                    },
                    "name": {
                        "description": "name of the unit. e.g. pw_scf",
                        "type": "string"
                    },
                    "status": {
                        "description": "Status of the unit.",
                        "type": "string",
                        "enum": [
                            "idle",
                            "active",
                            "warning",
                            "error",
                            "finished"
                        ]
                    },
                    "head": {
                        "description": "Whether this unit is the first one to be executed.",
                        "type": "boolean"
                    },
                    "flowchartId": {
                        "description": "Identity of the unit in the workflow. Used to trace the execution flow of the workflow.",
                        "type": "string"
                    },
                    "next": {
                        "description": "Next unit's flowchartId. If empty, the current unit is the last.",
                        "type": "string"
                    },
                    "enableRender": {
                        "description": "Whether Rupy should attempt to use Jinja templating to add context variables into the unit",
                        "type": "boolean"
                    },
                    "context": {
                        "type": "object"
                    }
                },
                "additionalProperties": true,
                "required": [
                    "type",
                    "flowchartId"
                ]
            }
        },
        "model": {
            "description": "Model used inside the subworkflow",
            "schemaId": "model",
            "title": "model schema (base)",
            "properties": {
                "type": {
                    "description": "general type of the model, eg. `dft`",
                    "type": "string"
                },
                "subtype": {
                    "description": "general subtype of the model, eg. `lda`",
                    "type": "string"
                },
                "method": {
                    "schemaId": "method",
                    "title": "method schema (base)",
                    "properties": {
                        "type": {
                            "description": "general type of this method, eg. `pseudopotential`",
                            "type": "string"
                        },
                        "subtype": {
                            "description": "general subtype of this method, eg. `ultra-soft`",
                            "type": "string"
                        },
                        "precision": {
                            "description": "Object showing the actual possible precision based on theory and implementation",
                            "type": "object"
                        },
                        "data": {
                            "description": "additional data specific to method, eg. array of pseudopotentials",
                            "type": "object"
                        }
                    },
                    "required": [
                        "type",
                        "subtype"
                    ]
                }
            },
            "additionalProperties": true,
            "required": [
                "type",
                "subtype",
                "method"
            ]
        },
        "application": {
            "description": "information about the simulation engine/application.",
            "schemaId": "software/application",
            "title": "application schema (base)",
            "type": "object",
            "properties": {
                "name": {
                    "description": "The name of the application. e.g. espresso",
                    "type": "string"
                },
                "shortName": {
                    "description": "The short name of the application. e.g. qe",
                    "type": "string"
                },
                "summary": {
                    "description": "Application's short description.",
                    "type": "string"
                },
                "version": {
                    "description": "Application version. e.g. 5.3.5",
                    "type": "string"
                },
                "build": {
                    "description": "Application build. e.g. VTST",
                    "type": "string"
                },
                "hasAdvancedComputeOptions": {
                    "description": "Whether advanced compute options are present",
                    "type": "boolean"
                },
                "isLicensed": {
                    "description": "Whether licensing is present",
                    "type": "boolean"
                }
            },
            "additionalProperties": true,
            "required": [
                "name"
            ]
        },
        "isDraft": {
            "description": "Defines whether to store the results/properties extracted in this unit to properties collection",
            "type": "boolean",
            "default": false
        }
    },
    "required": [
        "model",
        "application"
    ]
}
 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
{
    "_id": "LCthJ6E2QabYCZqf4",
    "application": {
        "name": "espresso",
        "shortName": "qe",
        "summary": "Quantum Espresso",
        "version": "5.1.1",
        "hasAdvancedComputeOptions": true
    },
    "model": {
        "method": {
            "data": {
                "dataset": {
                    "apps": [
                        "espresso"
                    ],
                    "elements": [
                        "Si",
                        "Ge",
                        "As"
                    ],
                    "exchangeCorrelation": {
                        "approximation": "gga",
                        "functional": "pbe"
                    },
                    "files": [
                        {
                            "apps": [
                                "vasp"
                            ],
                            "electronicConfiguration": "s2p2",
                            "element": "Si",
                            "energyCutoff": {
                                "max": 245.345,
                                "min": 184.009,
                                "name": "energy cutoff",
                                "units": "eV"
                            },
                            "exchangeCorrelation": {
                                "approximation": "gga",
                                "functional": "pbe"
                            },
                            "generationDate": "05Jan2001",
                            "mass": 28.085,
                            "name": "pseudopotential file",
                            "path": "/export/share/pseudo/ag/gga/pbe/gbrv/1.4/us/ag_pbe_gbrv_1.4.upf",
                            "radii": {
                                "cutoff": 1.9,
                                "name": "radii",
                                "partialCore": 1.5,
                                "units": "angstrom",
                                "wignerSeitz": 1.312
                            },
                            "source": "vasp",
                            "textHeading": "PAW_PBE Si 05Jan2001\n   4.00000000000000\nparameters from PSCTR are:\n   VRHFIN =Si: s2p2\n   LEXCH  = PE\n   EATOM  =   103.0669 eV,    7.5752 Ry\n \n   TITEL  = PAW_PBE Si 05Jan2001\n   LULTRA =        F    use ultrasoft PP ?\n   IUNSCR =        1    unscreen: 0-lin 1-nonlin 2-no\n   RPACOR =    1.500    partial core radius\n   POMASS =   28.085; ZVAL   =    4.000    mass and valenz\n   RCORE  =    1.900    outmost cutoff radius\n   RWIGS  =    2.480; RWIGS  =    1.312    wigner-seitz radius (au A)\n   ENMAX  =  245.345; ENMIN  =  184.009 eV\n   ICORE  =        2    local potential\n   LCOR   =        T    correct aug charges\n   LPAW   =        T    paw PP\n   EAUG   =  322.069\n   DEXC   =    0.000\n   RMAX   =    1.950    core radius for proj-oper\n   RAUG   =    1.300    factor for augmentation sphere\n   RDEP   =    1.993    radius for radial grids\n   RDEPT  =    1.837    core radius for aug-charge\n \n   Atomic configuration\n    6 entries     n  l   j            E        occ.\n     1  0  0.50     -1785.8828   2.0000\n     2  0  0.50      -139.4969   2.0000\n     2  1  1.50       -95.5546   6.0000\n     3  0  0.50       -10.8127   2.0000\n     3  1  0.50        -4.0811   2.0000\n     3  2  1.50        -4.0817   0.0000\n   Description\n     l       E           TYP  RCUT    TYP  RCUT\n     0    -10.8127223     23  1.900\n     0     -7.6451159     23  1.900\n     1     -4.0811372     23  1.900\n     1      2.4879257     23  1.900\n     2     -4.0817478      7  1.900\n   Error from kinetic energy argument (eV)\n",
                            "title": "Si paw pbe vasp 5.2",
                            "type": "paw",
                            "valenceElectrons": 4
                        }
                    ],
                    "format": "upf",
                    "name": "my set",
                    "source": "gbrv",
                    "type": "us",
                    "version": "1.5"
                }
            },
            "subtype": "us",
            "type": "pseudopotential"
        },
        "subtype": "gga",
        "type": "dft"
    },
    "name": "Band Structure",
    "properties": [
        "band_structure"
    ],
    "units": [
        {
            "flowchartId": "pw-scf",
            "head": true,
            "name": "pw_scf",
            "status": "idle",
            "type": "execution",
            "tags": [
                "test-tags"
            ]
        }
    ]
}