Skip to content

Commit

Permalink
Merge pull request #119 from Exabyte-io/feat/SOF-6927
Browse files Browse the repository at this point in the history
SOF-6927: support collinear spin calculation in qe
  • Loading branch information
pranabdas committed Mar 21, 2024
2 parents 786a285 + 4a9bb4e commit abd5b8f
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 18 deletions.
50 changes: 50 additions & 0 deletions assets/espresso/pw_bands_magn.j2.in
@@ -0,0 +1,50 @@
{% if subworkflowContext.MATERIAL_INDEX %}
{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}
{% endif -%}
&CONTROL
calculation = 'bands'
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_WITH_LABELS }}
nspin = 2
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'smearing'
degauss = 0.005
{%- for item in starting_magnetization %}
starting_magnetization({{ item.index }}) = {{ item.value }}
{%- endfor %}
/
&ELECTRONS
diagonalization = 'david'
diago_david_ndim = 4
diago_full_acc = .true.
mixing_beta = 0.3
/
&IONS
/
&CELL
/
ATOMIC_SPECIES
{{ input.ATOMIC_SPECIES_WITH_LABELS }}
ATOMIC_POSITIONS crystal
{{ input.ATOMIC_POSITIONS }}
CELL_PARAMETERS angstrom
{{ input.CELL_PARAMETERS }}
K_POINTS crystal_b
{{kpath.length}}
{% for point in kpath -%}
{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}
{% endfor %}
48 changes: 48 additions & 0 deletions assets/espresso/pw_nscf_magn.j2.in
@@ -0,0 +1,48 @@
&CONTROL
calculation = 'nscf'
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_WITH_LABELS }}
nspin = 2
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'smearing'
degauss = 0.005
{%- for item in starting_magnetization %}
starting_magnetization({{ item.index }}) = {{ item.value }}
{%- endfor %}
{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}
nosym = .true.
noinv = .true.
{%- endif %}
/
&ELECTRONS
diagonalization = 'david'
diago_david_ndim = 4
diago_full_acc = .true.
mixing_beta = 0.3
/
&IONS
/
&CELL
/
ATOMIC_SPECIES
{{ input.ATOMIC_SPECIES_WITH_LABELS }}
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 %}
48 changes: 48 additions & 0 deletions assets/espresso/pw_scf_magn.j2.in
@@ -0,0 +1,48 @@
{% 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_WITH_LABELS }}
nspin = 2
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'smearing'
degauss = 0.005
{%- for item in starting_magnetization %}
starting_magnetization({{ item.index }}) = {{ item.value }}
{%- 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_WITH_LABELS }}
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 %}
68 changes: 52 additions & 16 deletions executables/espresso/pw.x.yml
Expand Up @@ -76,6 +76,22 @@ flavors:
applicationName: espresso
executableName: pw.x

pw_scf_kpt_conv:
input:
- name: pw_scf_kpt_conv.in
results:
- total_energy
- fermi_energy
- pressure
- atomic_forces
- total_force
- stress_tensor
monitors:
- standard_output
- convergence_electronic
applicationName: espresso
executableName: pw.x

pw_scf_dft_u:
input:
- name: pw_scf_dft_u.in
Expand Down Expand Up @@ -168,6 +184,23 @@ flavors:
- '6.8.0'
- '7.0'

pw_scf_magn:
input:
- name: pw_scf_magn.in
results:
- atomic_forces
- fermi_energy
- pressure
- stress_tensor
- total_energy
- total_energy_contributions
- total_force
monitors:
- standard_output
- convergence_electronic
applicationName: espresso
executableName: pw.x

pw_esm:
input:
- name: pw_esm.in
Expand Down Expand Up @@ -217,6 +250,17 @@ flavors:
applicationName: espresso
executableName: pw.x

pw_nscf_magn:
input:
- name: pw_nscf_magn.in
results:
- fermi_energy
- band_gaps
monitors:
- standard_output
applicationName: espresso
executableName: pw.x

pw_bands:
input:
- name: pw_bands.in
Expand All @@ -225,6 +269,14 @@ flavors:
applicationName: espresso
executableName: pw.x

pw_bands_magn:
input:
- name: pw_bands_magn.in
monitors:
- standard_output
applicationName: espresso
executableName: pw.x

pw_relax:
input:
- name: pw_relax.in
Expand Down Expand Up @@ -261,22 +313,6 @@ flavors:
applicationName: espresso
executableName: pw.x

pw_scf_kpt_conv:
input:
- name: pw_scf_kpt_conv.in
results:
- total_energy
- fermi_energy
- pressure
- atomic_forces
- total_force
- stress_tensor
monitors:
- standard_output
- convergence_electronic
applicationName: espresso
executableName: pw.x

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

30 changes: 30 additions & 0 deletions templates/espresso/pw.x.yml
Expand Up @@ -140,3 +140,33 @@
# pw.x md calculation, also there seems to be no effective electron mass in pw.x
applicationName: espresso
executableName: pw.x

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

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

- content: !readFile 'assets/espresso/pw_bands_magn.j2.in'
name: pw_bands_magn.in
contextProviders:
- name: KPathFormDataManager
- name: QEPWXInputDataManager
- name: PlanewaveCutoffDataManager
- name: CollinearMagnetizationDataManager
applicationName: espresso
executableName: pw.x

0 comments on commit abd5b8f

Please sign in to comment.