Skip to content

Commit

Permalink
Merge branch 'inputarchive'
Browse files Browse the repository at this point in the history
  • Loading branch information
bhourahine committed Dec 3, 2018
2 parents a676ac0 + c1ef6a7 commit 34c0666
Show file tree
Hide file tree
Showing 77 changed files with 984 additions and 597 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*~
_gitmsg.saved.txt
docs/_build
docs/_archives/recipes/slakos/download/*
docs/_downloads/archives

20 changes: 17 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,23 @@ DFTB+ Recipes
*************

This repository contains the source of the DFTB+ Recipes book. The content is
rendered on `dftbplus-recipes.readthedocs.io
<http://dftbplus-recipes.readthedocs.io>`_.
currently rendered on `dftbplus-recipes.readthedocs.io
<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!


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 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.
2 changes: 2 additions & 0 deletions docs/_archives/_ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*~
recipes/slako/download/*
54 changes: 54 additions & 0 deletions docs/_archives/recipes/basics/bandstruct/1_density/dftb_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Geometry = GenFormat {
6 F
Ti O
1 1 0.4393045491E-02 -0.4394122690E-02 -0.4185505032E-06
2 1 -0.2456050838E+00 -0.7543932244E+00 0.5000007729E+00
3 2 0.1997217007E+00 0.2106836749E+00 -0.1813953963E-02
4 2 -0.4625010039E+00 0.4843137675E-01 0.4981557672E+00
5 2 -0.2106822274E+00 -0.1997223911E+00 0.1816384188E-02
6 2 -0.4843281768E-01 -0.5374990457E+00 0.5018414482E+00
0.0000000000E+00 0.0000000000E+00 0.0000000000E+00
-0.1903471721E+01 0.1903471721E+01 0.4864738245E+01
0.1903471721E+01 -0.1903471721E+01 0.4864738245E+01
0.1903471721E+01 0.1903471721E+01 -0.4864738245E+01
}

Hamiltonian = DFTB {
Scc = Yes
SccTolerance = 1e-5
SlaterKosterFiles = Type2FileNames {
Prefix = "../../../slakos/mio-ext/"
Separator = "-"
Suffix = ".skf"
}
MaxAngularMomentum {
Ti = "d"
O = "p"
}
KPointsAndWeights = SupercellFolding {
4 0 0
0 4 0
0 0 4
0.5 0.5 0.5
}
}

Analysis {
ProjectStates {
Region {
Atoms = Ti
ShellResolved = Yes
Label = "dos_ti"
}
Region {
Atoms = O
ShellResolved = Yes
Label = "dos_o"
}
}
}

ParserOptions {
ParserVersion = 6
}

10 changes: 10 additions & 0 deletions docs/_archives/recipes/basics/bandstruct/1_density/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +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

39 changes: 39 additions & 0 deletions docs/_archives/recipes/basics/bandstruct/2_bands/dftb_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Geometry = GenFormat {
6 F
Ti O
1 1 0.4393045491E-02 -0.4394122690E-02 -0.4185505032E-06
2 1 -0.2456050838E+00 -0.7543932244E+00 0.5000007729E+00
3 2 0.1997217007E+00 0.2106836749E+00 -0.1813953963E-02
4 2 -0.4625010039E+00 0.4843137675E-01 0.4981557672E+00
5 2 -0.2106822274E+00 -0.1997223911E+00 0.1816384188E-02
6 2 -0.4843281768E-01 -0.5374990457E+00 0.5018414482E+00
0.0000000000E+00 0.0000000000E+00 0.0000000000E+00
-0.1903471721E+01 0.1903471721E+01 0.4864738245E+01
0.1903471721E+01 -0.1903471721E+01 0.4864738245E+01
0.1903471721E+01 0.1903471721E+01 -0.4864738245E+01
}

Hamiltonian = DFTB {
Scc = Yes
ReadInitialCharges = Yes
MaxSccIterations = 1
SlaterKosterFiles = Type2FileNames {
Prefix = "../../../slakos/mio-ext/"
Separator = "-"
Suffix = ".skf"
}
MaxAngularMomentum {
Ti = "d"
O = "p"
}
KPointsAndWeights = Klines {
1 0.5 0.5 -0.5 # Z
20 0.0 0.0 0.0 # G
45 0.0 0.0 0.5 # X
10 0.25 0.25 0.25 # P
}
}

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

40 changes: 40 additions & 0 deletions docs/_archives/recipes/basics/firstcalc/dftb_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Geometry = GenFormat {
3 C
O H

1 1 0.00000000000E+00 -0.10000000000E+01 0.00000000000E+00
2 2 0.00000000000E+00 0.00000000000E+00 0.78306400000E+00
3 2 0.00000000000E+00 0.00000000000E+00 -0.78306400000E+00
}

Driver = ConjugateGradient {
MovedAtoms = 1:-1
MaxForceComponent = 1E-4
MaxSteps = 100
OutputPrefix = "geom.out"
}

Hamiltonian = DFTB {
Scc = Yes
SlaterKosterFiles {
O-O = "../../slakos/mio-ext/O-O.skf"
O-H = "../../slakos/mio-ext/O-H.skf"
H-O = "../../slakos/mio-ext/H-O.skf"
H-H = "../../slakos/mio-ext/H-H.skf"
}
MaxAngularMomentum {
O = "p"
H = "s"
}
}

Options {}

Analysis {
CalculateForces = Yes
}

ParserOptions {
ParserVersion = 6
}

3 changes: 3 additions & 0 deletions docs/_archives/recipes/basics/firstcalc/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -e
dftb+ > output
40 changes: 40 additions & 0 deletions docs/_archives/recipes/basics/waveplot/dftb_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Geometry = GenFormat {
3 C
O H
1 1 0.00000000000E+00 -0.10000000000E+01 0.00000000000E+00
2 2 0.00000000000E+00 0.00000000000E+00 0.78306400000E+00
3 2 0.00000000000E+00 0.00000000000E+00 -0.78306400000E+00
}

Driver = ConjugateGradient {
MovedAtoms = 1:-1
MaxForceComponent = 1.0e-4
MaxSteps = 100
OutputPrefix = "geom.out"
}

Hamiltonian = DFTB {
Scc = Yes
SccTolerance = 1.0e-5
SlaterKosterFiles = Type2FileNames {
Prefix = "../../slakos/mio-ext/"
Separator = "-"
Suffix = ".skf"
}
MaxAngularMomentum = {
O = "p"
H = "s"
}
}

Options {
WriteDetailedXml = Yes
}

Analysis {
WriteEigenvectors = Yes
}

ParserOptions {
ParserVersion = 5
}
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
29 changes: 29 additions & 0 deletions docs/_archives/recipes/basics/waveplot/waveplot_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# General 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
PlottedRegion = OptimalCuboid {} # Region to plot

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
# of DFTB+
EigenvecBin = "eigenvec.bin" # File cointaining the binary eigenvecs


# Definition of the basis
Basis {
Resolution = 0.01
# 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"
}
33 changes: 33 additions & 0 deletions docs/_archives/recipes/scripts/get_slakos
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
################################################################################
# Downloads and unpacks slako related files from dftb.org
################################################################################
scriptdir="$(dirname $0)"
root="$scriptdir/.."
downloaddir="$root/slakos/download"
downloadfile="$root/slakos/SLAKO_DOWNLOADS"
slakourlprefix="http://www.dftb.org/fileadmin/DFTB/public/slako"

echo "Downloading SLAKO archives:"
for remotefile in $(cat $downloadfile); do
destdir=$(dirname $remotefile)
fname=$(basename $remotefile)
mkdir -p $downloaddir/$destdir

echo "Downloading $remotefile"
echo "wget -q -O $downloaddir/$destdir/$fname $slakourlprefix/$remotefile"
wget -q -O $downloaddir/$destdir/$fname $slakourlprefix/$remotefile
if [ $? -ne 0 ]; then
echo "DOWNLOAD FAILED for$ slakourlprefix/$remotefile" >&2
fi

if [ "$(basename $fname .tar.xz)" != "$fname" ]; then
echo "Unpacking archive $fname"
tar -x -C $downloaddir/$destdir -J -f $downloaddir/$destdir/$fname
if [ $? -ne 0 ]; then
echo "UNPACKING FAILED for $downloaddir/$destdir/$fname" >&2
fi
echo "Removing archive $fname"
rm -f $downloaddir/$destdir/$fname
fi
done
3 changes: 3 additions & 0 deletions docs/_archives/recipes/slakos/SLAKO_DOWNLOADS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mio/mio-1-1.tar.xz
mio/wfc.mio-1-1.hsd
tiorg/tiorg-0-1.tar.xz
Empty file.
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/C-C.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/C-H.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/C-N.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/C-O.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/C-P.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/C-S.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/C-Ti.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/H-C.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/H-H.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/H-N.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/H-O.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/H-P.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/H-S.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/H-Ti.skf
2 changes: 2 additions & 0 deletions docs/_archives/recipes/slakos/mio-ext/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This folder contains the mio set and some of its extensions. Please consult the
LICENSE files of the respective sets for further information.
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/LICENSE.mio-1-1
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/LICENSE.tiorg-0-1
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/N-C.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/N-H.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/N-N.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/N-O.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/N-P.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/N-S.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/N-Ti.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/O-C.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/O-H.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/O-N.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/O-O.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/O-P.skf
1 change: 1 addition & 0 deletions docs/_archives/recipes/slakos/mio-ext/O-S.skf
Loading

0 comments on commit 34c0666

Please sign in to comment.