|
118 | 118 | "\n", |
119 | 119 | "# K-grids and k-path\n", |
120 | 120 | "RELAXATION_KGRID = None # e.g. [4, 4, 4]\n", |
121 | | - "SCF_KGRID = None # e.g. [8, 8, 8]\n", |
122 | | - "NSCF_KGRID = None # e.g. [12, 12, 12] — used for band_structure_dos\n", |
123 | | - "KPATH = [{\"point\": \"Г\", \"steps\": 10}, {\"point\": \"M\", \"steps\": 10}, {\"point\": \"K\", \"steps\": 10}, {\"point\": \"Г\", \"steps\": 10}] # e.g. [{\"point\": \"Г\", \"steps\": 10}, {\"point\": \"M\", \"steps\": 10}, {\"point\": \"K\", \"steps\": 10}, {\"point\": \"Г\", \"steps\": 10}]\n", |
| 121 | + "SCF_KGRID = None # e.g. [8, 8, 8]\n", |
| 122 | + "NSCF_KGRID = None # e.g. [12, 12, 12] — used for band_structure_dos\n", |
| 123 | + "KPATH = None # [{\"point\": \"Г\", \"steps\": 10}, {\"point\": \"M\", \"steps\": 10}, {\"point\": \"K\", \"steps\": 10}, {\"point\": \"Г\", \"steps\": 10}]\n", |
124 | 124 | "\n", |
125 | 125 | "# Energy cutoffs\n", |
126 | 126 | "ECUTWFC = 40\n", |
127 | | - "ECUTRHO = 200" |
| 127 | + "ECUTRHO = 200\n", |
| 128 | + "\n", |
| 129 | + "# Additional QE input parameters per unit\n", |
| 130 | + "# Format: {\"unit_name\": {\"namelist\": {\"parameter\": value}}}\n", |
| 131 | + "ADDITIONAL_PARAMETERS = {\n", |
| 132 | + " # \"pw_nscf\": {\"system\": {\"occupations\": \"tetrahedra_opt\"}},\n", |
| 133 | + "}" |
128 | 134 | ] |
129 | 135 | }, |
130 | 136 | { |
|
390 | 396 | "source": [ |
391 | 397 | "from mat3ra.wode.context.providers import PlanewaveCutoffsContextProvider, PointsGridDataProvider, \\\n", |
392 | 398 | " PointsPathDataProvider\n", |
| 399 | + "from mat3ra.notebooks_utils.workflow import patch_workflow_qe_input\n", |
| 400 | + "\n", |
393 | 401 | "\n", |
394 | 402 | "bs_subworkflow = workflow.subworkflows[1 if ADD_RELAXATION else 0]\n", |
395 | 403 | "\n", |
|
423 | 431 | " unit = swf.get_unit_by_name(name=unit_name)\n", |
424 | 432 | " if unit:\n", |
425 | 433 | " unit.add_context(cutoffs_context)\n", |
426 | | - " swf.set_unit(unit)" |
| 434 | + " swf.set_unit(unit)\n", |
| 435 | + "\n", |
| 436 | + "if ADDITIONAL_PARAMETERS:\n", |
| 437 | + " for unit_name, parameters in ADDITIONAL_PARAMETERS.items():\n", |
| 438 | + " patch_workflow_qe_input(workflow, parameters, unit_names=[unit_name])" |
427 | 439 | ] |
428 | 440 | }, |
429 | 441 | { |
|
513 | 525 | " queue=QUEUE_NAME,\n", |
514 | 526 | " ppn=PPN\n", |
515 | 527 | ")\n", |
516 | | - "print(f\"Using cluster: {compute.cluster.hostname}, queue: {QUEUE_NAME}, ppn: {PPN}\")\n", |
517 | | - "compute.cluster" |
| 528 | + "print(f\"Using cluster: {compute.cluster.hostname}, queue: {QUEUE_NAME}, ppn: {PPN}\")" |
518 | 529 | ] |
519 | 530 | }, |
520 | 531 | { |
|
0 commit comments