Atomization energy

Introduction

The atomization energy, \(\Delta E\), of a molecule can be expressed as:

\[\Delta E = n_{\text{atom}} \times E_{\text{atom}} - E_{\text{molecule}}\]

Where:

  • \(\Delta E\) is the atomization energy of the molecule.

  • \(n_{\text{atom}}\) is the number of atoms.

  • \(E_{\text{atom}}\) is the energy of an isolated atom.

  • \(E_{\text{molecule}}\) is the energy of the molecule.

Visualizing the WorkGraph Builder

[1]:
from workgraph_collections.ase.emt.atomization_energy import atomization_energy

task = atomization_energy.TaskCls()
task.to_html()
[1]:

Visualizing the WorkGraph

[2]:
from workgraph_collections.ase.emt.atomization_energy import atomization_energy

wg = atomization_energy()
wg.to_html()
[2]:

Example: Atomization energy of a molecule N2

Prepare the inputs and submit the workflow

[4]:
from ase.build import molecule
from ase import Atoms
from workgraph_collections.ase.emt.atomization_energy import atomization_energy
from aiida import load_profile

load_profile()

# create input structure
n_atom = Atoms("N", pbc=True)
n_atom.center(vacuum=5.0)
n2_molecule = molecule("N2", pbc=True)
n2_molecule.center(vacuum=5.0)

metadata = {
    "options": {
        "prepend_text": """
eval "$(conda shell.posix hook)"
conda activate aiida
export OMP_NUM_THREADS=1
        """,
    }
}
# ------------------------- Set the inputs -------------------------
wg = atomization_energy()
wg.tasks["scf_atom"].set(
    {"atoms": n_atom, "computer": "localhost", "metadata": metadata}
)
wg.tasks["scf_mol"].set(
    {"atoms": n2_molecule, "computer": "localhost", "metadata": metadata}
)
wg.tasks["calc_atomization_energy"].set({"molecule": n2_molecule, "computer": "localhost"})
# ------------------------- Submit the calculation -------------------
wg.submit(wait=True, timeout=200)
# ------------------------- Print the output -------------------------
print(
    "Atomization energy:                  {:0.3f} eV".format(
        wg.tasks["calc_atomization_energy"].outputs["result"].value.value
    )
)

WorkGraph process created, PK: 16423
Atomization energy:                  9.651 eV