Getting Started with ADF


Warning: ADF is extremely powerful but is less beginner-friendly than other QM programs. The program presets are often not sufficient to obtain meaningful results. This how-to should only be used as a starting point and is NOT a substitute for studying the documentation. Finally, the concepts presented here are not rigorously defined: they are intended only to give you a feel for the program.


1. ADF Primer: General Considerations, Key Differences:

Functionals:

Amsterdam Density Functional primarily uses pure DFT. The current release handles HF functionals (and therefore hybrid DFT functionals) for SCF and post-SCF calculations only, and no correlated ab initio methods are available (MP2, CASSCF, etc.). Some program functions are only available with certain combinations of exchange and correlation gradient corrections, so it is recommended that you use the predefined XC functionals (e.g. BP86, OLYP, etc.) unless you know what you are doing.


Basis Sets:

Whereas nearly all other programs employing atom-centered basis functions use Gaussian-type functions, ADF uses Slater-type functions (STOs). Therefore it is difficult to compare ADF basis sets to those most often discussed in the literature. That being said, the ADF SZ basis is roughly equivalent to a Gaussian type STO-3G basis, a DZ is like a double-zeta basis (e.g. 6-31G, etc.) and likewise for TZ (6-311G, etc.). Specification of polarization and diffuse functions are not completely straightforward. For instance, some atoms in the TZP basis set actually have extra STOs best described as diffuse functions. Read the Database section in Chapter 1.1 of the user's manual for a description of the available basis sets.

All of the available basis sets are located in the /usr/software/adf/adf_latest/atomicdata directory. If you are doing ZORA relativistic calculations, you MUST only use basis sets from the ZORA subdirectory (they unfortunately have the same names as the non-relativistic bases). This will be done automatically if you do not specify basis set file locations.

Basis set example: if you know that 6-31++G(d,p) works optimally for your system, you might try the ADZP basis set (located in the AUG directory) if DZP proves inadequate.


Frozen Cores vs. ECPs

ADF does not use effective core potentials in the exact traditional sense. Instead, core orbitals from high-level all-electron atomic calculations are used in frozen (but intact) form when calculating the atomic wavefunctions (see Fragments below). Basis sets for different frozen core sizes are available, for instance the all-electron basis files for manganese are called Mn, while the files called Mn.2p and Mn.3p have the orbitals up through 2P and 3P (respectively) frozen. Frozen core basis sets are available for almost every element, so for instance you could use 1S frozen core basis sets for second-row elements if you have a large organic molecule.


Fitting Sets:

The use of STOs creates a problem when evaluating the 2-electron integrals (Coulomb), which is probably the main reason why they are not used by most programs. ADF's work-around is to use density-fitting STOs in place of the actual basis functions to evaluate these terms. This is an option in some other programs but mandatory here. As long as you don't mess with the standard basis sets this approximation shouldn't significantly affect results, but it is a fundamental aspect of the program and should not be forgotten (see A1FIT and ADDDIFFUSEFIT keywords).


Fragments:

Another way in which ADF differs fundamentally from most other QM programs is the way in which it builds molecular wavefunctions. Wavefunctions are always built up from previously-calculated fragment wavefunctions. This can be useful for bonding decomposition analysis because the interactions between user-specified fragments is explicitly handled.

Obviously there needs to be some smallest fragment in this regime, which is an individual atom (basic atom). If you don't specify any fragments, the program considers each atom as a separate fragment. In fact, the fragments must be atoms when doing any calculation involving gradients (geometry optimization, frequency calculations, etc.). When you run ADF, the program starts by doing Create runs for each element in the molecule, which take the specified atomic basis sets and construct atomic wavefunctions. The result files for those runs are then used as fragment files for the main run. These Create runs always treat the atomic wavefunction as closed-shell with equal numbers of alpha and beta spins, using fractional occupations if there are an odd number of electrons. Obviously, the electronic energies of these atoms should not be considered physically relevant.

The most obvious consequence of this bonding scheme is that the bond energies reported in the output are the difference of the energy of the molecule and the fragments from which it is composed. Therefore these energies will be on the order of 1 a.u. instead of the hundreds or thousands of a.u. you are probably used to seeing. Because of the way in which basic atoms are calculated, if your fragments are just the atoms then the bond energy number will be even less physically relevant than a normal molecular SCF energy.


Vibrational Frequencies:

ADF can do frequency calculations either analytically or numerically. The numerical method has more flexibility with respect to appropriate model chemistries and program options but analytical frequency calculations are in general very much faster and about as accurate (provided you use sufficiently accurate integrals, see below). You can specify an analytical (only) frequency calculation in the input file for a geometry optimization, but it must be manually entered with the ANALYTICALFREQ keyword (see example input and the note on integration).


