quacc icon indicating copy to clipboard operation
quacc copied to clipboard

Allow for the use of `@flow`s with Jobflow

Open Andrew-S-Rosen opened this issue 2 years ago • 1 comments

What new feature would you like to see?

Hinges on two things:

  • https://github.com/materialsproject/jobflow/pull/547
  • https://github.com/materialsproject/jobflow/pull/450

Andrew-S-Rosen avatar Oct 11 '23 05:10 Andrew-S-Rosen

We might be able to use Covalent as an intermediary to get the Jobflow Flow since they have a nice compiler for the Lattice objects.

import covalent as ct
import json

@ct.electron
def add(a, b):
    return a+b

@ct.lattice
def my_flow(a, b):
    return add(a, b)

my_flow.build_graph(1, 2)

json.loads(my_flow.transport_graph.serialize_to_json())

Andrew-S-Rosen avatar Aug 16 '24 01:08 Andrew-S-Rosen