GUI tour: UV/Vis spectrum of ethene
***********************************

ADF Spectroscopy AMSdos AMSinput AMSoutput AMSlevels AMSspectra
AMSview Excitations

In this tutorial you will first construct an ethene molecule and
optimize its geometry.

Next you will perform an excitation energies calculation using ADF.
The results will be examined using AMSlevels, AMSdos, AMSspectra and
AMSview. The use of the KFbrowser is also shown.

Finally you will run an excited state geometry optimization and check
its results.


Create your ethene molecule
===========================

First we construct an ethene molecule, and pre-optimize its geometry:

   **1.** Start AMSinput (**SCM → New Input**)
   **2.** Select the C-tool by clicking on [image: CTool][image]
   **3.** Select the Double bond mode [image: BondTool][image] **→ Double** (or use the shortcut: press the '2' - key)
   **4.** Click somewhere in the drawing area to create a carbon atom
   **5.** Click again to create a second carbon atom (with a double bond)
   **6.** Click on the just created Carbon atom to stop bonding
   **7.** Select the **Atoms → Add Hydrogen** command
   **8.** Click on [image: PreOptimTool][image] to pre-optimize
   **9.** Click on [image: SymmTool][image] to symmetrize the structure (it should be D(2H))

Your ethene molecule should look something like this:

   [image]


Optimize the geometry
=====================

The next step is to optimize the geometry using ADF:

   Select the **Geometry Optimization** task

   [image]

With the proper options selected, now run ADF:

   **1.** Select the **File → Run** command
   **2.** In the file select box, choose a name for your file (for example 'ethene')
   **3.** Click 'Save'

Now ADF will start automatically, and you can follow the calculation
using the logfile that is automatically shown.

   Wait until the optimization is ready (should take very little time)
   The button [image: UpdateMolecule][image] should then appear - click it to update the coordinates


Calculate the excitation energies
=================================


Select calculations options
---------------------------

To set up the calculation of the excitation spectrum:

   **1.** Select the **Single Point** task in the main panel
   **2.** Use the panel bar **Properties → Excitations (UV/Vis), CD** command to go to the Excitations panel
   **3.** For the 'Type of excitations' option, Select 'SingletAndTriplet'
   **4.** Check the 'Calculate NTOs' check box

   [image]

For the tutorial this set up is fine, normally you would also need to
select an XC potential and Basis set that gives better results.


Run the calculation
-------------------

Now everything is ready to run the excitation energies calculation
with ADF. Before running we will save the current input in a different
file:

   **1.** Select **File → Save As...**
   **2.** Enter a filename (ethene-exci) and click 'Save'
   **3.** Select **File → Run**
   **4.** Wait for the calculation to finish


Results of your calculation
===========================


Logfile: AMStail
----------------

The logfile shows you that the calculation has finished, and that
indeed the excitation code has been running (your output may look
slightly different):

   Select **SCM → Logfile**

   [image]


Energy levels: level diagram and DOS
------------------------------------

   Select **SCM → Levels**

   [image]

In this level diagram you can see that the HOMO and LUMO consist
mainly of carbon p orbitals. It is also easy to see what orbitals the
hydrogens take part in.

Tip:

  You can drag the vertical columns around (the final MOs and the
  fragments) to get a clearer diagram if needed. Click and drag in the
  name (at the bottom) to do this.

Note that the carbon and hydrogen stacks show all carbon and hydrogen
atoms at once: they show the fragment type. AMSlevels can also show
the individual fragments but when using atomic fragments you will get
too many fragments. In this particular case symmetry is used, and
since there is only one symmetry unique carbon atom and only one
symmetry unique hydrogen atom you still would see only one stack per
atom type.

   Select **SCM → DOS**

   In the AMSdos window:
   **Graph → Add Graph**
   Select one hydrogen atom

   [image]

