Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature documentation #46

Open
wants to merge 594 commits into
base: bug-fixes
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
594 commits
Select commit Hold shift + click to select a range
5a3f439
Merge with 2022-yambo-school
Mar 31, 2022
d77bb86
scripts tuotrial qepy and qp-gw
Mar 31, 2022
5466ef9
Removed outdated files
Mar 31, 2022
12e5aab
Merge branch 'master' of github.com:yambo-code/yambo-whypy-devel
Mar 31, 2022
0d4dc7e
removed temporary file
Mar 31, 2022
8c36708
flow works directly. duplicate files removed
Mar 31, 2022
4395543
Merge branch 'master' of https://github.com/yambo-code/yambo-whypy-de…
Mar 31, 2022
8ffa7bc
fix to setup.py which was not including flows
Mar 31, 2022
f7f0990
Small change in elph_plot.py
Mar 31, 2022
ed82ec1
Merge conflicts resolved. This is yambopy v0.2.0
Mar 31, 2022
76b9f60
cleaning class
Mar 31, 2022
05a83dd
adding content qepy tutorial
Mar 31, 2022
6d7e036
Updated tutorial descriptions
Apr 1, 2022
771a822
Updated tutorial descriptions
Apr 1, 2022
239e664
Merge branch 'master' of github.com:yambo-code/yambo-whypy-devel
Apr 1, 2022
123d3bf
Imported devel-version commit 9461c7865d3c038a506fd8b00fd794c07092b9d…
Apr 1, 2022
b5e92c3
change in excitondb
Apr 12, 2022
246eeca
Merge branch 'master' of https://github.com/yambo-code/yambo-whypy-de…
Apr 12, 2022
893f1ad
support for merging db
Apr 12, 2022
635bca8
small fix in gkkp.py
Apr 12, 2022
ecbe33a
Merge branch 'master' of github.com:yambo-code/yambopy
Apr 12, 2022
f896ea3
revert fix; problem with merge
Apr 12, 2022
061247d
o
Apr 12, 2022
89cbfbc
Merge branch 'master' into devel-aiida-parsing
Apr 13, 2022
29a3623
NEW FEATURE: excphondb class to treat exciton-phonon data from yambo-…
Apr 14, 2022
dd19e7a
Added YamboBZgrids class to read ndb.kindx (i.e., qindx_XBSC)
Apr 14, 2022
abff1bd
Corrected small bug in function energy_gaps of YamboElectronsDB
Apr 20, 2022
a93a360
bf
Apr 20, 2022
a0eaa69
My first commit on WhyPy, a new function to write atoms
attacc Apr 22, 2022
86d3abc
NEW FEATURE: class ExcitonDispersion (yambopy/bse) to treat Q-depende…
Apr 22, 2022
e0bec82
little fixing in exciton parsing
Apr 24, 2022
b86623f
Merge branch 'devel-aiida-parsing' of https://github.com/yambo-code/y…
Apr 24, 2022
0610d33
expansion of gkkp using qindx_C
Apr 26, 2022
3c72a4c
try except for finite q in get_chi... temporaryø
May 8, 2022
1549120
spin polarization in exciton band structure
May 16, 2022
becf074
fixed bug introduced before
May 16, 2022
d69a391
Added symmetry reading and kpoints and eigenvalue expansion in pwxml
May 26, 2022
81c1c4e
Added kpt and energies BZ-expansion in qepy/pwxml
May 26, 2022
e3dcadc
smal fix
May 26, 2022
130f8a3
small fix
May 26, 2022
4b35e30
qp dbs for spin polarized
May 26, 2022
19c0c0d
refining qp for spin-polarized systems
May 27, 2022
90ff490
fixing small things in spin-polarized exciton and qp dbs
May 27, 2022
6871130
Merge branch 'master' of github.com:yambo-code/yambopy-devel
May 27, 2022
0d0ab02
Fixed possible bug in qpdb
May 27, 2022
26f8d71
Added a generic 2D plotter to transform_matrix_element
May 27, 2022
a836c6d
Merge branch 'master' of github.com:yambo-code/yambopy-devel
May 27, 2022
8fd8247
Small bug fixes and improvements in exciton-related plots; added brav…
May 31, 2022
14de64c
Small bug fixes and improvements in exciton-related plots; added brav…
May 31, 2022
74920b3
bug in reading em1s database
Jun 1, 2022
af2ec1b
new plot options in em1s
Jun 2, 2022
b8bab1a
Merge branch 'master' of github.com:yambo-code/yambopy-devel
Jun 2, 2022
78d4e19
Implemented scissor shift in bandstructure.py (nspin=1 case)
Jun 6, 2022
a1308c5
Merge branch 'master' of github.com:yambo-code/yambopy-devel
Jun 6, 2022
b6975f2
Implemented scissor shift in bandstructure.py (nspin=1 case)
Jun 6, 2022
6c74c06
Fixed bug in xml kpoint expansion
Jun 6, 2022
826fcc6
Fixed bug in xml kpoint expansion
Jun 6, 2022
ea7ab5b
Fixed missing time reversal in symmetry expansion of pwxml
Jun 9, 2022
3b671b0
Fixed missing time reversal in symmetry expansion of pwxml
Jun 9, 2022
3ad0269
Merge branch 'master' into aiida-parsing
Jun 10, 2022
08e9f01
Changed version number
Jun 10, 2022
e245d58
Changed version number
Jun 10, 2022
384e252
Starting branch to read upf
Jun 20, 2022
363ad12
Implemented interface to upf pseudos in qepy. Local and nonlocal part…
Jun 20, 2022
5b37ac8
added PP submodule
Jun 20, 2022
c38392f
MergeQP now works also in spin-polarised case
Jun 29, 2022
312be0b
MergeQP now works also in spin-polarised case
Jun 29, 2022
d253bbd
Fixed bug in supercell.py using python version >3.8 [ISSUE #36]
Jul 15, 2022
70a8248
Updated excphondb to new ndb.excph PARS variable
Aug 29, 2022
10bfef5
Fixed bug in get_fermi related to eigenvalues having spin axis also i…
Oct 18, 2022
916f869
Fixed bug in get_fermi related to eigenvalues having spin axis also i…
Oct 18, 2022
45d3b94
changes in update_serial
Oct 18, 2022
8248ae0
Merge branch 'PP_reader'
Oct 18, 2022
b9b3c98
fixed bug for command-line options defined in recipes, which were not…
Oct 18, 2022
baa7388
Merge branch 'master' of github.com:yambo-code/yambopy-devel
Oct 18, 2022
2d874f7
fixed bug for command-line options defined in recipes, which were not…
Oct 18, 2022
6f2431a
Added commmand 'phinp' to generate ph.x input with qpoints coordinate…
Nov 17, 2022
78887e4
Updated YamboWFDB. SOC supported in reading wfcs
Nov 26, 2022
f1a5e8a
Updated YamboWFDB. SOC supported in reading wfcs
Nov 26, 2022
419664c
improvement of excitondb. Added GW energies in interpolated exciton b…
Dec 4, 2022
67b4451
Merge branch 'master' of github.com:yambo-code/yambopy-devel
Dec 4, 2022
7eb6ae1
Fixed yambo website
sangallidavide Dec 14, 2022
1658896
Merge branch 'master' into aiida-parsing
Dec 16, 2022
1de316c
bugs in excitondb and qpdb
Dec 20, 2022
a73f858
Merge branch 'master' of github.com:yambo-code/yambopy-devel
Dec 20, 2022
6d2607d
update, now gkkp works with newer devel ypp_ph versions
palful Dec 20, 2022
6adadcd
fix bug fermi level spin pol. interpolation
Dec 21, 2022
16773a4
Merge branch 'master' of github.com:yambo-code/yambopy-devel
Dec 21, 2022
09e568d
sorting GW values. Improve interpolation
Jan 11, 2023
f7fc1a8
Update README.md
palful Jan 16, 2023
b3d8382
Minor changes in electronsdb and qpdb
Feb 6, 2023
de4c830
Merge remote-tracking branch 'yambopy-devel/master' into devel
Feb 8, 2023
038b0e1
Merge remote-tracking branch 'yambopy-devel/master' into devel
Feb 8, 2023
d3f1b6d
adding import qpdb in excitondb
Mar 13, 2023
e9997dc
- Added new class YamboRefineElphDB to refine ndb.elph_gkkp_expanded …
Mar 15, 2023
491f3c2
Changes to refine_gkkp
palful Mar 18, 2023
bdbecb6
- elphondb: added support for reading databases with custom band numb…
Mar 20, 2023
a71c14b
Added transpose expansion mode to latticedb (matching yambo expansion…
Mar 21, 2023
0e4611f
Fixed issue #39 (wrong conversion in reduced coords in ExcitonDispers…
Mar 23, 2023
9db9682
add legend in spin polarized bands QE
Apr 26, 2023
15fcc64
small fix in bravais.py
May 12, 2023
b84077c
Merge branch 'master' of github.com:yambo-code/yambopy-devel
May 12, 2023
38e5c47
fixing bug in interpolate
Jun 11, 2023
429e5e9
fix bug in interpolate function
Jun 12, 2023
6895fa9
Update README.md
palful Jun 20, 2023
5cee45f
bug spotted by Lorenzo https://www.yambo-code.eu/forum/viewtopic.php?…
Jun 20, 2023
96ee0d8
bug spotted by Lorenzo https://www.yambo-code.eu/forum/viewtopic.php?…
alexmoratalla Jun 20, 2023
378c228
Adding cofactor to IPA dipolesdb for testing
Jun 21, 2023
21ab9f3
Merge branch 'master' of github.com:yambo-code/yambopy-devel
Jun 21, 2023
807c127
Update README.md
palful Jun 22, 2023
1c8f628
Update README.md
palful Jun 22, 2023
1eb842a
Update README.md
palful Jun 22, 2023
3f27213
Update README.md
palful Jun 22, 2023
cdb49ce
Updates to em1sdb: compute asymmetrical epsilon, computed q-space (tr…
Jun 26, 2023
33a1949
Included new class to expand em1s
Jun 26, 2023
ab7447c
Large updated involving IP absorption and merging R. Reho's developments
Jun 27, 2023
aa824cf
failed attempt at discovering cofactors in IPA case
Jun 27, 2023
fd34a0f
Merge branch 'master' into devel-em1s
Jun 28, 2023
3599ad8
- Started developing database output for expanded em1s
Jun 29, 2023
262e297
Finished class. Included saving to netcdf ndb.em1s+fragments for yamb…
Jun 30, 2023
bb98c21
Added file for command line option to convert from RL to Ry
Jun 30, 2023
808619f
Final testing complete. Branch ready for merge.
Jul 3, 2023
4ae32b6
Updated docstring of YamboEm1sRotate including usage case
Jul 3, 2023
608189b
Update README.md
palful Jul 3, 2023
3161d83
Update README.md
palful Jul 3, 2023
91d473a
Merge remote-tracking branch 'yambopy-devel/master' into devel
Jul 3, 2023
dc41dfd
Merge branch 'devel'
Jul 3, 2023
23a2155
Now k-point expansion in latticedb is consistent with yambo expansion…
Jul 3, 2023
80ae94b
Fixed some bugs related to compatibility with python 3.10 and setup w…
Jul 4, 2023
a07cc00
Started branch to move yambopy installation from setuptools to pip.
Jul 4, 2023
23008dd
Fixed bug in k-point expansion (Issue #44)
Jul 7, 2023
9e4aadd
Fix for issue #44 importend in expand_kpoints in em1s_rotate.py
Jul 10, 2023
d4c24b0
Update README.md
palful Jul 11, 2023
b296702
Fixed Issue #43
Jul 11, 2023
06ed747
Merge branch 'master' of github.com:yambo-code/yambopy
Jul 11, 2023
d3e80cb
Replaced np.int with int in convert script as it was causing python 3…
Jul 20, 2023
bdcb516
Fixed bug in mergeqp for newer python versions, where empty elements …
Aug 24, 2023
9ab136e
- Updated kqgridsdb.py after a change in variable names in ndb.kindx
Oct 5, 2023
2d7c98e
Merge branch 'bug-fixes'
Oct 5, 2023
f0d65f2
Implemented class YamboQPRotate to expand ndb.QP databases from IBZ t…
Oct 9, 2023
c271db2
Merge branch 'bug-fixes'
Oct 9, 2023
cc003e5
Imported stuff to yambopy
attacc Oct 18, 2023
5c670bc
Imported last changes
attacc Oct 18, 2023
b684b0a
Added two tutorials
attacc Oct 18, 2023
3254372
Fixed time range
attacc Oct 19, 2023
d894485
- Merged nonlinear optics database: new
Oct 20, 2023
0a93f71
Merge branch 'master' into pip_installer
Oct 23, 2023
dc12e4b
fixed bug in setup.py
Oct 23, 2023
4d3d6a0
fixed bug in setup.py
Oct 23, 2023
27c77ad
Merge branch 'master' into pip_installer
Oct 23, 2023
abb1e7b
small fix
Oct 23, 2023
7b09242
Improve plotting function
attacc Nov 14, 2023
ebd59cc
Small typos
attacc Nov 14, 2023
2f57d00
New tools for HHG
attacc Nov 14, 2023
7daa5d7
Added file to the import
attacc Nov 14, 2023
a2a92a6
Work in progress
attacc Nov 14, 2023
846ca7b
Work in progess
attacc Nov 14, 2023
07ecc3e
Removed wrong plotting line
attacc Nov 15, 2023
a19802c
Merge pull request #1 from attacc/nonlinear
attacc Nov 22, 2023
bf9e29e
Merge pull request #2 from attacc/master
palful Nov 24, 2023
b4ee627
Update README.md
palful Nov 24, 2023
0bf1b95
Added support for spin-polarized calcualation to the
Nov 24, 2023
216dc6c
Merge branch 'generate_bands'
Nov 24, 2023
429ddab
Added a couple of comments to projwfcxml.py to clarify usage
Dec 4, 2023
5cd2ec4
Merge branch 'bug-fixes'
Dec 4, 2023
f9bd090
Fixed issue for labels in function plot_eigen of projwfcxml
Dec 4, 2023
a6e21df
Merge branch 'bug-fixes'
Dec 4, 2023
443b7de
Correctly identify nspin value in dipolesdb
Dec 15, 2023
d6c1d40
Fixed pip installation
Dec 20, 2023
b5b5acf
merge with master
Dec 20, 2023
0665bbc
Update README.md
palful Dec 20, 2023
a004ecb
Merge branch 'master' into pip_installer
Dec 20, 2023
0979b28
updated README.md
Dec 20, 2023
2fd37f0
Merge branch 'bug-fixes'
Dec 20, 2023
20302b5
Added updated addqp functionality (working with current ndb.QP databa…
Dec 21, 2023
a5acd4c
- Imported abipy SkwInterpolator class. This removes yambopy's
Jan 12, 2024
eb1bc9e
Added acknowledgments
Jan 12, 2024
9fc5251
Fixed bugs messing up visualization of bands plots (also in the tutor…
Jan 12, 2024
3eaa1d2
updated licence
Jan 12, 2024
39a1bf1
logo added
Jan 12, 2024
8aa9345
updated readme
Jan 12, 2024
1cbf65a
updated logo
Jan 12, 2024
94ec87d
Update README.md
palful Jan 12, 2024
10e3679
Added support for Hubbard correction to PwIn
Jan 18, 2024
ff11853
streamlined small issues in pw.py
Jan 19, 2024
86d4310
Merge branch 'bug-fixes'
Jan 19, 2024
b00ad02
cleaning unneeded file
Jan 19, 2024
2048247
Merge branch 'master' into aiida-parsing
Jan 19, 2024
f2d1d54
Completed merging of aiida-parsing branch
Jan 19, 2024
2464c2f
Update README.md
palful Jan 19, 2024
61eeb11
Update README.md
palful Jan 20, 2024
ca2f021
Merge branch 'master' into pip_installer
Jan 22, 2024
a6dad90
elphondb now reads the IBZ kpoints from header DB
Jan 25, 2024
6d866ea
Added the possibility to loop on angles
attacc Jan 26, 2024
147d1ea
Fixed variable
attacc Jan 26, 2024
0ccb2d3
Merge pull request #4 from attacc/master
palful Jan 26, 2024
45d27cf
Merge branch 'master' into pip_installer
Jan 29, 2024
94ba572
updated dependency on pyproject.toml
Jan 29, 2024
79bdd28
small changes after testing
Jan 29, 2024
b0071cd
Reorganization of subpackages imported_modules, command_line, scripts in
Jan 29, 2024
70c1224
finished removing old files
Jan 29, 2024
95eca47
Merge branch 'bug-fixes' into pip_installer
Jan 29, 2024
51300ec
Fixed broken imports
Jan 29, 2024
eae35fb
fixed import
Jan 29, 2024
e8b4001
fixed import
Jan 29, 2024
0d7515d
Switched back to setuptools as backend for building the distribution
Jan 29, 2024
e6c5583
updated version to 0.2.6
Jan 29, 2024
b2b1674
Merge branch 'master' into pip_installer
Jan 30, 2024
f41eb4a
Added support for spin-polarised dipoles
Jan 31, 2024
a8f8a47
Updated development goals
Jan 31, 2024
d5cc09e
Updated README
Feb 1, 2024
54c8f73
Update README.md
palful Feb 1, 2024
67fcd4f
Update README.md
palful Feb 1, 2024
7c89320
Update README.md
palful Feb 1, 2024
085497f
Version updated to 0.3.0
Feb 1, 2024
88a0ab1
Updated README
Feb 1, 2024
7c6e21e
corrected typo
Feb 1, 2024
13e9134
added missing yambopy/lattice.py to __init__.py
Feb 22, 2024
bb800ce
Fixed bug in creating dimensions for netCDF4 database of rotated scre…
Feb 22, 2024
f1c23ca
debug mode set to false in call to get_path
Feb 22, 2024
ef37fa0
fixed variable dimension logic when writing rotated database
Feb 26, 2024
203a1b7
Bug Fix bsekerneldb
rreho Feb 28, 2024
c748f2c
Changed legend logic in plot_ax to avoid legend reset when user tries…
Feb 28, 2024
42dc90d
Improve reading QE input file, allow for case insenstive reading in I…
rreho Mar 13, 2024
6241df7
fixed: pw readin bug scientific notation for d+0? was not matched, al…
stevenbos123 Mar 13, 2024
6edd680
fixed regex to match d+ scientific notation
stevenbos123 Mar 14, 2024
932602c
return ibrav in get_lattice_dict
stevenbos123 Mar 18, 2024
ef35d10
Double escaped characters to avoid SyntaxWarning with python 3.12
Mar 19, 2024
5fafdd8
Fixed bug where cli script would be invoked twice
Mar 19, 2024
6f4bfc3
fixed small bug
Mar 21, 2024
ddfb1cd
Patched the static screening class in the following ways
Mar 22, 2024
3d2d9cb
Fixed missing import
Mar 22, 2024
54b7cdf
Fixed missing import
Mar 22, 2024
77fae5e
Fixed wrong sign (1-vX instead of 1+vX) in docstring
Mar 26, 2024
46f666a
1) Added different method to invert the polarization
attacc Mar 29, 2024
9d12e40
- Now YamboLatticeDB recognizes if ntyp set in QE is larger than numb…
Apr 3, 2024
2ca6e67
Merge branch 'bug-fixes'
Apr 3, 2024
e6d595d
small update
Apr 4, 2024
05fde35
Merge pull request #34 from rreho/tech-bsekerneldb
palful Apr 4, 2024
cc3a0b5
Fixed bug in .get_kernel_value_bands (spotted by Riccardo Reho)
Apr 4, 2024
25244b9
Merge branch 'bug-fixes'
Apr 4, 2024
7cd4a0a
Merge pull request #36 from yambo-code/nonlinear
palful Apr 4, 2024
8d57b5c
Merge branch 'bug-fixes'
Apr 4, 2024
38ec28b
Merge pull request #35 from rreho/tech-fixpw
palful Apr 4, 2024
1d76e6c
Merge branch 'bug-fixes'
Apr 4, 2024
1263b1b
Updated BSE part of tutorial
Apr 17, 2024
737cba6
Fixed bug where bravais_types could return NoneType object instead of…
Apr 17, 2024
285b9fd
Merge branch 'master' of github.com:rreho/yambopy
rreho Jun 26, 2024
4f72039
New files for documentation
rreho Jun 26, 2024
b67571f
Add tutorial lifetimes and python dependencies
rreho Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
323 changes: 323 additions & 0 deletions docs/source/advanced-tutorial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
Real Time Simulations (Si)
---------------------------
**by A. Molina Sánchez**

We start with the calculation of the ground state properties using the script
``gs_si.py`` in the ``tutorials/si`` folder.
We will create self-consistent data (folder ``scf``) and a non-self consistent
data (folder ``nscf``). All the real-time calculations are realized
inside the folder ``rt``.

In order to perform real-time simulations we need to perform some preliminary steps:

- Creating the files containing the electron-phonon matrix elements: We use
quantum espresso ('ph.x'). The grid used for obtaining the eletron-phonon
matrix elements must be the same than for the real-time simulations.
See in the `yambo website <http://www.yambo-code.org/>`_ more information about the methodology.

.. code-block:: bash

python gkkp_si.py

The script will create a folder ``GKKP`` inside ``rt``. ``GKKP`` contains all the electron-phonon matrix elements in the
full Brillouin zone.

- Breaking symmetries. The action of an external field breaks the symmetry of
the system. We need to break the symmetries according with the direction of
the polarization of the incident light. When we run for first time:

.. code-block:: bash

python rt_si.py

``yambopy`` check if the ``SAVE`` exists inside ``rt``. If not, it breaks the symmetries. We can select linear or circular
polarized light. The light polarization must be the same along all the calculations. Here we select a field along x-axis:

.. code-block:: bash

ypp['Efield1'] = [ 1, 0, 0] # Field in the X-direction

The circular polarized field must be set as follows:

.. code-block:: bash

ypp['Efield1'] = [ 1, 0, 0] # Circular polarization
ypp['Efield2'] = [ 0, 1, 0]

If everything is OK we have to find inside ``rt`` the folder ``SAVE`` and ``GKKP``. Now we can start the
real-time simulations. We discuss the following run levels.

**1. Collisions.**

.. code-block:: bash

yambo -r -e -v c -V all

Calculation of the collisions files. This step is mandatory to run any real-time simulation. We calculate the
matrix elements related with the electronic correlation (see
Ref. `PRB 84, 245110 (2011) <http://journals.aps.org/prb/abstract/10.1103/PhysRevB.84.245110>`_). We have
several choices for the potential approximation (we use COHSEX in this tutorial).

.. code-block:: bash

run['HXC_Potential'] = 'COHSEX' # IP, HARTREE, HARTREE-FOCK, COHSEX

The variables for the collisions are very similar to a Bethe-Salpeter (BSE) run. First, we start calculating
the static dielectric function. It follows the calculation of the Kernel components for the
electron-hole states of interest. In addition, we have several cutoffs
to be set, in a similar way than in the case of the BSE.

.. code-block:: bash

run['NGsBlkXs'] = [100,'mHa'] # Cut-off of the dielectric function
run['BndsRnXs' ] = [1,30] # Bands of the dielectric function
run['COLLBands'] = [2,7] # States participating in the dynamics.
run['HARRLvcs'] = [5,'Ha'] # Hartree term: Equivalent to BSENGexx in the BSE run-level
run['EXXRLvcs'] = [100,'mHa'] # Forck term: Equivalent to BSENGBlk in the BSE run-level
run['CORRLvcs'] = [100,'mHa'] # Correlation term: Not appearing in BSE.

In general, we use the converged parameters of the BSE to set the
variables of the collisions run. For parallel runs (see section for parallel advices) a common
recipe is to parallelize only in k points.

**2. Time-dependent with a delta pulse.**

.. code-block:: bash

yambo -q p

The delta pulse real time simulation is the equivalent to the Bethe-Salpeter equation in the time domain (if we
use the COHSEX potential). We have to set the propagation variables: (i) time interval, (ii) duration of the
simulation, and (iii) integrator. We have also to set the intensity of the delta pulse.

.. code-block:: bash

run['GfnQP_Wv'] = [0.10,0.00,0.00] # Constant damping valence
run['GfnQP_Wc'] = [0.10,0.00,0.00] # Constant damping conduction

run['RTstep'] = [ 100 ,'as'] # Interval
run['NETime'] = [ 300 ,'fs'] # Duration
run['Integrator'] = "RK2 RWA" # Runge-Kutta propagation

run['Field1_kind'] = "DELTA" # Type of pulse
run['Field1_Int'] = [ 100, 'kWLm2'] # Intensity pulse

run['IOtime'] = [ [0.050, 0.050, 0.100], 'fs' ]

The ``IOtime`` intervals specify the time interval to write (i) carriers, (ii) green's functions and (iii) output. In general,
we can set high values to avoid frequent IO and hence slow simulations. Only in the case where we need the
data to calculate the Fourier Transform (as in the case of the delta pulse, we set this variable to lower values). The constant
dampings ``GfnQP_Wv`` and ``GfnQP_Wc`` are dephasing constants, responsible of the decaying of the polarization. They are
the finite-time equivalent to the finite broadening of the Bethe-Salpeter solver (``BDmRange``).

A mandatory test to check if yambo_rt is running properly is to confront the BSE spectra with the obtained using yambo_rt (use the
script kbe-spectra.py). Observe how the KBE spectra is identical to the BSE spectra except for intensities bigger than ``1E5``. Beyond
this value we are not longer in the linear response regime.

.. image:: figures/bse-kbe-intensity.png
:height: 400px
:width: 800 px
:align: center

**3. Time-dependent with a gaussian pulse.**

.. code-block:: bash

yambo -q p

The run-level is identical for that of the delta pulse. However, we have to set more variables related with the pulse kind. In order
to generate a sizable amount of carriers, the pulse should be centered at the excitonic peaks (obtained from the delta pulse spectra).
The damping parameter determines the duration of the pulse. We can also chose linear or circular polarization (see later
the section for circular polarization). Be aware of setting the duration of the simulation accordingly with the duration of the pulse.

.. code-block:: bash

run['Field1_kind'] = "QSSIN"
run['Field1_Damp'] = [ 50,'fs'] # Duration of the pulse
run['Field1_Freq'] = [[2.3,2.3],'eV'] # Excitation frequency
run['Field1_Int'] = [ 1, 'kWLm2'] # Intensity pulse

In general, for any pulse create a population of carriers (electron-holes). One sign that simulation is running well is that the number
of electrons and holes is the same during all the simulation. Below we show the typical output for a simulation of a gaussian pulse, the number of
carriers increases until the intensity of the pulse becomes zero.

.. image:: figures/qssin-pulse.png
:height: 400px
:width: 800 px
:align: center



Besides the delta and gaussian pulse we can use others as the sin pulse. Below we have a brief summary of the three pulses, showing the
external field and the number of carriers. Observe than the sinusoidal pulse is active along all the simulation time, therefore we are always creating carriers. After certain time the number of electrons will exceed the charge acceptable in a simulation of linear response. The polarization follows the field. In the case of the delta pulse, we see a zero-intensity field and a constant number of carriers. Thus, the pulse is only active at the initial time and afterwards the polarization decays due to the the finite
lifetime given by ``GfnQP_Wv`` and ``GfnQP_Wc``.

.. image:: figures/dyn-field-pulses.png
:height: 400px
:width: 800 px
:align: center


**4. Time-dependent with a gaussian pulse and dissipation**

The Kadanoff-Baym equation implemented in yambo includes dissipation mechanisms such as (i) electron-phonon scattering, (ii) electron-electron
scattering and (iii) electron-photon scattering. In the following subsections we use a gaussian pulse with the parameters given above.

**4.1 Electron-phonon interaction**

.. code-block:: bash

yambo -q p -s p

In order to include electron-phonon dissipation, previously we need to create the electron-phonon matrix elements. We call the script
``gkkp_sii.py``. We can check

.. code-block:: bash

python gkkp_si.py

This script runs QE to calculate the matrix elements and then ``ypp_ph`` to convert them to the ``yambo`` format. If everything is right
we find a folder call ``GKKP`` inside ``rt``. ``GKKP`` contains all the electron-phonon matrix elements in the
full Brillouin zone. The variables related to the dissipation are

.. code-block:: bash

run['LifeExtrapSteps'] = [ [1.0,1.0], 'fs' ]
run['BoseTemp'] = [ 0, 'K']
run['ElPhModes'] = [ 1, 9]
run.arguments.append('LifeExtrapolation') # If commented: Lifetimes are constant

The variable ``LifeExtrapSteps`` sets the extrapolation steps to calculate the electron-phonon lifetimes. If commented, lifetimes are assumed
constants. We can set the lattice temperature with ``BoseTemp`` and the number of modes entering in the simulation ``ElPhModes``. In order
to account of the temperature effects in a realistic ways the electron and hole damping ``GfnQP_Wv`` and ``GfnQP_Wc`` should be update for
each temperature run. In most semiconductors, they are proportional to the electronic density of states. The second element of the array
multiply the density of states by the given values. For instance, we could set:

.. code-block:: bash

run['GfnQP_Wv'] = [0.00,0.10,0.00] # Constant damping valence
run['GfnQP_Wc'] = [0.00,0.10,0.00] # Constant damping conduction

Below we show the carrier dynamics simulation including the electron-phonon dissipation of electrons and holes. We have made the example for two different
temperatures. We only show the lifetimes of electrons and holes for 0 and 300 K. At each time step we show the mean value of the electron-phonon lifetime. We can observe
that increases for larger temperature (see the Electron-phonon tutorial). Moreover, when the systems tends to the final state the mean EP lifetimes reachs a constant value.

.. image:: figures/lifetimes.png
:height: 400px
:width: 800 px
:align: center

**4.2 Electron-electron interaction**

.. code-block:: bash

yambo -q p -s e

The inclusion of the electron-electron scattering needs the calculation of the electron-electron collisions files.

**5. Use of Double-Grid in carrier dynamics simulation**

The convergence of the results with the k-grid is a delicate issue in carrier dynamics simulations. In order to mitigate the
simulation time we can use a double-grid. In our example we create the double-grid in three steps.

(i) We run a non-self-consistent simulation for a larger grid (``4x4x4`` in the silicon example). We find the results in the folder **nscf-dg**.

(ii) We break the symmetries accordingly with our polarization field using the scripts. We indicate the output folder **rt-dg**, the prefix **si** and the polarization **100**.

.. code-block:: bash

python break-symm.py -i nscf-dg -o rt-dg -p si -s 100

(iii) We have created the script `map-symm.py` to map the coarse grid in the fine grid.

.. code-block:: bash

python map-symm.py -i rt-dg -o rt dg-4x4x4

The folder **dg-4x4x4** is inside the **rt** folder. We will find a netCDF file ``ndb.Double_Grid``. In order to tell yambo to read the Double-grid we
have to indicate the folder name inside the ``-J`` option. In our example

.. code-block:: bash

yambo_rt -F 04_PUMP -J 'qssin,col-hxc,dg-4x4x4'

We can activate the double-grid in the python script `rt_si.py` by selecting:

.. code-block:: bash

job['DG'] = (True,'dg-4x4x4')

We can also check if yambo is reading correctly the double-grid in the report file. We have to find the lines:

.. code-block:: bash

[02.05] Double K-grid
=====================

K-points : 103
Bands : 8

Electron-Phonon interaction (Si)
---------------------------------
**by A. Molina Sánchez**

**1. Ground State and non-self consistent calculation**

Electron-phonon interaction calculations requires to obtain electronic states, phonon states and the
interaciton between them. An extended study can be found in the `Thesis of Elena Cannuccia
<http://www.yambo-code.org/papers/Thesis_Elena_Cannuccia.pdf>`_.


Go to the ``tutorial`` folder and run the ground state calculation using the ``gs_si.py`` file:

.. code-block:: bash

python gs_si.py

The script will run a relaxation of the structure, read the optimized cell parameter and create a new input file that is used
to run a self-consistent (scf) cycle and a non self-consistent (nscf) cycle using the charge density calculated on the previous run.

The self-consistent data are used to obtain the derivative of the potential. The non-self-consistent data are used, together with the
potential derivative, for deriving the electron-phonon matrix elements.

.. image:: figures/tutorial-el-ph_1.jpg


The script ``elph_pw_si.py`` calculates the electron-phonon matrix elements. It follows the indications of the flowchart, using
the scf and nscf data. All the files used by QE are stored in the directory ``work``. Finally, it transform the files from
the QE format to the netCDF format used by yambo. It creates the folder ``elphon``.


**2. Electron-phonon calculations**


The second step requires the script ``elph_qp_si.py``. If the electron-phonon matrix elements have been successfully created and
stored in ``elphon/SAVE`` we are ready to calculate the electron-phonon correction of the eigenvalues at several temperatures,
or to examine the spectral function of each quasi-particle state. A detailed tutorial of the capabilities of the module electron-phonon
of yambo is also available in the `yambo electron-phonon tutorial <http://www.yambo-code.org/tutorials/Electron_Phonon/index.php>`_.

If we run:

.. code-block:: bash

python elph_qp_si.py -r

Yambo will calculate the quasi-particle correction and the spectral functions for the top of the valence band and the
bottom of the conduction band (states 4 and 5). In order to plot the results we type:

.. code-block:: bash

python elph_qp_si.py -p

The QP correction due to the electron-phonon interaction are usually much smaller than those obtained with the GW approximation.

.. image:: figures/elph-qp-correction.png

We can also plot the spectral function for a given state (n,k), i. e., the imaginary part of the Green's function. This is a useful check of
the validity of the QP approximation. A well-defined QP state will show a single-peak spectral function (or a clearly predominant one). A recent
application in single-layer MoS2 is available here.

.. image:: figures/elph-sf.png

We can play with more options by selecting the appropiate variables from the script ``elph_qp_si.py``. For instance we can: (i) select only
the Fan or Debye-Waller term, (ii) calculation on the on-mass-shell approximation, (iii) print the Eliashberg functions, etc.
Loading