|
6 | 6 | Reference, MEnum, derived)
|
7 | 7 | from nomad.metainfo.search_extension import Search
|
8 | 8 | from nomad.datamodel.metainfo.simulation.calculation import Calculation
|
9 |
| -from nomad.datamodel.metainfo.simulation.run import RunReference |
| 9 | +from nomad.datamodel.metainfo.simulation.run import Run |
10 | 10 | from .common import FastAccess
|
11 | 11 |
|
12 | 12 |
|
@@ -1141,40 +1141,6 @@ class SinglePoint(MSection):
|
1141 | 1141 | ''')
|
1142 | 1142 |
|
1143 | 1143 |
|
1144 |
| -class WorkflowReference(MSection): |
1145 |
| - ''' |
1146 |
| - Section that provides a link between a section to a section workflow. Such a link is |
1147 |
| - necessary for example between an Debye model that uses a the poisson ratio calculated |
1148 |
| - from an elastic workflow. The relationship should be described by kind and the |
1149 |
| - referred section workflow is given by value. An external url can also be provided in |
1150 |
| - place of value. |
1151 |
| - ''' |
1152 |
| - |
1153 |
| - m_def = Section(validate=False) |
1154 |
| - |
1155 |
| - kind = Quantity( |
1156 |
| - type=str, |
1157 |
| - shape=[], |
1158 |
| - description=''' |
1159 |
| - Defines the relationship between the referenced section workflow and the present |
1160 |
| - section. |
1161 |
| - ''') |
1162 |
| - |
1163 |
| - external_url = Quantity( |
1164 |
| - type=str, |
1165 |
| - shape=[], |
1166 |
| - description=''' |
1167 |
| - URL used to reference an externally stored section workflow. |
1168 |
| - ''') |
1169 |
| - |
1170 |
| - value = Quantity( |
1171 |
| - type=Reference(SectionProxy('Workflow')), |
1172 |
| - shape=[], |
1173 |
| - description=''' |
1174 |
| - Value of the referenced section wofklow. |
1175 |
| - ''') |
1176 |
| - |
1177 |
| - |
1178 | 1144 | class Workflow(MSection):
|
1179 | 1145 | '''
|
1180 | 1146 | Section containing the results of a workflow.
|
@@ -1224,6 +1190,31 @@ class Workflow(MSection):
|
1224 | 1190 | simulation.
|
1225 | 1191 | ''')
|
1226 | 1192 |
|
| 1193 | + run_ref = Quantity( |
| 1194 | + type=Reference(Run.m_def), |
| 1195 | + shape=[], |
| 1196 | + description=''' |
| 1197 | + Links the section workflow to the section run that contains the calculations. |
| 1198 | + ''', |
| 1199 | + categories=[FastAccess]) |
| 1200 | + |
| 1201 | + n_references = Quantity( |
| 1202 | + type=np.dtype(np.int32), |
| 1203 | + shape=[], |
| 1204 | + description=''' |
| 1205 | + Number of references to the current section workflow. |
| 1206 | + ''') |
| 1207 | + |
| 1208 | + workflows_ref = Quantity( |
| 1209 | + type=Reference(SectionProxy('Workflow')), |
| 1210 | + shape=['n_references'], |
| 1211 | + description=''' |
| 1212 | + Links the the current section to other workflow sections. Such a link is necessary |
| 1213 | + for example between an Debye model that uses a the poisson ratio calculated |
| 1214 | + from an elastic workflow. |
| 1215 | + ''', |
| 1216 | + categories=[FastAccess]) |
| 1217 | + |
1227 | 1218 | single_point = SubSection(
|
1228 | 1219 | sub_section=SinglePoint.m_def,
|
1229 | 1220 | # TODO determine if there is a need for this to be a repeating section
|
@@ -1280,9 +1271,3 @@ class Workflow(MSection):
|
1280 | 1271 | thermodynamics = SubSection(
|
1281 | 1272 | sub_section=Thermodynamics.m_def,
|
1282 | 1273 | repeats=False)
|
1283 |
| - |
1284 |
| - workflow_ref = SubSection( |
1285 |
| - sub_section=WorkflowReference.m_def, repeats=True) |
1286 |
| - |
1287 |
| - run_ref = SubSection( |
1288 |
| - sub_section=RunReference.m_def, repeats=True) |
0 commit comments