In these plots you can see that the partial DOS for the hydrogen atoms
have no contribution to the HOMO. By right clicking on an atom you can
also show partial DOS graphs with contribution from selected atoms and
selected L-values only.


Excitation spectrum: AMSspectra
-------------------------------

   Select **SCM → Spectra**

AMSspectra will start and show the calculated excitation spectrum.

   [image]

In the window below the spectrum you will find a table with
information. You can get more information by selecting one of the
entries (or click on the peak in the spectrum):

   In the table select the Singlet-Singlet1B3.u peak

   [image]

The composition of the excitation in terms of orbital transitions is
listed on the right side. In many cases you can visualize relevant
orbitals or NTOs with AMSview by clicking on them in the window on the
right. The active items are visually marked. You can rotate the view
by left-clicking and moving your mouse.

   Click on the the first major contribution line "1b1.u -> 1b2.g" (with the highlighted orbitals)

   [image]

   Close the two windows showing the orbitals using **SCM → Quit** (or 'Ctrl+Q') in both windows.


Orbitals, orbital selection panel: AMSview
------------------------------------------

We will now use AMSview to examine the orbitals. Not just one, but
have a look at many of them. To do that AMSview has an 'orbital
selection' panel.

   Select **SCM → View**
   Click **HOMO** in the right hand panel
   Click on the field selector pull-down in the control bar for the HOMO (reading SCF_B1.u 1: ...),
   select **Orbitals (occupied)**

   [image]

In the orbital table you can select the orbital that you want to see.
Note that the currently visible orbital is highlighted using a dark
green background.

   Click on all of the orbitals in the window, one by one, and observe the orbitals
   Click again on them

When you click the first time on an orbital, its values need to be
calculated and then the orbital is shown. When you click for a second
time on an orbital in the list, it has already been calculated
(indicated by the light green background color). And thus it shows
immediately.

   [image]

The orbital selection table allows you to reorder the orbitals by
clicking on the headers of the columns. Thus you can sort by Symmetry,
Spin, etc. Clicking again on a header reverts the sort order.

   Click on 'Symmetry' in the 'Select Occupied Orbital' window

   [image]

   Close AMSview: **SCM → Quit** (or 'Ctrl+Q'). No need to save the calculated fields.


Transition density: AMSview
---------------------------

You can use AMSview to view orbitals etc, but also to have a look at
the transition density.

   In AMSjobs with your ethene-exci job selected:
   Select **SCM → View**

   In AMSview:
   Select [image: AddButton][image] then **Isosurface: With Phase**

In the field pull-down menu (in the controls for the isosurface with
phase) you will find an entry 'Transition (Fit) Density', and if you
select it a table will be shown with all available transition
densities:

   [image]

In this case let's select the transition density that belongs to the
largest peak: the Singlet-Singlet excitation at 0.3124 Hartree (which
may have B1.u, B2.u or B3.u symmetry depending on the molecule
orientation):

   Click on the **Excitations_SS_B3.u_1** row
   In the AMSview window, change the iso value from 0.03 to 0.003
   Select **Fields → Grid → Medium**
   Select **View → View Direction → Along Y-axis**

   [image]


AMSoutput
---------

Using the output browser you can find all details about your
excitation calculation. Use the menu to jump to the relevant part of
output:

   Select **SCM → Output**
   Select **Response Properties → All Singlet-Singlet Excitation Energies**

   [image]


KFBrowser: KF files, copy to Excel, graphs of results
-----------------------------------------------------

Most result of the calculation are saved to the KF result file (the
**adf.rkf** file for an ADF calculation). You can inspect the contents
of KF files using the KFBrowser.

   Select **SCM → KFBrowser**

The KFBrowser gets the raw data out of the result file, and presents a
selection of that might be of interest for users.

