Skip to content

Commit

Permalink
Small tweaks to final part; remove outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbercx committed Nov 23, 2023
1 parent 690a1e6 commit 63a09cf
Showing 1 changed file with 14 additions and 99 deletions.
113 changes: 14 additions & 99 deletions docs/source/1_computing_hubbard.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"tags": [
"hide-cell"
Expand Down Expand Up @@ -98,20 +98,9 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<HubbardStructureData: uuid: 41df60ed-0ed2-4f4d-8339-2287ffa4cb3d (pk: 88)>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"from aiida_quantumespresso.data.hubbard_structure import HubbardStructureData\n",
"\n",
Expand Down Expand Up @@ -139,20 +128,9 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HUBBARD\tortho-atomic\n",
" V\tCo-3d\tCo-3d\t1\t1\t1e-08\n",
" V\tCo-3d\tO-2p\t1\t46\t1e-08\n",
"\n"
]
}
],
"outputs": [],
"source": [
"from aiida_quantumespresso.utils.hubbard import HubbardUtils\n",
"print(HubbardUtils(hubbard_structure).get_hubbard_card())"
Expand Down Expand Up @@ -192,37 +170,13 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"11/22/2023 09:07:40 PM <85438> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [94|PwBaseWorkChain|run_process]: launching PwCalculation<97> iteration #1\n",
"11/22/2023 09:07:50 PM <85438> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [94|PwBaseWorkChain|results]: work chain completed after 1 iterations\n",
"11/22/2023 09:07:50 PM <85438> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [94|PwBaseWorkChain|on_terminated]: remote folders will not be cleaned\n"
]
},
{
"data": {
"text/plain": [
"{'remote_folder': <RemoteData: uuid: c8f715ec-d7f7-4be3-9adb-147601aebdbd (pk: 98)>,\n",
" 'retrieved': <FolderData: uuid: 90fe5167-f785-442d-a425-98f7d9705f57 (pk: 99)>,\n",
" 'output_parameters': <Dict: uuid: e13649df-2524-4889-b5c1-2de2f9260b6c (pk: 102)>,\n",
" 'output_trajectory': <TrajectoryData: uuid: 9756d735-c267-4284-9df5-6d8b809edd79 (pk: 101)>,\n",
" 'output_band': <BandsData: uuid: 202c551f-a04d-4e4e-add9-0fbf512822fa (pk: 100)>}"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"from aiida.engine import run_get_node\n",
"from aiida.orm import KpointsData\n",
Expand Down Expand Up @@ -264,7 +218,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -292,40 +246,13 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"11/22/2023 10:18:20 PM <85438> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [109|HpBaseWorkChain|run_process]: launching HpCalculation<112> iteration #1\n",
"11/22/2023 10:18:49 PM <85438> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [109|HpBaseWorkChain|results]: work chain completed after 1 iterations\n",
"11/22/2023 10:18:49 PM <85438> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [109|HpBaseWorkChain|on_terminated]: cleaned remote folders of calculations: 112\n",
"11/22/2023 10:18:49 PM <85438> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [109|HpBaseWorkChain|on_terminated]: cleaned remote folders of calculations: 112\n"
]
},
{
"data": {
"text/plain": [
"{'remote_folder': <RemoteData: uuid: 1b71f446-856c-4265-a5dd-8cd625809ff0 (pk: 113)>,\n",
" 'retrieved': <FolderData: uuid: 28c034b0-a371-4991-8aa7-24fe01499597 (pk: 114)>,\n",
" 'parameters': <Dict: uuid: 5684751b-8cb7-4d1a-93ef-ee3fcecf2fae (pk: 115)>,\n",
" 'hubbard_structure': <HubbardStructureData: uuid: 6f1f6636-6447-4461-b60e-08717b2bf4ec (pk: 119)>,\n",
" 'hubbard': <Dict: uuid: 240833bd-6eb6-4bae-a28f-904c13b943e4 (pk: 116)>,\n",
" 'hubbard_chi': <ArrayData: uuid: b96a5764-6ffd-408b-ab05-9401bad808eb (pk: 118)>,\n",
" 'hubbard_matrices': <ArrayData: uuid: 8a59c026-e758-432c-bf9c-c873836d66a2 (pk: 117)>}"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"from aiida_quantumespresso_hp.workflows.hp.base import HpBaseWorkChain\n",
"\n",
Expand All @@ -350,21 +277,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HUBBARD\tortho-atomic\n",
" V\tCo-3d\tCo-3d\t1\t1\t6.4018\n",
" V\tCo-3d\tO-2p\t1\t11\t0.5994\n",
" V\tCo-3d\tO-2p\t1\t22\t0.5934\n",
"\n"
]
}
],
"outputs": [],
"source": [
"print(HubbardUtils(results['hubbard_structure']).get_hubbard_card())"
]
Expand All @@ -377,12 +292,12 @@
"## Final considerations\n",
"\n",
"We managed to compute the Hubbard parameters of LiCoO2 __fully__ ___ab initio___! :tada:\n",
"Although, as you could have noticed, there were some quite few passages to do by end.\n",
"However, we had to execute quite a few steps manually, which can be tedious and error prone.\n",
"Moreover, there are the following considerations:\n",
"\n",
"1. For larger and more complex structures you will need to perturb many more atoms.\n",
" Moreover, to get converged results you will need more than one q point.\n",
" Click [here](./2_parallel_hubbard.ipynb) to learn how to parallelize over atoms and q points\n",
" Click [here](./2_parallel_hubbard.ipynb) to learn how to parallelize over atoms and q points.\n",
"2. To do a _full_ self-consistent calculation of these parameters, you should _relax_ your structure with the Hubbard parameters from the `hp.x` run, repeat the steps of this tutorial, relax _again_, and do this procedure over and over till convergence.\n",
" Learn the automated way [here](./3_self_consistent.ipynb)!\n",
"\n",
Expand Down

0 comments on commit 63a09cf

Please sign in to comment.