Docs
Search…
Gaussian Tutorial

Command Line Basics

Command
Description
ls
list directories & files in current directory
mkdir newDir
makes a new directory in the current directory
cd ..
back up one directory
cd myDirectory/
open myDirectory
nano file1
opens file1 in nano editor
Ctrl-o , Enter
In nano-saves edits
Ctrl-X
Exits out of nano
The "cd" command is used to move into and out of directories (folders). It's basically equivalent (in Windows Explorer) to clicking on a subfolder of the folder you are in (eg. "cd subfolder/") or hitting the back arrow to move out of a folder into the previous one (eg. "cd ..").

Getting Started

MobaXterm

MobaXterm can be freely downloaded here (use the Home Installer Edition): https://mobaxterm.mobatek.net/download.html
Open MobaX.
Log in to Lawrence (refer to the following code).
2
Warning: Permanently added 'lawrence.usd.edu' (RSA) to the list of known hosts.
3
[email protected]'s password:
4
Last login: Wed Jan 9 13:14:19 2019 from 192.236.35.187
5
Welcome to the Lawrence Supercomputer at the University of South Dakota!
6
......
7
8
Copied!

Transferring Files (Lawrence to & from PC)

In MobaX, the file explorer/hierarchy is visible just to the left of the command line interface. Navigate into directories by clicking on them, and out of directories using the "parent directory" button.
Note: entering/exiting a directory in this area doesn't change your current directory in the command line (you'll still be in the same directory as before in the command line). Use the cd command to navigate directories in the command line.
From this section of the MobaX window, you can drag and drop files between Lawrence and your PC as needed.
Once your files are in the proper directories, they can be handled in the same way as the example input files are handled in this tutorial (excluding the steps of copying the example input files into their respective directories).

Interactive Jobs

Open MobaX and log into Lawrence (see section "Getting Started").
Make a directory in your home directory, and navigate into it:
1
[[email protected]@login ~]$ mkdir myInteractiveDir
2
[[email protected]@login ~]$ cd myInteractiveDir/
3
[[email protected]@login myInteractiveDir]$
Copied!
Connect to a node.
1
[[email protected]@login myInteractiveDir]$ srun --pty bash
2
[[email protected]@node56 myInteractiveDir]$
Copied!
Copy the Gaussian test file into your myInteractiveDir directory.
1
[[email protected]@node56 myInteractiveDir]$ cp /opt/examples/Gaussian/test.com ./test.com
2
[[email protected]@node56 myInteractiveDir]$ ls
3
test.com
Copied!
If these commands don't make sense, go to the top section: "Command Line Basics".
To see the Gaussian modules available:
1
[[email protected]@node56 myInteractiveDir]$ module avail gauss
2
---------------------------- /act/modulefiles --------------------------------
3
gaussian/09 gaussian/16
Copied!
Load one of the Gaussian modules.
1
[[email protected]@node56 myInteractiveDir]$ module load gaussian/16
2
[[email protected]@node56 myInteractiveDir]$ module list
3
Currently Loaded Modulefiles:
4
1) gaussian/16
Copied!
Run Gaussian with an input file:
1
[[email protected]@node56 myInteractiveDir]$ g16 <test.com >interactiveOutput.com
2
[[email protected]@node56 myInteractiveDir]$
Copied!
To view the output, open "interactiveOutput.com" with nano or another editor.
1
[[email protected]@node56 myInteractiveDir]$ nano interactiveOutput.com
Copied!
To get back out of nano, use the instructions at the bottom of the command line screen, or see "Command Line Basics".
Navigate out of "myInteractiveDir" into your home directory:
1
[[email protected]@node56 myInteractiveDir]$ cd ..
2
[[email protected]@node56 ~]$
Copied!
Exit the node.
1
[[email protected]@node56 ~]$ exit
2
[[email protected]@login ~]$
Copied!

Batch Jobs

If entering the tutorial at this point, open MobaX and log into Lawrence (see the second half of "Getting Started").
Make a directory in your home directory, and navigate into it:
1
[[email protected]@login ~]$ mkdir myBatchDir
2
[[email protected]@login ~]$ cd myBatchDir
3
[[email protected]@login myBatchDir]$
Copied!
If these commands don't make sense, go to the top section: "Command Line Basics".
Copy the Gaussian batch job template files into your myBatchDir directory.
1
[[email protected]@login myBatchDir]$ cp -r /opt/examples/Gaussian/. ./
2
[[email protected]@login myBatchDir]$ ls
3
gaussianBatchTemplate.sh output.txt test.com
Copied!
Open the file "gaussianBatchTemplate.sh" using nano (or another editor, if you prefer) and note the features described in the image below.
1
[[email protected]@login myBatchDir]$ nano gaussianBatchTemplate.sh
Copied!
Open the file "test.com" (you will have to exit viewing gaussianBatchTemplate.sh in nano to do this in the same terminal).
1
[[email protected]@login myBatchDir]$ nano test.com
Copied!
In the last line, "test.com" is the input file name and the slurm ID followed by ".out" is the output file name. Also note that the number of CPUs (ntasks) requested matches the %nprocshared (or %nprocs) in the input file.
--ntasks in batch file should equal %nprocshared in input file
Exit nano (Ctrl-x), then run the batch job:
1
[[email protected]@login myBatchDir]$ sbatch gaussianBatchTemplate.sh
2
Submitted batch job 12345
3
[[email protected]@login myBatchDir]$
Copied!
Show the list of jobs running on Lawrence:
1
[[email protected]@login myBatchDir]$ squeue
2
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
3
12345 nodes gaussian user2 R 0:22 1 node40
4
48469 nodes bash user1 R 3:04 1 node56
5
48467 nodes bash user3 R 23:07 5 node[25-29]
6
48458 nodes bash user4 R 23:41 1 node21
7
48459 nodes bash user4 R 23:41 1 node22
8
48460 nodes bash user4 R 23:41 1 node24
9
48457 nodes bash user4 R 25:14 1 node11
10
48449 nodes bash user4 R 25:18 1 node13
11
48450 nodes bash user4 R 25:18 1 node17
12
Copied!
Show only your jobs:
1
[[email protected]@login myBatchDir]$ squeue -u user.name
2
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
3
12345 nodes gaussian user.n R 2:34:52 1 node43
Copied!
When your job is complete, it will not appear on squeue. To see the output of your job when completed, open the ".out" file.
1
[[email protected]@login myBatchDir]$ nano 12345.out
Copied!
To see how the job went, and look at any errors, open the slurm file.
1
[[email protected]@login myBatchDir]$ nano slurm-12345.out
Copied!
Note: the number 12345 in slurm-12345.out corresponds to the number of the batch job above.

Graphical User Interface Jobs

If entering the tutorial at this point, open MobaX and log into Lawrence (for help, see the section "Getting Started").

Starting the GUI

Log into a node
1
[[email protected]@login ~]$ srun --pty bash
2
[[email protected]@node51 ~]$
Copied!
Load the Gaussian module:
1
[[email protected]@node51 ~]$ module load gaussian/16
2
[[email protected]@node51 ~]$ module list
3
Currently Loaded Modulefiles:
4
1) gaussian/16
Copied!
Launch the Gaussian GUI:
1
[[email protected]@node51 ~]$ srun gview
Copied!
The GUI will open:
Last modified 2yr ago