Skip to content

Commit

Permalink
SOF-7011: support DFT+U calculation in QE v7.0 and below
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Oct 13, 2023
1 parent ecab407 commit 1eac7c4
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 2 deletions.
49 changes: 49 additions & 0 deletions assets/espresso/pw_scf_dft_u_legacy.j2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{% 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'
lda_plus_u = .true.
lda_plus_u_kind = 0
U_projection_type = 'ortho-atomic'
{% for row in hubbard -%}
Hubbard_U({{ row.atomicSpeciesIndex }}) = {{ row.hubbardUValue }}
{% endfor %}
/
&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 %}
29 changes: 29 additions & 0 deletions executables/espresso/pw.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,35 @@ flavors:
supportedApplicationVersions:
- '7.2'

pw_scf_dft_u_legacy:
input:
- name: pw_scf_dft_u_legacy.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:
- '5.2.1'
- '5.4.0'
- '6.0.0'
- '6.3'
- '6.4.1'
- '6.5.0'
- '6.6.0'
- '6.7.0'
- '6.8.0'
- '7.0'

pw_esm:
input:
- name: pw_esm.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.

10 changes: 10 additions & 0 deletions templates/espresso/pw.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,13 @@
- name: HubbardContextManager
applicationName: espresso
executableName: pw.x

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

0 comments on commit 1eac7c4

Please sign in to comment.