Skip to content

Commit

Permalink
Merge pull request #103 from Exabyte-io/feat/SOF-7123
Browse files Browse the repository at this point in the history
SOF-7123: new template for DFT+U+V and DFT+U+J
  • Loading branch information
pranabdas authored Dec 21, 2023
2 parents 89106c0 + 1ba96cc commit f9295ec
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 4 deletions.
47 changes: 47 additions & 0 deletions assets/espresso/pw_scf_dft_j.j2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% if subworkflowContext.MATERIAL_INDEX %}
{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}
{% endif -%}
&CONTROL
calculation = 'scf'
title = ''
verbosity = 'low'
restart_mode = '{{ input.RESTART_MODE }}'
wf_collect = .true.
tstress = .true.
tprnfor = .true.
outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}
wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}
prefix = '__prefix__'
pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}
/
&SYSTEM
ibrav = {{ input.IBRAV }}
nat = {{ input.NAT }}
ntyp = {{ input.NTYP }}
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'fixed'
/
&ELECTRONS
diagonalization = 'david'
diago_david_ndim = 4
diago_full_acc = .true.
mixing_beta = 0.3
startingwfc = 'atomic+random'
/
&IONS
/
&CELL
/
ATOMIC_SPECIES
{{ input.ATOMIC_SPECIES }}
ATOMIC_POSITIONS crystal
{{ input.ATOMIC_POSITIONS }}
CELL_PARAMETERS angstrom
{{ input.CELL_PARAMETERS }}
K_POINTS automatic
{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}
HUBBARD {ortho-atomic}
{% for row in hubbard_j -%}
{{ row.paramType }} {{ row.atomicSpecies }}-{{ row.atomicOrbital }} {{ row.value }}
{% endfor -%}
2 changes: 1 addition & 1 deletion assets/espresso/pw_scf_dft_u.j2.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ CELL_PARAMETERS angstrom
K_POINTS automatic
{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}
HUBBARD {ortho-atomic}
{% for row in hubbard -%}
{% for row in hubbard_u -%}
U {{ row.atomicSpecies }}-{{ row.atomicOrbital }} {{ row.hubbardUValue }}
{% endfor -%}
50 changes: 50 additions & 0 deletions assets/espresso/pw_scf_dft_v.j2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% if subworkflowContext.MATERIAL_INDEX %}
{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}
{% endif -%}
&CONTROL
calculation = 'scf'
title = ''
verbosity = 'low'
restart_mode = '{{ input.RESTART_MODE }}'
wf_collect = .true.
tstress = .true.
tprnfor = .true.
outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}
wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}
prefix = '__prefix__'
pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}
/
&SYSTEM
ibrav = {{ input.IBRAV }}
nat = {{ input.NAT }}
ntyp = {{ input.NTYP }}
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'fixed'
/
&ELECTRONS
diagonalization = 'david'
diago_david_ndim = 4
diago_full_acc = .true.
mixing_beta = 0.3
startingwfc = 'atomic+random'
/
&IONS
/
&CELL
/
ATOMIC_SPECIES
{{ input.ATOMIC_SPECIES }}
ATOMIC_POSITIONS crystal
{{ input.ATOMIC_POSITIONS }}
CELL_PARAMETERS angstrom
{{ input.CELL_PARAMETERS }}
K_POINTS automatic
{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}
HUBBARD {ortho-atomic}
{% for row in hubbard_u -%}
U {{ row.atomicSpecies }}-{{ row.atomicOrbital }} {{ row.hubbardUValue }}
{% endfor -%}
{% for row in hubbard_v -%}
V {{ row.atomicSpecies }}-{{ row.atomicOrbital }} {{ row.atomicSpecies2 }}-{{ row.atomicOrbital2 }} {{ row.siteIndex }} {{ row.siteIndex2 }} {{ row.hubbardVValue }}
{% endfor -%}
40 changes: 40 additions & 0 deletions executables/espresso/pw.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,46 @@ flavors:
supportedApplicationVersions:
- '7.2'

pw_scf_dft_u+v:
input:
- name: pw_scf_dft_v.in
results:
- atomic_forces
- band_gaps
- fermi_energy
- pressure
- stress_tensor
- total_energy
- total_energy_contributions
- total_force
monitors:
- standard_output
- convergence_electronic
applicationName: espresso
executableName: pw.x
supportedApplicationVersions:
- '7.2'

pw_scf_dft_u+j:
input:
- name: pw_scf_dft_j.in
results:
- atomic_forces
- band_gaps
- fermi_energy
- pressure
- stress_tensor
- total_energy
- total_energy_contributions
- total_force
monitors:
- standard_output
- convergence_electronic
applicationName: espresso
executableName: pw.x
supportedApplicationVersions:
- '7.2'

pw_scf_dft_u_legacy:
input:
- name: pw_scf_dft_u_legacy.in
Expand Down
2 changes: 1 addition & 1 deletion src/js/data/templates.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/js/data/tree.js

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion templates/espresso/pw.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,28 @@
- name: KGridFormDataManager
- name: QEPWXInputDataManager
- name: PlanewaveCutoffDataManager
- name: HubbardContextManager
- name: HubbardUContextManager
applicationName: espresso
executableName: pw.x

- content: !readFile 'assets/espresso/pw_scf_dft_v.j2.in'
name: pw_scf_dft_v.in
contextProviders:
- name: KGridFormDataManager
- name: QEPWXInputDataManager
- name: PlanewaveCutoffDataManager
- name: HubbardUContextManager
- name: HubbardVContextManager
applicationName: espresso
executableName: pw.x

- content: !readFile 'assets/espresso/pw_scf_dft_j.j2.in'
name: pw_scf_dft_j.in
contextProviders:
- name: KGridFormDataManager
- name: QEPWXInputDataManager
- name: PlanewaveCutoffDataManager
- name: HubbardJContextManager
applicationName: espresso
executableName: pw.x

Expand Down

0 comments on commit f9295ec

Please sign in to comment.