<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://chemwiki.ch.ic.ac.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ns4912</id>
	<title>ChemWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://chemwiki.ch.ic.ac.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ns4912"/>
	<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/wiki/Special:Contributions/Ns4912"/>
	<updated>2026-05-16T09:01:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255088</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255088"/>
		<updated>2012-06-25T15:29:24Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. You should be able to start using the cluster after you get your college username and password.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
&lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Your results&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Using GaussView in the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
You should be familiar with using GaussView on your Mac. GaussView can also be used in the cluster. To open the program, start up the &#039;&#039;&#039;X11&#039;&#039;&#039; application and type &#039;xhost +&#039;, then press enter.&lt;br /&gt;
In a shell where you are logged in to the cluster, type &#039;module load gaussian&#039; followed by &#039;gview &amp;amp;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ module load gaussian&lt;br /&gt;
-bash-4.1$ gview &amp;amp;&lt;br /&gt;
[1] 9486&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Viewing output files in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
It may be that you have written an input file in vim on the cluster and submitted it to Gaussian (as described above), but want to view only the output on GaussView. To do this, start up GaussView and open the checkpoint file created as part of your job&#039;s output. By default the &#039;File Type&#039; is set to &#039;Gaussian Input Files&#039;; to view your checkpoint file, change this to &#039;Gaussian Checkpoint Files&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Doing an entire job in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
Just as on the Mac, you can also do an entire job from start to finish in GaussView. The input files are created in your HOME directory, so the output files will also be put there. You can move them to your WORK directory using the &#039;mv&#039; command.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255087</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255087"/>
		<updated>2012-06-25T15:20:53Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
&lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Your results&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Using GaussView in the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
You should be familiar with using GaussView on your Mac. GaussView can also be used in the cluster. To open the program, start up the &#039;&#039;&#039;X11&#039;&#039;&#039; application and type &#039;xhost +&#039;, then press enter.&lt;br /&gt;
In a shell where you are logged in to the cluster, type &#039;module load gaussian&#039; followed by &#039;gview &amp;amp;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ module load gaussian&lt;br /&gt;
-bash-4.1$ gview &amp;amp;&lt;br /&gt;
[1] 9486&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Viewing output files in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
It may be that you have written an input file in vim on the cluster and submitted it to Gaussian (as described above), but want to view only the output on GaussView. To do this, start up GaussView and open the checkpoint file created as part of your job&#039;s output. By default the &#039;File Type&#039; is set to &#039;Gaussian Input Files&#039;; to view your checkpoint file, change this to &#039;Gaussian Checkpoint Files&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Doing an entire job in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
Just as on the Mac, you can also do an entire job from start to finish in GaussView. The input files are created in your HOME directory, so the output files will also be put there. You can move them to your WORK directory using the &#039;mv&#039; command.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255085</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255085"/>
		<updated>2012-06-25T15:14:20Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Your results&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Using GaussView in the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
You should be familiar with using GaussView on your Mac. GaussView can also be used in the cluster. To open the program, start up the &#039;&#039;&#039;X11&#039;&#039;&#039; application and type &#039;xhost +&#039;, then press enter.&lt;br /&gt;
In a shell where you are logged in to the cluster, type &#039;module load gaussian&#039; followed by &#039;gview &amp;amp;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ module load gaussian&lt;br /&gt;
-bash-4.1$ gview &amp;amp;&lt;br /&gt;
[1] 9486&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Viewing output files in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
It may be that you have written an input file in vim on the cluster and submitted it to Gaussian (as described above), but want to view only the output on GaussView. To do this, start up GaussView and open the checkpoint file created as part of your job&#039;s output. By default the &#039;File Type&#039; is set to &#039;Gaussian Input Files&#039;; to view your checkpoint file, change this to &#039;Gaussian Checkpoint Files&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Doing an entire job in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
Just as on the Mac, you can also do an entire job from start to finish in GaussView. The input files are created in your HOME directory, so the output files will also be put there. You can move them to your WORK directory using the &#039;mv&#039; command.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255084</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255084"/>
		<updated>2012-06-25T15:13:48Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Your results&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Using GaussView in the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
You should be familiar with using GaussView on your Mac. GaussView can also be used in the cluster. To open the program, start up the &#039;&#039;&#039;X11&#039;&#039;&#039; application and type &#039;xhost +&#039;, then press enter.&lt;br /&gt;
In a shell where you are logged in to the cluster, type &#039;module load gaussian&#039; followed by &#039;gview &amp;amp;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ module load gaussian&lt;br /&gt;
-bash-4.1$ gview &amp;amp;&lt;br /&gt;
[1] 9486&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Viewing output files in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
It may be that you have written an input file in vim on the cluster and submitted it to Gaussian (as described above), but want to view only the output on GaussView. To do this, start up GaussView and open the checkpoint file created as part of your job&#039;s output. By default the &#039;File Type&#039; is set to &#039;Gaussian Input Files&#039;; to view your checkpoint file, change this to &#039;Gaussian Checkpoint Files&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Doing an entire job in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
Just as on the Mac, you can also do an entire job from start to finish in GaussView. The input files are created in your HOME directory, so the output files will also be put there. You can move them to your WORK directory using the &#039;mv&#039; command.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255083</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255083"/>
		<updated>2012-06-25T12:03:17Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Your results&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Using GaussView in the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Viewing output files in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Doing an entire job in GaussView&amp;lt;/h3&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255079</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255079"/>
		<updated>2012-06-21T13:53:06Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Your results&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255078</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255078"/>
		<updated>2012-06-21T13:52:49Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Your results&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255077</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255077"/>
		<updated>2012-06-21T13:51:50Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255076</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255076"/>
		<updated>2012-06-21T13:33:13Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
