| 1 | --- |
| 2 | layout: default |
| 3 | title: custodian.gaussian.jobs.md |
| 4 | nav_exclude: true |
| 5 | --- |
| 6 | |
| 7 | # custodian.gaussian.jobs module |
| 8 | |
| 9 | This module implements basic kinds of jobs for Gaussian runs. |
| 10 | |
| 11 | ## *class* custodian.gaussian.jobs.GaussianJob(gaussian_cmd: str, input_file: str, output_file: str, stderr_file: str = ‘stderr.txt’, suffix: str = ‘’, backup: bool = True) |
| 12 | |
| 13 | Bases: `Job` |
| 14 | |
| 15 | A basic Gaussian job. |
| 16 | |
| 17 | * **Parameters:** |
| 18 | * **gaussian_cmd** (*str*) – Command to run Gaussian. |
| 19 | * **input_file** (*str*) – Name of the Gaussian input file. |
| 20 | * **output_file** (*str*) – Name of the Gaussian output file. |
| 21 | * **stderr_file** (*str*) – Name of the stderr file. Defaults to ‘stderr.txt’. |
| 22 | * **suffix** (*str*) – String to append to the input and output files, e.g., to |
| 23 | rename Gaussian input and output files from say gaussian.com and |
| 24 | gaussian.out, to gaussian.com.guess1 and gaussian.out.guess1, |
| 25 | respectively, provide “.guess1” as the suffix. . Defaults to ‘’. |
| 26 | * **backup** (*bool*) – Whether to backup the input file. If True, the input will be |
| 27 | copied with a “.orig” appended to the name. Defaults to True. |
| 28 | |
| 29 | ### *classmethod* generate_better_guess(gaussian_cmd: str, input_file: str, output_file: str, stderr_file: str = ‘stderr.txt’, backup: bool = True, cart_coords: bool = True, directory: str = ‘./’) |
| 30 | |
| 31 | Generate a better initial guess for a Gaussian calculation (optimization or |
| 32 | SCF run). This is done by running the job at a lower level of theory |
| 33 | (e.g., STO-3G). The geometry for this job is read from the checkpoint file |
| 34 | generated by the previous job. |
| 35 | |
| 36 | * **Parameters:** |
| 37 | * **gaussian_cmd** (*str*) – Command to run Gaussian. |
| 38 | * **input_file** (*str*) – Name of the Gaussian input file. |
| 39 | * **output_file** (*str*) – Name of the Gaussian output file. |
| 40 | * **stderr_file** (*str*) – Name of the stderr file. Defaults to ‘stderr.txt’. |
| 41 | * **backup** (*bool*) – Whether to backup the input file. If True, the input will be |
| 42 | copied with a “.orig” appended to the name. Defaults to True. |
| 43 | * **cart_coords** (*bool*) – Whether to use Cartesian coordinates in the input file. |
| 44 | Defaults to True. |
| 45 | * **directory** (*str*) – Directory where the job will be run. Defaults to ‘./’. |
| 46 | * **Yields:** |
| 47 | *GaussianJob* – The Gaussian job instance. |
| 48 | |
| 49 | ### postprocess(directory: str = ‘./’) |
| 50 | |
| 51 | Perform any postprocessing of the Gaussian run. This includes making a copy |
| 52 | of the input and output file if a suffix is specified. |
| 53 | |
| 54 | * **Parameters:** |
| 55 | **directory** (*str*) – Directory where the job was run. Defaults to ‘./’. |
| 56 | |
| 57 | ### run(directory: str = ‘./’) |
| 58 | |
| 59 | Perform the actual Gaussian run. |
| 60 | |
| 61 | * **Parameters:** |
| 62 | **directory** (*str*) – Directory where the job will be run. Defaults to ‘./’. |
| 63 | * **Returns:** |
| 64 | The process running the Gaussian job. |
| 65 | * **Return type:** |
| 66 | subprocess.Popen |
| 67 | |
| 68 | ### setup(directory: str = ‘./’) |
| 69 | |
| 70 | Perform initial setup for the job, i.e., make a backup of the input file if |
| 71 | requested. |
| 72 | |
| 73 | * **Parameters:** |
| 74 | **directory** (*str*) – Directory where the job will be run. Defaults to ‘./’. |
| 75 | |
| 76 | ### terminate(directory: str = ‘./’) |
| 77 | |
| 78 | Terminate the Gaussian job. |
| 79 | |
| 80 | * **Parameters:** |
| 81 | **directory** (*str*) – Directory where the job was run. Defaults to ‘./’. |