How can I restart a job that was interrupted?
Many Gaussian jobs that are stopped prematurely — e.g., due to a machine crash, a power failure, manually killing the job — can be restarted. These include geometry optimizations, frequency calculations, and CCSD and EOM-CCSD calculations. The technique to restart the jobs varies depending on the type of job. This FAQ will discuss some common cases.
Be aware that all restarts require the checkpoint file from the previous job. Some job types also require the read-write file. If the required file(s) have been deleted, then the job cannot be restarted.
Restarting Interrupted Geometry Optimizations: Opt=Restart
If a geometry optimization is terminated before completion due to an external factor, you can resume it simply by adding the Restart option to the Opt keyword into the route section of the original job, as in this example:
%Chk=myfile # Opt=Restart remainder of the original route
The Opt=Restart option always begins from the last completed point in the previous optimization.
If the Opt keyword originally had other options, in most cases you can simply add Restart to the existing set:
%Chk=myfile # Opt=(QST2,Restart) …
If CalcFC or RCFC was among the original options, then you can omit it if you do not need to compute/retrieve force constants, e.g., if the optimization was beyond the first step. On the other hand, if you add CalcFC to the option list along with Restart, the force constant will be computed at the beginning/next point of the restarted optimization.
“Restarting” a Geometry Optimization from a Specific Point: Geom=(AllCheck,Step=n)
If you want to begin a new geometry optimization from a specific point in a previous optimization, this can be accomplised via the Step option to the Geom keyword. It does not matter if the previous optimization completed, was interrupted or failed.
The following example optimizes the structure at point 20 of the previous optimization:
%OldChk=myfile %Chk=mynewfile # method/basis Opt Geom=(AllCheck,Step=20) Guess=Read
You may add any desired options to the Opt keyword. In this example, we use the %OldChk directive to retrieve the desired structure from an existing checkpoint file without modifying that file; a different checkpoint file is used for the new calculation. You can also use the Check option to Geom rather than AllCheck if you prefer (providing the additional required input).
Note that this method does not restart the optimization but rather begins a new one from a specific retrieved geometry.
Restarting IRC Calculations: IRC=Restart
The IRC keyword also has a Restart option. This can be used to restart an IRC calculation which did not complete. It can also be used to compute additional points along the path beginning from a complete IRC job. Here is an example of the former:
%Chk=myfile # IRC=Restart …
Restarting Analytic Frequency Calculations (and Other Long Jobs): # Restart
Long running calculations with large amounts of intermediate data will require both the checkpoint file and the read-write file in order to be restarted. This method applies to jobs like analytic frequencies (for numerical frequencies, see the next section), coupled cluster methods (including EOM-CCSD), NMR calculations, BD energies and optical rotation predictions (Polar=OptRot).
These jobs can be restarted with a route section that consists of just the Restart keyword, as in this job:
%Chk=myfile %RWF=/path/filename # Restart
You will need to specify the name and location of the read-write file when restarting interrupted jobs. Consult the penultimate section of this page if you do not know how to locate the read-write file when you did not include the %RWF directive in the original job.
If you anticipate that a job may need restarting at some point, then you can assign a name to the read-write file in the original job:
%RWF=myrwfile %NoSave %Chk=myfile # desired route section job file continues …
By default, any file which is named with a % directive is retained when the job finishes. The %NoSave after the %RWF overrides this default, so that the read-write file will still be deleted if the job finishes normally (but will be left behind if the job terminates early). In this case, the %Chk directive will typically be placed after %NoSave since you usually want to retain it for future use.
Restarting Numerical Frequency Calculations: Freq=(Numer,Restart)
The Restart option to the Freq keyword may be used to restart a numerical frequency calculation. It restarts a numerical frequency job after the last completed geometry. A failed numerical frequency job may be restarted from its checkpoint file by simply repeating the route section of the original job, adding the Restart option to the Freq=Numer keyword/option. No other input is required:
%Chk=myfile # Freq=(Numer,Restart) remainder of the original route
Locating the Read-Write File for a Job
If you did not use %RWF in the original interrupted job to name a read-write file, then you may be able to find the read-write file in the Gaussian scratch directory (specified by the GAUSS_SCRDIR environment variable). It will have the default name assigned by Gaussian, which is of the form Gau-#####. Examine the beginning of the Gaussian output file for the interrupted job for lines like the following:
Initial command: //g09/l1.exe "/scratch/chem/Gau-22066.inp" -scrdir="/scratch/chem/" Entering Link 1 = /g09/l1.exe PID= 22067.
The scratch directory in your system is the one listed after -scrdir: here /scratch/chem/. The automatically-generated name for the read-write file based on the job’s PID number (process ID), which is different for every job. In this example, the read-write file is /scratch/chem/Gau-22067.rwf. You can specify this path to the %RWF directive to use it in a subsequent job.
For More Information …
Consult the Gaussian 16 User’s Reference for full details about all of these keywords and options.
Last updated on: 14 August 2016.