AI2PS: calculating spectral function for Cu

Note: ‘AI2PS/' denotes location of AI2PS directory


Set up ABINIT with temporary patch. In AI2PS/src, there is a script called AIpatch that will patch a subroutine in ANADDB (prints extra output). To run this script, simply supply the location of the ABINIT source code directory:

$ cd AI2PS/src                  .

$ ./AIpatch /path/to/abinit-7.0.x

The script will print out a message explicitly stating what changes were made. Once that’s done, recompile ABINIT.

$ cd /path/to/abinit-7.0.x

$ make                   .

Set up (standalone) DMDW:

$ cd /path/to/DMDW

$ make           .

Compile AI2DYM, the data translation tool that connects ABINIT to DMDW. In AI2PS/src, there is a Fortran 90 routine called ai2dym.f90, which needs to be compiled:

$ cd AI2PS/src             .

$ ifort -o ai2dym ai2dym.f90


Now, everything should be set to use AI2PS. Go to the Cu directory in the examples directory

$ cd AI2PS/examples/Cu

There are two subdirectories--input and expected_ouput

Copy the input files to the current directory (AI2PS/examples/Cu)

$ cp input/* .

Edit the control script driveCu.pbs as necessary for your machine.

$ TEXT_EDITOR driveCu.pbs

The file is set up to run on our own cluster using MPI. It is organized as follows:

Other than the PBS-related lines, lines 12-37 are generally the key lines to edit.

Once the driveCu.pbs script is set up for your machine, submit the job. Using PBS:

$ qsub drive.pbs


This example is set up to be very short and rough. Using 4x16 processors on our cluster, this example runs in about 8-10 minutes.


Once finished, there will be a new subdirectory for each segment of the run:

$ ls                                                             .

0_input        3_dynmat                   Cu.sout          uber.in

1_abinit       4_vibes_16p_0.3meV_300.0K  driveCu.pbs            .

29-Cu.LDA.fhi  4_vibes_16p_0.3meV_3.0K    expected_output        .

2_anaddb       Cu.serr                    input                  .

Note that there are multiple subdirectories for the 4th and final part--DMDW. Each set of parameters has its own subdirectory, denoted by the choice for (1) number of Lanczos poles, (2) quasiparticle energy, and (3) temperature.

In each of the DMDW subdirectories, the calculated electron spectral function is in the file called Akw.dat. The top of the file shows a key for the columns, which give energy versus A as both magnitude/phase and real/imaginary parts.

Plotting energy versus spectral function A (magnitude) for both temperatures gives the following:

This plot can be found in AI2PS/examples/Cu/expected_output, along with an archive of the files generated by running this example (minus some very large files generated by ABINIT).