Calculate the total energy of a material in Quantum ESPRESSO and, from the same self-consistent calculation, the wavefunction amplitude, the average electrostatic potential or both, with or without a relaxation first.
In JupyterLite, the notebook is made/workflows/total_energy_post_processing.ipynb, entry 2.2.1 "Wavefunction Amplitude / Average Electrostatic Potential" of made/workflows/Introduction.ipynb.
fromdatetimeimportdatetimefrommat3ra.ide.computeimportQueueName# 2. Auth and organization parametersORGANIZATION_NAME=None# 3. Material parametersFOLDER="../uploads"MATERIAL_NAME="Silicon"# 4. Workflow parametersAPPLICATION_NAME="espresso"ADD_RELAXATION=False# Post-processing (PP) properties to calculate — list one or more, or use [] for total energy only:POST_PROCESSING_PROPERTIES=["wavefunction_amplitude"]# e.g., ["wavefunction_amplitude", "average_electrostatic_potential"]# Model parametersMODEL_SUBTYPE="gga"# or "lda"MY_WORKFLOW_NAME="Total Energy"+(" + "+", ".join(p.replace("_"," ").title()forpinPOST_PROCESSING_PROPERTIES)ifPOST_PROCESSING_PROPERTIESelse"")# 5. Compute parametersCLUSTER_NAME=None# specify full or partial name i.e. "cluster-001" to selectQUEUE_NAME=QueueName.DPPN=1# 6. Job parameterstimestamp=datetime.now().strftime("%Y-%m-%d %H:%M")POLL_INTERVAL=30# seconds
POST_PROCESSING_PROPERTIES lists the post-processing properties, "wavefunction_amplitude" and "average_electrostatic_potential"; [] calculates the total energy only.
Cell 1.3 holds the method and post-processing parameters:
1 2 3 4 5 6 7 8 910111213141516171819
# Method parametersPSEUDOPOTENTIAL_TYPE="us"# ultrasoft pseudopotentials; alternatives: "nc" (norm-conserving), "paw"FUNCTIONAL="pbe"# for gga: pbe, pbesol, etc.; for lda: pz, etc.# set k-grid for relaxation and SCF (if not set, KPPRA is used by default)RELAXATION_KGRID=None# e.g., [4, 4, 4]SCF_KGRID=None# e.g., [4, 4, 4]# Wavefunction amplitude parameters# Band selection: "VBM" (Valence Band Maximum), "CBM" (Conduction Band Minimum = VBM+1), or an integer (1-based custom band index)WFN_BAND="VBM"# XY fractional (crystal) coordinates of the sampling point; plot is always 1D along ZWFN_X=0.0# x0(1) in fractional crystal coordinates [0, 1)WFN_Y=0.0# x0(2) in fractional crystal coordinates [0, 1)# Average electrostatic potential parametersAVG_SAMPLING_SCALE=1.0# macroscopic average period factorAVG_NUM_POINTS=3000# number of points along the averaging directionAVG_SMOOTHING_WINDOW=3.0# smoothing window length (in Bohr)
WFN_BAND is the band whose amplitude is calculated: "VBM", "CBM" or a band index starting from 1. WFN_X and WFN_Y are the fractional in-plane coordinates of the line along z on which the amplitude is sampled. AVG_SAMPLING_SCALE, AVG_NUM_POINTS and AVG_SMOOTHING_WINDOW set the period factor of the macroscopic average, the number of points along the averaging direction and the smoothing window in Bohr.
The overview explains the model and k-point parameters.