Skip to content

Commit

Permalink
Merge branch 'master' into archive_modified
Browse files Browse the repository at this point in the history
  • Loading branch information
bhourahine committed Dec 3, 2018
2 parents 31633dc + 34c0666 commit c831bbf
Show file tree
Hide file tree
Showing 19 changed files with 265 additions and 254 deletions.
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ DFTB+ Recipes

This repository contains the source of the DFTB+ Recipes book. The content is
currently rendered on `dftbplus-recipes.readthedocs.io
<http://dftbplus-recipes.readthedocs.io>`_. You can render it also locally by
<http://dftbplus-recipes.readthedocs.io>`_. You can also render it locally by
using the Sphinx documentation system.

The material is licensed under the CC-BY-SA license (see `LICENSE <LICENSE>`_).
This material is licensed under the CC-BY-SA license (see `LICENSE <LICENSE>`_).

Contributions are very welcome!

Expand All @@ -18,8 +18,8 @@ Technical notes
* The book is written in the restructured text format and is contained in the
`docs/` folder. In order to process it, you need Sphinx version 1.8 or above.

* Before the book is built, the building system creates a tar.bz2 archive for
each file/directory in the `docs/_archives/` folder. Those archives will be
then copied to the `docs/_downloads/archives` folder. As this happens before
building the book itself, you may reference those .tar.bz2 archives in the
book.
* Before the text of the book is built, the building system creates a tar.bz2
archive for each top level file/directory in the `docs/_archives/`
folder. Created archives will be then copied to the `docs/_downloads/archives`
folder. You may then reference those .tar.bz2 archives from within the text of
the book.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Geometry = GenFormat {
}

