diff --git a/README.md b/README.md index cde527d..03cf108 100644 --- a/README.md +++ b/README.md @@ -43,23 +43,23 @@ JSON file: "5": 2 }, "edges": [ - {"tn": 0, "th": "x", "sn": 1, "sh": "x"}, - {"tn": 1, "th": "x", "sn": 4, "sh": null}, - {"tn": 1, "th": "y", "sn": 5, "sh": null}, - {"tn": 0, "th": "y", "sn": 2, "sh": "y"}, - {"tn": 2, "th": "x", "sn": 4, "sh": null}, - {"tn": 2, "th": "y", "sn": 5, "sh": null}, - {"tn": 0, "th": "z", "sn": 3, "sh": "z"}, - {"tn": 3, "th": "x", "sn": 4, "sh": null}, - {"tn": 3, "th": "y", "sn": 5, "sh": null} + {"target": 0, "targetPort": "x", "source": 1, "sourcePort": "x"}, + {"target": 1, "targetPort": "x", "source": 4, "sourcePort": null}, + {"target": 1, "targetPort": "y", "source": 5, "sourcePort": null}, + {"target": 0, "targetPort": "y", "source": 2, "sourcePort": "y"}, + {"target": 2, "targetPort": "x", "source": 4, "sourcePort": null}, + {"target": 2, "targetPort": "y", "source": 5, "sourcePort": null}, + {"target": 0, "targetPort": "z", "source": 3, "sourcePort": "z"}, + {"target": 3, "targetPort": "x", "source": 4, "sourcePort": null}, + {"target": 3, "targetPort": "y", "source": 5, "sourcePort": null} ] } ``` The abbreviations in the definition of the edges are: -* `tn` - target node -* `th` - target handle - for a node with multiple input parameters the target handle specifies which input parameter to use. -* `sn` - source node -* `sh` - source handle - for a node with multiple output parameters the source handle specifies which output parameter to use. +* `target` - target node +* `targetPort` - target port - for a node with multiple input parameters the target port specifies which input parameter to use. +* `source` - source node +* `sourcePort` - source port - for a node with multiple output parameters the source port specifies which output parameter to use. As the workflow does not require any additional resources, as it is only using built-in functionality of the Python standard library. diff --git a/book/simple.md b/book/simple.md index c02fac1..d38abcb 100644 --- a/book/simple.md +++ b/book/simple.md @@ -28,23 +28,23 @@ JSON file: "5": 2 }, "edges": [ - {"tn": 0, "th": "x", "sn": 1, "sh": "x"}, - {"tn": 1, "th": "x", "sn": 4, "sh": null}, - {"tn": 1, "th": "y", "sn": 5, "sh": null}, - {"tn": 0, "th": "y", "sn": 2, "sh": "y"}, - {"tn": 2, "th": "x", "sn": 4, "sh": null}, - {"tn": 2, "th": "y", "sn": 5, "sh": null}, - {"tn": 0, "th": "z", "sn": 3, "sh": "z"}, - {"tn": 3, "th": "x", "sn": 4, "sh": null}, - {"tn": 3, "th": "y", "sn": 5, "sh": null} + {"target": 0, "targetPort": "x", "source": 1, "sourcePort": "x"}, + {"target": 1, "targetPort": "x", "source": 4, "sourcePort": null}, + {"target": 1, "targetPort": "y", "source": 5, "sourcePort": null}, + {"target": 0, "targetPort": "y", "source": 2, "sourcePort": "y"}, + {"target": 2, "targetPort": "x", "source": 4, "sourcePort": null}, + {"target": 2, "targetPort": "y", "source": 5, "sourcePort": null}, + {"target": 0, "targetPort": "z", "source": 3, "sourcePort": "z"}, + {"target": 3, "targetPort": "x", "source": 4, "sourcePort": null}, + {"target": 3, "targetPort": "y", "source": 5, "sourcePort": null} ] } ``` The abbreviations in the definition of the edges are: -* `tn` - target node -* `th` - target handle - for a node with multiple input parameters the target handle specifies which input parameter to use. -* `sn` - source node -* `sh` - source handle - for a node with multiple output parameters the source handle specifies which output parameter to use. +* `target` - target node +* `targetPort` - target port - for a node with multiple input parameters the target port specifies which input parameter to use. +* `source` - source node +* `sourcePort` - source port - for a node with multiple output parameters the source port specifies which output parameter to use. As the workflow does not require any additional resources, as it is only using built-in functionality of the Python standard library. diff --git a/python_workflow_definition/src/python_workflow_definition/aiida.py b/python_workflow_definition/src/python_workflow_definition/aiida.py index dc9e8e6..6d2c444 100644 --- a/python_workflow_definition/src/python_workflow_definition/aiida.py +++ b/python_workflow_definition/src/python_workflow_definition/aiida.py @@ -30,32 +30,32 @@ def load_workflow_json(file_name): # add links for link in data["edges"]: - to_task = task_name_mapping[str(link["tn"])] + to_task = task_name_mapping[str(link["target"])] # if the input is not exit, it means we pass the data into to the kwargs # in this case, we add the input socket - if link["th"] not in to_task.inputs: - to_socket = to_task.add_input( "workgraph.any", name=link["th"]) + if link["targetPort"] not in to_task.inputs: + to_socket = to_task.add_input( "workgraph.any", name=link["targetPort"]) else: - to_socket = to_task.inputs[link["th"]] - from_task = task_name_mapping[str(link["sn"])] + to_socket = to_task.inputs[link["targetPort"]] + from_task = task_name_mapping[str(link["source"])] if isinstance(from_task, orm.Data): to_socket.value = from_task else: try: - if link["sh"] is None: - link["sh"] = "result" + if link["sourcePort"] is None: + link["sourcePort"] = "result" # because we are not define the outputs explicitly during the pythonjob creation # we add it here, and assume the output exit - if link["sh"] not in from_task.outputs: - # if str(link["sh"]) not in from_task.outputs: + if link["sourcePort"] not in from_task.outputs: + # if str(link["sourcePort"]) not in from_task.outputs: from_socket = from_task.add_output( "workgraph.any", - name=link["sh"], - # name=str(link["sh"]), + name=link["sourcePort"], + # name=str(link["sourcePort"]), metadata={"is_function_output": True}, ) else: - from_socket = from_task.outputs[link["sh"]] + from_socket = from_task.outputs[link["sourcePort"]] wg.add_link(from_socket, to_socket) except Exception as e: @@ -84,10 +84,10 @@ def write_workflow_json(wg, file_name): # if the from socket is the default result, we set it to None if link_data["from_socket"] == "result": link_data["from_socket"] = None - link_data["tn"] = node_name_mapping[link_data.pop("to_node")] - link_data["th"] = link_data.pop("to_socket") - link_data["sn"] = node_name_mapping[link_data.pop("from_node")] - link_data["sh"] = link_data.pop("from_socket") + link_data["target"] = node_name_mapping[link_data.pop("to_node")] + link_data["targetPort"] = link_data.pop("to_socket") + link_data["source"] = node_name_mapping[link_data.pop("from_node")] + link_data["sourcePort"] = link_data.pop("from_socket") data["edges"].append(link_data) for node in wg.tasks: @@ -112,10 +112,10 @@ def write_workflow_json(wg, file_name): else: input_node_name = data_node_name_mapping[input.value.uuid] data["edges"].append({ - "tn": node_name_mapping[node.name], - "th": input._name, - "sn": input_node_name, - "sh": None + "target": node_name_mapping[node.name], + "targetPort": input._name, + "source": input_node_name, + "sourcePort": None }) with open(file_name, "w") as f: # json.dump({"nodes": data[], "edges": edges_new_lst}, f) diff --git a/python_workflow_definition/src/python_workflow_definition/executorlib.py b/python_workflow_definition/src/python_workflow_definition/executorlib.py index 3e301a5..eb13319 100644 --- a/python_workflow_definition/src/python_workflow_definition/executorlib.py +++ b/python_workflow_definition/src/python_workflow_definition/executorlib.py @@ -12,7 +12,7 @@ def get_item(obj, key): def _get_value(result_dict, nodes_new_dict, link_dict, exe): - source, source_handle = link_dict["sn"], link_dict["sh"] + source, source_handle = link_dict["source"], link_dict["sourcePort"] if source in result_dict.keys(): result = result_dict[source] elif source in nodes_new_dict.keys(): diff --git a/python_workflow_definition/src/python_workflow_definition/jobflow.py b/python_workflow_definition/src/python_workflow_definition/jobflow.py index b3d3203..a7b9221 100644 --- a/python_workflow_definition/src/python_workflow_definition/jobflow.py +++ b/python_workflow_definition/src/python_workflow_definition/jobflow.py @@ -26,27 +26,27 @@ def _get_nodes_dict(function_dict): def _get_edge_from_dict(target, key, value_dict, nodes_mapping_dict): if len(value_dict['attributes']) == 1: - return {'tn': target, 'th': key, "sn": nodes_mapping_dict[value_dict['uuid']], 'sh': value_dict['attributes'][0][1]} + return {"target": target, "targetPort": key, "source": nodes_mapping_dict[value_dict["uuid"]], "sourcePort": value_dict["attributes"][0][1]} else: - return {'tn': target, 'th': key, "sn": nodes_mapping_dict[value_dict['uuid']], 'sh': None} + return {"target": target, "targetPort": key, "source": nodes_mapping_dict[value_dict["uuid"]], "sourcePort": None} def _get_edges_and_extend_nodes(flow_dict, nodes_mapping_dict, nodes_dict): edges_lst = [] - for job in flow_dict['jobs']: - for k, v in job['function_kwargs'].items(): - if isinstance(v, dict) and '@module' in v and '@class' in v and '@version' in v: + for job in flow_dict["jobs"]: + for k, v in job["function_kwargs"].items(): + if isinstance(v, dict) and "@module" in v and "@class" in v and "@version" in v: edges_lst.append(_get_edge_from_dict( target=nodes_mapping_dict[job["uuid"]], key=k, value_dict=v, nodes_mapping_dict=nodes_mapping_dict, )) - elif isinstance(v, dict) and any([isinstance(el, dict) and '@module' in el and '@class' in el and '@version' in el for el in v.values()]): + elif isinstance(v, dict) and any([isinstance(el, dict) and "@module" in el and "@class" in el and "@version" in el for el in v.values()]): node_dict_index = len(nodes_dict) nodes_dict[node_dict_index] = get_dict for kt, vt in v.items(): - if isinstance(vt, dict) and '@module' in vt and '@class' in vt and '@version' in vt: + if isinstance(vt, dict) and "@module" in vt and "@class" in vt and "@version" in vt: edges_lst.append(_get_edge_from_dict( target=node_dict_index, key=kt, @@ -59,13 +59,13 @@ def _get_edges_and_extend_nodes(flow_dict, nodes_mapping_dict, nodes_dict): nodes_dict[node_index] = vt else: node_index = {str(tv): tk for tk, tv in nodes_dict.items()}[str(vt)] - edges_lst.append({'tn': node_dict_index, 'th': kt, "sn": node_index, 'sh': None}) - edges_lst.append({'tn': nodes_mapping_dict[job["uuid"]], 'th': k, "sn": node_dict_index, 'sh': None}) - elif isinstance(v, list) and any([isinstance(el, dict) and '@module' in el and '@class' in el and '@version' in el for el in v]): + edges_lst.append({"target": node_dict_index, "targetPort": kt, "source": node_index, "sourcePort": None}) + edges_lst.append({"target": nodes_mapping_dict[job["uuid"]], "targetPort": k, "source": node_dict_index, "sourcePort": None}) + elif isinstance(v, list) and any([isinstance(el, dict) and "@module" in el and "@class" in el and "@version" in el for el in v]): node_list_index = len(nodes_dict) nodes_dict[node_list_index] = get_list for kt, vt in enumerate(v): - if isinstance(vt, dict) and '@module' in vt and '@class' in vt and '@version' in vt: + if isinstance(vt, dict) and "@module" in vt and "@class" in vt and "@version" in vt: edges_lst.append(_get_edge_from_dict( target=node_list_index, key=str(kt), @@ -78,15 +78,15 @@ def _get_edges_and_extend_nodes(flow_dict, nodes_mapping_dict, nodes_dict): nodes_dict[node_index] = vt else: node_index = {str(tv): tk for tk, tv in nodes_dict.items()}[str(vt)] - edges_lst.append({'tn': node_list_index, 'th': kt, "sn": node_index, 'sh': None}) - edges_lst.append({'tn': nodes_mapping_dict[job["uuid"]], 'th': k, "sn": node_list_index, 'sh': None}) + edges_lst.append({"target": node_list_index, "targetPort": kt, "source": node_index, "sourcePort": None}) + edges_lst.append({"target": nodes_mapping_dict[job["uuid"]], "targetPort": k, "source": node_list_index, "sourcePort": None}) else: if v not in nodes_dict.values(): node_index = len(nodes_dict) nodes_dict[node_index] = v else: node_index = {tv: tk for tk, tv in nodes_dict.items()}[v] - edges_lst.append({'tn': nodes_mapping_dict[job["uuid"]], 'th': k, "sn": node_index, 'sh': None}) + edges_lst.append({"target": nodes_mapping_dict[job["uuid"]], "targetPort": k, "source": node_index, "sourcePort": None}) return edges_lst, nodes_dict @@ -99,7 +99,7 @@ def _resort_total_lst(total_dict, nodes_dict): for ind in sorted(total_dict.keys()): connect = total_dict[ind] if ind not in ordered_lst: - source_lst = [sd["sn"] for sd in connect.values()] + source_lst = [sd["source"] for sd in connect.values()] if all([s in ordered_lst or s in nodes_without_dep_lst for s in source_lst]): ordered_lst.append(ind) total_new_dict[ind] = connect @@ -109,11 +109,11 @@ def _resort_total_lst(total_dict, nodes_dict): def _group_edges(edges_lst): total_dict = {} for ed_major in edges_lst: - target_id = ed_major["tn"] + target_id = ed_major["target"] tmp_lst = [] if target_id not in total_dict.keys(): for ed in edges_lst: - if target_id == ed["tn"]: + if target_id == ed["target"]: tmp_lst.append(ed) total_dict[target_id] = get_kwargs(lst=tmp_lst) return total_dict @@ -139,8 +139,8 @@ def get_attr_helper(obj, source_handle): else: fn = job(method=v) kwargs = { - kw: input_dict[vw['sn']] if vw['sn'] in input_dict else get_attr_helper( - obj=memory_dict[vw['sn']], source_handle=vw['sh']) + kw: input_dict[vw["source"]] if vw["source"] in input_dict else get_attr_helper( + obj=memory_dict[vw["source"]], source_handle=vw["sourcePort"]) for kw, vw in total_dict[k].items() } memory_dict[k] = fn(**kwargs) @@ -160,15 +160,15 @@ def load_workflow_json(file_name): edges_new_lst = [] for edge in content["edges"]: - if edge['sh'] is None: + if edge["sourcePort"] is None: edges_new_lst.append(edge) else: edges_new_lst.append( { - 'tn': edge['tn'], - 'th': edge['th'], - 'sn': edge['sn'], - 'sh': str(edge['sh']), + "target": edge["target"], + "targetPort": edge["targetPort"], + "source": edge["source"], + "sourcePort": str(edge["sourcePort"]), } ) diff --git a/python_workflow_definition/src/python_workflow_definition/purepython.py b/python_workflow_definition/src/python_workflow_definition/purepython.py index 019f029..bea3493 100644 --- a/python_workflow_definition/src/python_workflow_definition/purepython.py +++ b/python_workflow_definition/src/python_workflow_definition/purepython.py @@ -13,7 +13,7 @@ def resort_total_lst(total_lst, nodes_dict): while len(total_new_lst) < len(total_lst): for ind, connect in total_lst: if ind not in ordered_lst: - source_lst = [sd["sn"] for sd in connect.values()] + source_lst = [sd["source"] for sd in connect.values()] if all([s in ordered_lst or s in nodes_without_dep_lst for s in source_lst]): ordered_lst.append(ind) total_new_lst.append([ind, connect]) @@ -21,22 +21,22 @@ def resort_total_lst(total_lst, nodes_dict): def group_edges(edges_lst): - edges_sorted_lst = sorted(edges_lst, key=lambda x: x["tn"], reverse=True) + edges_sorted_lst = sorted(edges_lst, key=lambda x: x["target"], reverse=True) total_lst, tmp_lst = [], [] - target_id = edges_sorted_lst[0]["tn"] + target_id = edges_sorted_lst[0]["target"] for ed in edges_sorted_lst: - if target_id == ed["tn"]: + if target_id == ed["target"]: tmp_lst.append(ed) else: total_lst.append((target_id, get_kwargs(lst=tmp_lst))) - target_id = ed["tn"] + target_id = ed["target"] tmp_lst = [ed] total_lst.append((target_id, get_kwargs(lst=tmp_lst))) return total_lst def _get_value(result_dict, nodes_new_dict, link_dict): - source, source_handle = link_dict["sn"], link_dict["sh"] + source, source_handle = link_dict["source"], link_dict["sourcePort"] if source in result_dict.keys(): result = result_dict[source] elif source in nodes_new_dict.keys(): diff --git a/python_workflow_definition/src/python_workflow_definition/pyiron_base.py b/python_workflow_definition/src/python_workflow_definition/pyiron_base.py index 0e31924..4b1050d 100644 --- a/python_workflow_definition/src/python_workflow_definition/pyiron_base.py +++ b/python_workflow_definition/src/python_workflow_definition/pyiron_base.py @@ -16,7 +16,7 @@ def _resort_total_lst(total_lst, nodes_dict): while len(total_new_lst) < len(total_lst): for ind, connect in total_lst: if ind not in ordered_lst: - source_lst = [sd["sn"] for sd in connect.values()] + source_lst = [sd["source"] for sd in connect.values()] if all([s in ordered_lst or s in nodes_without_dep_lst for s in source_lst]): ordered_lst.append(ind) total_new_lst.append([ind, connect]) @@ -24,15 +24,15 @@ def _resort_total_lst(total_lst, nodes_dict): def _group_edges(edges_lst): - edges_sorted_lst = sorted(edges_lst, key=lambda x: x["tn"], reverse=True) + edges_sorted_lst = sorted(edges_lst, key=lambda x: x["target"], reverse=True) total_lst, tmp_lst = [], [] - target_id = edges_sorted_lst[0]["tn"] + target_id = edges_sorted_lst[0]["target"] for ed in edges_sorted_lst: - if target_id == ed["tn"]: + if target_id == ed["target"]: tmp_lst.append(ed) else: total_lst.append((target_id, get_kwargs(lst=tmp_lst))) - target_id = ed["tn"] + target_id = ed["target"] tmp_lst = [ed] total_lst.append((target_id, get_kwargs(lst=tmp_lst))) return total_lst @@ -54,8 +54,8 @@ def _get_delayed_object_dict(total_lst, nodes_dict, source_handle_dict, pyiron_p k: _get_source( nodes_dict=nodes_dict, delayed_object_dict=delayed_object_dict, - source=v["sn"], - sourceHandle=v["sh"], + source=v["source"], + sourceHandle=v["sourcePort"], ) for k, v in input_dict.items() } @@ -152,24 +152,24 @@ def _get_edges_dict(edges_lst, nodes_dict, connection_dict, lookup_dict): if isinstance(output, DelayedObject): if output._list_index is not None: edges_dict_lst.append({ - "tn": target, - "th": target_handle, - "sn": connection_dict[output_name], - "sh": f"s_{output._list_index}", # check for list index + "target": target, + "targetPort": target_handle, + "source": connection_dict[output_name], + "sourcePort": f"s_{output._list_index}", # check for list index }) else: edges_dict_lst.append({ - "tn": target, - "th": target_handle, - "sn": connection_dict[output_name], - "sh": output._output_key, # check for list index + "target": target, + "targetPort": target_handle, + "source": connection_dict[output_name], + "sourcePort": output._output_key, # check for list index }) else: edges_dict_lst.append({ - "tn": target, - "th": target_handle, - "sn": connection_dict[output_name], - "sh": None, + "target": target, + "targetPort": target_handle, + "source": connection_dict[output_name], + "sourcePort": None, }) existing_connection_lst.append(connection_name) return edges_dict_lst diff --git a/python_workflow_definition/src/python_workflow_definition/shared.py b/python_workflow_definition/src/python_workflow_definition/shared.py index 444aee6..223fa66 100644 --- a/python_workflow_definition/src/python_workflow_definition/shared.py +++ b/python_workflow_definition/src/python_workflow_definition/shared.py @@ -9,16 +9,16 @@ def get_list(**kwargs): def get_kwargs(lst): - return {t["th"]: {"sn": t["sn"], "sh": t["sh"]} for t in lst} + return {t["targetPort"]: {"source": t["source"], "sourcePort": t["sourcePort"]} for t in lst} def get_source_handles(edges_lst): source_handle_dict = {} for ed in edges_lst: - if ed["sn"] not in source_handle_dict.keys(): - source_handle_dict[ed["sn"]] = [ed["sh"]] + if ed["source"] not in source_handle_dict.keys(): + source_handle_dict[ed["source"]] = [ed["sourcePort"]] else: - source_handle_dict[ed["sn"]].append(ed["sh"]) + source_handle_dict[ed["source"]].append(ed["sourcePort"]) return { k: list(range(len(v))) if len(v) > 1 and all([el is None for el in v]) else v for k, v in source_handle_dict.items() diff --git a/workflow_nfdi.json b/workflow_nfdi.json index 141d170..8ca4a3c 100644 --- a/workflow_nfdi.json +++ b/workflow_nfdi.json @@ -9,16 +9,16 @@ "6": 2.0 }, "edges": [ - {"tn": 0, "th": "domain_size", "sn": 6, "sh": null}, - {"tn": 1, "th": "gmsh_output_file", "sn": 0, "sh": null}, - {"tn": 2, "th": "meshio_output_xdmf", "sn": 1, "sh": "xdmf_file"}, - {"tn": 2, "th": "meshio_output_h5", "sn": 1, "sh": "h5_file"}, - {"tn": 3, "th": "poisson_output_pvd_file", "sn": 2, "sh": "pvd_file"}, - {"tn": 3, "th": "poisson_output_vtu_file", "sn": 2, "sh": "vtu_file"}, - {"tn": 4, "th": "pvbatch_output_file", "sn": 3, "sh": null}, - {"tn": 4, "th": "ndofs", "sn": 2, "sh": "numdofs"}, - {"tn": 4, "th": "domain_size", "sn": 6, "sh": null}, - {"tn": 5, "th": "macros_tex", "sn": 4, "sh": null}, - {"tn": 5, "th": "plot_file", "sn": 3, "sh": null} + {"target": 0, "targetPort": "domain_size", "source": 6, "sourcePort": null}, + {"target": 1, "targetPort": "gmsh_output_file", "source": 0, "sourcePort": null}, + {"target": 2, "targetPort": "meshio_output_xdmf", "source": 1, "sourcePort": "xdmf_file"}, + {"target": 2, "targetPort": "meshio_output_h5", "source": 1, "sourcePort": "h5_file"}, + {"target": 3, "targetPort": "poisson_output_pvd_file", "source": 2, "sourcePort": "pvd_file"}, + {"target": 3, "targetPort": "poisson_output_vtu_file", "source": 2, "sourcePort": "vtu_file"}, + {"target": 4, "targetPort": "pvbatch_output_file", "source": 3, "sourcePort": null}, + {"target": 4, "targetPort": "ndofs", "source": 2, "sourcePort": "numdofs"}, + {"target": 4, "targetPort": "domain_size", "source": 6, "sourcePort": null}, + {"target": 5, "targetPort": "macros_tex", "source": 4, "sourcePort": null}, + {"target": 5, "targetPort": "plot_file", "source": 3, "sourcePort": null} ] } \ No newline at end of file diff --git a/workflow_qe.json b/workflow_qe.json index b26b658..36256cb 100644 --- a/workflow_qe.json +++ b/workflow_qe.json @@ -34,64 +34,64 @@ "31": "python_workflow_definition.shared.get_list" }, "edges": [ - {"tn": 0, "th": "element", "sn": 9, "sh": null}, - {"tn": 0, "th": "a", "sn": 10, "sh": null}, - {"tn": 0, "th": "cubic", "sn": 11, "sh": null}, - {"tn": 1, "th": "working_directory", "sn": 12, "sh": null}, - {"tn": 13, "th": "structure", "sn": 0, "sh": null}, - {"tn": 13, "th": "pseudopotentials", "sn": 14, "sh": null}, - {"tn": 13, "th": "kpts", "sn": 15, "sh": null}, - {"tn": 13, "th": "calculation", "sn": 16, "sh": null}, - {"tn": 13, "th": "smearing", "sn": 17, "sh": null}, - {"tn": 1, "th": "input_dict", "sn": 13, "sh": null}, - {"tn": 2, "th": "structure", "sn": 1, "sh": "structure"}, - {"tn": 2, "th": "strain_lst", "sn": 18, "sh": null}, - {"tn": 3, "th": "working_directory", "sn": 19, "sh": null}, - {"tn": 20, "th": "structure", "sn": 2, "sh": "s_0"}, - {"tn": 20, "th": "pseudopotentials", "sn": 14, "sh": null}, - {"tn": 20, "th": "kpts", "sn": 15, "sh": null}, - {"tn": 20, "th": "calculation", "sn": 21, "sh": null}, - {"tn": 20, "th": "smearing", "sn": 17, "sh": null}, - {"tn": 3, "th": "input_dict", "sn": 20, "sh": null}, - {"tn": 4, "th": "working_directory", "sn": 22, "sh": null}, - {"tn": 23, "th": "structure", "sn": 2, "sh": "s_1"}, - {"tn": 23, "th": "pseudopotentials", "sn": 14, "sh": null}, - {"tn": 23, "th": "kpts", "sn": 15, "sh": null}, - {"tn": 23, "th": "calculation", "sn": 21, "sh": null}, - {"tn": 23, "th": "smearing", "sn": 17, "sh": null}, - {"tn": 4, "th": "input_dict", "sn": 23, "sh": null}, - {"tn": 5, "th": "working_directory", "sn": 24, "sh": null}, - {"tn": 25, "th": "structure", "sn": 2, "sh": "s_2"}, - {"tn": 25, "th": "pseudopotentials", "sn": 14, "sh": null}, - {"tn": 25, "th": "kpts", "sn": 15, "sh": null}, - {"tn": 25, "th": "calculation", "sn": 21, "sh": null}, - {"tn": 25, "th": "smearing", "sn": 17, "sh": null}, - {"tn": 5, "th": "input_dict", "sn": 25, "sh": null}, - {"tn": 6, "th": "working_directory", "sn": 26, "sh": null}, - {"tn": 27, "th": "structure", "sn": 2, "sh": "s_3"}, - {"tn": 27, "th": "pseudopotentials", "sn": 14, "sh": null}, - {"tn": 27, "th": "kpts", "sn": 15, "sh": null}, - {"tn": 27, "th": "calculation", "sn": 21, "sh": null}, - {"tn": 27, "th": "smearing", "sn": 17, "sh": null}, - {"tn": 6, "th": "input_dict", "sn": 27, "sh": null}, - {"tn": 7, "th": "working_directory", "sn": 28, "sh": null}, - {"tn": 29, "th": "structure", "sn": 2, "sh": "s_4"}, - {"tn": 29, "th": "pseudopotentials", "sn": 14, "sh": null}, - {"tn": 29, "th": "kpts", "sn": 15, "sh": null}, - {"tn": 29, "th": "calculation", "sn": 21, "sh": null}, - {"tn": 29, "th": "smearing", "sn": 17, "sh": null}, - {"tn": 7, "th": "input_dict", "sn": 29, "sh": null}, - {"tn": 30, "th": "0", "sn": 3, "sh": "volume"}, - {"tn": 30, "th": "1", "sn": 4, "sh": "volume"}, - {"tn": 30, "th": "2", "sn": 5, "sh": "volume"}, - {"tn": 30, "th": "3", "sn": 6, "sh": "volume"}, - {"tn": 30, "th": "4", "sn": 7, "sh": "volume"}, - {"tn": 8, "th": "volume_lst", "sn": 30, "sh": null}, - {"tn": 31, "th": "0", "sn": 3, "sh": "energy"}, - {"tn": 31, "th": "1", "sn": 4, "sh": "energy"}, - {"tn": 31, "th": "2", "sn": 5, "sh": "energy"}, - {"tn": 31, "th": "3", "sn": 6, "sh": "energy"}, - {"tn": 31, "th": "4", "sn": 7, "sh": "energy"}, - {"tn": 8, "th": "energy_lst", "sn": 31, "sh": null} + {"target": 0, "targetPort": "element", "source": 9, "sourcePort": null}, + {"target": 0, "targetPort": "a", "source": 10, "sourcePort": null}, + {"target": 0, "targetPort": "cubic", "source": 11, "sourcePort": null}, + {"target": 1, "targetPort": "working_directory", "source": 12, "sourcePort": null}, + {"target": 13, "targetPort": "structure", "source": 0, "sourcePort": null}, + {"target": 13, "targetPort": "pseudopotentials", "source": 14, "sourcePort": null}, + {"target": 13, "targetPort": "kpts", "source": 15, "sourcePort": null}, + {"target": 13, "targetPort": "calculation", "source": 16, "sourcePort": null}, + {"target": 13, "targetPort": "smearing", "source": 17, "sourcePort": null}, + {"target": 1, "targetPort": "input_dict", "source": 13, "sourcePort": null}, + {"target": 2, "targetPort": "structure", "source": 1, "sourcePort": "structure"}, + {"target": 2, "targetPort": "strain_lst", "source": 18, "sourcePort": null}, + {"target": 3, "targetPort": "working_directory", "source": 19, "sourcePort": null}, + {"target": 20, "targetPort": "structure", "source": 2, "sourcePort": "s_0"}, + {"target": 20, "targetPort": "pseudopotentials", "source": 14, "sourcePort": null}, + {"target": 20, "targetPort": "kpts", "source": 15, "sourcePort": null}, + {"target": 20, "targetPort": "calculation", "source": 21, "sourcePort": null}, + {"target": 20, "targetPort": "smearing", "source": 17, "sourcePort": null}, + {"target": 3, "targetPort": "input_dict", "source": 20, "sourcePort": null}, + {"target": 4, "targetPort": "working_directory", "source": 22, "sourcePort": null}, + {"target": 23, "targetPort": "structure", "source": 2, "sourcePort": "s_1"}, + {"target": 23, "targetPort": "pseudopotentials", "source": 14, "sourcePort": null}, + {"target": 23, "targetPort": "kpts", "source": 15, "sourcePort": null}, + {"target": 23, "targetPort": "calculation", "source": 21, "sourcePort": null}, + {"target": 23, "targetPort": "smearing", "source": 17, "sourcePort": null}, + {"target": 4, "targetPort": "input_dict", "source": 23, "sourcePort": null}, + {"target": 5, "targetPort": "working_directory", "source": 24, "sourcePort": null}, + {"target": 25, "targetPort": "structure", "source": 2, "sourcePort": "s_2"}, + {"target": 25, "targetPort": "pseudopotentials", "source": 14, "sourcePort": null}, + {"target": 25, "targetPort": "kpts", "source": 15, "sourcePort": null}, + {"target": 25, "targetPort": "calculation", "source": 21, "sourcePort": null}, + {"target": 25, "targetPort": "smearing", "source": 17, "sourcePort": null}, + {"target": 5, "targetPort": "input_dict", "source": 25, "sourcePort": null}, + {"target": 6, "targetPort": "working_directory", "source": 26, "sourcePort": null}, + {"target": 27, "targetPort": "structure", "source": 2, "sourcePort": "s_3"}, + {"target": 27, "targetPort": "pseudopotentials", "source": 14, "sourcePort": null}, + {"target": 27, "targetPort": "kpts", "source": 15, "sourcePort": null}, + {"target": 27, "targetPort": "calculation", "source": 21, "sourcePort": null}, + {"target": 27, "targetPort": "smearing", "source": 17, "sourcePort": null}, + {"target": 6, "targetPort": "input_dict", "source": 27, "sourcePort": null}, + {"target": 7, "targetPort": "working_directory", "source": 28, "sourcePort": null}, + {"target": 29, "targetPort": "structure", "source": 2, "sourcePort": "s_4"}, + {"target": 29, "targetPort": "pseudopotentials", "source": 14, "sourcePort": null}, + {"target": 29, "targetPort": "kpts", "source": 15, "sourcePort": null}, + {"target": 29, "targetPort": "calculation", "source": 21, "sourcePort": null}, + {"target": 29, "targetPort": "smearing", "source": 17, "sourcePort": null}, + {"target": 7, "targetPort": "input_dict", "source": 29, "sourcePort": null}, + {"target": 30, "targetPort": "0", "source": 3, "sourcePort": "volume"}, + {"target": 30, "targetPort": "1", "source": 4, "sourcePort": "volume"}, + {"target": 30, "targetPort": "2", "source": 5, "sourcePort": "volume"}, + {"target": 30, "targetPort": "3", "source": 6, "sourcePort": "volume"}, + {"target": 30, "targetPort": "4", "source": 7, "sourcePort": "volume"}, + {"target": 8, "targetPort": "volume_lst", "source": 30, "sourcePort": null}, + {"target": 31, "targetPort": "0", "source": 3, "sourcePort": "energy"}, + {"target": 31, "targetPort": "1", "source": 4, "sourcePort": "energy"}, + {"target": 31, "targetPort": "2", "source": 5, "sourcePort": "energy"}, + {"target": 31, "targetPort": "3", "source": 6, "sourcePort": "energy"}, + {"target": 31, "targetPort": "4", "source": 7, "sourcePort": "energy"}, + {"target": 8, "targetPort": "energy_lst", "source": 31, "sourcePort": null} ] } \ No newline at end of file diff --git a/workflow_simple.json b/workflow_simple.json index 4a30bce..7f5a5f5 100644 --- a/workflow_simple.json +++ b/workflow_simple.json @@ -6,10 +6,10 @@ "3": 2 }, "edges": [ - {"tn": 0, "th": "x", "sn": 2, "sh": null}, - {"tn": 0, "th": "y", "sn": 3, "sh": null}, - {"tn": 1, "th": "x", "sn": 0, "sh": "x"}, - {"tn": 1, "th": "y", "sn": 0, "sh": "y"}, - {"tn": 1, "th": "z", "sn": 0, "sh": "z"} + {"target": 0, "targetPort": "x", "source": 2, "sourcePort": null}, + {"target": 0, "targetPort": "y", "source": 3, "sourcePort": null}, + {"target": 1, "targetPort": "x", "source": 0, "sourcePort": "x"}, + {"target": 1, "targetPort": "y", "source": 0, "sourcePort": "y"}, + {"target": 1, "targetPort": "z", "source": 0, "sourcePort": "z"} ] }