### TABLE OF CONTENTS

## 73-after

DESCRIPTION

This example shows how to instruct PWTK to submit a calculation only after some preceding calculation is finished.

EXPLANATION

Suppose that you submitted a QE calculation that takes quite a while. After that you got an idea for a new calculation, which depends on the first one. Hence, you cannot submit this calculation right away because the first calculation is not finished yet.

For such situations, the ::pwtk::afterDone command is useful, which waits for the specified calculation to complete, i.e., it periodically checks the QE output file if the output file correponds to a finished calculation.

EXAMPLE SOURCE FILE

SOURCE

# here we emulate the above described scenario by the running the # first calculation in the background import CORh.pwtk CELL_PARAMETERS_and_ATOMIC_POSITIONS_fromXSF CO-Rh100-c2x2-2L.xsf fixAtomsLast 2 runPW relax.CO-Rh100.in & # we need to wait for the first calculation to finish before # submitting the new calculation; to this end, we use ::pwtk::afterDone afterDone relax.CO-Rh100.out # let's calculate the PDOS using the ::pwtk::pdos_run workflow PROJWFC { ngauss = 0 degauss = 0.01 DeltaE = 0.05 } pdos_run -nscf {8 8 1} -t png CO-Rh100