o you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255075</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255075"/>
		<updated>2012-06-21T13:32:58Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
o you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255074</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255074"/>
		<updated>2012-06-21T13:32:31Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
o you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255073</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255073"/>
		<updated>2012-06-21T13:24:44Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
o you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or you may wish to copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255072</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255072"/>
		<updated>2012-06-21T13:22:44Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
o you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
You may wish to copy a file that you have saved on the cluster to your Mac, or copy a file on your Mac to the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your Mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
This is done in a shell where you are not connected to the cluster. Use the &#039;scp&#039; command, followed by the path to the file on your Mac. In the same line, login to the cluster and specify where on the cluster you would like the copy to be sent to.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
intelimac1:~/g09 username$ scp /Users/username/g09/oxygen.com/ ns4912@login.cx1.hpc.ic.ac.uk:/home/ns4912&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
oxygen.com                                    100%  203     0.2KB/s   00:00 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, there a file called &#039;oxygen.com&#039;, which is saved in a folder called g09 in the user&#039;s area on the Mac. It is going to be copied to the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
After typing your command, you are prompted for your password. After entering it, the file is copied to the cluster.&lt;br /&gt;
This can be double-checked when you log into the cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ pwd&lt;br /&gt;
/home/ns4912&lt;br /&gt;
-bash-4.1$ ls&lt;br /&gt;
bin  oxygen.com  test&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file &#039;oxygen.com&#039; now also appears in the user&#039;s area in the HOME directory on the cluster.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your Mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
Again, this is done in a shell where you are not connected to the cluster. The &#039;scp&#039; command is also used here, but the order of phrases in your command is slightly different. In the example below, we will copy a file called &#039;ethane.chk&#039; from the user&#039;s area in the WORK directory on the cluster to their area on the Mac. We will then check that the file has been successfully copied.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop   Library   Music     Public    g09       scripts&lt;br /&gt;
Documents Movies    Pictures  Sites     h2o.rtf   work&lt;br /&gt;
intelimac1:~ nafisa$ scp ns4912@login.cx1.hpc.ic.ac.uk:/work/ns4912/test/ethane.chk/ /Users/username/&lt;br /&gt;
ns4912@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
ethane.chk                                    100%  768KB 768.0KB/s   00:00    &lt;br /&gt;
intelimac1:~ nafisa$ cd /Users/username/&lt;br /&gt;
intelimac1:~ nafisa$ ls&lt;br /&gt;
Desktop    Library    Music      Public     ethane.chk h2o.rtf    work&lt;br /&gt;
Documents  Movies     Pictures   Sites      g09        scripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file has been successfully copied to the Mac.&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website lists classic UNIX commands: [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255071</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255071"/>
		<updated>2012-06-21T12:34:43Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can submit big calculations more easily than you can on your Mac. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access the cluster, and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
Then type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;.&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created. A special jobscript file is also created which corresponds to this particular calculation. If your calculation failed, you can try to open the jobscript to see if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
o you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really useful to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255070</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255070"/>
		<updated>2012-06-21T12:05:30Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
If your job is queueing for a long time, then the part of the cluster you need to use is overbooked. &lt;br /&gt;
The part of the cluster your job is sent to depends on the time and memory that your job requires. Each part of the cluster has a limit to the amount of calculations it can run, which is why some calculations will end up queuing for a long time. In the example above, the job was running on an area of the cluster called &#039;medium&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To look at all the different parts and determine how full they are, use the &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From the &#039;Run&#039; and &#039;Que&#039; columns, we can see how many jobs each part of the cluster is running, and how many jobs each part has queuing. If your job has been sent to an area that is very full, you can try changing the time or memory you have requested for the job. By doing this and resubmitting the job, you may end up sending it to an area of the cluster that is less busy.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you wish to cancel a calculation which is running or queuing, use the &#039;qdel&#039; command followed by the Job Id.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. This means that if you want to make the file understandable you will have to format it. It is not always necessary to look at the checkpoint file to get the information you need as the log file will contain lots of important information already. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255069</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255069"/>
		<updated>2012-06-21T11:09:21Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
You can now look at the output files to see whether your job has been successful.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory, and then to the folder that you have sent the output files to. You can then open the log file with vim (using &#039;&#039;&#039;&#039;vi name_of_your_file.log&#039;&#039;&#039;&#039;). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;. To use &#039;less&#039;, type &#039;&#039;&#039;&#039;less name_of_your_file.log&#039;&#039;&#039;&#039;. This allows you to look at the log file one page at a time. Press the space bar to go one window forward and &#039;B&#039; to go one window up.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use &#039;more&#039;, type &#039;&#039;&#039;&#039;more name_of_your_file.log&#039;&#039;&#039;&#039;. This will show you your whole log file, which you may prefer. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more information than you can find in your output file, but it is a binary file. As the file is a binary file, if you want to make the file understandable you will have to format it. It is not always necessary to do this. If you do want to format your checkpoint file, type &#039;module load gaussian&#039; and then use the command &#039;formchk&#039;.&lt;br /&gt;
&lt;br /&gt;
............&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255067</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255067"/>
		<updated>2012-06-20T15:24:16Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Submitting your calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
You can now look at the output files to see whether your job has been successful.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h31&amp;gt;Output file and Checkpoint file&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file&amp;lt;/h3&amp;gt;&lt;br /&gt;
To have a look at the output file, go to your WORK directory. You can open the log file with vim. Alternatively, you can use another text editor, such as &#039;less&#039; or &#039;more&#039;.  use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255066</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255066"/>
		<updated>2012-06-20T15:15:24Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
This command takes you to a specific directory, and it allows you to change that directory. You must use the path-name of the folder you wish to move to. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Submitting your calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
You can now look at the output files to see whether your job has been successful.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255065</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255065"/>
		<updated>2012-06-20T15:12:52Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Changes the directory. This is specified with the path-name of the folder you wish to move to. It is used for navigating through the file-system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have performed some calculations on your Mac, so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Submitting your calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
You can now look at the output files to see whether your job has been successful.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255064</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255064"/>
		<updated>2012-06-20T15:08:13Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Changes the directory. This is specified with the path-name of the folder you wish to move to. It is used for navigating through the file-system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have already done some calculation on your mac so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Submitting your calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
You can now look at the output files to see whether your job has been successful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255063</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255063"/>
		<updated>2012-06-20T15:06:42Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Changes the directory. This is specified with the path-name of the folder you wish to move to. It is used for navigating through the file-system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Preparing your first calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have already done some calculation on your mac so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Submitting your calculation&amp;lt;/h4&amp;gt;&lt;br /&gt;
After writing your input file and jobscript, you have to submit your job. To do this, open your input file, then if it is as you want it, save it and close it.&lt;br /&gt;
Next, type the command &#039;&#039;&#039;&#039;qsub&#039;&#039;&#039;&#039;, followed by the full name of your jobscript file. Press enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi ethane.com&lt;br /&gt;
-bash-4.1$ qsub job.sh&lt;br /&gt;
1478294.cx1b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your job should now be running. The number following your command is the Job Id. &lt;br /&gt;
To check the progress of your job (for example, to see whether it is already running or still queuing), use the &#039;&#039;&#039;&#039;qstat&#039;&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium                 &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
1478294.cx1b      job.sh           ns4912            00:00:00 R medium          &lt;br /&gt;
-bash-4.1$ qstat&lt;br /&gt;
-bash-4.1$ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The penultimate column tells us the status of the job. The &#039;R&#039; in this case means the job is running. A &#039;Q&#039; would mean the job is still queuing.&lt;br /&gt;
You can use the &#039;qstat&#039; command as many times as you like to check the status of your job. When using the command does not return information on the status of your job, but instead results in a blank prompt line, it means your job has finished running. &lt;br /&gt;
You can now look at the output files to see whether your job has been successful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255062</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255062"/>
		<updated>2012-06-20T14:37:08Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Changes the directory. This is specified with the path-name of the folder you wish to move to. It is used for navigating through the file-system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have already done some calculation on your mac so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input file&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This is simply a file that tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
Jobscript files can be written in vim. The important difference is that they are saved with the extension &#039;.sh&#039;, not &#039;.com&#039; like main input files. The jobscript for the ethane optimisation job above is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1500mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g09 &amp;lt; /home/ns4912/test/ethane.com &amp;gt; /work/ns4912/test/ethane.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have specified the number of processors, the memory, and the time we would like to allocate to the job. The line &#039;module load gaussian&#039; tells the system to start up Gaussian.&lt;br /&gt;
The last line gives the version of Gaussian to be used (g09), and then it gives the location of the input file (in the HOME directory) and where we want to put the output files (in the WORK directory).&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How can I predict the time of a calculation?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe! It depends on your the size of your system, the method and basis set that you are using (a larger basis set corresponds to a calculation that will take longer), and finally it depends on the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255061</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255061"/>
		<updated>2012-06-20T14:21:08Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Changes the directory. This is specified with the path-name of the folder you wish to move to. It is used for navigating through the file-system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have already done some calculation on your mac so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript as well as an input file. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you may find some important information if your calculation does not start.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
When making input files on your mac, at the very beginning of the file you may have put the &#039;Link 0 command&#039;, which contains information about the output file. This line always begins with a % symbol.&lt;br /&gt;
When making an input file on the cluster, several Link 0 commands have to be included. First, specify how much memory you want the job to take up, on the next line state how many processors you want the job to use, and then specify the location of the output checkpoint file. In the example below, we want to use 1400MB of memory and one processor. We want the output files to go to the &#039;test&#039; folder in the user&#039;s WORK directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
%chk=mem1400MB&lt;br /&gt;
%nproc=1&lt;br /&gt;
%chk=/work/ns4912/test/ethane.chk&lt;br /&gt;
# opt hf/3-21g&lt;br /&gt;
&lt;br /&gt;
ethane optimisation&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
C1&lt;br /&gt;
C2 C1 1.5&lt;br /&gt;
H1 C2 1.0 C1 109.5&lt;br /&gt;
H6 C1 1.0 C2 109.5 H1 180.0&lt;br /&gt;
H4 C1 1.0 C2 109.5 H1 300.0&lt;br /&gt;
H5 C1 1.0 C2 109.5 H1 60.0&lt;br /&gt;
H2 C2 1.0 C1 109.5 H5 180.0&lt;br /&gt;
H3 C2 1.0 C1 109.5 H4 180.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input filet&amp;lt;/h4&amp;gt;&lt;br /&gt;
To open an input file you have made already, use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to change your input file, go into insert mode, make the required changes and then go back into command mode and save the changes using &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; as described earlier. If you want to quit and you haven&#039;t made any changes, use &#039;&#039;&#039;&#039;:q&#039;&#039;&#039;&#039; instead. Finally, if you want to quit without saving the changes you have made, use &#039;&#039;&#039;&#039;:q!&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
As mentioned before, to run a job on the cluster, you need a jobscript as well as an input file. This tells the cluster how to handle the job and where to put the output files. Input files - which take up relatively little space - are saved in the HOME directory. The log and checkpoint files which form the output are much larger, so they are sent to the WORK directory, which has more space. This is not done automatically - we need to tell the cluster to do this in the jobscript.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1700mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -joe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g03 &amp;lt; /home/username/name_of_your_file.com &amp;gt; /work/username/name_of_your_file.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &#039;&#039;module load gaussian&#039;&#039; corresponds to the software used, and &#039;&#039;g03&#039;&#039; called this specific part of the software (version of Gaussian), after this you specify the name of the file .com and .log and the localisation of those files.&lt;br /&gt;
&lt;br /&gt;
And before you specified the number of processors that you require &#039;&#039;ncpus&#039;&#039;, the memory &#039;&#039;mem&#039;&#039; and the estimate time of your calculation &#039;&#039;walltime&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An usual question : how can I predict the time of a calculation ?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe ! It depends on your system (small, big...), it depends on the method and basis set that you are using (bigger is the basis set and longer is the calculation...), and finally it depends of the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255060</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255060"/>
		<updated>2012-06-20T13:08:59Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type &#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Changes the directory. This is specified with the path-name of the folder you wish to move to. It is used for navigating through the file-system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have already done some calculation on your mac so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you will find maybe some information if your calculation does not start.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So as on your mac the input file contain many informations : route job, geometry, memory require... as you can see below.&lt;br /&gt;
&lt;br /&gt;
[[Image:input_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input, create an input&amp;lt;/h4&amp;gt;&lt;br /&gt;
So as to open an input file you have to use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And in order to create a new .com file you have to &#039;&#039;open&#039;&#039; a file with &#039;&#039;&#039;vi&#039;&#039;&#039; followed by the name of the file that you want to create and it will create the file.&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_new_file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Save what you just changed inside your input, quit a file...&amp;lt;/h4&amp;gt;&lt;br /&gt;
Different UNIX commands enable you to save (or not) the changes (wanted or not) that you did inside a file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + : + wq&#039;&#039;&#039; enables you ta save the changes operated&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
:wq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + : q&#039;&#039;&#039; enables to quit the file&lt;br /&gt;
&amp;lt;pre&amp;gt;                                                                              &lt;br /&gt;
:q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + q + !&#039;&#039;&#039; enables you to quit the file without saving the different changes that you did&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
:q!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have more space allocate on your WORK directory, so because the files .log and .chk are bigger than the file .com, usually we save the .log and .chk in the WORK directory and .com in the HOME directory.&lt;br /&gt;
&lt;br /&gt;
A Jobscript file is like a command in order to explain where is the file that you want to compute, where you want to save the output and what kind of software you wan to use to run the calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1700mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -joe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g03 &amp;lt; /home/username/name_of_your_file.com &amp;gt; /work/username/name_of_your_file.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &#039;&#039;module load gaussian&#039;&#039; corresponds to the software used, and &#039;&#039;g03&#039;&#039; called this specific part of the software (version of Gaussian), after this you specify the name of the file .com and .log and the localisation of those files.&lt;br /&gt;
&lt;br /&gt;
And before you specified the number of processors that you require &#039;&#039;ncpus&#039;&#039;, the memory &#039;&#039;mem&#039;&#039; and the estimate time of your calculation &#039;&#039;walltime&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An usual question : how can I predict the time of a calculation ?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe ! It depends on your system (small, big...), it depends on the method and basis set that you are using (bigger is the basis set and longer is the calculation...), and finally it depends of the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255059</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255059"/>
		<updated>2012-06-20T13:02:52Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type:&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Changes the directory. This is specified with the path-name of the folder you wish to move to. It is used for navigating through the file-system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. In order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have already done some calculation on your mac so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you will find maybe some information if your calculation does not start.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So as on your mac the input file contain many informations : route job, geometry, memory require... as you can see below.&lt;br /&gt;
&lt;br /&gt;
[[Image:input_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input, create an input&amp;lt;/h4&amp;gt;&lt;br /&gt;
So as to open an input file you have to use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And in order to create a new .com file you have to &#039;&#039;open&#039;&#039; a file with &#039;&#039;&#039;vi&#039;&#039;&#039; followed by the name of the file that you want to create and it will create the file.&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_new_file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Save what you just changed inside your input, quit a file...&amp;lt;/h4&amp;gt;&lt;br /&gt;
Different UNIX commands enable you to save (or not) the changes (wanted or not) that you did inside a file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + : + wq&#039;&#039;&#039; enables you ta save the changes operated&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
:wq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + : q&#039;&#039;&#039; enables to quit the file&lt;br /&gt;
&amp;lt;pre&amp;gt;                                                                              &lt;br /&gt;
:q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + q + !&#039;&#039;&#039; enables you to quit the file without saving the different changes that you did&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
:q!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have more space allocate on your WORK directory, so because the files .log and .chk are bigger than the file .com, usually we save the .log and .chk in the WORK directory and .com in the HOME directory.&lt;br /&gt;
&lt;br /&gt;
A Jobscript file is like a command in order to explain where is the file that you want to compute, where you want to save the output and what kind of software you wan to use to run the calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1700mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -joe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g03 &amp;lt; /home/username/name_of_your_file.com &amp;gt; /work/username/name_of_your_file.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &#039;&#039;module load gaussian&#039;&#039; corresponds to the software used, and &#039;&#039;g03&#039;&#039; called this specific part of the software (version of Gaussian), after this you specify the name of the file .com and .log and the localisation of those files.&lt;br /&gt;
&lt;br /&gt;
And before you specified the number of processors that you require &#039;&#039;ncpus&#039;&#039;, the memory &#039;&#039;mem&#039;&#039; and the estimate time of your calculation &#039;&#039;walltime&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An usual question : how can I predict the time of a calculation ?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe ! It depends on your system (small, big...), it depends on the method and basis set that you are using (bigger is the basis set and longer is the calculation...), and finally it depends of the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255058</id>
		<title>Using the cluster : tutorial, examples</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Using_the_cluster_:_tutorial,_examples&amp;diff=255058"/>
		<updated>2012-06-20T13:00:55Z</updated>

		<summary type="html">&lt;p&gt;Ns4912: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Connecting to the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running calculations on the cluster is quicker and you can more easily submit some big calculations. So as soon as you can go on the cluster, learn how it works and use it!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;SSH &amp;lt;/h3&amp;gt;&lt;br /&gt;
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.&lt;br /&gt;
&lt;br /&gt;
We use the &#039;&#039;&#039;ssh&#039;&#039;&#039; command to access to the cluster and build a connection like a safe tunnel between your mac and the cluster. Thus you can run and follow calculations on the cluster via your mac.&lt;br /&gt;
&lt;br /&gt;
This can be used with a number of options (use the &#039;&#039;&#039;man ssh&#039;&#039;&#039; command to view these). One of the most useful is &#039;&#039;&#039;-Y&#039;&#039;&#039; which enables X11 forwarding, enabling graphical user interfaces (GUIs), such as nedit or xpbs, to be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;How to use SSH protocol &amp;lt;/h3&amp;gt;&lt;br /&gt;
To connect to the PC cluster you must have an IC college account.&lt;br /&gt;
&lt;br /&gt;
When you have an IC college account, open a Terminal shell for example: &lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_1.png]]&lt;br /&gt;
&lt;br /&gt;
and type:&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;ssh -Y username@login.cx1.hpc.ic.ac.uk&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
The username is the one given to you by Imperial College. When using this page, always substitute &#039;username&#039; for your personal username.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_2.png]]&lt;br /&gt;
&lt;br /&gt;
It will ask you for your password. After entering you password and pressing enter, you will be connected to the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Image:terminal_3.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to leave the cluster, just close the window.&lt;br /&gt;
&lt;br /&gt;
You can connect many shells to the cluster to make different manipulations easier, and you can have Terminal and X11 connected to the cluster at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First steps on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Structure of the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cluster can be thought of as a hierarchy of directories like any UNIX system. On it your user area is divided into two sections, work and home. Input files are usually made and saved in &#039;&#039;&#039;home&#039;&#039;&#039; and output files are saved in &#039;&#039;&#039;work&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:cluster_structure2.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Basic UniX commands&amp;lt;/h3&amp;gt;&lt;br /&gt;
The cluster uses UNIX commands in order to navigate through the file system. Below you will find some basic commands that you will use often. They may often be used with a number of options. Use &#039;&#039;&#039;man command-name&#039;&#039;&#039; or &#039;&#039;&#039;command-name help&#039;&#039;&#039; for information on these options. For further information the following two links are of interest:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ee.surrey.ac.uk/Teaching/Unix/ UNIX Online Tutorials]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unix_commands List of UNIX commands]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;pwd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays current position in the file system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So, when you connect to the cluster you are in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;ls&amp;lt;/h4&amp;gt;&lt;br /&gt;
Displays files and directories inside the directory you are in, which in the example here is &#039;/home/username&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the /home/username directory there are different folders but if this is your first time on the cluster this is probably empty. We are going to create a folder in the next part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mkdir&amp;lt;/h4&amp;gt;&lt;br /&gt;
Creates a folder.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ mkdir tutorial&lt;br /&gt;
-bash-3.00$  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We now have a folder named tutorial in the &#039;username&#039; directory. (The path to this folder is &#039;/home/username/tutorial&#039;).&lt;br /&gt;
We can check that the folder exists with the &#039;&#039;&#039;ls&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
ONIOM2     benzene     protein     ONIOM &lt;br /&gt;
bin     qst2     g03     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd&amp;lt;/h4&amp;gt;&lt;br /&gt;
Changes the directory. This is specified with the path-name of the folder you wish to move to. It is used for navigating through the file-system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cd /work/username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you are in your WORK directory. Following the above steps a folder &#039;tutorial&#039; can also be created here (within your username). &lt;br /&gt;
Note that if you are already in your WORK directory, and want to change the &#039;username&#039; directory in WORK, you can simply type &#039;cd username/&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work&lt;br /&gt;
-bash-3.00$ cd username/&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cd ..&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move up a level out of the folder you are in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
-bash-3.00$  /home/username/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is useful for navigating your way around directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Moving between the HOME and WORK directories&amp;lt;/h4&amp;gt;&lt;br /&gt;
You have two directories in the cluster : a &#039;&#039;&#039;HOME&#039;&#039;&#039; folder and a &#039;&#039;&#039;WORK&#039;&#039;&#039; one.&lt;br /&gt;
&lt;br /&gt;
When you connect to the cluster you are directly in your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory. So in order to go to your &#039;&#039;&#039;WORK&#039;&#039;&#039; directory you can use the command &#039;&#039;&#039;cd /work/username/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also use the shortcut &#039;&#039;&#039;cd $WORK&#039;&#039;&#039; in order to directly get to your part of the &#039;&#039;&#039;WORK&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
If you want to go back to your &#039;&#039;&#039;HOME&#039;&#039;&#039; directory, use &#039;&#039;&#039;cd $HOME&#039;&#039;&#039; or &#039;&#039;&#039;cd ~&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;h4&amp;gt;jump&amp;lt;/h4&amp;gt;&lt;br /&gt;
Use this command to go straight from where you are in the HOME directory to the equivalent point in the WORK directory (or vice versa).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  jump&lt;br /&gt;
cd /work/username/tutorial&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username/tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before moving on, try using all the commands above to make sure you are comfortable with them.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Making and manipulating a new text file&amp;lt;/h3&amp;gt;&lt;br /&gt;
Hopefully you are now comfortable with moving around the directories. The next step is to make a new text file as a practise run for when you will be making input files for Gaussian.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Making a new file&amp;lt;/h4&amp;gt;&lt;br /&gt;
First, make sure you are in the folder that you would like the file to be saved in. The text editor you will be using is called &#039;vim&#039; or &#039;vi&#039;. Type &#039;&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&#039;, then press enter. The following screen will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                 &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
&amp;quot;name_of_your_file.com&amp;quot; [New File]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vim has two modes: &#039;command&#039; and &#039;insert&#039;. When you create a new file, you are in command mode by default. To insert text you will need to change to insert mode by pressing &#039;&#039;&#039;&#039;i&#039;&#039;&#039;&#039;. You will see the bottom of the screen now says -INSERT-. Type some text:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-bash-4.1$ vi name_of_your_file.com&lt;br /&gt;
&lt;br /&gt;
My first vi file&lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
~                                                                               &lt;br /&gt;
                                                                            &lt;br /&gt;
~                                                                               &lt;br /&gt;
-- INSERT --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To save your file, first go back into command mode by pressing the esc button, then type &#039;&#039;&#039;&#039;:wq&#039;&#039;&#039;&#039; and press enter. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you have made your first text file, practise the commands below in order to become confident with manipulating your file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;cp&amp;lt;/h4&amp;gt;&lt;br /&gt;
Copy a file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ cp testjob_2.com testjob_3.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com    &lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we have made a copy of testjob_2.com, the new file testjob_3.com.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;rm&amp;lt;/h4&amp;gt;&lt;br /&gt;
Remove a file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/work/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
tutorial&lt;br /&gt;
-bash-3.00$ cd tutorial/&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com     testjob_2.com&lt;br /&gt;
-bash-3.00$ rm testjob_2.com&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_1.com&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a file is no longer needed it can be removed with this command. If you wish to remove a whole directory use &#039;&#039;&#039;rm-r&#039;&#039;&#039; before specifying its name to remove the folder and all the files inside.&lt;br /&gt;
When you are in the cluster and are trying to remove a file, a line will appear saying &#039;rm: remove regular file &#039;name_of_file&#039;?&#039; with a prompt. Type &#039;y&#039; and press enter to remove the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;mv&amp;lt;/h4&amp;gt;&lt;br /&gt;
Move a file to another folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username/tutorial&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ mv testjob_3.com /home/username/&lt;br /&gt;
-bash-3.00$  ls&lt;br /&gt;
testjob_1.com     testjob_2.com     testjob_3.com&lt;br /&gt;
-bash-3.00$ cd ..&lt;br /&gt;
-bash-3.00$ pwd&lt;br /&gt;
/home/username&lt;br /&gt;
-bash-3.00$ ls&lt;br /&gt;
testjob_3.com     tutorial&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;First calculation&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(This tutorial was put together when the default released version of Gaussian was Gaussian 03 / g03.&lt;br /&gt;
It&#039;s now Gaussian 09 / g09, so use &#039;g09&#039; with &#039;module load gaussian&#039; in what&#039;s below.&lt;br /&gt;
--[[User:Mjbear|Mjbear]] 11:56, 23 March 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
You most probably have already done some calculation on your mac so you know that in order to run a calculation you need an input file. But now the difference is that to compute this calculation you must have a jobscript. And as usual a calculation will create an output file, a .chk file and also a jobscript_ file in which you will find maybe some information if your calculation does not start.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Input&amp;lt;/h3&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So as on your mac the input file contain many informations : route job, geometry, memory require... as you can see below.&lt;br /&gt;
&lt;br /&gt;
[[Image:input_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Open an input, create an input&amp;lt;/h4&amp;gt;&lt;br /&gt;
So as to open an input file you have to use the UNIX command &#039;&#039;&#039;vi&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_file.com&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And in order to create a new .com file you have to &#039;&#039;open&#039;&#039; a file with &#039;&#039;&#039;vi&#039;&#039;&#039; followed by the name of the file that you want to create and it will create the file.&lt;br /&gt;
&#039;&#039;&#039;vi name_of_your_new_file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Save what you just changed inside your input, quit a file...&amp;lt;/h4&amp;gt;&lt;br /&gt;
Different UNIX commands enable you to save (or not) the changes (wanted or not) that you did inside a file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + : + wq&#039;&#039;&#039; enables you ta save the changes operated&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
:wq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + : q&#039;&#039;&#039; enables to quit the file&lt;br /&gt;
&amp;lt;pre&amp;gt;                                                                              &lt;br /&gt;
:q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ESC + q + !&#039;&#039;&#039; enables you to quit the file without saving the different changes that you did&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
:q!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Jobscript&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have more space allocate on your WORK directory, so because the files .log and .chk are bigger than the file .com, usually we save the .log and .chk in the WORK directory and .com in the HOME directory.&lt;br /&gt;
&lt;br /&gt;
A Jobscript file is like a command in order to explain where is the file that you want to compute, where you want to save the output and what kind of software you wan to use to run the calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#PBS -l ncpus=1&lt;br /&gt;
#PBS -l mem=1700mb&lt;br /&gt;
#PBS -l walltime=01:30:00&lt;br /&gt;
#PBS -joe&lt;br /&gt;
&lt;br /&gt;
module load gaussian&lt;br /&gt;
&lt;br /&gt;
g03 &amp;lt; /home/username/name_of_your_file.com &amp;gt; /work/username/name_of_your_file.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &#039;&#039;module load gaussian&#039;&#039; corresponds to the software used, and &#039;&#039;g03&#039;&#039; called this specific part of the software (version of Gaussian), after this you specify the name of the file .com and .log and the localisation of those files.&lt;br /&gt;
&lt;br /&gt;
And before you specified the number of processors that you require &#039;&#039;ncpus&#039;&#039;, the memory &#039;&#039;mem&#039;&#039; and the estimate time of your calculation &#039;&#039;walltime&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;Advice Break&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An usual question : how can I predict the time of a calculation ?&lt;br /&gt;
&lt;br /&gt;
That&#039;s a good question but there is no magical recipe ! It depends on your system (small, big...), it depends on the method and basis set that you are using (bigger is the basis set and longer is the calculation...), and finally it depends of the calculation that you would like to compute (a single point energy calculation is quicker than an optimisation with the same system).&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Output file and Checkpoint file&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Output file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To have a look at the output file, use &#039;&#039;&#039;vi&#039;&#039;&#039; or &#039;&#039;&#039;less&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% vi aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vi&#039;&#039;&#039; : so as to move inside the file quickly, press &#039;&#039;&#039;Ctrl + f&#039;&#039;&#039; if you want to go forward and &#039;&#039;&#039;Ctrl + b&#039;&#039;&#039; to go back&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;less&#039;&#039;&#039; is an other way to open a file, with this way you can push on space to take down of one window and push B to go up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~/g03] aurelie% less aurelie_pyridine_iefpcm_water.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Checkpoint file&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkpoint file contains all the information concerning your system and the calculation that you computed, so it contains more informations that you can find in your output file, but it is a binary file. That&#039;s why if you want to get some informations like concerning the orbitals (read the orbitals of your system) you have to formate the checkpoint file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Run a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;QSUB&amp;lt;/h4&amp;gt;&lt;br /&gt;
In order to run a calculation you need so an input file, and a jobscript, and so as to compute the calculation you have to submit your jobscript :&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qsub jobscript_name_of_your_file&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_turorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And so when you are running a calculation you can check if it is really running or not with the command &#039;&#039;&#039;qstat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qsub jobscript_tutorial &lt;br /&gt;
2760944.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2760944.cx1       jobscript_couma  alasoro                  0 Q q48             &lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So here the calculation is queueing  for the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are queueing during a long time that is because the cluster is overbooked and specially the part that you require to use.&lt;br /&gt;
Indeed, when you are running a calculation, depending on the time that you require, the memory... you will be affect to a part of the cluster, in my previous example I was on &#039;&#039;&#039;q48&#039;&#039;&#039;, but every part has a limit of calculations that it can run, so to have a look at all the different part and if there are full or not use &#039;&#039;&#039;qstat -q&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat -q&lt;br /&gt;
&lt;br /&gt;
server: cx1&lt;br /&gt;
&lt;br /&gt;
Queue            Memory CPU Time Walltime Node   Run   Que   Lm  State&lt;br /&gt;
---------------- ------ -------- -------- ---- ----- ----- ----  -----&lt;br /&gt;
vlong            1900mb    --    72:00:00  --    110    26  110   E R&lt;br /&gt;
submit             --      --       --     --      0     0   --   E R&lt;br /&gt;
short            1000mb    --    01:00:00  --      7    76   25   E R&lt;br /&gt;
medium           1000mb    --    04:00:00  --      5     0   25   E R&lt;br /&gt;
long             1900mb    --    22:00:00  --     69    24   60   E R&lt;br /&gt;
q24              3900mb    --    48:00:00  --      0     0    0   E S&lt;br /&gt;
q816              244gb    --    72:00:00  --     18    14   17   E R&lt;br /&gt;
monster            --      --       --     --      0     0    0   E S&lt;br /&gt;
bench             122gb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
fixed              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
q48                61gb    --    72:00:00  --    137   195  120   E R&lt;br /&gt;
pqaerostr          --      --    300:00:0  --     10     3   --   E R&lt;br /&gt;
ibtest             --      --    480:00:0  --      0     0   60   D S&lt;br /&gt;
tng                16gb    --    48:00:00  --      0     0  600   E S&lt;br /&gt;
heplt2             --      --       --     --      0     0   --   E R&lt;br /&gt;
xdbg               61gb    --    00:15:00  --      0     0    3   E R&lt;br /&gt;
pqese              --      --    150:00:0  --     12     0   --   E R&lt;br /&gt;
pqph               --      --    120:00:0  --      9     0   --   E R&lt;br /&gt;
pqfb               --      --    120:00:0  --      1     0   --   E R&lt;br /&gt;
pqms               --      --    72:00:00  --     32     3   --   E R&lt;br /&gt;
slong            1900mb    --    72:00:00  --      0     0   --   E S&lt;br /&gt;
pqmb               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqjk               --      --    200:00:0  --      2     0   --   E R&lt;br /&gt;
test8              --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtyc              --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqmls              --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqeph              --      --    999:00:0  --    123    10   --   E R&lt;br /&gt;
pqnh               --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
chemlab1           --      --    72:00:00  --      1     0   --   E R&lt;br /&gt;
pqrevans           --      --    650:00:0  --      6     0   --   E R&lt;br /&gt;
pqneuro            --      --    96:00:00  --     18     0   --   E R&lt;br /&gt;
pqchemeng          --      --    72:00:00  --     18     4   --   E R&lt;br /&gt;
pqciveng           --      --    999:00:0  --      1     0   --   E R&lt;br /&gt;
test82             --      --    72:00:00  --      6     1   --   E R&lt;br /&gt;
pqjc1              --      --    650:00:0  --      1     0   --   E R&lt;br /&gt;
p1mem              12gb    --    72:00:00  --     16    41   --   E R&lt;br /&gt;
test81             --      --    72:00:00  --      6     8   --   E R&lt;br /&gt;
pqesebot           --      --    100:00:0  --     31     3   --   E R&lt;br /&gt;
pqspat             --      --    72:00:00  --      6     0   --   E R&lt;br /&gt;
testnh             --      --    72:00:00  --      0     0   --   E R&lt;br /&gt;
pqastro            --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqplee             --      --    1000:00:  --     20     1   --   E R&lt;br /&gt;
pqplasp            --      --       --     --      0     0   --   E R&lt;br /&gt;
pqtzaki            --      --    96:00:00  --      9     0   --   E R&lt;br /&gt;
pqexss             --      --    72:00:00  --      2     0   --   E R&lt;br /&gt;
pqdd               --      --    500:00:0  --      1     0   --   E R&lt;br /&gt;
                                               ----- -----&lt;br /&gt;
                                                 681   409&lt;br /&gt;
-bash-3.00$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you can notice that &#039;&#039;&#039;q48&#039;&#039;&#039; is in fact full and that a lot of calculations are queueing.... So maybe it will be useful to try to change of part in the cluster, so as to do that you can try to change the memory used or change the time that you predict for your calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Jobscript&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a calculation is running output and checkpoint files are created but also a special jobscript file which corresponds to this particular calculation, if your calculation failed in the beginning you can try to open the jobscript to have a look if it can give you an explanation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ vi jobscript_tutor.o2760944&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Cancel a calculation&amp;lt;/h3&amp;gt;&lt;br /&gt;
If you want to cancel a calculation which is running or queueing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
Job id            Name             User              Time Use S Queue&lt;br /&gt;
----------------  ---------------- ----------------  -------- - -----&lt;br /&gt;
2745894.cx1       jobscript_couma  alasoro                  0 Q p1mem           &lt;br /&gt;
-bash-3.00$ qdel 2745894.cx1&lt;br /&gt;
-bash-3.00$ qstat&lt;br /&gt;
-bash-3.00$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;qdel name_of_the_file_in_the_queue&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Following on calculations on the cluster&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a training run the calculation of this input on the cluster&lt;br /&gt;
[[Media:cyclopropane_optimisation.gjf]]&lt;br /&gt;
&lt;br /&gt;
When the optimisation is successful, you will need a frequency calculation in order to check if you really found a minimum, and so as to run a frequency calculation you have to keep the geometry of your optimised parameters. Thus what you always have to do in those cases is :&lt;br /&gt;
&lt;br /&gt;
1) cp the input file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.com cyclopropane_optimised_frequency.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) cp the checkpoint file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-bash-3.00$ cp cyclopropane_optimisation.chk cyclopropane_optimised_frequency.chk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) change the name of the checkpoint file in the new input file&lt;br /&gt;
So you have to change the name of the checkpoint file which correspond to this new input&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# opt=calcall b3lyp/cc-pvdz geom=connectivity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) change the command in the new input file&lt;br /&gt;
&lt;br /&gt;
So you have to change the calculation type (opt ---&amp;gt; freq), but also because you want to keep the optimised geometry,contained in the checkpoint that you copied you have to specify &#039;&#039;&#039;geom=check&#039;&#039;&#039; and remove the geometry below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%chk=/work/username/cyclopropane_optimised_frequency.chk&lt;br /&gt;
%mem=1200mb&lt;br /&gt;
%nproc=1&lt;br /&gt;
# freq b3lyp/cc-pvdz geom=check&lt;br /&gt;
&lt;br /&gt;
cyclopropane &lt;br /&gt;
DFT ccpvdz b3lyp&lt;br /&gt;
opt + calcall&lt;br /&gt;
&lt;br /&gt;
0 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) run the new calculation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Connecting the cluster to your Mac&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your mac to your account on the cluster&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is really usefull to export a file from a computer to the cluster&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp absolute_link_to_the_file_on_your_mac username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Example :&amp;lt;br/&amp;gt;&lt;br /&gt;
So send our file test2.com to the directory home on the cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[intellimac4:~] aurelie% pwd&lt;br /&gt;
/Users/aurelie&lt;br /&gt;
[intellimac4:~] aurelie% cd phony&lt;br /&gt;
[intellimac4:~/phony] aurelie% ls&lt;br /&gt;
test2.com&lt;br /&gt;
[intellimac4:~/phony] aurelie% scp ./test2.com  alasoro@login.cx1.hpc.ic.ac.uk:/home/alasoro/&lt;br /&gt;
alasoro@login.cx1.hpc.ic.ac.uk&#039;s password: &lt;br /&gt;
test2.com                                                                              100%  650     0.6KB/s   00:00    &lt;br /&gt;
[intellimac4:~/phony] aurelie% &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the file was good sent to the directory home.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Copy a file from your account on the cluster to your mac&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Obviously you can do it in the other side.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;scp username@login.cx1.hpc.ic.ac.uk:/home(or work, it depends on which directory you want to put the file)/username/ absolute_link_to_the_file_on_your_mac&#039;&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;More about UNIX&amp;lt;/h1&amp;gt;&lt;br /&gt;
This website group together the most classical command of UNIX : [http://mally.stanford.edu/~sr/computing/basic-unix.html Basis UNIX commands]&lt;/div&gt;</summary>
		<author><name>Ns4912</name></author>
	</entry>
</feed>