Hamiltonian = DFTB {
SCC = Yes
SCCTolerance = 1e-5
Scc = Yes
SccTolerance = 1e-5
SlaterKosterFiles = Type2FileNames {
Prefix = "../../../slakos/mio-ext/"
Separator = "-"
Expand All @@ -25,9 +25,6 @@ Hamiltonian = DFTB {
Ti = "d"
O = "p"
}
Filling = Fermi {
Temperature [Kelvin] = 0.0
}
KPointsAndWeights = SupercellFolding {
4 0 0
0 4 0
Expand All @@ -52,6 +49,6 @@ Analysis {
}

ParserOptions {
ParserVersion = 5
ParserVersion = 6
}

7 changes: 7 additions & 0 deletions docs/_archives/recipes/basics/bandstruct/1_density/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/bash
set -e
dftb+ > output
dp_dos band.out dos_total.dat >> output
dp_dos -w dos_ti.1.out dos_ti.s.dat >> output
dp_dos -w dos_ti.2.out dos_ti.p.dat >> output
dp_dos -w dos_ti.3.out dos_ti.d.dat >> output
dp_dos -w dos_o.1.out dos_o.s.dat >> output
dp_dos -w dos_o.2.out dos_o.p.dat >> output

9 changes: 3 additions & 6 deletions docs/_archives/recipes/basics/bandstruct/2_bands/dftb_in.hsd
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Geometry = GenFormat {
}

Hamiltonian = DFTB {
SCC = Yes
Scc = Yes
ReadInitialCharges = Yes
MaxSCCIterations = 1
MaxSccIterations = 1
SlaterKosterFiles = Type2FileNames {
Prefix = "../../../slakos/mio-ext/"
Separator = "-"
Expand All @@ -26,9 +26,6 @@ Hamiltonian = DFTB {
Ti = "d"
O = "p"
}
Filling = Fermi {
Temperature [Kelvin] = 0.0
}
KPointsAndWeights = Klines {
1 0.5 0.5 -0.5 # Z
20 0.0 0.0 0.0 # G
Expand All @@ -38,5 +35,5 @@ Hamiltonian = DFTB {
}

ParserOptions {
ParserVersion = 5
ParserVersion = 6
}
2 changes: 2 additions & 0 deletions docs/_archives/recipes/basics/bandstruct/2_bands/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
set -e
cp ../1_density/charges.bin .
dftb+ > output
dp_bands band.out band >> output

3 changes: 0 additions & 3 deletions docs/_archives/recipes/basics/firstcalc/dftb_in.hsd
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ Hamiltonian = DFTB {
O = "p"
H = "s"
}
Filling = Fermi {
Temperature [Kelvin] = 0.0
}
}

Options {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ Hamiltonian = DFTB {
O = "p"
H = "s"
}
Filling = Fermi {
Temperature [Kelvin] = 0.0
}
}

Options {
Expand Down
4 changes: 4 additions & 0 deletions docs/_archives/recipes/basics/waveplot/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e
dftb+ > output
waveplot >> output
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# General options

Options = {
Options {
TotalChargeDensity = Yes # Total density be plotted?
TotalChargeDifference = Yes # Total density difference plotted?
ChargeDensity = Yes # Charge density for each state?
RealComponent = Yes # Plot real component of the wavefunction
PlottedSpins = { 1 -1 }
PlottedLevels = { 4 } # Levels to plot
PlottedSpins = 1 -1
PlottedLevels = 4 # Levels to plot
PlottedRegion = OptimalCuboid {} # Region to plot

NrOfPoints = { 50 50 50 } # Number of grid points in each direction
NrOfPoints = 50 50 50 # Number of grid points in each direction
NrOfCachedGrids = -1 # Nr of cached grids (speeds up things)
Verbose = Yes # Wanna see a lot of messages?
}

DetailedXML = "detailed.xml" # File containing the detailed xml output
DetailedXml = "detailed.xml" # File containing the detailed xml output
# of DFTB+
EigenvecBin = "eigenvec.bin" # File cointaining the binary eigenvecs


# Definition of the basis
Basis = {
Basis {
Resolution = 0.01
# Including mio-0-1.hsd. (If you use a set, which depends on other sets,
# Including mio-1-1.hsd. (If you use a set, which depends on other sets,
# the wfc.*.hsd files for each required set must be included in a similar
# way.)
<<+ "../../slakos/wfc/wfc.mio-1-1.hsd"
}

4 changes: 0 additions & 4 deletions docs/_archives/recipes/waveplot/firststeps/run.sh

This file was deleted.

43 changes: 20 additions & 23 deletions docs/basics/bandstruct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ Band structure, DOS and PDOS
****************************

This chapter demonstrates, using the example of anatase (|TiO2|), how the band
structure, the density of states (DOS) and the partial density of states (PDOS)
of a periodic system (such as wires, surfaces or solids) can be obtained using
DFTB+.
structure, density of states (DOS) and the partial density of states (PDOS) of a
periodic system (such as wires, surfaces or solids) can be obtained using DFTB+.

.. |TiO2| replace:: TiO\ :sub:`2`\

Expand All @@ -17,20 +16,20 @@ you will need the Slater-Koster sets `mio` and `tiorg`. The sample input files
assume that the necessary Slater-Koster files have been copied into a
subdirectory `mio-ext`.

The examples here are based on DFTB+ version 17.1, the input/output
files in other versions may slightly differ from those shown here.


Introduction
============

The calculation of the band structure for a periodic system consists of two
steps. First for self-consistent (SCC) calculations, the charges in the system
must be calculated using a converged k-point sampling. Then, keeping the
obtained self-consistent charges fixed, the one-electron levels must be
calculated for k-points chosen along the specific lines in k-space of the chosen
band structure. These are usually between high symmetry points in the Brillouin
zone of that unit cell.
steps.

* First for self-consistent (SCC) calculations, the charges in the system must
be calculated using a converged k-point sampling.

* Then, keeping the obtained self-consistent charges fixed, the one-electron
levels must be calculated for k-points chosen along the specific lines in
k-space of the chosen band structure. These are usually between high symmetry
points in the Brillouin zone of that unit cell.


Creating the proper input charges
Expand Down Expand Up @@ -84,9 +83,6 @@ good k-point sampling. A sample `dftb_in.hsd` input looks like::
Ti = "d"
O = "p"
}
Filling = Fermi {
Temperature [Kelvin] = 0.0
}
KPointsAndWeights = SupercellFolding {
4 0 0
0 4 0
Expand All @@ -111,7 +107,7 @@ good k-point sampling. A sample `dftb_in.hsd` input looks like::
}
ParserOptions {
ParserVersion = 5
ParserVersion = 6
}

In the input above, the coordinates have been specified in relative (fractional)
Expand All @@ -123,7 +119,7 @@ line of the geometry specification::
6 F
:

The k-points are been generated automatically using the ``SupercellFolding``
The k-points are generated automatically using the ``SupercellFolding``
method, which enables among others the generation of Monkhorst-Pack schemes. In
the current example, a k-point set equivalent to the Monkhorst-Pack scheme
:math:`4 \times 4 \times 4` has been chosen (For details how to specify the
Expand All @@ -141,7 +137,7 @@ an accuracy in the range of 1e-3 eV for the total energy. Also, by specifying a
smaller SCC tolerance than the chosen one (1e-5) you can check that converging
the charges more precisely does not significantly decrease the total energy. We
note in passing that these settings provide well converged results for the total
energy in the current example, by in principal may not provide converged values
energy in the current example, but in principal may not provide converged values
for other properties. One should, in principal, test the convergence of any
evaluated properties with respect to the calculation parameters.

Expand Down Expand Up @@ -259,8 +255,9 @@ to be changed slightly::

# ...

Note: only the relevant part of the input are shown, here. See the
`Introduction`_ how to obtain the archive with the full input.
Note: only the relevant parts of the input are shown, here. See the
:ref:`sec-introduction` section on how to obtain the archive with the full
input.

The input is (must be) almost the same as in the previous case, with only a few
adaptions:
Expand Down Expand Up @@ -303,9 +300,9 @@ adaptions:
point only, as demonstrated above for the Z-point.

Running DFTB+ with the input above, the eigenlevel spectrum is calculated at
the required k-points. The results are written to the file `detailed.out` and
in more readable format to `band.out`. You can use the script `dp_bands` from
the `dptools` package to convert this file into NXY format. By issuing::
the required k-points. The results are written to the file `band.out`. You can
use the script `dp_bands` from the `dptools` package to convert this file into
XNY format. By issuing::

dp_bands band.out band

Expand Down
Loading

0 comments on commit c831bbf

Please sign in to comment.