Skip to content

Commit 00dceee

Browse files
Merge pull request #17 from Exabyte-io/epic/SOF-6265
Epic/sof 6265
2 parents 236cd82 + bbb0f13 commit 00dceee

18 files changed

+958
-186
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ Workflows defined as configuration conform to the following specification:
151151
- `[key]: {{constructorArgument}}: String` - parameter passed to constructor
152152
- `[value]: {{constructorValue}}: Any` - value for a given constructor parameter
153153

154+
155+
Workflow Creation
156+
-----------------
157+
158+
The Workflow instances associated with the workflow configurations are built by
159+
the `createWorkflows` function traversing all three levels (workflow, subworkflow, unit):
160+
![Workflow Generation Diagram](https://user-images.githubusercontent.com/10773967/196579112-d249cafb-d775-4834-b146-e3dedc796174.jpg)
161+
154162
## Links
155163

156164
1. Workflows explained in Mat3ra documentation: https://docs.mat3ra.com/workflows/overview/
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Note: this subworkflow is assumed to be used as part of the valence band offset workflow
2+
# and is this NOT self-sufficient!
3+
# Furthermore, this subworkflow expects the following variable(s) to exist in the global context:
4+
# array_from_context
5+
application:
6+
name: python
7+
version: 3.8.6
8+
method:
9+
name: UnknownMethod
10+
model:
11+
name: UnknownModel
12+
name: Find ESP Value
13+
units:
14+
- config:
15+
name: Find Extrema
16+
execName: python
17+
flavorName: generic:processing:find_extrema:scipy
18+
flowchartId: python-find-extrema
19+
type: executionBuilder
20+
- config:
21+
name: Set Averaged ESP Value
22+
operand: AVG_ESP
23+
value: 'json.loads(STDOUT)["minima"]'
24+
input:
25+
- name: STDOUT
26+
scope: python-find-extrema
27+
type: assignment
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
config:
2+
isMultiMaterial: true
3+
application:
4+
name: espresso
5+
version: 5.4.0
6+
method:
7+
name: PseudopotentialMethod
8+
model:
9+
name: DFTModel
10+
name: Band Structure + averaged ESP
11+
units:
12+
- config:
13+
name: Set Material Index
14+
operand: MATERIAL_INDEX
15+
value: 0
16+
type: assignment
17+
- config:
18+
execName: pw.x
19+
flavorName: pw_scf
20+
name: pw_scf
21+
type: executionBuilder
22+
- config:
23+
execName: pw.x
24+
flavorName: pw_bands
25+
name: pw_bands
26+
flowchartId: pw-bands-calculate-band-gap
27+
type: executionBuilder
28+
attributes:
29+
results:
30+
- name: band_gaps
31+
- config:
32+
name: Select indirect band gap
33+
operand: BAND_GAP_INDIRECT
34+
value: '[bandgap for bandgap in band_gaps["values"] if bandgap["type"] == "indirect"][0]'
35+
input:
36+
- name: band_gaps
37+
scope: pw-bands-calculate-band-gap
38+
type: assignment
39+
- config:
40+
name: Set Valence Band Maximum
41+
operand: VBM
42+
value: 'BAND_GAP_INDIRECT["eigenvalueValence"]'
43+
type: assignment
44+
- config:
45+
execName: bands.x
46+
flavorName: bands
47+
name: bands
48+
type: executionBuilder
49+
- config:
50+
execName: pp.x
51+
flavorName: pp_electrostatic_potential
52+
name: Electrostatic Potential (ESP)
53+
type: executionBuilder
54+
- config:
55+
execName: average.x
56+
flavorName: averaged_potential
57+
name: average ESP
58+
flowchartId: average-electrostatic-potential
59+
type: executionBuilder
60+
- config:
61+
name: Set Macroscopically Averaged ESP Data
62+
operand: array_from_context
63+
value: 'averaged_potential_profile["yDataSeries"][1]'
64+
input:
65+
- name: averaged_potential_profile
66+
scope: average-electrostatic-potential
67+
type: assignment
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Note: this subworkflow is assumed to be used as part of the valence band offset workflow
2+
# and is this NOT self-sufficient!
3+
# Furthermore, this subworkflow expects the following variable(s) to exist in the global context:
4+
# VBM_LEFT, VBM_RIGHT, AVG_ESP_LEFT, AVG_ESP_RIGHT, AVG_ESP_INTERFACE
5+
application:
6+
name: python
7+
version: 3.8.6
8+
method:
9+
name: UnknownMethod
10+
model:
11+
name: UnknownModel
12+
name: Calculate VBO
13+
units:
14+
- config:
15+
name: Difference of valence band maxima
16+
operand: VBM_DIFF
17+
value: 'VBM_LEFT - VBM_RIGHT'
18+
type: assignment
19+
- config:
20+
name: Difference of macroscopically averaged ESP in bulk
21+
operand: AVG_ESP_DIFF
22+
value: 'AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]'
23+
type: assignment
24+
- config:
25+
name: Lineup of macroscopically averaged ESP in interface
26+
operand: ESP_LINEUP
27+
value: 'np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])'
28+
type: assignment
29+
- config:
30+
name: Valence Band Offset
31+
operand: VALENCE_BAND_OFFSET
32+
value: 'abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))'
33+
results:
34+
- name: valence_band_offset
35+
type: assignment
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Valence band offset for an interface via the potential lineup method.
2+
# Designed to work with a 2D heterostructure, e.g. MoS2 on WS2.
3+
# The workflow assumes 3 structures being present:
4+
# - Interface - e.g. MoS2/WS2 heterostructure
5+
# - Interface Left - e.g. MoS2
6+
# - Interface Right - e.g. WS2
7+
# and repeats bandstructure + electrostatic potential calculation (subworkflow) for them.
8+
# Then, calculates the band offset based on the data extracted.
9+
#
10+
# Relevant references:
11+
# - http://dx.doi.org/10.1103/PhysRevLett.61.734
12+
# - http://dx.doi.org/10.1103/physrevb.44.5572
13+
# - http://dx.doi.org/10.1088/0953-8984/19/21/213203
14+
#
15+
16+
name: Valence Band Offset (2D)
17+
units:
18+
19+
# interface-related subworkflows
20+
- name: average_electrostatic_potential_via_band_structure
21+
type: subworkflow
22+
config:
23+
attributes:
24+
name: BS + Avg ESP (Interface)
25+
unitConfigs:
26+
- index: 0
27+
type: assignment
28+
config:
29+
attributes:
30+
name: Set Material Index (Interface)
31+
value: '0'
32+
- name: average_electrostastatic_potential_find_minima
33+
type: subworkflow
34+
config:
35+
attributes:
36+
name: Find ESP Values (Interface)
37+
unitConfigs:
38+
- index: 1
39+
type: assignment
40+
config:
41+
attributes:
42+
operand: AVG_ESP_INTERFACE
43+
44+
# interface-left-related subworkflows
45+
- name: average_electrostatic_potential_via_band_structure
46+
type: subworkflow
47+
config:
48+
attributes:
49+
name: BS + Avg ESP (interface left)
50+
unitConfigs:
51+
- index: 0
52+
type: assignment
53+
config:
54+
attributes:
55+
name: Set Material Index (Interface left)
56+
value: '1'
57+
- index: 2
58+
type: executionBuilder
59+
config:
60+
attributes:
61+
flowchartId: pw-bands-calculate-band-gap-left
62+
- index: 3
63+
type: assignment
64+
config:
65+
attributes:
66+
input:
67+
- name: band_gaps
68+
scope: pw-bands-calculate-band-gap-left
69+
- index: 4
70+
type: assignment
71+
config:
72+
attributes:
73+
operand: VBM_LEFT
74+
- index: 7
75+
type: executionBuilder
76+
config:
77+
attributes:
78+
flowchartId: average-electrostatic-potential-left
79+
- index: 8
80+
type: assignment
81+
config:
82+
attributes:
83+
input:
84+
- name: averaged_potential_profile
85+
scope: average-electrostatic-potential-left
86+
- name: average_electrostastatic_potential_find_minima
87+
type: subworkflow
88+
config:
89+
attributes:
90+
name: Find ESP Value (Interface left)
91+
unitConfigs:
92+
- index: 0
93+
type: executionBuilder
94+
config:
95+
attributes:
96+
flowchartId: python-find-extrema-left
97+
- index: 1
98+
type: assignment
99+
config:
100+
attributes:
101+
operand: AVG_ESP_LEFT
102+
input:
103+
- name: STDOUT
104+
scope: python-find-extrema-left
105+
106+
# interface-right-related subworkflows
107+
- name: average_electrostatic_potential_via_band_structure
108+
type: subworkflow
109+
config:
110+
attributes:
111+
name: BS + Avg ESP (interface right)
112+
unitConfigs:
113+
- index: 0
114+
type: assignment
115+
config:
116+
attributes:
117+
name: Set Material Index (Interface right)
118+
value: '2'
119+
- index: 2
120+
type: executionBuilder
121+
config:
122+
attributes:
123+
flowchartId: pw-bands-calculate-band-gap-right
124+
- index: 3
125+
type: assignment
126+
config:
127+
attributes:
128+
input:
129+
- name: band_gaps
130+
scope: pw-bands-calculate-band-gap-right
131+
- index: 4
132+
type: assignment
133+
config:
134+
attributes:
135+
operand: VBM_RIGHT
136+
- index: 7
137+
type: executionBuilder
138+
config:
139+
attributes:
140+
flowchartId: average-electrostatic-potential-right
141+
- index: 8
142+
type: assignment
143+
config:
144+
attributes:
145+
input:
146+
- name: averaged_potential_profile
147+
scope: average-electrostatic-potential-right
148+
- name: average_electrostastatic_potential_find_minima
149+
type: subworkflow
150+
config:
151+
attributes:
152+
name: Find ESP Value (Interface right)
153+
unitConfigs:
154+
- index: 0
155+
type: executionBuilder
156+
config:
157+
attributes:
158+
flowchartId: python-find-extrema-right
159+
- index: 1
160+
type: assignment
161+
config:
162+
attributes:
163+
operand: AVG_ESP_RIGHT
164+
input:
165+
- name: STDOUT
166+
scope: python-find-extrema-right
167+
168+
# final subworkflow to calculate valence band offset
169+
- name: valence_band_offset_calc_from_previous_esp_vbm
170+
type: subworkflow

0 commit comments

Comments
 (0)