- The instructions here assume you use bash.
To find out which shell you use open a terminal and type
echo $0
he default is often bash. If it is not, then type "bash" (followed
by pressing the "Enter" key).
- The program is available as /vol/cursus/QuantumChemistry/bin/nwchem
To run the program without using the full pathname add the directory to
your path:
if [ -d /vol/cursus/QuantumChemistry/bin ]; then
export PATH="$PATH:/vol/cursus/QuantumChemistry/bin"
fi
It is easiest to add these lines to $HOME/.profile. In your
login directory just edit .profile (probably does not yet exist)
and add these lines, e.g. using "nano".
This is the minumum setup. It is sufficient to run nwchem.
Alternatively you can do the following:
cp /vol/cursus/QuantumChemistry/setup/.bashrc ~/.
cp -rp /vol/cursus/QuantumChemistry/setup/.bash_functions ~/.
and put the following lines in $HOME/.profile
if [ $SHELL == /bin/bash ]; then
test -s ~/.bashrc && . ~/.bashrc || true
fi
This gives you a lot of extra nice commands and extra safety all made by
Gerrit Groenenboom.
- The program NWChem creates large (temporary) files during the computation.
Putting these files on a network disk ($HOME) slows the computations down.
And for some calculations your disk space might be insuffient.
For this purpose create a directory in /tmp
mkdir -p /tmp/$USER
Because of the -p the command will not give an error message if
the directory also exists. To check use
ls -l /tmp
Of course you may put the mkdir command in your $HOME/.bashrc.
To run NWChem create a subdirectory on the tmp file system, and work there:
cd /tmp/$USER
mkdir -p job1
cd job1
# now create the input file here, etc (see below)
(Everything after the "#" is just a comment that is ignored by bash)
Be aware that there is no backup of the /tmp filesystem,
so copy important files to $HOME (or better $HOME/QuantumChemistry)
To copy an entire directory with all its subdirectories you use, e.g.
cd # without argument this brings you to $HOME
cd QuantumChemistry
mkdir -p job1
cd job1
rsync -avz /tmp/$USER/job1 .
Note: the "-a" flag means "archive", the "v" is for "verbose" (i.e.,
you'll get some information on what rsync is doing), and the "z"
means compress the data during the copy. The latter is not essential.
Usually, you may not need a backup of large binary files, so just
making a backup of input and output files may be sufficient.
NOTE: running NMChem from /tmp will only be needed for larger jobs in
the last 2 weeks. Avoid running on /tmp as much as possible: /tmp is local to the
cluster node that you are using. If the connection is broken, and you log
on to jupyterhub again, you might end up on another cluster node, where
/tmp is another file system that does not have your job's data.
- There are many tricks to make working with the command line
easier. Some goodies:
pwd # show path to current directory
cd # to go to $HOME
touch .bashrc # creates an empty file if .bashrc does not yet exist
cat /vol/cursus/QuantumChemistry/setup/.bashrc >> .bashrc # this appends the file
If you opted for the elaborate alternative above (copying .bashrc, etc.) the following
might also work. Your prompt should display your current working directory.
After changing to
a new directory you may go to the previous by type
b # b = go back
and go forward with
f # f = forward, i.e., undo "b"
To see your file sorted with most recent first use
l # alias for "ls -lt"
The rm is changed by an alias such that
rm some_file
will move some_file to $HOME/waste, rather than deleting it.
To actually remove a file use
\rm some_file # you will get /bin/rm and not the alias