How to use Yambo:advanced usage: Difference between revisions

From The Yambo Project
Jump to navigation Jump to search
(Created page with "===Production example=== '''CECAM students: Skip this and return to the First steps tutorial.''' Here is an example of how to combine several command line options. Starti...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
===Production example===
This module presents examples of more advanced usage of the Yambo command line interface.
'''CECAM students: Skip this and return to the [[First steps]] tutorial.'''
== Prerequisites ==
'''Previous modules'''
* Initialization for [[Bulk_material:_h-BN|bulk hBN]].


Here is an example of how to combine several command line options. Starting from the usual folder containing the ''SAVE'', do
'''You will need''':
  $ mkdir TEST
* The <code>SAVE</code> databases for bulk hBN ('''Download here''')
  $ cd TEST
* The <code>yambo</code> executable
 
==Lowercase options: 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 <code>ns.db1</code> database.
% BndsRnXd
    1 | 100 |                # [Xd] Polarization function bands
%
Change these values to <code>  8 |  9  | </code>, 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 <code>yambo.in</code> file.
 
Now run the calculation. To keep things neat, add the <code>-J TEST1</code> 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 ''TEST1'' folder, you will see several new databases:
$ ls TEST1
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 -J TEST1 -o c
Looking inside the input file you will find:
% BndsRnXd
  8 |  9 |                  # [Xd] Polarization function bands
%
Here, Yambo has read from the <code>ndb.dip_iR_and_P</code> 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.
 
==Uppercase options: 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''
  $ yambo -F yambo.in_IP -I ../ -C q100 -J 3Ry -V RL -o c      ''and change to''
  FFTGvecs= 3            Ry    # [FFT] Plane-waves
  FFTGvecs= 3            Ry    # [FFT] Plane-waves
Line 21: Line 58:
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.
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.
Of course, it is up to the user to decide which options they like best.
== Links ==
* [[Tutorials|Back to tutorials menu]]

Latest revision as of 14:30, 30 March 2017

This module presents examples of more advanced usage of the Yambo command line interface.

Prerequisites

Previous modules

You will need:

  • The SAVE databases for bulk hBN (Download here)
  • The yambo executable

Lowercase options: 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 TEST1 folder, you will see several new databases:

$ ls TEST1
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 -J TEST1 -o c

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.

Uppercase options: 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.

Links