PAOFLOW.gen.elphon_system#
paoflow-gen elphon: write an electron-phonon system folder from a pw.x input.
The folder has the layout of examples/elphon/<System>: system.py (the only file with
values, an ElphonSystem plus the per-workflow defaults),
qe/ (scf, ph.x, nscf and, optionally, optics-nscf inputs with run_qe.sh) and one
subfolder per selected workflow (phonons/, coupling/, superconductivity/,
optics/, transport/, arpes/) holding copies of the drivers of
PAOFLOW/gen/elphon_templates (the same files as the examples).
Attributes#
Functions#
|
Text of |
|
Text of |
|
Text of |
|
QE (and EPW) inputs of the system folder, |
|
Template files (relative paths) of the workflows selected in |
|
Write |
|
Ask for an integer that is a positive multiple of |
|
Comma-separated multi-select among |
|
Prompt for the electron-phonon system configuration. |
|
Run the electron-phonon generator: prompts, then the system folder. |
Module Contents#
- PAOFLOW.gen.elphon_system.WRITE_UKK_TEMPLATE = Multiline-String[source]#
Show Value
"""#!/usr/bin/env python3 """Write {ukk} for epw.x with wannierize = .false. (run in this directory before epw.x). EPW reads the band bookkeeping from this file only: the {nbnd} nscf bands, {exclusion} No Wannier functions are built; the identity rotations only feed EPW's Wannier stage, which PAOFLOW does not use. The empty {stem}.bvec / {stem}.mmn written alongside let that stage finish. """ from PAOFLOW.gen.epw_inputs import write_placeholder_ukk write_placeholder_ukk('{ukk}', nbnd={nbnd}, nk_total={nk_total}, exclude_bands={excluded}, nelec={nelec}) print('Wrote {ukk} (and the empty wannier90 stubs {stem}.bvec, {stem}.mmn)') """
- PAOFLOW.gen.elphon_system.render_system_py(cfg)[source]#
Text of
system.py:NAME,SYSTEMand the per-workflow default dictionaries.- Parameters:
cfg (dict) –
name,prefix,coupling_source,kgrid,qgrid,masses_amu,nelec,basisdir,configuration,pthr,long_range,quadrupoles(path orNone),cache_dir,spin_degeneracyand the optional dictionariessuperconductivity,optics,transport,arpes,phonons,coupling(missing ones are written empty).- Returns:
The module text.
- Return type:
- PAOFLOW.gen.elphon_system.render_run_qe(cfg)[source]#
Text of
qe/run_qe.sh: scf,ph.x, the nscf (and the EPW / optics steps).
- PAOFLOW.gen.elphon_system.write_ukk_script(cfg)[source]#
Text of
qe/nscf/write_ukk.py(placeholder<prefix>.ukkforwannierize = .false.).
- PAOFLOW.gen.elphon_system.qe_inputs(cfg)[source]#
QE (and EPW) inputs of the system folder,
{relative path: text}.- Parameters:
cfg (dict) –
prefix,kgrid,qgrid,nbnd,nelec,masses_amu,pw_template_text(apw.xinput; without it onlyqe/nscf/nscf.kpointsis written),pseudo_dir,coupling_source,irreducible(nscf on the irreducible wedge),metal(noepsil),exclude_bands,optics_nscf,optics_kgrid,optics_nbnd.- Returns:
qe/phonon/scf.in,qe/phonon/ph.in,qe/nscf/nscf.in(ornscf.kpoints),qe/run_qe.shand, for the EPW source,qe/nscf/epw.inandqe/nscf/write_ukk.py; withoptics_nscfalsoqe/optics/nscf.in.- Return type:
- PAOFLOW.gen.elphon_system.workflow_files(cfg)[source]#
Template files (relative paths) of the workflows selected in
cfg['workflows'].
- PAOFLOW.gen.elphon_system.write_system_folder(cfg, out, force=False)[source]#
Write
system.py, the QE inputs and the workflow drivers of a system folder.- Parameters:
cfg (dict) – The generator configuration (
render_system_py(),qe_inputs(),workflows,metal).out (str) – The system folder (created).
force (bool, optional) – Overwrite existing files (otherwise they are skipped with a message).
- Returns:
Written files.
- Return type:
- PAOFLOW.gen.elphon_system.ask_divisible(ask_int, prompt, default, divisor, what)[source]#
Ask for an integer that is a positive multiple of
divisor(re-prompting otherwise).
- PAOFLOW.gen.elphon_system.ask_workflows(ask, choices, default)[source]#
Comma-separated multi-select among
choices(re-prompts on an unknown name).
- PAOFLOW.gen.elphon_system.collect_elphon_system(args, workdir)[source]#
Prompt for the electron-phonon system configuration.
- Parameters:
args (argparse.Namespace) –
prefixandoutoverrides ofpaoflow-gen.workdir (str) – Directory scanned for a
pw.xinput.
- Returns:
The configuration of
write_system_folder().- Return type:
- PAOFLOW.gen.elphon_system.main_elphon(args, workdir)[source]#
Run the electron-phonon generator: prompts, then the system folder.
- Parameters:
args (argparse.Namespace) –
paoflow-genarguments (prefix,out,force).workdir (str) – Directory scanned for QE inputs.
- Returns:
Exit status.
- Return type: