"materials." is a srcipty tool that generates input files for Quantum Espresso. it also has scripts to post-process the results of the calculations (scf, nscf, dos) and extract useful information from them.
- download pseudopotentials from SSSP precision library
which contains all pseudopotential files and place them in some directory
(e.g.
./pseudos/). - set the
PSEUDO_DIRvariable in.envfile to the path of this directory. - run
python ./src/rename_pseudos.pyto rename the pseudopotential files for other scripts to recognize. - copy
.env.exampleto.envand set thePROJECT_NAME, leave the rest to defaults.
you have to build your structure in main.py's main() function.
you'll have to two more functions to generate the input files. here's
an example of how to do that:
def main():
# get project directory
project_dir = setup_output_project(PROJECT_NAME)
# build your structure here
structure = get_structure_from_id("mp-149") # Silicon ID from Materials Project
# generate the input files
generate_espresso_input(
structure,
out_dir=project_dir,
prefix="si",
like="insulator", # or "metal"; this decides what occupation scheme to use i.e. smearing (mv*) or fixed occupations;
xc="pbe", # exchange-correlation functional; this sets the `input_dft` variable in the input files
kpts=(7, 7, 7),
)then run,
python ./src/main.pyalthough phonon files are generated for functionals other than
pbe, they are not supported by Quantum ESPRESSO as of build 7.4.1 (which i used).
after generating the input files, you can run the calculations using
# run relaxation calculation
pw.x < ./<OUTPUT_DIR>/<PROJECT_NAME>/relax.in > ./<OUTPUT_DIR>/<PROJECT_NAME>/relax.out
# copy the relaxed structure to scf.in and nscf.in (bottom)
# run scf calculation
pw.x < ./<OUTPUT_DIR>/<PROJECT_NAME>/scf.in > ./<OUTPUT_DIR>/<PROJECT_NAME>/scf.out
# run nscf calculation
pw.x < ./<OUTPUT_DIR>/<PROJECT_NAME>/nscf.in > ./<OUTPUT_DIR>/<PROJECT_NAME>/nscf.out
# run dos calculation
dos.x < ./<OUTPUT_DIR>/<PROJECT_NAME>/dos.in > ./<OUTPUT_DIR>/<PROJECT_NAME>/dos.out
# run phonon calculation
ph.x < ./<OUTPUT_DIR>/<PROJECT_NAME>/ph.in > ./<OUTPUT_DIR>/<PROJECT_NAME>/ph.outyou can check calculation progress by running
tail -f ./<OUTPUT_DIR>/<PROJECT_NAME>/<calculation_type>.outin a separate terminal, where<calculation_type>is one ofscf,nscf,dosorph.
after running the calculations, you can post-process the results using
python ./src/process.pythis will generate ./<OUTPUT_DIR>/<PROJECT_NAME>/processed.json file which contains
useful informaton extracted from scf and nscf calculations.
- you can use
mpirun -np <num_procs> pw.x < ./<OUTPUT_DIR>/<PROJECT_NAME>/scf.in > ./<OUTPUT_DIR>/<PROJECT_NAME>/scf.outto run the calculations in parallel on multiple processors. - get your pseudopotentials from here.
- although phonon calculations are always generated, they are not supported by Quantum ESPRESSO as of
build 7.4.1 (which i used) for exchange-functionals other than
pbe. - certain exchange-functionals (eg. SCAN) require norm-conserving pseudopotentials to be used. i used
sg15_oncv_upf_2020-02-06.tar.gz SG15 ONCV potentials in UPF formatfrom SG15 ONCV potentials for this purpose. you are still required to rename them just like the normal psuedos and update your.envfile if working with such functionals.
╱|、
(˚ˎ 。7
|、˜〵
じしˍ,)ノ
the repository and everything within is licensed under the GNU General Public License v3.0. Refer to COPYING.md for the full license text.