# Seeking Advice on Using Workflows as a Beginner

**URL:** <https://aiida.discourse.group/t/seeking-advice-on-using-workflows-as-a-beginner/475>\
**Category:** General Usage\
**Created:** [October 14, 2024, 6:38am UTC](https://aiida.discourse.group/t/seeking-advice-on-using-workflows-as-a-beginner/475 "2024-10-14T06:38:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chao\_zhou](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/chao_zhou/32/202_2.png) [@chao\_zhou](https://aiida.discourse.group/u/chao_zhou)\
**Post date:** [October 14, 2024, 6:38am UTC](https://aiida.discourse.group/t/seeking-advice-on-using-workflows-as-a-beginner/475/1 "2024-10-14T06:38:38Z")

</div>

Dear AiiDA Community,

Although I have successfully run the aiida-siesta examples, as a beginner, I would like to know how I can use the provided workflows more flexibly for my own research.

Additionally, I came across some code on GitHub that interests me, specifically [aiida\_tb2j\_plugin](https://github.com/antelmor/aiida_tb2j_plugin), but there is no documentation available, and I am unsure how to use it. I am aware that the Materials Cloud platform offers AiiDA Lab, but it seems that it is not open to everyone. So, does it require strong programming skills to make good use of AiiDA?

Currently, I am working with aiida-siesta and would appreciate any advice from more experienced users.

Thank you in advance for your guidance!

Best regards,  
Chao Zhou

---

<div class="post-metadata">

**Author:** ![agoscinski](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/agoscinski/32/147_2.png) [@agoscinski](https://aiida.discourse.group/u/agoscinski)\
**Post date:** [October 17, 2024, 9:55am UTC](https://aiida.discourse.group/t/seeking-advice-on-using-workflows-as-a-beginner/475/2 "2024-10-17T09:55:29Z")

</div>

> Although I have successfully run the aiida-siesta examples, as a beginner, I would like to know how I can use the provided workflows more flexibly for my own research.

That is a bit vague, maybe you can provide more details on what you want to achieve, then we can give you a more concrete answer. Because aiida is very feature-rich, it can be hard to discover the right tools to solve one’s problems in a simple manner.

In principle, it requires a meaningful effort to adapt or create plugins for codes. You need to get acquainted how to write plugins in AiiDA and that is time consuming. What is more in the reach, without spending much time studying the AiiDA doc, is to connect inputs and outputs from different calculations/workflows (these can live in different plugins). For that I would recommend to use  
[aiida-workgraph](https://github.com/aiidateam/aiida-workgraph). You can see its usage for example with [the PwCalculation from aiida-quantumespresso here](https://aiida-workgraph.readthedocs.io/en/latest/tutorial/autogen/eos.html#create-the-calcfunction-task)

```python
# Output result from context to the output socket
@task.graph_builder(outputs=[{"name": "result", "from": "context.result"}])
def all_scf(structures, scf_inputs):
    """Run the scf calculation for each structure."""
    from aiida_workgraph import WorkGraph
    from aiida_quantumespresso.calculations.pw import PwCalculation

    wg = WorkGraph()
    for key, structure in structures.items():
        pw1 = wg.add_task(PwCalculation, name=f"pw1_{key}", structure=structure)
        ...
    return wg

```

You could use in a similar way the [TB2JCalculation](https://github.com/antelmor/aiida_tb2j_plugin/blob/01e26002bfa63c11436c85f8cf10f9d5461732d9/aiida_tb2j/calculations/tb2j.py#L60) in the repo you linked.

To run arbitrary scripts you can use the `ShellJob` from the aiida-shell plugin that is also integrated in aiida-workgraph ([see doc](https://aiida-workgraph.readthedocs.io/en/latest/built-in/autogen/shelljob.html).)

I also want to mention tutorial material for the workgraph which might be helpful to get an idea what you can achieve with it. [See the tutorial on nanohub](https://nanohub.org/tools/aiida) (it requires that you create a free account to run it on their servers, but the whole environment is provided).

> I am aware that the Materials Cloud platform offers AiiDA Lab, but it seems that it is not open to everyone.

If you don’t have any credentials for the offered hosts, you can run AiiDA lab on your machine ([here the instructions](https://aiidalab.readthedocs.io/en/latest/usage/index.html#aiidalab-launch)), but I am not sure if this is the right solution for you if you want to use the mentioned plugin. AiiDA-lab has its own registry of apps [https://aiidalab.github.io/aiidalab-registry/](https://aiidalab.github.io/aiidalab-registry/) that is much more restricted (as you need to implement much more things for the GUI interaction). @Any AiiDA lab developer please correct me if I am wrong.
