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 some correlated ab initio methods are available, e.g. MP2. 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 /home/mgcf/software-ws/ADF/ams2024.105/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.


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 can play a large role in the quality of the results. In some cases, you may find it important to adjust/increase the values for the various options found in the AMSinput (see below) menu under Details -> Numerical Quality, such as the "Numerical quality" and "Integration".


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 AMSinput (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.

When you save the input, three files are generated. The file yourjobname.ams 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.run ncpu


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 use 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 files, found in the ams.results subdirectory and titled adf.rkf and ams.rkf, can be read into AMSinput and used to inspect the current molecular geometry, orbital energy levels, frequency calculation results, etc (see example below). 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.

There is an AMSinput option to save the restart and grid data files, see Details -> Files (Restart) in the menu.


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. A printout of the .run file is provided in Section 3 of this how-to.

Start the GUI by typing adf_setup and then amsinput 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 menu, go to Details -> Output Details, and in the Title field, enter an identifying phrase such as: "nico2 opt with freq" (no special characters, e.g. don't type *?"" characters). In the menu, go back to Main, and for Task, choose Geometry Optimization. Under this, for Frequencies, check Yes. The Total charge and Spin polarization fields should both have the value 0.0. For XC Functional, select GGA -> BP86. Set Basis set to DZP, and Frozen core to Large.

Go to Details -> Files (Restart). Make sure Grid-based data is un-selected (no orange box next to TAPE41).

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

Submit the job by typing run_adf nico2.run 4 on the command line.

Analysis of output:

When the job is finished, you can view the various results in the GUI. The SCM option on the menu has various options, and if you click on any of them, a separate window will open, in which you can open an appropriate results file for viewing. Here are some examples:

(1) try selecting SCM -> Movie. In the new window (which will be labelled Movie), do File -> Open and browse into the ams.results subdirectory and select ams.rkf. The structure will appear on the left, and underneath that there's a slider and forward/backward controls to view the optimization progression. On the right there should be an energy plot for the optimization (you may have to go to Graph -> Energy to show this).

(2) A MO-level diagram may be obtained by choosing SCM -> Levels, and in the new window doing File -> Open and choosing ams.results -> adf.rkf.

(3) Select SCM -> Spectra, and open ams.results -> ams.rkf. 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.

(4) Display molecular orbitals by selecting SCM -> View. In the new window, open ams.results -> adf.rkf. Then choose Add -> Isosurface: With Phase. At the bottom of the screen, click on Select Field -> Orbitals (occupied). A new window with a list of the orbitals and their energies will appear, and you can click on each entry to view the orbital.


3. Example ADF Input File:


#!/bin/sh

"$AMSBIN/ams" << eor

Task GeometryOptimization
Properties
    NormalModes Yes
End
System
    Atoms
        Ni 4.163336342344337e-17 -0.3630157551232462 3.156416100713599e-14 
        O 1.162826778170856 2.568762376576996 0.08084483075990199 
        O -1.162826778170855 -3.294793886823484 -0.0808448307600049 
        C 0.7408183271697588 1.504773164027299 0.05150494760543452 
        C -0.740818327169758 -2.230804674273789 -0.05150494760547713 
    End
    BondOrders
         2 4 3.0
         3 5 3.0
         4 1 1.0
         5 1 1.0
    End
End

Engine ADF
    Basis
        Type DZP
    End
    XC
        GGA BP86
    End
    Title nico2 opt with freq
EndEngine
eor