How to use Yambo:advanced usage

From The Yambo Project
Revision as of 14:27, 30 March 2017 by Conor (talk | contribs)
Jump to navigation Jump to search

Here are some examples of more advanced usage of the Yambo command line interface.

Input file generation

Yambo reads various parameters from existing database files and/or input files and use them to suggest values or ranges. Let's illustrate this by calculating the static screening for bulk hBN.

$ cd YAMBO_TUTORIALS/hBN/YAMBO
$ yambo        (initialize, if you haven't already done so)
$ yambo -b

and look at the generated input file. Inside you will see a suggested range of bands, which Yambo guesses from the core ns.db1 database.

% BndsRnXd
   1 | 100 |                 # [Xd] Polarization function bands
%

Change these values to 8 | 9 | , save and exit the editor. Now launch the input file generator again:

$ yambo -b

and notice that your chosen values remain: they are simply read from the yambo.in file.

Now run the calculation. To keep things neat, add the -J TEST1 option, which directs all output to a directory TEST1.

$ yambo -J TEST1

After a few seconds, the code finishes. If you now look inside the SAVE folder, you will see several new databases:

$ ls TEST
ndb.dip_iR_and_P ndb.em1s [...]

Delete the input file yambo.in, and generate the input file for a different task: optical response in the independent particle approximation.

$ rm yambo.in
$ yambo -o c -J TEST1

Looking inside the input file you will find:

% BndsRnXd
 8 |  9 |                   # [Xd] Polarization function bands
%

Here, Yambo has read from the ndb.dip_iR_and_P database and suggests to use the previous values. If at this stage, you decide to change these values (increase the range), Yambo will recompute the relevant database.

Command line options

Here is an example of how to combine several uppercase command line options. Starting from the usual folder containing the SAVE, do

$ mkdir TEST2
$ cd TEST2
$ yambo -F yambo.in_IP -I ../ -C q100 -J 3Ry -V RL -o c      and change to
FFTGvecs= 3            Ry    # [FFT] Plane-waves
$ yambo -F yambo.in_IP -I ../ -C q100 -J 3Ry -V RL 

You will notice

<---> [WF] Performing Wave-Functions I/O from ..//SAVE
<---> Dipoles: P and iR (T): |########################################| [100%] --(E) --(X)

with the ndb.dip_iR_and_P databases written in 3Ry, and output files inside the folder q100. Now select a different q-component and run again:

$ yambo -F yambo.in_IP -I ../ -C q001 -J 3Ry -V RL -o c      and change to
% LongDrXd
0.000000 | 0.000000 | 1.000000 |        # [Xd] [cc] Electric Field
%
$ yambo -F yambo.in_IP -I ../ -C q001 -J 3Ry -V RL 

For this run, yambo reads the database from the 3Ry folder, does a quick calculation, and writes the outputs inside q001.

The overall result is very neatly organised. Remember to check the report file to verify which databases are being WR = written to and RD = read from. Of course, it is up to the user to decide which options they like best.