By default, KFBrowser opens the **ams.rkf** binary file. The ADF-
specific results (such as excitations energies) are on the **adf.rkf**
file.

   Click on **File → Related files → adf.rkf**. This will open the **adf.rkf**, containing the ADF specific results.
   Click on the arrow in front of Excitations
   Click on the arrow in front of Energies (Hartree) (in the Excitations section)

   [image]

If you click on the name of the property you can select it. Next you
can copy it, and paste it for example in Excel:

   Click on "Energies (Hartree)"
   Copy (from the Edit menu or the usual shortcut)
   Open Excel or some text editor
   Paste

After pasting you should have your results nicely formatted in Excel
or in some text document. Note that the values are tab-separated, so
pasting into Excel will automatically put the data (energies) in
cells.

   [image]

In a similar way you can copy/paste other results. Or even all
results:

   In the KFBrowser window:
   **Edit → Select All**
   **Edit → Copy**
   In the Excel or text editor window:
   Paste

All results should be nicely formatted in your text document or
spreadsheet:

   [image]

Another feature of the KFBrowser is that it can show results in simple
graphs:

   Close the KFBrowser window
   Open it again **SCM → KFBrowser**
   Open the **adf.rkf** file: **File → Related files → adf.rkf**
   Open the Charges and Spin Densities section
   Click on Mulliken (e)
   Shift-click on MDC-Q (e)
   Use the **Graph → Selection As Graph** command (or double click on the selection)

A window should appear that shows the selected results, charges in
this case:

   [image]

Finally two features that are intended for developers and expert
users: the KFBrowser module can also show the raw data on the result
file, and it can dump a KF file as a plain text file. To activate the
expert mode, use the **File → Expert Mode** menu command. To save the
contents of the result file as a text file using the **File → Save As
ASCII...** command.


Excited state geometry optimization and excited state density
=============================================================

With ADF you can also optimize the geometry of some selected excited
state. It depends on your application which state to optimize, in this
tutorial we will pick the state corresponding to the largest peak in
the UV/Vis spectrum.

   Determine the name of the excited state corresponding with the largest peak in AMSspectra (1B1.u, 1B2.u or 1B3.u in this case, depending on the orientation)
   If your molecule has a different symmetry the name may be different!

   In AMSjobs: click on the ADF button in front of the ethene-exci job

AMSinput should open with the ethene-exci job (or come to the front if
already open).

   Select the **Geometry Optimization** task

   Select Frozen Core: None

   Open the Excited State Geometry panel in the Properties menu
   Enter the excited state to optimize (1B1.u, 1B2.u or 1B3.u, depending on the orientation)

   **File → Save As...**
   Save the file with a name like 'ethene-exci-1B3u'

   **File → Run**

With AMSview you can see how the excited state geometry is different
from the ground state geometry:

   Wait for the calculation to finish
   **SCM → Movie**
   Observe how the geometry changes

With AMSmovie you can see how the excited state density is different
from the ground state density:

   **SCM → View**

   [image: AddButton][image] **Isosurface: With Phase**

   In the field select menu: select **Excited State → Difference Density**
   Change the isovalue to 0.001

   **Fields → Grid → Medium** to get a better quality
   Change the isovalue to 0.001

Now you see how the excited state density differs from the ground
state density (for this geometry)

   [image]

If you wish to see the excited state density, you can do this using a
Calculated field (add the ground state density to the difference
density).


Closing the AMS-GUI modules
---------------------------

To close only the current AMS-GUI module, use the **Quit** command
from the SCM menu:

   Select **SCM → Quit** (or 'Ctrl+Q') / **AMSview → Quit AMSview** (or 'Cmd+Q') on Mac

To close all AMS-GUI modules for your calculation at once, use the
**Close Job** command from the File menu:

   Select **File → Close Job** (or 'Ctrl+W')

**Close Job** will close all open modules that have your current job
loaded, except AMSjobs.

Finally, the **Quit All** command will close every AMS-GUI module,
including AMSjobs:

   Select **SCM → Quit All**

All AMS-GUI modules will be closed.
