4

GaussBatchReplacer 2012.11.27

Fig. 1 Interface of GaussBatchReplacer 2012.11.27

This program is designed to perform batch processing of Gaussian input files, including:

1. add up to 3 new lines at the beginning of the Route Section,

2. replace specific text strings with strings of your choice,

3. check the contents of original and modified input files without leaving the program.

Load Gaussian Input Files

There are two way to load Gaussian input file(s).

·  Click the button on the top left corner to select Gaussian input file(s), or

·  Drag Gaussian input file(s) to this window.

After the files are loaded, the file names will be listed and the total number of files will be shown above the list.

Note: Any ASCII file is OK, regardless of its file extension.

Check File Contents

Once files are loaded, you may click any file in the list to view its content in the bottom box.

Add New Lines at the Beginning of Route Section

If adding new lines at the beginning of Route Section is desired, three textboxes are provided for this purpose. Any characters in these boxes will be inserted to the beginning of each file in the file list, in the order of 1 2 3. The leading number is for indication only and will not be included.

If a textbox only contains space(s) or is left blank, it will be ignored.

Replace Designated Text Strings

The program will search through each file and replace all instances of designated text strings with those of your choice.

Infinite sets of “replace … with …” can be defined using the “Add” button. To modify any item, just click it, modify the texts in the boxes below, and click “Update”. Selected item can be removed using the “Remove Selected” button. And clicking the “Clear” button will clear the whole list.

Note 1: It is important to ensure that the strings to be replaced are unique in the file and is not confusing with other strings.

For example,

In order to replace %nprocshared= 2 with %nprocshared= 3, one should specify:

Replace %nprocshared= 2

With %nprocshared= 3

Here, the string %nprocshared= before the number 2 makes the whole string unique. If one specify,

Replace 2

With 3

all of the digits “2” in the file will be replaced with “3”, which is not desired.

Note 2: It is recommended to directly copy the string to be replaced from the original file, and only modify the part you want to replace.

For example, in the string “1/42= 1”, there are 9 spaces in the middle. If one more (or less) space is mistyped, exact match could not be achieved, and replacement will not occur.

File Saving Options

All modified files will be saved as new files with the file extension specified in the box.

If a destination file already exists, a time stamp will be appended to the new file name.

Modified input files are formatted for use in Linux (without Carriage Returns).

In the file list on left panel, the second column titled “Success?” will indicate whether a file is successfully modified.

After all options are correctly set up, click “Replace & Save” to execute the replacement for all files in the list. The file names of the modified files are listed in the third column on the left panel.

Click any item in the file list, and then click “Original” or “Modified” below the list to toggle the file content display.

Questions and Comments

Questions and comments are welcome. Please send to

Revision History

2012.09.04 / First release
2012.11.27 / FIXED: Resolved issue with "File saving options" not working.

GaussBatchReplacer 2012.11.27