{ "cells": [ { "cell_type": "markdown", "id": "0", "metadata": {}, "source": [ "# Band Gap and Density of States of an H-Passivated Si Nanowire\n", "\n", "> **B. Aradi, L. E. Ramos, P. Deák, Th. Köhler, F. Bechstedt, R. Q. Zhang, and Th. Frauenheim**\n", "> \"Theoretical study of the chemical gap tuning in silicon nanowires\"\n", "> Phys. Rev. B 76, 035305 (2007)\n", "> [DOI: 10.1103/PhysRevB.76.035305](https://doi.org/10.1103/PhysRevB.76.035305)\n", "\n", "Computes the band gap, the bands along the wire and the density of states of the H-passivated ⟨110⟩ silicon nanowire\n", "of radius 0.51 nm, one period Si₁₈H₁₂ as created in the [structure notebook](passivation_edge_nanowire_silicon.ipynb),\n", "and the band gap of bulk silicon, with the HSE06 hybrid functional, and compares them with Aradi et al.'s Table II and\n", "Fig. 8 (left). The manuscript optimizes the wire with DFTB and computes its gaps with CRYSTAL and a one-parameter global\n", "hybrid fitted to bulk silicon (1.16 eV); here the atoms and the period of the wire are relaxed with PBE and the gaps are\n", "computed with HSE06.\n", "\n", "

Usage

\n", "\n", "1. Create the material in the [structure notebook](passivation_edge_nanowire_silicon.ipynb), which saves `Si nanowire 110 H-passivated one period` to the `uploads` folder.\n", "1. Set the parameters in cells 1.2 and 1.3 (or use the defaults).\n", "1. Click \"Run\" > \"Run All\" to run all cells.\n", "1. Wait for the jobs to complete.\n", "1. Scroll down to view the results.\n", "\n", "## Summary\n", "\n", "1. Set up the environment and parameters: install packages (JupyterLite only) and configure the material names, compute, DFT and plot parameters.\n", "1. Authenticate and initialize API client: authenticate via browser, initialize the client, then select account and project.\n", "1. Load the wire by name and bulk silicon from Standata, print provenance and save both to the platform.\n", "1. Configure the workflows: variable-cell relaxation of the wire, HSE06 band structure of the wire, HSE06 band gap and density of states of the wire and of bulk silicon.\n", "1. Configure compute: get the list of clusters and create a compute configuration.\n", "1. Run the jobs: bulk silicon and the relaxation of the wire, then the band structure and the density of states of the relaxed wire.\n", "1. Retrieve the results: the period of the relaxed wire and the band gaps.\n", "1. Compare with Aradi et al. (2007): the band gaps, then the bands and the density of states beside Fig. 8 (left)." ] }, { "cell_type": "markdown", "id": "1", "metadata": {}, "source": [ "## 1. Set up the environment and parameters\n", "### 1.1. Install packages (JupyterLite)" ] }, { "cell_type": "code", "execution_count": null, "id": "2", "metadata": {}, "outputs": [], "source": [ "from mat3ra.notebooks_utils.packages import install_packages\n", "\n", "await install_packages(\"made|api_examples\")" ] }, { "cell_type": "markdown", "id": "3", "metadata": {}, "source": [ "### 1.2. Set parameters and configurations for the workflows and jobs" ] }, { "cell_type": "code", "execution_count": null, "id": "4", "metadata": {}, "outputs": [], "source": [ "from datetime import datetime\n", "from mat3ra.ide.compute import QueueName\n", "\n", "ORGANIZATION_NAME = None # set to your organization name (full or partial); otherwise, your default one is used\n", "FOLDER = \"./uploads\"\n", "WIRE_NAME = \"Si nanowire 110 H-passivated one period\" # saved by the structure notebook\n", "RELAXED_WIRE_NAME = \"Si nanowire 110 H-passivated relaxed one period\"\n", "BULK_NAME = \"Silicon\" # Standata\n", "\n", "APPLICATION_NAME = \"espresso\"\n", "RELAX_WORKFLOW_SEARCH_TERM = \"variable_cell_relaxation.json\"\n", "BANDS_WORKFLOW_SEARCH_TERM = \"band_structure_hse.json\"\n", "DOS_WORKFLOW_SEARCH_TERM = \"band_gap_dos_hse.json\"\n", "\n", "CLUSTER_NAME = None # specify full or partial name i.e. \"cluster-001\" to select\n", "QUEUE_NAME = QueueName.OF\n", "PPN = None # None uses the selected queue's maximum cores per job on the selected cluster\n", "NPOOLS = 2 # k-point pools: must divide the cores and not exceed any job's k-points; each adds HSE06 exchange memory\n", "TIME_LIMIT = \"24:00:00\"\n", "\n", "timestamp = datetime.now().strftime(\"%Y-%m-%d %H:%M\")\n", "POLL_INTERVAL = 60 # seconds\n", "\n", "ENERGY_WINDOW = (-4.0, 6.0) # eV, the energy range of Fig. 8" ] }, { "cell_type": "markdown", "id": "5", "metadata": {}, "source": [ "### 1.3. Set the DFT parameters" ] }, { "cell_type": "code", "execution_count": null, "id": "6", "metadata": {}, "outputs": [], "source": [ "# manuscript: geometry with DFTB, gaps with CRYSTAL and a one-parameter global hybrid fitted to bulk Si;\n", "# ours: geometry with PBE, gaps with HSE06, GBRV ultrasoft pseudopotentials at their tested cutoffs\n", "ECUTWFC = 40 # Ry\n", "ECUTRHO = 200 # Ry\n", "\n", "# forces below 1e-4 Ha/Bohr as in the manuscript, in QE's Ry/Bohr; the atoms and the period along the wire relax\n", "RELAXATION_SETTINGS = {\"control\": {\"forc_conv_thr\": 2e-4, \"nstep\": 100}, \"cell\": {\"cell_dofree\": \"z\"}}\n", "PRELIMINARY_SCF_SETTINGS = {\"control\": {\"verbosity\": \"high\"}} # so pw.x prints the crystal k-points the HSE run uses\n", "HSE_SETTINGS = {\"control\": {\"tstress\": False}} # Quantum ESPRESSO computes no hybrid-functional stress with pools\n", "RELAX_KGRID = [1, 1, 8] # manuscript: 1x1x4 on two periods\n", "BANDS_KGRID = [1, 1, 8]\n", "QGRID = [1, 1, 4] # HSE exchange q-grid; each dimension divides the one of BANDS_KGRID\n", "KPATH_STEPS = 20 # even, so every k − q of the path stays on the path for the 1x1x4 q-grid\n", "# a job is reused by material, this name and BANDS_KGRID, so rename it after changing QGRID or KPATH_STEPS\n", "BANDS_WORKFLOW_NAME = \"Band Structure HSE06 Si nanowire\"\n", "DOS_KGRID = [1, 1, 8] # the workflow runs odd dimensions as the next even, so 2x2x8\n", "BULK_KGRID = [8, 8, 8]\n", "\n", "RELAX_UNIT = \"pw_vc-relax\"\n", "PRELIMINARY_SCF_UNIT = \"pw_scf\"\n", "BANDS_HSE_UNIT = \"pw_scf_bands_hse\"\n", "BANDS_UNIT = \"bands\"\n", "DOS_HSE_UNIT = \"pw_scf_hse\"" ] }, { "cell_type": "markdown", "id": "7", "metadata": {}, "source": [ "## 2. Authenticate and initialize API client\n", "### 2.1. Authenticate\n", "Authenticate in the browser and have credentials stored in environment variable \"OIDC_ACCESS_TOKEN\"." ] }, { "cell_type": "code", "execution_count": null, "id": "8", "metadata": {}, "outputs": [], "source": [ "from mat3ra.notebooks_utils.auth import authenticate\n", "\n", "await authenticate()" ] }, { "cell_type": "markdown", "id": "9", "metadata": {}, "source": [ "### 2.2. Initialize API client" ] }, { "cell_type": "code", "execution_count": null, "id": "10", "metadata": {}, "outputs": [], "source": [ "from mat3ra.api_client import APIClient\n", "\n", "client = APIClient.authenticate()\n", "client" ] }, { "cell_type": "markdown", "id": "11", "metadata": {}, "source": [ "### 2.3. Select account" ] }, { "cell_type": "code", "execution_count": null, "id": "12", "metadata": {}, "outputs": [], "source": [ "client.list_accounts()" ] }, { "cell_type": "code", "execution_count": null, "id": "13", "metadata": {}, "outputs": [], "source": [ "selected_account = client.my_account\n", "\n", "if ORGANIZATION_NAME:\n", " selected_account = client.get_account(name=ORGANIZATION_NAME)\n", "\n", "ACCOUNT_ID = selected_account.id\n", "print(f\"✅ Selected account ID: {ACCOUNT_ID}, name: {selected_account.name}\")" ] }, { "cell_type": "markdown", "id": "14", "metadata": {}, "source": [ "### 2.4. Select project" ] }, { "cell_type": "code", "execution_count": null, "id": "15", "metadata": {}, "outputs": [], "source": [ "projects = client.projects.list({\"isDefault\": True, \"owner._id\": ACCOUNT_ID})\n", "project_id = projects[0][\"_id\"]\n", "print(f\"✅ Using project: {projects[0]['name']} ({project_id})\")" ] }, { "cell_type": "markdown", "id": "16", "metadata": {}, "source": [ "## 3. Load the materials\n", "### 3.1. Load the wire from the uploads folder or the platform, bulk silicon from Standata, and print provenance" ] }, { "cell_type": "code", "execution_count": null, "id": "17", "metadata": {}, "outputs": [], "source": [ "from collections import Counter\n", "from mat3ra.made.material import Material\n", "from mat3ra.notebooks_utils.core.entity.material.api import load_material\n", "from mat3ra.standata.materials import Materials\n", "\n", "materials = {\n", " WIRE_NAME: load_material(client, FOLDER, WIRE_NAME, ACCOUNT_ID),\n", " BULK_NAME: Material.create(Materials.get_by_name_first_match(BULK_NAME)),\n", "}\n", "for name, material in materials.items():\n", " print(f\"{name}: {dict(Counter(material.basis.elements.values))}, {material.basis.number_of_atoms} atoms, \"\n", " f\"cell {material.lattice.a:.3f} x {material.lattice.b:.3f} x {material.lattice.c:.3f} Å\")" ] }, { "cell_type": "markdown", "id": "18", "metadata": {}, "source": [ "### 3.2. Save the materials to the platform" ] }, { "cell_type": "code", "execution_count": null, "id": "19", "metadata": {}, "outputs": [], "source": [ "from mat3ra.notebooks_utils.core.entity.material.api import get_or_create_material\n", "\n", "saved_materials = {name: get_or_create_material(client, material, ACCOUNT_ID) for name, material in materials.items()}" ] }, { "cell_type": "markdown", "id": "20", "metadata": {}, "source": [ "## 4. Configure the workflows\n", "\n", "The Standata workflows carry their models: PBE for the relaxation and for the preliminary SCF of the band structure,\n", "HSE06 for the band structure and for the band gap and density of states, all with GBRV ultrasoft pseudopotentials.\n", "### 4.1. Variable-cell relaxation of the wire" ] }, { "cell_type": "code", "execution_count": null, "id": "21", "metadata": {}, "outputs": [], "source": [ "from mat3ra.standata.workflows import WorkflowStandata\n", "from mat3ra.wode.workflows import Workflow\n", "from mat3ra.notebooks_utils.workflow import apply_planewave_cutoffs, apply_scf_kgrid, patch_workflow_qe_input\n", "\n", "workflow_configs = WorkflowStandata.filter_by_application(APPLICATION_NAME)\n", "wire = materials[WIRE_NAME]\n", "\n", "relax_workflow = Workflow.create(workflow_configs.get_by_name_first_match(RELAX_WORKFLOW_SEARCH_TERM))\n", "relax_workflow.name = \"Variable-cell Relaxation Si nanowire\"\n", "apply_planewave_cutoffs(relax_workflow, ECUTWFC, ECUTRHO, unit_name=RELAX_UNIT)\n", "apply_scf_kgrid(relax_workflow, RELAX_KGRID, material=wire, unit_name=RELAX_UNIT)\n", "patch_workflow_qe_input(relax_workflow, RELAXATION_SETTINGS, [RELAX_UNIT])" ] }, { "cell_type": "markdown", "id": "22", "metadata": {}, "source": [ "### 4.2. HSE06 band structure of the wire\n", "\n", "The PBE SCF on `BANDS_KGRID` gives the k-points of the HSE06 run, which adds the path along the wire (6.2) and\n", "evaluates the exchange on `QGRID`." ] }, { "cell_type": "code", "execution_count": null, "id": "23", "metadata": {}, "outputs": [], "source": [ "from mat3ra.wode.context.providers import PointsGridDataProvider\n", "\n", "bands_workflow = Workflow.create(workflow_configs.get_by_name_first_match(BANDS_WORKFLOW_SEARCH_TERM))\n", "bands_workflow.name = BANDS_WORKFLOW_NAME\n", "apply_scf_kgrid(bands_workflow, BANDS_KGRID, material=wire, unit_name=PRELIMINARY_SCF_UNIT)\n", "for unit_name in (PRELIMINARY_SCF_UNIT, BANDS_HSE_UNIT):\n", " apply_planewave_cutoffs(bands_workflow, ECUTWFC, ECUTRHO, unit_name=unit_name)\n", "patch_workflow_qe_input(bands_workflow, PRELIMINARY_SCF_SETTINGS, [PRELIMINARY_SCF_UNIT])\n", "patch_workflow_qe_input(bands_workflow, HSE_SETTINGS, [BANDS_HSE_UNIT])\n", "main_hse_subworkflow = next(\n", " subworkflow for subworkflow in bands_workflow.subworkflows if subworkflow.name == \"Main HSE Run\"\n", ")\n", "bands_hse_unit = main_hse_subworkflow.get_unit_by_name(name=BANDS_HSE_UNIT)\n", "bands_hse_unit.add_context(\n", " PointsGridDataProvider(name=\"qgrid\", material=wire, dimensions=QGRID, isEdited=True).get_context_item_data()\n", ")\n", "main_hse_subworkflow.set_unit(bands_hse_unit)\n", "bands_unit = main_hse_subworkflow.get_unit_by_name(name=BANDS_UNIT)\n", "bands_unit.results = [{\"name\": \"band_structure\"}, {\"name\": \"band_gaps\"}]\n", "main_hse_subworkflow.set_unit(bands_unit)" ] }, { "cell_type": "markdown", "id": "24", "metadata": {}, "source": [ "### 4.3. HSE06 band gap and density of states of the wire and of bulk silicon" ] }, { "cell_type": "code", "execution_count": null, "id": "25", "metadata": {}, "outputs": [], "source": [ "dos_workflows = {}\n", "for name, kgrid, workflow_name in ((WIRE_NAME, DOS_KGRID, \"Band Gap + DOS HSE06 Si nanowire\"),\n", " (BULK_NAME, BULK_KGRID, \"Band Gap + DOS HSE06 Si bulk\")):\n", " workflow = Workflow.create(workflow_configs.get_by_name_first_match(DOS_WORKFLOW_SEARCH_TERM))\n", " workflow.name = workflow_name\n", " apply_planewave_cutoffs(workflow, ECUTWFC, ECUTRHO, unit_name=DOS_HSE_UNIT)\n", " apply_scf_kgrid(workflow, kgrid, material=materials[name], unit_name=DOS_HSE_UNIT)\n", " patch_workflow_qe_input(workflow, HSE_SETTINGS, [DOS_HSE_UNIT])\n", " dos_workflows[name] = workflow" ] }, { "cell_type": "markdown", "id": "26", "metadata": {}, "source": [ "## 5. Create the compute configuration\n", "### 5.1. Get list of clusters" ] }, { "cell_type": "code", "execution_count": null, "id": "27", "metadata": {}, "outputs": [], "source": [ "clusters = client.clusters.list()\n", "print(f\"Available clusters: {[c['hostname'] for c in clusters]}\")" ] }, { "cell_type": "markdown", "id": "28", "metadata": {}, "source": [ "### 5.2. Create the compute configuration for the jobs" ] }, { "cell_type": "code", "execution_count": null, "id": "29", "metadata": {}, "outputs": [], "source": [ "from mat3ra.ide.compute import Compute\n", "\n", "if CLUSTER_NAME:\n", " cluster = next((c for c in clusters if CLUSTER_NAME in c[\"hostname\"]), None)\n", " if cluster is None:\n", " raise ValueError(f\"Cluster '{CLUSTER_NAME}' not found. Available: {[c['hostname'] for c in clusters]}\")\n", "else:\n", " cluster = clusters[0]\n", "ppn = PPN or next(queue[\"maxPPN\"] for queue in cluster[\"queues\"] if queue[\"name\"] == QUEUE_NAME.value)\n", "compute = Compute(cluster=cluster, queue=QUEUE_NAME, ppn=ppn, timeLimit=TIME_LIMIT, arguments={\"npools\": NPOOLS})\n", "print(f\"Using cluster: {compute.cluster.hostname}, queue: {QUEUE_NAME}, ppn: {ppn}, \"\n", " f\"time limit: {TIME_LIMIT}\")" ] }, { "cell_type": "markdown", "id": "30", "metadata": {}, "source": [ "## 6. Run the jobs\n", "\n", "A submitted, queued, running or finished job for the same material, workflow name and k-grid is reused.\n", "### 6.1. Bulk silicon and the relaxation of the wire" ] }, { "cell_type": "code", "execution_count": null, "id": "31", "metadata": {}, "outputs": [], "source": [ "from mat3ra.notebooks_utils.core.entity.job.api import find_job_for_material\n", "from mat3ra.notebooks_utils.job import create_job\n", "from mat3ra.notebooks_utils.api.job import submit_jobs, wait_for_jobs_to_finish_async\n", "\n", "job_ids = {}\n", "for workflow, saved_material, kgrid, unit_name in (\n", " (dos_workflows[BULK_NAME], saved_materials[BULK_NAME], BULK_KGRID, DOS_HSE_UNIT),\n", " (relax_workflow, saved_materials[WIRE_NAME], RELAX_KGRID, RELAX_UNIT),\n", "):\n", " job = find_job_for_material(client, saved_material[\"_id\"], workflow.name, ACCOUNT_ID,\n", " statuses=(\"submitted\", \"queued\", \"active\", \"finished\"),\n", " kgrid=kgrid, unit_name=unit_name)\n", " if job is None:\n", " job = create_job(api_client=client, materials=[saved_material], workflow=workflow, project_id=project_id,\n", " owner_id=ACCOUNT_ID, compute=compute.to_dict(), prefix=f\"{workflow.name} {timestamp}\")\n", " submit_jobs(client.jobs, [job[\"_id\"]])\n", " print(f\"✅ {workflow.name}: submitted job {job['_id']}\")\n", " else:\n", " print(f\"♻️ {workflow.name}: reusing job {job['_id']}\")\n", " job_ids[workflow.name] = job[\"_id\"]" ] }, { "cell_type": "code", "execution_count": null, "id": "32", "metadata": {}, "outputs": [], "source": [ "await wait_for_jobs_to_finish_async(client.jobs, [job_ids[relax_workflow.name]], poll_interval=POLL_INTERVAL)" ] }, { "cell_type": "markdown", "id": "33", "metadata": {}, "source": [ "### 6.2. Relaxed wire and the path along it\n", "\n", "The end of the Brillouin zone along the wire, (0, 0, 1/2), is Z in the manuscript; its name in the k-path depends on\n", "the lattice type of the relaxed cell, so it is looked up by its coordinates." ] }, { "cell_type": "code", "execution_count": null, "id": "34", "metadata": {}, "outputs": [], "source": [ "from mat3ra.made.reciprocal.symmetry_points import get_symmetry_points\n", "from mat3ra.notebooks_utils.core.entity.material.api import get_final_structure_for_job\n", "from mat3ra.wode.context.providers import PointsPathDataProvider\n", "\n", "relaxed_wire = get_final_structure_for_job(client, job_ids[relax_workflow.name])\n", "client.materials.update(relaxed_wire.id, {\"name\": RELAXED_WIRE_NAME})\n", "wire_axis_point = next(\n", " point[\"point\"] for point in get_symmetry_points(relaxed_wire.lattice) if point[\"coordinates\"] == [0, 0, 0.5]\n", ")\n", "bands_hse_unit.add_context(\n", " PointsPathDataProvider(\n", " name=\"explicitKPath\",\n", " path=[{\"point\": \"Γ\", \"steps\": KPATH_STEPS}, {\"point\": wire_axis_point, \"steps\": 1}],\n", " isEdited=True,\n", " ).get_context_item_data()\n", ")\n", "main_hse_subworkflow.set_unit(bands_hse_unit)" ] }, { "cell_type": "markdown", "id": "35", "metadata": {}, "source": [ "### 6.3. Band structure and density of states of the relaxed wire" ] }, { "cell_type": "code", "execution_count": null, "id": "36", "metadata": {}, "outputs": [], "source": [ "for workflow, saved_material, kgrid, unit_name in (\n", " (bands_workflow, relaxed_wire.to_dict(), BANDS_KGRID, PRELIMINARY_SCF_UNIT),\n", " (dos_workflows[WIRE_NAME], relaxed_wire.to_dict(), DOS_KGRID, DOS_HSE_UNIT),\n", "):\n", " job = find_job_for_material(client, saved_material[\"_id\"], workflow.name, ACCOUNT_ID,\n", " statuses=(\"submitted\", \"queued\", \"active\", \"finished\"),\n", " kgrid=kgrid, unit_name=unit_name)\n", " if job is None:\n", " job = create_job(api_client=client, materials=[saved_material], workflow=workflow, project_id=project_id,\n", " owner_id=ACCOUNT_ID, compute=compute.to_dict(), prefix=f\"{workflow.name} {timestamp}\")\n", " submit_jobs(client.jobs, [job[\"_id\"]])\n", " print(f\"✅ {workflow.name}: submitted job {job['_id']}\")\n", " else:\n", " print(f\"♻️ {workflow.name}: reusing job {job['_id']}\")\n", " job_ids[workflow.name] = job[\"_id\"]" ] }, { "cell_type": "code", "execution_count": null, "id": "37", "metadata": {}, "outputs": [], "source": [ "await wait_for_jobs_to_finish_async(client.jobs, list(job_ids.values()), poll_interval=POLL_INTERVAL)" ] }, { "cell_type": "markdown", "id": "38", "metadata": {}, "source": [ "## 7. Retrieve the results\n", "### 7.1. Period of the relaxed wire" ] }, { "cell_type": "code", "execution_count": null, "id": "39", "metadata": {}, "outputs": [], "source": [ "print(f\"Period along the wire, {WIRE_NAME}:\")\n", "print(f\"start: {wire.lattice.c:.4f} Å\")\n", "print(f\"relaxed (PBE): {relaxed_wire.lattice.c:.4f} Å\")" ] }, { "cell_type": "markdown", "id": "40", "metadata": {}, "source": [ "### 7.2. Band gaps\n", "\n", "The fundamental gap is the `indirect` entry of a job's band gaps: from the valence-band maximum to the conduction-band\n", "minimum wherever they fall, direct when both are at the same k-point. The gap of the wire comes from the band structure\n", "job, whose k-points include the path along the wire." ] }, { "cell_type": "code", "execution_count": null, "id": "41", "metadata": {}, "outputs": [], "source": [ "from mat3ra.notebooks_utils.core.entity.property.api import get_properties_for_job\n", "\n", "fundamental_gaps = {}\n", "for workflow in (bands_workflow, dos_workflows[WIRE_NAME], dos_workflows[BULK_NAME]):\n", " band_gaps = get_properties_for_job(client, job_ids[workflow.name], \"band_gaps\")[0]\n", " fundamental_gaps[workflow.name] = next(gap for gap in band_gaps[\"values\"] if gap[\"type\"] == \"indirect\")" ] }, { "cell_type": "markdown", "id": "42", "metadata": {}, "source": [ "## 8. Compare with Aradi et al. (2007)\n", "### 8.1. Band gaps" ] }, { "cell_type": "code", "execution_count": null, "id": "43", "metadata": {}, "outputs": [], "source": [ "# Aradi et al. 2007: Table II (p. 5) for the wire; bulk Si with the same hybrid, p. 6\n", "MANUSCRIPT_BAND_GAPS = {WIRE_NAME: (2.21, \"direct\"), BULK_NAME: (1.16, \"indirect\")} # eV\n", "\n", "print(\"Band gap (HSE06):\")\n", "for label, gap in ((WIRE_NAME, fundamental_gaps[bands_workflow.name]),\n", " (BULK_NAME, fundamental_gaps[dos_workflows[BULK_NAME].name])):\n", " character = \"direct\" if gap[\"kpointValence\"] == gap[\"kpointConduction\"] else \"indirect\"\n", " print(f\"{label}: {gap['value']:.2f} eV, {character}, VBM at k = {tuple(gap['kpointValence'])}, \"\n", " f\"CBM at k = {tuple(gap['kpointConduction'])}\")\n", "\n", "print(\"\\nBand gap from the manuscript:\")\n", "for label, (value, character) in MANUSCRIPT_BAND_GAPS.items():\n", " print(f\"{label}: {value:.2f} eV, {character}\")" ] }, { "cell_type": "markdown", "id": "44", "metadata": {}, "source": [ "### 8.2. Bands and density of states (Fig. 8 of the manuscript, left)\n", "\n", "The manuscript's Fig. 8 (left): density of states (solid), its projection on the H atoms (dotted) and bands along Γ–Z,\n", "the valence-band maximum at 0:\n", "\n", "\"Aradi" ] }, { "cell_type": "code", "execution_count": null, "id": "45", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from matplotlib import pyplot as plt\n", "from mat3ra.notebooks_utils.plot import display_matplotlib_figure\n", "\n", "band_structure = get_properties_for_job(client, job_ids[bands_workflow.name], \"band_structure\")[0]\n", "density_of_states = get_properties_for_job(client, job_ids[dos_workflows[WIRE_NAME].name], \"density_of_states\")[0]\n", "path_bands = np.array(band_structure[\"yDataSeries\"]) - fundamental_gaps[bands_workflow.name][\"eigenvalueValence\"]\n", "last_path_index = len(band_structure[\"xDataArray\"]) - 1\n", "dos_energies = np.array(density_of_states[\"xDataArray\"][0])\n", "dos_energies -= fundamental_gaps[dos_workflows[WIRE_NAME].name][\"eigenvalueValence\"]\n", "hydrogen_dos = np.sum([series for series, legend in zip(density_of_states[\"yDataSeries\"], density_of_states[\"legend\"])\n", " if legend.get(\"element\") == \"H\"], axis=0)\n", "\n", "figure, (dos_axes, bands_axes) = plt.subplots(1, 2, sharey=True, gridspec_kw={\"width_ratios\": [1, 2], \"wspace\": 0})\n", "dos_axes.plot(density_of_states[\"yDataSeries\"][0], dos_energies, color=\"black\", label=\"total\")\n", "dos_axes.plot(hydrogen_dos, dos_energies, color=\"black\", linestyle=\":\", label=\"H\")\n", "dos_axes.invert_xaxis()\n", "dos_axes.set_xticks([])\n", "dos_axes.set_ylabel(\"Energy (eV)\")\n", "dos_axes.legend()\n", "bands_axes.plot(path_bands.T, color=\"black\", linewidth=0.8)\n", "bands_axes.set_xlim(0, last_path_index)\n", "bands_axes.set_xticks([0, last_path_index], [\"Γ\", \"Z\"])\n", "bands_axes.set_ylim(*ENERGY_WINDOW)\n", "figure.suptitle(f\"{WIRE_NAME}, HSE06\")\n", "display_matplotlib_figure(figure)" ] }, { "cell_type": "markdown", "id": "46", "metadata": {}, "source": [ "## References\n", "\n", "[1] B. Aradi, L. E. Ramos, P. Deák, Th. Köhler, F. Bechstedt, R. Q. Zhang and Th. Frauenheim, \"Theoretical study of the chemical gap tuning in silicon nanowires\", Phys. Rev. B 76, 035305 (2007). https://doi.org/10.1103/PhysRevB.76.035305\n", "\n", "[2] J. Heyd, G. E. Scuseria and M. Ernzerhof, \"Hybrid functionals based on a screened Coulomb potential\", J. Chem. Phys. 118, 8207 (2003). https://doi.org/10.1063/1.1564060\n", "\n", "[3] A. V. Krukau, O. A. Vydrov, A. F. Izmaylov and G. E. Scuseria, \"Influence of the exchange screening parameter on the performance of screened hybrid functionals\", J. Chem. Phys. 125, 224106 (2006). https://doi.org/10.1063/1.2404663\n", "\n", "[4] K. F. Garrity, J. W. Bennett, K. M. Rabe and D. Vanderbilt, \"Pseudopotentials for high-throughput DFT calculations\", Comput. Mater. Sci. 81, 446 (2014). https://doi.org/10.1016/j.commatsci.2013.08.053" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.2" } }, "nbformat": 4, "nbformat_minor": 5 }