# First time you run an ADF job?¶

This page contains info aimed at first time users of ADF on Stallo, but may also be usefull to more experienced users. Please look carefully through the provided examples. Also note that the job-script example is rather richly commented to provide additional and relevant info.

If you want to run this testjob, download the copies of the scripts and put them into your test job folder (which I assume you have created in advance).

## ADF input example¶

title Caffeine for scale testing
integration  6.0
units
length angstrom
end
symmetry  Nosym
atoms cartesian
C     1.179579     0.000000    -0.825950
C     2.359623     0.000000     0.016662
C     2.346242     0.000000     1.466600
N     1.092573     0.000000     2.175061
C     0.000000     0.000000     1.440000
N     0.000000     0.000000     0.000000
N     3.391185     0.000000     1.965657
C     4.217536     0.000000     1.154419
N     3.831536     0.000000     0.062646
C     4.765176    -0.384157    -0.964164
C     1.058378    -0.322767     3.578004
O    -1.345306     0.000000     1.827493
C    -1.260613    -0.337780    -0.608570
O     1.192499     0.000000    -2.225890
H    -1.997518    -0.535233     0.168543
H    -1.598963     0.492090    -1.227242
H    -1.138698    -1.225644    -1.227242
H     0.031688    -0.271264     3.937417
H     1.445570    -1.329432     3.728432
H     1.672014     0.388303     4.129141
H     4.218933    -0.700744    -1.851470
H     5.400826     0.464419    -1.212737
H     5.381834    -1.206664    -0.604809
H     5.288201     0.000000     1.353412
end

BASIS
Type TZ2P
End

geometry
end
scf
end
unrestricted

charge 0 0

xc
gga PW91
end

noprint frag sfo

endinput


This file can also be downloaded here: Caffeine input for ADF.

Place this file in a job folder of choice, say ADFFIRSTJOB in your home directory on Stallo.

then, copy the job-script as seen here:

#!/bin/bash -l

################### ADF Job Batch Script Example ###################
# Section for defining queue-system variables:
#-------------------------------------
# This script asks for a given set of cores nodes and cores. Stallo has got 16 or 20 cores/node,
# asking for something that adds up to both is our general recommodation (80, 160 etc), you would
# then need to use --ntasks instead of --nodes and --ntasks-per-node. (replace both).
# Runtime for this job is 59 minutes; syntax is hh:mm:ss.
# Memory is set to the maximum advised for a full node, 1500MB/core - giving a total
# of 30000MB/node and leaving some for the system to use. Memory
# can be specified pr core, virtual or total pr job (be carefull).
#-------------------------------------
# SLURM-section
#SBATCH --nodes=2
#SBATCH --time=00:59:00
#SBATCH --mem-per-cpu=1500MB # Be ware of memory needs, might be a lot higher if you are running Zora basis, for example.
#SBATCH --mail-type=ALL
#SBATCH --exclusive
#SBATCH --partition=multinode

######################################
# Section for defining job variables and settings:

input=caffeine # Name of input without extention
ext=adf # We use the same naming scheme as the software default, also for extention
cores=$SLURM_NTASKS # Number of cores potentially used by mpi engine in submit procedure # We load all the default program system settings with module load: module --quiet purge module load ADF/adf2017.108 # Now we create working directory and temporary scratch for the job(s): # Necessary variables are defined in the notur and the software modules. export SCM_TMPDIR=/global/work/$USER/$SLURM_JOBID mkdir -p$SCM_TMPDIR

# Preparing and moving inputfiles to tmp:

submitdir=$SLURM_SUBMIT_DIR cp${input}.${ext}$SCM_TMPDIR
cd $SCM_TMPDIR # In case necessary, set SCM_IOBUFFERSIZE #export SCM_IOBUFFERSIZE=1024 # Or higher if necessary. ###################################### # Section for running the program and cleaning up: # Running the program: time adf -n$cores < ${input}.${ext} > adf_$input.out # Cleaning up and moving files back to home/submitdir: # Make sure to move all essential files specific for the given job/software. cp adf_$input.out $submitdir/adf_$input.out
cp TAPE21 $submitdir/$input.t21

# To zip some of the output might be a good idea!
#gzip $input.t21 #mv$input.t21.gz $submitdir/ # Investigate potentially other files to keep: echo$(pwd)
echo $(ls -ltr) # ALWAYS clean up after yourself. Please do uncomment the following line #cd$submitdir
#rm -r \$tempdir/*

echo "Job finished at"
date
################### Job Ended ###################
exit 0


(Can also be downloaded from here: job_adf.sh)

Place this script in the same folder and type:

sbatch job_adf.sh


You may now have submitted your first adf job.

## These files are also available on Stallo¶

module load ADF/adf2017.108
cd <to whatever you call your test folder> # for instance ADFFIRSTJOB
cp -R /global/hds/software/notur/apprunex/ADF/* .


To verify that the jobs has worked fine, check the outputfile. If it says EXIT and print Bond Energies at the end of the file, you are likely on the safe side.

Check the Bond Energy in adf_caffeine.out. The value should ideally be close to -156.75317227 eV. When this is the case, you may alter variables in the shell script as much as you like to adapt to your own jobs.

NB: ADF is installed as precompiled binaries, they come with their own mpi (intel MPI). So if you are not using the provided runscript example and/or loading the newer modules - please make sure that you load an intelmpi module and also preferably a rather recent intel compiler.

Also note that, on Stallo, we hold the nbo6 plug in license that allows users of adf to produce files that can be read with the nb06 software.

Good luck with your chemistry!