---
# System prepended metadata

title: WorkGraph brainstorm meeting 2024-11-12

---

# WorkGraph brainstorm meeting 2024-11-12


Questions from others:
- difference with old if/while and the new zone
- how the condition of a zone works? e.g., `compare` task used in `While` loop?
- clarify that in if/else, only the "correct" brunch will run
- While zone, show how result goes back to condition? Do we use the context?
- context private to the zone? (Good idea by Alberto, TBD) -> to do separate: you need to do a nested workgraph
- how to distinguish WorkChains and WorkGraphs? How do I design/decide whether to use WorkGraphs? (Elliott)

    WG doesn't replace `WorkChain` and `CalcJob`; complex `if`/`while` logic, WC is still better suited, that becomes complex for WG


- Can we just write a WorkGraph, and then wrap it in a WorkChain to just provide in/out specs and error specs? (GP)
- Alin: Loops? No, but we have while so you can do it. (Same as work chain) TBD if it's really useful, e.g. in the GUI (let's not make syntax too complex)
- Clarify that you can do workgraphs of workgraphs. 
- plan for CWL exporter?
- Riccardo Bertossa: benchmark? (E.g. 1'000'000 molecules, memory usage?)
- thinking about writing everything with async?
- Philipp Rüßmann: Workgraph and workchains have the same restarting capabilities, features, ...? (Yes)
- Daniel Wortmann: are we standardizing workflows, or fragmenting more the environment? How do we ensure that we unify the usage?


- In some parts, e.g., `if`/`while` WG very verbose, and also not easy to understand; while WC was more logical




   G: same for WorkChains, requires indeed common data (WorkGraph reuses the same AiiDA datatypes as WorkChain) and community effort similar to common workflows (plan to test common workflows with workgraph in the future, for the next paper with all codes). Still requires common low-level common workflow API (and then go with Xing's approach of template workflow)


Riccardo Bertossa: happy to try during the coding week
Alin says that Federica (who left) converted to WorkGraphs (Elliott can present, but they are using it)

* Alberto Garcia: he didn't understand the double relaxation workflow in workgraph of a person on his side. He has two ways to add a task (.new and add_task).


From Giovanni:
- file monitor -> can you use events (so no polling time?)

- Summary/timeline: can one put many workgraphs from a group?

- direct data visualization: on viz or also editing?

- do you want to try some ML/BO (while loop)?

- how to avoid storing a lot of things in the DB? Extend nodes with temporary files, similar to extras, but files? Or simply use a temporary folder? (Do we need this after running?) 

