Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOF-7298: add spin-orbit coupling templates #124

Merged
merged 19 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2c3654b
SOF-7298: add spin-orbit coupling templates
pranabdas Apr 20, 2024
5e7c8b9
SOF-7298: adjustments to soc template according to wode provider
pranabdas Apr 20, 2024
0a1d278
SOF-7298: wrap constrained_magnetization string value in quotes
pranabdas Apr 20, 2024
582a017
SOF-7298: set blocks for soc calculation starting from existing charg…
pranabdas Apr 20, 2024
85b06ee
SOF-7298: set spin angles when starting from existing charge density
pranabdas Apr 20, 2024
a57b279
SOF-7298: fix whitespace and renaming
pranabdas Apr 20, 2024
bcbd691
SOF-7298: implement fixed magnetization and set constrained magnetiza…
pranabdas Apr 21, 2024
658d3fa
SOF-7298: remove nspin from soc template
pranabdas Apr 21, 2024
26d0df9
SOF-7298: allow setting lforcet
pranabdas Apr 22, 2024
533b626
SOF-7298: workaround for whitespace issue in nested if conditions
pranabdas Apr 23, 2024
e312e14
SOF-7298: add pw_nscf_soc template
pranabdas Apr 23, 2024
cac3ca2
SOF-7298: add pw_bands_soc template
pranabdas Apr 23, 2024
66be560
SOF-7298: add pw_scf_dft_u_soc_legacy template
pranabdas Apr 23, 2024
2dada6f
SOF-7298: add pw_scf_dft_u_soc template
pranabdas Apr 23, 2024
3e1ff1c
SOF-7298: add pw_nscf_dft_u_soc template
pranabdas Apr 24, 2024
f41bb69
SOF-7298: add pw_bands_dft_u_soc template
pranabdas Apr 24, 2024
433450d
SOF-7298: add pw_nscf_dft_u_soc_legacy template
pranabdas Apr 24, 2024
267870e
SOF-7298: add pw_bands_dft_u_soc_legacy template
pranabdas Apr 24, 2024
470a6e1
SOF-7298: fix pw_bands_dft_u_soc template
pranabdas Apr 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions assets/espresso/pw_bands_dft_u_soc.j2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{% 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 }}
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'smearing'
degauss = 0.005
noncolin = .true.
lspinorb = .true.
{%- if nonCollinearMagnetization.isStartingMagnetization %}
{%- for item in nonCollinearMagnetization.startingMagnetization %}
starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization %}
constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'
lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}
fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}
fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}
fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}
lforcet = .true.
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and !nonCollinearMagnetization.lforcet %}
lforcet = .false.
{%- endif %}
{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}
{%- for item in nonCollinearMagnetization.spinAngles %}
angle1({{ item.index }}) = {{ item.angle1 }}
angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}
{%- endif %}
/
&ELECTRONS
diagonalization = 'david'
diago_david_ndim = 4
diago_full_acc = .true.
mixing_beta = 0.3
{%- if nonCollinearMagnetization.isExistingChargeDensity %}
startingpot = 'file'
{%- endif %}
/
&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 %}
HUBBARD {ortho-atomic}
{% for row in hubbard_u -%}
U {{ row.atomicSpecies }}-{{ row.atomicOrbital }} {{ row.hubbardUValue }}
{% endfor -%}
81 changes: 81 additions & 0 deletions assets/espresso/pw_bands_dft_u_soc_legacy.j2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{% 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 }}
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'smearing'
degauss = 0.005
lda_plus_u = .true.
lda_plus_u_kind = 0
U_projection_type = 'ortho-atomic'
{%- for row in hubbard_legacy %}
Hubbard_U({{ row.atomicSpeciesIndex }}) = {{ row.hubbardUValue }}
{%- endfor %}
noncolin = .true.
lspinorb = .true.
{%- if nonCollinearMagnetization.isStartingMagnetization %}
{%- for item in nonCollinearMagnetization.startingMagnetization %}
starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization %}
constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'
lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}
fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}
fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}
fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}
lforcet = .true.
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and !nonCollinearMagnetization.lforcet %}
lforcet = .false.
{%- endif %}
{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}
{%- for item in nonCollinearMagnetization.spinAngles %}
angle1({{ item.index }}) = {{ item.angle1 }}
angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}
{%- endif %}
/
&ELECTRONS
diagonalization = 'david'
diago_david_ndim = 4
diago_full_acc = .true.
mixing_beta = 0.3
{%- if nonCollinearMagnetization.isExistingChargeDensity %}
startingpot = 'file'
{%- endif %}
/
&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 %}
72 changes: 72 additions & 0 deletions assets/espresso/pw_bands_soc.j2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{% 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 }}
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'smearing'
degauss = 0.005
noncolin = .true.
lspinorb = .true.
{%- if nonCollinearMagnetization.isStartingMagnetization %}
{%- for item in nonCollinearMagnetization.startingMagnetization %}
starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization %}
constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'
lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}
fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}
fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}
fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}
lforcet = .true.
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and !nonCollinearMagnetization.lforcet %}
lforcet = .false.
{%- endif %}
{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}
{%- for item in nonCollinearMagnetization.spinAngles %}
angle1({{ item.index }}) = {{ item.angle1 }}
angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}
{%- 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 crystal_b
{{kpath.length}}
{% for point in kpath -%}
{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}
{% endfor %}
77 changes: 77 additions & 0 deletions assets/espresso/pw_nscf_dft_u_soc.j2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
&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 }}
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'smearing'
degauss = 0.005
noncolin = .true.
lspinorb = .true.
{%- if nonCollinearMagnetization.isStartingMagnetization %}
{%- for item in nonCollinearMagnetization.startingMagnetization %}
starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization %}
constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'
lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}
fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}
fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}
fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}
lforcet = .true.
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and !nonCollinearMagnetization.lforcet %}
lforcet = .false.
{%- endif %}
{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}
{%- for item in nonCollinearMagnetization.spinAngles %}
angle1({{ item.index }}) = {{ item.angle1 }}
angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}
{%- endif %}
{%- 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
{%- if nonCollinearMagnetization.isExistingChargeDensity %}
startingpot = 'file'
{%- endif %}
/
&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 %}
HUBBARD {ortho-atomic}
{% for row in hubbard_u -%}
U {{ row.atomicSpecies }}-{{ row.atomicOrbital }} {{ row.hubbardUValue }}
{% endfor -%}
79 changes: 79 additions & 0 deletions assets/espresso/pw_nscf_dft_u_soc_legacy.j2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
&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 }}
ecutwfc = {{ cutoffs.wavefunction }}
ecutrho = {{ cutoffs.density }}
occupations = 'smearing'
degauss = 0.005
lda_plus_u = .true.
lda_plus_u_kind = 0
U_projection_type = 'ortho-atomic'
{%- for row in hubbard_legacy %}
Hubbard_U({{ row.atomicSpeciesIndex }}) = {{ row.hubbardUValue }}
{%- endfor %}
noncolin = .true.
lspinorb = .true.
{%- if nonCollinearMagnetization.isStartingMagnetization %}
{%- for item in nonCollinearMagnetization.startingMagnetization %}
starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization %}
constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'
lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}
{%- endif %}
{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}
fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}
fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}
fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}
lforcet = .true.
{%- endif %}
{%- if nonCollinearMagnetization.isExistingChargeDensity and !nonCollinearMagnetization.lforcet %}
lforcet = .false.
{%- endif %}
{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}
{%- for item in nonCollinearMagnetization.spinAngles %}
angle1({{ item.index }}) = {{ item.angle1 }}
angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}
{%- endif %}
{%- 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
{%- if nonCollinearMagnetization.isExistingChargeDensity %}
startingpot = 'file'
{%- endif %}
/
&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 %}
Loading
Loading