Input file generation: Difference between revisions
No edit summary |
No edit summary |
||
Line 34: | Line 34: | ||
-a :ACFDT Total Energy | -a :ACFDT Total Energy | ||
Note that multiple options can be used together (in some cases this is actually a necessity). For instance: | Note that multiple options can be used together (in some cases this is actually a necessity). For instance: | ||
yambo -o c -k hartree Calculate optical spectra including local field effects (Hartree approximation) | $ yambo -o c -k hartree Calculate optical spectra including local field effects (Hartree approximation) | ||
yambo -x -g n -p p Perform a Hartree-Fock and GW calculation using a plasmon-pole approximation | $ yambo -x -g n -p p Perform a Hartree-Fock and GW calculation using a plasmon-pole approximation | ||
After launching Yambo with a lowercase option, Yambo will generate an appropriate input file (default name: <code>yambo.in</code>) and launch the <code>vi</code> editor. (Editor choice can be changed at configure; alternatively you can use the <code>-Q</code> run time option). | After launching Yambo with a lowercase option, Yambo will generate an appropriate input file (default name: <code>yambo.in</code>) and launch the <code>vi</code> editor. (Editor choice can be changed at configure; alternatively you can use the <code>-Q</code> run time option). | ||
Line 41: | Line 41: | ||
== Choosing input parameters == | == Choosing input parameters == | ||
Yambo will also read various parameters from existing database files and/or input files and use them to suggest values or ranges. | Yambo will also read 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. | Let's illustrate this by calculating the static screening for bulk hBN. | ||
cd YAMBO_TUTORIALS/hBN/YAMBO | $ cd YAMBO_TUTORIALS/hBN/YAMBO | ||
yambo ''(initialize, if you haven't already done so)'' | $ yambo ''(initialize, if you haven't already done so)'' | ||
yambo -b | $ 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. | 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 | % BndsRnXd | ||
Line 50: | Line 50: | ||
% | % | ||
Change these values to <code> 8 | 9 | </code>, save and exit the editor. Now launch the input file generator again: | Change these values to <code> 8 | 9 | </code>, save and exit the editor. Now launch the input file generator again: | ||
yambo -b | $ yambo -b | ||
and notice that your chosen values remain: they are simply read from the <code>yambo.in</code> file. Now run the calculation | and notice that your chosen values remain: they are simply read from the <code>yambo.in</code> file. | ||
yambo | |||
Now run the calculation. To keep things neat, add the '''-J TEST''' option, which directs all output to a directory '''TEST''' - this will be explained in the next section. | |||
$ yambo -J TEST | |||
After a few seconds, the code finishes. If you now look inside the SAVE folder, you will see several new databases: | After a few seconds, the code finishes. If you now look inside the SAVE folder, you will see several new databases: | ||
$ ls | $ ls TEST | ||
'''ndb.dip_iR_and_P''' '''ndb.em1s''' ns.gops ns.kindx [...] | |||
Delete the input file <code>yambo.in</code>, and generate the input file for a different task: optical response in the independent particle approximation. | Delete the input file <code>yambo.in</code>, and generate the input file for a different task: optical response in the independent particle approximation. | ||
$ rm yambo.in | $ rm yambo.in | ||
$ yambo -o c | $ yambo -o c -J TEST | ||
Looking inside the input file you will find: | Looking inside the input file you will find: | ||
% BndsRnXd | % BndsRnXd |
Revision as of 11:05, 28 March 2017
In this tutorial you will learn how to generate and modify an input file with Yambo.
Prerequisites
Previous modules
- Initialization for bulk hBN.
You will need:
- The
SAVE
databases for bulk hBN (Download here) - The
yambo
executable
Launch the input file generator
Yambo generates its own input files: you just tell the code what you want to calculate by launching Yambo along with one or more lowercase options. (Uppercase options are considered in the following section).
To see the list of runlevels and options, run yambo -h
or better,
$ yambo -H Tool: yambo 4.1.2 rev.14024 Description: A shiny pot of fun and happiness [C.D.Hogan] [Upper case options] -i :Initialization -o <opt> :Optics [opt=(c)hi is (G)-space / (b)se is (eh)-space ] -k <opt> :Kernel [opt=hartree/alda/lrc/hf/sex] -y <opt> :BSE solver [opt=h/d/(p/f)i] (h)aydock/(d)iagonalization/(i)nversion -r :Coulomb potential -x :Hartree-Fock Self-energy and local XC -d :Dynamical Inverse Dielectric Matrix -b :Static Inverse Dielectric Matrix -p <opt> :GW approximations [opt=(p)PA/(c)HOSEX] -g <opt> :Dyson Equation solver [opt=(n)ewton/(s)ecant/(g)reen] -l :GoWo Quasiparticle lifetimes -a :ACFDT Total Energy
Note that multiple options can be used together (in some cases this is actually a necessity). For instance:
$ yambo -o c -k hartree Calculate optical spectra including local field effects (Hartree approximation) $ yambo -x -g n -p p Perform a Hartree-Fock and GW calculation using a plasmon-pole approximation
After launching Yambo with a lowercase option, Yambo will generate an appropriate input file (default name: yambo.in
) and launch the vi
editor. (Editor choice can be changed at configure; alternatively you can use the -Q
run time option).
Choosing input parameters
Yambo will also read 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 TEST option, which directs all output to a directory TEST - this will be explained in the next section.
$ yambo -J TEST
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 ns.gops ns.kindx [...]
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 TEST
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.