Tutorial -- Electronic Circular Dichroism with DR-TDDFT

Performing a parallel relativistic calculation of electronic circular dichroism (ECD) spectra with damped-response TDDFT (DR-TDDFT), known also as complex polarization propagator TDDFT (CPP-TDDFT), is a simple two-step process

respect --scf --inp=my-input-file --nt=4 --scratch=/path/to/scratch/directory
respect --cpp --inp=my-input-file --nt=4 --scratch=/path/to/scratch/directory

The first call of respect with the argument --scf performs the self-consistent field (SCF) optimization of ground-state molecular orbitals, which is a necessary prerequisite for the following property calculation. The second call of respect with the argument --cpp actually performs the DR-TDDFT ECD simulation.

The other arguments mandatory to respect are

  • --inp
    specifies a name of the input file;

  • --nt
    specifies the number of physical cores required for parallel execution;

  • --scratch
    specifies a path to the scratch directory.

The input file my-input-file.inp should contain the input block scf: with some SCF-specific keywords, and the input block cpp: with some ECD-specific keywords. A comprehensive list of all keywords can be found for SCF here and for ECD here. A simple example of my-input-file.inp looks like

#SCF section
#DFT calculation of H2O2 molecule, employing the relativistic 2c
#amfX2C Hamiltonian, PBE0 functional and uncontracted cc-pvdz basis
scf:

    geometry:
       H
       O  1  0.950
       O  2  1.474  1  94.8
       H  3  0.950  2  94.8  1  115.5

    method: ks-amfX2C/pbe0

    basis:
          H: ucc-pvdz
          O: ucc-pvdz

    charge:        0
    multiplicity:  1
    maxiterations: 30
    nc-model:      gauss
    convergence:   1.0e-6


#DR-TDDFT section
cpp:
    property:      ecd
    maxiterations: 30
    convergence:   1.0e-4

    units:       ev
    damping:     0.1
    frequencies: 6.0 81x0.1  #81 frequency points with step 0.1 starting from 6.0 eV

Final output data from the DR-TDDFT calculation are saved in file my-input-file.out_cpp. Of relevance for ECD are CD intensities, which are listed for all user-selected frequency points in the last column of a table at the bottom of the output file

Freq           Freq          Real part      Imag part         ORD               ECD
[au]           [eV]             [au]           [au]     [deg/(dm g cm^-3)]   [L/(mol cm)]
-----------------------------------------------------------------------------------------
0.22050        6.00000        0.75849       -0.20363       -31799.5           0.88021
0.22417        6.10000        0.63574       -0.09867       -27097.2           0.43359
0.22785        6.20000        0.56608       -0.04726       -24523.7           0.21110
0.23152        6.30000        0.53063       -0.01533       -23358.7           0.06959
0.23520        6.40000        0.52055        0.01015       -23278.8          -0.04682
.....................................................................................
0.49979       13.60000        0.27905        0.47256       -26517.7          -4.63000
0.50347       13.70000        0.77020        0.71672       -73729.0          -7.07392
0.50714       13.80000        1.50100        1.32841      -144736.4         -13.20680
0.51082       13.90000        2.52752        3.09320      -245485.9         -30.97497
0.51449       14.00000        1.36618        8.24152      -133645.4         -83.12332

These data can be used to plot the final ECD spectrum. For instance, the simple Linux command grep and the gnuplot program can be used to extract the table and to visualize the ECD spectrum.

grep -A87 'Final isotropic' my-input-file.out_cpp | tail -n +8 > spectrum.out
gnuplot -e "set xlabel 'Freq [ev]'; set ylabel 'ECD[L/(mol*cm)]'; plot 'spectrum.out' using 2:6 smooth mcspline w lines; pause -1" 

ECD

Finally, note that 81 frequencies from the example above will be treated together. Having more points helps the convergence and enables to cover the whole spectral region of interest. However, adding more points makes the calculation run longer and require more memory, while the convergence is not markedly improved beyond a certain number of points. Therefore, it is recommended to find some compromise and partition the spectral region into several smaller ones containing e.g. 20 to 50 points, and run these few calculations in parallel.

Finally, there are several important aspects associated with the input syntax, namely

  • the input is case-insensitive
    This means that the program does not distinguish between uppercase and lowercase letters.

  • the input is insensitive to the number of blank lines and/or comment lines
    All comments begin with the number sign (#), can start anywhere on a line and continue until the end of the line.

  • the input is compliant with the dictionary syntax of the YAML markup language
    This means that each input line is represented either by a single block: statement or by a simple keyword:value pair, such as

  • block1:
        keyword1: value1 
        keyword2: value2  
        ...
        block2: 
          keyword3: value3
          keyword4: value4
          ...
        block3: 
               keyword5: value5
               keyword6: value6
               ...
    

    It is essential to remember that all members of one block: are lines beginning at the same indentation level. Whitespace indentation is used to denote the block structure; however, tab characters are never allowed as indentation. The only exception to the YAML-based input syntax is the block geometry: which utilizes a simple xyz format for the molecular geometry specification.


TIPS & TRICKS

Q: How to scale the speed of light in the DR-TDDFT calculation?

Set the cscale option in the SCF calculation. The scaling value is then automatically transferred to the DR-TDDFT calculation.

Q: Is it possible to scale spin-orbit interaction in the DR-TDDFT calculation?

No. Currently this feature is not supported.

Q: Is there a way to launch DR-TDDFT calculations without the need to explicitly setup the scratch path by "--scratch=/path/to/scratch/directory"?

Yes, the argument "--scratch=/path/to/scratch/directory" can be saved to the file .respectrc in your home directory. If both the file and the command line argument exist, then ReSpect takes the scratch directory setting from the command line.

Q: How to restart a DR-TDDFT calculation?

DR-TDDFT calculations can be restarted simply by creating the symbolic link to the data file of the previous job

ln -sf my-old-job.50 my-new-job.50

and by adding an extra argument --restart to the command line when restarting new job

respect --cpp --inp=my-new-job --nt=4 --scratch=/path/to/scratch/directory --restart

The restart process build on the previously converged or uncoverged solution and starts new iteration cycle. If nothing was stored during a previous calculation (e.g. a job time out occured before it got to the given cartesian component), a calculation will start from the standard initial guess

Q: Is it possible to recover a DR-TDDFT job from a scratch directory?

If the ReSpect job for any reason fails and the scratch directory is still accessible, it is possible to recover the failed calculation. After running the command

respect --recover-job=/path/to/scratch/directory

file respect_checkpoint_file.50 will be created in the current directory. Using this file, you can now restart the DR-TDDFT calculation as described in the tip How to restart a DR-TDDFT calculation?.


Latest Posts


Useful Links

Our Contacts

Hylleraas Centre
Department of Chemistry
UiT The Arctic University of Norway
Tromsø, NO-9037 Norway
Email: info@respectprogram.eu