.. _restart: Restarting calculations ======================= Starting with Version 1.9, WEASEL supports restarting an interrupted job. For example, a simple WEASEL job is started and at some point aborted by user using ``Ctrl+c``. .. prompt:: bash $ $ weasel water.smi -gas The report file would look as follows (skipping header):: [...] Starting job: weasel water.smi -gas [...] ############################## * COMMENCING ACTIONS * ############################## === Starting Action 1. === == PREOPTIMIZATION == ============================ Running otool_xtb water_PreOpt.xyz -P 4 --opt vtight --namespace water_PreOpt --alpb H2O > water_PreOpt.out Preoptimization converged! Adding energy -3181.814679 kcal/mol to summary file. ~~~~~ Result Action 1. ~~~~ ~~~ Action 1. completed! ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ === Starting Action 2. === == OPTIMIZATION == ============================ Starting optimization... Running orca water_Opt.inp -wdir water/Opt > water_Opt.out Optimization converged! Adding energy -47982.019738 kcal/mol to summary file. ~~~~~ Result Action 2. ~~~~ ~~~ Action 2. completed! ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ === Starting Action 3. === == DFT Calculation == ============================ Starting B3LYP calculation using def2-TZVP basis set... Running orca water_SP_DFT.inp -wdir water/SP_DFT > water_SP_DFT.out ^C KEYBOARD INTERRUPT was caught. Aborting... WEASEL terminated with ERRORs WEASEL was interrupted while performing Action 3. In order to restart the job, just call WEASEK like this: ``weasel -restart ``. WEASEL should also be called from the same folder as used for the original job. The report file of the restarted job would look as follows (skipping headers) :: ############################## * COMMENCING ACTIONS * * (Restarted) * ############################## === Starting Action 1. === == PREOPTIMIZATION == ============================ Post-Processing only. Not running job, but expecting output water_PreOpt.out Preoptimization converged! Adding energy -3181.814679 kcal/mol to summary file. ~~~~~ Result Action 1. ~~~~ ~~~ Action 1. completed! ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ === Starting Action 2. === == OPTIMIZATION == ============================ Starting optimization... Post-Processing only. Not running job, but expecting output water_Opt.out Optimization converged! Adding energy -47982.019738 kcal/mol to summary file. ~~~~~ Result Action 2. ~~~~ ~~~ Action 2. completed! ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ === Starting Action 3. === == DFT Calculation == ============================ Starting B3LYP calculation using def2-TZVP basis set... Running /opt/orca/orca-5.0.3-f.0_linux_x86-64/bin/orca water_SP_DFT.inp -wdir /tmp/water/SP_DFT > water_SP_DFT.out SCF converged! Done! Adding energy -47958.336286 kcal/mol to summary file. ~~~~~ Result Action 3. ~~~~ ~~~ Action 3. completed! ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #################################### ACTIONS CONCLUDED ##################################### ************************* ACTIONS SUMMARY ************************* 3 of 3 actions were completed successfully: 1: Preoptimization of 'water' using XTB. 2: Optimization of 'water' using BP86 with def2-TZVP(-F) basis set. 3: DFT single point calculation of 'water' using 'B3LYP' with def2-TZVP basis set. ***************** TIMINGS ***************** Timings for job 'water' (in HH:MM:SS.s) Overall Time : 00:00:01.4 ---------- Individual Timings ---------- Preoptimization : 00:00:00.0 Optimization : 00:00:00.0 DFT SP calculations : 00:00:01.3 SMILES string conversion : 00:00:00.0 Time not assigned : 00:00:00.0 WEASEL terminated successfully Actions 1 and 2 were skipped and only the post-processing was performed, while Action 3 was started anew. The report file will be called ``.restarted.report``, same goes for the summary file, as well as any warning or error file, which may be created. .. important:: WEASEL's restart feature is completely based on the ``.restart.tsv.bz2`` file located in every mainjob dir. If the file is missing or corrupted, a restart is not possible and all actions of a job have to re-performed. .. note:: The restart file also contains the original command line arguments used, therefore, ``-restart `` can be used without the need to provide any additional command line arguments. WEASEL practically also allows restarting a job using different keywords for actions that have not been performed yet, e.g. using r2SCAN instead of r2SCAN-3c for optimization. **But this will likely lead to unexpected results!**