RT-TDSCF Tutorial

Running a RT-TDSCF simulation is a simple two-step process

/path/to/ReSpect/respect --scf   --inp=my-input-file --scratch=/path/to/scratch/directory
/path/to/ReSpect/respect --tdscf --inp=my-input-file --scratch=/path/to/scratch/directory

The first call of respect with the argument --scf starts a time-independent SCF calculation, which is a necessary prerequisite for the following RT-TDSCF calculation. The second call of respect with the argument --tdscf actually starts the RT-TDSCF simulation, the result of which can be further post-processed and visualized by a script spectrum.py provided with the ReSpect installation (see text below for more details).

The other arguments mandatory to respect are

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

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

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

#non-relativistic 1c Hartree-Fock calculation of H2O molecule

        O    0.000000    0.000000    0.000000
        H    0.000000    0.000000    0.940000
        H    0.903870    0.000000   -0.258105

    method: hf
    basis:  ucc-pvdz

    charge:        0
    multiplicity:  1
    nc-model:      point
    maxiterations: 30
    convergence:   1.0e-7

#RT-TDSCF calculation with a delta-type external field
#of amplitude 0.001 [a.u.] and x-direction
       spectroscopy:     eas
       time-steps:       2000 x 0.5
             model:      delta
             amplitude:  0.001
             direction:  1.0 0.0 0.0

There are several important aspects associated with the RT-TDSCF simulations, namely

  • it is necessary to perform three indipendent RT-TDSCF simulations with the external field oriented along three perpendicular Cartesian directions
    The easiest way to accomplish this requirement is to set the keyword direction: in the input block tdscf: to an unit vector along the x-axis as

  • direction:  1.0  0.0  0.0

    or to an unit vector along the y-axis as

    direction:  0.0  1.0  0.0

    or to an unit vector along the z-axis as

    direction:  0.0  0.0  1.0

    and rerun the RT-TDSCF simulation for each direction. Importantly, save the TDSCF output files with specific suffixes -- _x.out_tdscf for x-direction, _y.out_tdscf for y-direction, and _z.out_tdscf for z-direction. These name-specific files are required for a final post-processing of the time-domain signal and visualisation of spectra (see next point).

  • final post-processing of time-domain signals and visualisation of spectra using the script spectrum.py
    After having the three TDSCF outputs files, for instance named as my-output_x.out_tdscf, my-output_y.out_tdscf, and my-output_z.out_tdscf, the final electron absorption spectrum (eas) can be obtained by running

  • /path/to/ReSpect/util/spectrum.py --files=my-output --spectroscopy=eas --plot

    In addition to the spectral plot, the script will also generate two files; my-output.out_spectrum_eas containing all datapoints of the frequency domain spectrum and my-output.out_peaks_eas containing datapoints above the threshold 10-7 and information about the post-processing settings, relevant physical constants, and spectral resolution. All arguments to the script spectrum.py can be listed by the command

    /path/to/ReSpect/util/spectrum.py --help

There are several important and worth-to-remember 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  
          keyword3: value3
          keyword4: value4
               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.


Q: How to scale the speed of light in the RT-TDSCF calculation?

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

Q: Is it possible to scale spin-orbit interaction in the RT-TDSCF calculation?

No. Currently this feature is not supported.

Q: Is there a way to launch RT-TDSCF 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 set the number of processors for parallel RT-TDSCF calculations?

For OpenMP parallel calculations, the number of processors can be controlled from the command line by the argument --nt=N, where N ideally refers to the total number of physical cores of a machine. Thus, the command line for launching an OpenMP parallel RT-TDSCF job reads

/path/to/ReSpect/respect --nt=N --tdscf --inp=my-input-file

Note, however, we have assumed here that the scratch path is setup through the file .respectrc (see the previous discussion).

Q: How to restart a RT-TDSCF calculation?

RT-TDSCF 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

/path/to/ReSpect/respect --tdscf --inp=my-new-job --restart

The restart process collects and prints to the output file my-new-job.out_tdscf all relevant RT-TDSCF data generated in the previous run.

Q: Is it possible to recover a RT-TDSCF 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

/path/to/ReSpect/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 RT-TDSCF calculation as described in the tip How to restart a RT-TDSCF 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