{
"cells": [
{
"cell_type": "markdown",
"id": "22d177dc-6cfb-4de2-9509-f1eb45e10cf2",
"metadata": {},
"source": [
"# Wannier90\n",
"\n",
"## Visualizing the WorkGraph Builder\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "9db8ed4f",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" \n",
" "
],
"text/plain": [
""
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from workgraph_collections.gpaw.wannier90 import wannier90_workgraph\n",
"\n",
"task = wannier90_workgraph.TaskCls()\n",
"task.to_html()"
]
},
{
"cell_type": "markdown",
"id": "9e6360d8",
"metadata": {},
"source": [
"## Visualizing the WorkGraph"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "01bedd69",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" \n",
" "
],
"text/plain": [
""
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from workgraph_collections.gpaw.wannier90 import wannier90_workgraph\n",
"\n",
"wg = wannier90_workgraph()\n",
"wg.to_html()"
]
},
{
"cell_type": "markdown",
"id": "efa095d0",
"metadata": {},
"source": [
"## Example: GaAs band structure\n",
"### Prepare the inputs and submit the workflow\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8ee799d2-0b5b-4609-957f-6b3f2cd451f0",
"metadata": {},
"outputs": [],
"source": [
"from aiida import load_profile\n",
"from ase import Atoms\n",
"from ase.build import bulk\n",
"from gpaw import FermiDirac, PW\n",
"\n",
"load_profile()\n",
"\n",
"cell = bulk('Ga', 'fcc', a=5.68).cell\n",
"atoms = Atoms('GaAs', cell=cell, pbc=True,\n",
" scaled_positions=((0, 0, 0), (0.25, 0.25, 0.25)))\n",
"\n",
"wg = wannier90_workgraph()\n",
"wg.name = 'GPAW Wannier90: GaAs'\n",
"wg.tasks[\"scf\"].set({\"atoms\": atoms,\n",
" \"seed\": \"GaAs\",\n",
" \"kpts\": {'size': (2, 2, 2), 'gamma': True},\n",
" \"kwargs\": {\n",
" \"mode\": PW(600),\n",
" \"xc\": 'LDA',\n",
" \"occupations\": FermiDirac(width=0.01),\n",
" \"convergence\": {'density': 1.e-6},\n",
" \"txt\": 'gs_GaAs.txt'\n",
" }\n",
" })\n",
"wg.tasks[\"wannier90\"].set({\n",
" \"seed\": \"GaAs\",\n",
" \"binary\": '/home/wang_x3/apps/miniconda3/envs/qe-7.2/bin/wannier90.x',\n",
" \"wannier_plot\": True,\n",
" \"kwargs\": {\n",
" \"bands\": range(4),\n",
" \"orbitals_ai\": [[], [0, 1, 2, 3]]\n",
" }\n",
"})\n",
"wg.submit()\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
},
"vscode": {
"interpreter": {
"hash": "2f450c1ff08798c4974437dd057310afef0de414c25d1fd960ad375311c3f6ff"
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}