Visualizing a Lattice#

You can view the transport graph of a lattice in the Covalent GUI after you send the lattice to the Covalent dispatcher. Sometimes though you’ll want to view the lattice structure before you run it or before it’s even completed. The Covalent Lattice class contains a function that enables you to view a lattice at any time without dispatching it.

Prerequisites#

  1. Restart Covalent.

  2. Define a lattice.

[7]:
import covalent as ct


@ct.electron
def identity(x):
    return x


@ct.electron
def square(x):
    return x * x


@ct.lattice
def workflow(a):
    val_1 = identity(x=a)
    return square(x=val_1)

Procedure#

To view a lattice at any stage:

  1. Run the Covalent lattice.draw() function.

[8]:
workflow.draw(3)
  1. In the Covalent GUI, go to the Lattice Draw Preview page.

Lattice Graph

See Also#

Managing Covalent

Defining a Lattice

Adding Electrons to Lattices