Compute Canada

How do I run ADF interactively?

Please note: The FAQ pages at the HPCVL website are continuously being revised. Some pages might pertain to an older configuration of the system. Please let us know if you encounter problems or inaccuracies, and we will correct the entries.

The following instructions assume that you are a member of the Unix group adf. The instructions in this section are only useful if you need to run test jobs of a short duration. If you want to run a production job, please refer to to instructions on how to start a ADF batch job.

Both package components ADF and BAND require the setting of environment variables to properly function.

(bash syntax):

export ADFHOME=/opt/adf 
export ADFBIN=$ADFHOME/bin
export ADFRESOURCES=$ADFHOME/atomicdata
export SCMLICENSE=$ADFHOME/license
export LD_LIBRARY_PATH="/opt/studio12/SUNWspro/lib":$LD_LIBRARY_PATH
export NSCM=8 export MPIDIR="/opt/SUNWhpc/HPC7.0"

The environment variables ADFHOME, ADFBIN and ADFRESOURCES are necessary for proper program execution and are used for the system to find executables and data files such as basis sets. SCMLICENSE is used by the license manager of the program to find a machine specific file which ensures that the code cannot be run outside of the terms of the license agreement that exists between HPCVL and the software provider SCM. The variable NSCM gives the default number of processors for a program run. The actual number of processors the software uses will be set explicitly in the case of a parallel run.

Fortunately, the above settings can be applied through a call to usepackage on our system. Issuing the command

use adf

will take care of this, as well as including the $ADFBIN directory in the $PATH. This command may also be placed into a login shell setup file.

Once the environment variables are set, the program(s) can be run:

For ADF: adf <in >out 
For BAND: band <in >out

Instructions about the job are read from standard input, which has been redirected from a file in in the above command lines. Commonly an input file will be constructed to specify what calculation is to be run. The output of the program(s) goes to "standard output" and has been redirected to an output file out above. Note that the output of these programs is commonly thousands of lines long and should therefore be redirected in any case.

The construction of a proper input file for ADF is an involved process, and is outside the scope of this FAQ. Detailed instructions can be found in the ADF User's Guide or the BAND User's Guide, respectively, which should be studied in any case before the programs can be used properly. As an initial hint, we include a sample input file here. The input consists of several units, separated by blank lines, starting with a keyword, and ending with the statement END. For instance, the atoms in a molecules may be specified by issuing the keyword atoms, followed by one line with the atom name and the Cartesian coordinates for each atom, and closing with end (case insensitive).