Charge, Spin Polarization, Open Shell, Excited States:

The CHARGE keyword has two arguments, a number for the charge and a number for the spin polarization. For the latter you need to enter the number of unpaired electrons. This is different from most programs where you would enter the multiplicity according to 2S+1. If you have an open-shell system you should run an unrestricted calculation using the UNRESTRICTED keyword (no argument). Note: fragments cannot be unrestricted, hence the basic atom treatment mentioned above.

The electron configuration can also be explicitly assigned using the OCCUPATIONS keyword. If you use this it is not necessary to specify a charge and spin polarization, but it is advisable to do it anyway for checking purposes. It is not uncommon for some of the SCF algorithms to accidentally calculate excited states so it might sometimes be necessary redo a calculation using this section.


Integration:

The accuracy with which various numerical integrals are calculated plays a large role in the quality of the results. There is a general keyword INTEGRATION, the argument of which specifies the number of significant digits for anything the program calculates. The applicability of this number varies depending on the job, so what might be fine for one type of job might be totally inadequate for another. For example, a value of 4 is normally OK for geometry optimizations but not sufficient for frequency calculations. Therefore, if you want to run an analytical frequency calculation automatically after a geometry optimization, do it in two steps: first the geometry optimization with accint=4, and then restart it (see below) with accint=6 and include the ANALYTICALFREQ keyword. The new integration accuracy will now apply to both the geometry optimization and the frequency calculation. Skipping the geometry optimization at the higher accuracy may result in an inaccurate frequency calculation. At first I didn't believe the manual, but now I do after a frequency calculation mistook a minimum-E conformation of hydrogen peroxide for a transition state!


Coordinates:

By default ADF optimizes geometries in Cartesian coordinates. However, there are many instances in which you must use internal (Z-matrix) coordinates, such as when freezing bond lengths or angles. There are many rules involved in specifying coordinates so you should read that section of the manual before attempting any non-standard optimizations.


GUI and Input Files:

The easiest way to set up ADF input is to use the ADF GUI ADFInput (see the tutorial below). You can build in this program but it may be easier to build in whatever program you are used to and import the coordinates from a pdb or xyz file. Once the structure is to your liking, it is best to use one of the Preset tasks which can be selected in the Main Options panel. These tasks automatically set certain parameters to decent values for the intended task. The values that have been changed from the default by the Preset will be highlighted in green. If you change something manually, that field will then be highlighted in yellow, or red if it had previously been green. Clicking on the top of the Main Options panel will bring up a menu allowing access to details of the calculation.

When you save the input, three files are generated. The file yourjobname.adf contains the molecular coordinates and all of the calculation details but is not actually input for the ADF program. It can be used to read in a structure and parameters to set up another calculation. The actual ADF input file is yourjobname.run. This is the file that you can edit after its creation to affect the ADF run. The third (yourjobname.pid) file has no apparent use in this facility.

Once yourjobname.run has been edited to your liking, submit it to the server by typing:

run_adf yourjobname


Output:

Most ADF output files are not automatically assigned unique filenames so each job should be started from its own sub folder.

Note: ADF output files can be very large (500 MB is not uncommon), so be sure to transfer or delete any files that you won't need in the near future.

Standard output: This is a text file containing all of the program details and results. It is created when the program terminates and is called yourjobname.out.

Restart file: The restart file is called TAPE13 and is a binary result file which can be used to restart failed calculations. You should rename this file yourjobname.t13 if you are going to used it for anything. It contains the molecular geometry, wavefunction, and force constant matrix, among other things. If you are using this file for a restart, you must still include the molecular specification and all job options in the new .run file, as these are not automatically read from the restart file. If a job completes, the result file has all of the information contained in the restart file and so TAPE13 can be deleted.

Result file: The result file, called TAPE21, is the finished version of TAPE13. It should be renamed yourjobname.t21 when the job completes. It can be read into ADFInput and used to inspect the current molecular geometry, orbital energy levels, frequency calculation results, etc. It can also be used as a restart file when setting up subsequent calculations.

Grid-based data: All grid-based data are stored in TAPE41. It is generally very, very large. It contains things like the density matrix, which for most purposes are not useful. Therefore, only request it in the input if you know you need its contents.


2. Quick Tutorial. Geometry Optimization, Frequency Calculation on Ni(CO)2:

This tutorial leads you through the setup of a geometry optimization of a coordination complex, with a frequency calculation at the end. High-accuracy integrals are specified so that the frequency calculation can be performed in the same run. A printout of the .run file is provided in Section 3 of this how-to.

