Quantumchemistry, NWI-MOL406, Computer exercises, week 4

We can use two software packages:

Connecting from the destktop PC

First boot the PC with ubuntu. Open a terminal window and type
ssh -X lilo6.science.ru.nl
You can omit (the slighty dangerous) "-X" if you don't need graphical capabilities.

For access from home you can use MobaXterm, see "Server access" below.

In the first week, lilo6 is sufficient. For the assignments in the final two weeks, more means will be available. More info will be added later.

Moving about your folders

Create a new directory for this course by typing
 mkdir QuantumChemistry 
in the "Term Tab" and check in the "Dir tab" that you can find it there. Click on it. It should be empty. In the "Term Tab" you can also go to this directory by
 cd QuantumChemistry 
In directory "QuantumChemistry" you can (later) make (sub)directories to organize your work. You move up the directory tree by typing
 cd DIRECTORYNAME 
You move back down the directory tree by typing
 cd .. 
Try typing this in the "Term Tab" to move back from "QuantumChemistry" to your home file system. Do the same from the "Dir Tab" where you can click on the folder ".."

Now in the "Term Tab" type just
 cd 
That brings you back to the same location always:
/home/YOUR_LOGIN
You can see where you are in the directory tree by typing
 pwd 
Do this to check your location.

In the "Term Tab" you can see the contect of the current (sub)directory by typing
 ls 
If you type "ls -l" you get one line per file/directory. It the line starts with "d" you are dealing with the a directory, not a file.

An illustration:
535 cn60> pwd
/home/dewijs
536 cn60> mkdir quantumChemistry
537 cn60> cd quantumChemistry
538 cn60> mkdir subdir1
539 cn60> cd subdir1/
540 cn60> mkdir branch
541 cn60> ls -l
total 4
drwxrwxr-x 2 dewijs dewijs 4096 Nov 24 11:22 branch/
542 cn60> cd branch
543 cn60> mkdir leave
544 cn60> cd leave
545 cn60> pwd
/home/dewijs/quantumChemistry/subdir1/branch/leave
546 cn60> cd ..
547 cn60> rmdir leave
548 cn60> mkdir leaf
549 cn60> cd leaf
550 cn60> pwd
/home/dewijs/quantumChemistry/subdir1/branch/leaf
551 cn60> cd
552 cn60> pwd
/home/dewijs
553 cn60>
You climb "up the tree", from the root "/" (left) to one of the leaves "leaf" (right).

Editing files

You will need to modify files, make new input files, read output files, etc. There are two simple options: Of course, you can also use other editors from the command line, e.g. "vi". Using "emacs" should be possible but appears non-trivial.

Copying stuff

Coping files is done with:
cp OLDFILENAME NEWFILENAME
If "NEWFILENAME" already exists, it will be overwritten (the old content will get lost). You can also copy a file into a directory:
cp FILENAME DIRECTORYNAME

Removing stuff

Removing files is done with
rm FILENAME
Removing directories (folders) is done with
rm DIRECTORYNAME
These commands are dangerous. Once removed, a file or directory cannot be retrieved.

To practise: Go in the "Term Tab" and go to directory "QuantumChemistry". Make a subdirectory "Test1", go into this subdirctory and make a file "Testfile" with an editor of choice. Put in some nonsense. Then try removing "Testfile" and "Test1". Check what you are doing by typing "ls -l" and "pwd" as often as possible.

You disk space on /home

To see your file quotum and how much you current use on the home file system type:
quota -s

A list with useful UNIX commands and a useful UNIX primer.

Server access

The gmolden software is available from the machine lilo6.science.ru.nl On windows (your local PC) you can download MobaXterm,
which will allow you to setup a secure shell connection to lilo6 (a Ubuntu 18.04 machine). For MobaXterm see URL: https://mobaxterm.mobatek.net/
Start mobaxterm form your local PC. In the terminal window setup a secure connection:
ssh -X your_logon_name@lilo6.science.ru.nl
supply your password
gmolden
Note: If gmolden doesn't respond, the path is not (yet) set. You need to carry out the first part of hte next exercise "NWChem exercise" to set the appropriate path for NWChem. Once that is done, also gmolden will work.

For Mac you need to have X11. To get that, you can install XQuartz (https://www.xquartz.org). You can just start the "ssh" command from a terminal window. With X11 "molden" will work, but not "gmolden". For "gmolden" you also need openGL. To let the lilo6 machine contact your OpenGL server (the GLX extension of the Quartz X11 server), follow the following link: Enable glx between mac client and linux server.

To learn more about Z-matrices, follow the zmat link.

For quick molecule visualisation one can also use Jmol, e.g., using the input xyz-format. It is also available on lilo6 (type "jmol") and requires a similar set-up as for gmolden. It should also be possible to download Jmol and install this on your local PC/laptop.

The xyx-format is very simple. The filename requires the extension ".xyz". The first line gives the number of atoms. The second line is a text comment. The other lines list the identity of the atoms and their xyz coordinates in Angstroms. An example:
579 lilo6> more jmolgly.xyz
10
this is not glycine
C  0.1557882444  -0.1450082474  -0.6210553349
C  0.6900659252   1.0761828156   0.1440547545
H  1.0219176287  -0.7018847843  -1.0093921435
H -0.3850939973   0.2423234443  -1.4971362800
H -1.6097527091  -1.1911105963  -0.2430694416
H -0.2958878010  -1.8235203766   0.5263281994
H -0.4938380996   0.4376344310   1.4263997864
O  1.5224126494   1.8355983509  -0.3140927995
N  0.1301165284   1.2227576949   1.3627233320
N -0.7357283691  -0.9529727321   0.2252399273
Back to [ Quantum Chemistry ]
Last updated: 22-Nov-2022.