Quantumchemistry, NWI-MOL406, Computer exercises, week 4
The exercises are carried out with two software packages:
-
The NWChem quantum chemistry package to do quantum chemical calculations.
We wil use the command-line driven version, i.e. without a graphical interface.
-
The gmolden package as a graphical interface for structure viewing, molecule building, etc.
To use these you will both need to access and use Jupyterhub and the lilo server.
Go through the introductions below and carry out the instructions.
Jupyterhub
The NWChem calculations will be done in yupyterhub.
Jupyterhub
To access jupyterhub, go to:
https://jupyterhub.science.ru.nl/
Login with your science account. Next,
press "Spawn". This will send a request to the compute server to open a job for you.
It may take a while if it the compute server is busy. Don't press a second time.
You will see a directory list of your home directory. We will refer to this as the "Dir Tab".
Open a terminal by clicking the "New" box in the right upper corner and choose "terminal" from the menu.
This will open a new tab on your browser with a command line on the clusternode where you are running your Jupyter session. This new tab will be refered to as "Term Tab". The prompt is the name of the cluster node.
Here you can type UNIX/Linux commands.
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:
- Edit from the "Dir Tab". You can select a file with the checkboxes in the left margin
of the page. That will open a list of possible "actions", one of which is the box "Edit".
To make a file from scratch: first copy an existing file and work on that.
- Use the "nano" editor in the "Term Tab". Type
nano FILENAME
where "FILENAME" is the name of the (possibly new) file. The file is opened in the window. You can just
type and modify. At the bottom is an overview of commands. "^O" means press and "CTRL" and "o" together.
Save your work before leaving the editor.
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 withrm FILENAME
Removing directories (folders) is done withrm 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
Ending your juputerhub session
To exit jupyterhub you need to (always):
-
stop running the notebook and let it save your work. Click "Running" in "Dir Tab" and stop whatever
process is running.
-
let the compute server know that you are done and that someone else can take up your space. Click on "Control Panel" in the top-right corner of one of the tabs. Press "Stop My Server".
A list with useful
UNIX commands.
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.
- Back to [ Quantum Chemistry ]
Last updated: 24-Nov-2020.