Start the GUI by typing adfinput on the command line. You can see what each button does by holding the cursor over it. Select the Structure tool (bottom of the screen, looks like benzene) and select Metal Complexes - ML2 Linear. Right click on the metal, and select Change atom type - Ni. Add a CO ligand by selecting Structure tool - Ligands - CO. Double click on a free valence to place the first CO ligand. After that, you can type the space bar to reinstate the CO tool for the other CO.

The right half of the screen controls calculation input. In the Title field, enter an identifying phrase such as: "nico2 opt with freq" (no special characters, e.g. don't type *?"" characters). Set Preset - Geometry Optimization Strict. Notice that the Integration accuracy field now has the value 6, which is suitable for an analytical frequency calculation. The Total charge and Spin polarization fields should both have the value 0.0. Set XC potential in SCF - GGA: BP. This requests the popular BP86 functional. Set Basis Set - DZP, and Core Type - Large.

Click on Main Options at the top of the panel, and select Symmetry. Change Symbol to D(LIN). This enforces linear symmetry (if you do not want to use symmetry, you must explicitly specify NOSYM). Select Main Options - Coordinates and change the field to Cartesian. Select Main Options - Files (Restart). Make sure Save Grid-based data is un-selected (no red box next to TAPE41).

Under the File menu, select Save As and name the file nico2 (or any Unix-friendly name with no extension).

Type gedit nico2.run on the command line, and add the block:

ANALYTICALFREQ
END

after the GEOMETRY block (each block should end with a blank line, see the example file).

If you find the argument branch New in the GEOMETRY block, delete it.

Replace the lines at the end of the file, after the eor key, with:

mv TAPE21 nico2.t21

Save the file, and submit the job by typing run_adf nico2 on the command line.

Analysis of output:

When the job finishes, change into the directory nico2, and inspect the contents of logfile. Find the following information: a) where the Create runs end and where the main calculation starts; b) was the specified basis set actually used for all atoms; c) how the coordinate system was changed by the program; d) Did the optimization converge, and how many steps it took; e) what was the maximum number of SCF cycles needed for wavefunction convergence in any geometry step; e) what is the molecular bond energy. Note: you can also look in the file called nico2.job.o# (standard output, see above) for a VERY verbose description of the output.

Open ADFInput, select File - Open and look in the nico2 folder for nico2.adf. Click Open and Yes to the prompt asking if you want to update the coordinates. Click on the SCM icon (upper left) and select Levels. Inspect the MO diagram and make sure the calculation got the correct electronic configuration. Select SCM - Spectra. All molecular vibrational modes are indicated by red lines, and the IR-active modes are depicted as a simulated spectrum. Clicking on a vibrational mode displays an animation in the movie viewer. Display molecular orbitals by selecting SCM - View- Add - Isosurface: Double (+/-). At the bottom of the screen there will be a blank button on which you can click to specify the orbital. Repeating this process from the Add stage allows for visualization of multiple orbitals. The small button on the lower left of the screen controls which current orbitals are displayed.


3. Example ADF Input File:

"$ADFBIN/adf" <<eor
TITLE nico2 opt with freq
UNITS
   length Angstrom
   angle Degree
END

ATOMS
1 Ni -0.312447392345 -0.238711839792  0.101774536244 
2 C   0.428370934825  1.629077079360  0.153279483850 
3 O   0.850379385826  2.693066291910  0.182619367005 
4 C  -1.053265719510 -2.106500758940  0.050269588638 
5 O  -1.475274170510 -3.170489971490  0.020929705484 
END

GUIBONDS
1 3 2 3.0
2 5 4 3.0
3 2 1 1.0
4 4 1 1.0
END

CHARGE 0.0

SYMMETRY D(LIN) tol=0.001

BASIS
   type DZP
   core Large
END

XC
   GGA Becke Perdew
END

GEOMETRY
   smooth conservepoints
   optim All Cartesian
   iterations 100
   step rad=0.15 angle=10.0
   hessupd BFGS
   converge e=1.0e-3 grad=1.0e-4 rad=1.0e-2 angle=0.5
END

ANALYTICALFREQ
END

SAVE TAPE21 TAPE13

SCF
   iterations 100
   converge 1.0e-6 1.0e-6
   mixing 0.2
   lshift 0.0
   diis n=5 ok=0.01 cyc=10 cx=5.0 cxx=10.0
END

INTEGRATION 6.0 6.0 6.0

EXACTDENSITY
A1FIT 10.0

eor

mv TAPE21 nico2.t21