Skip to content

Commit

Permalink
Updated changes in the documentation due to the restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
Espen Flage-Larsen committed Feb 21, 2019
2 parents dc2f4d1 + 3bf294b commit 7598a7f
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 55 deletions.
7 changes: 1 addition & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ The structure of the program is simple: the main routines
are written in Python utlizing NumPy and SciPy where
necessary. In addition there are calls to external
routines through Cython, particularly the optional libraries.
It should support Python > 2.7 and Python 3.

The main driver for the program is the ``t4me.py`` file
located in the main directory. This is used to execute
the program and call necessary subroutines. In its standard
configuration this should serve most users.
Only support for Python3 is confirmed.

Contributing and versioning
***************************
Expand Down
13 changes: 9 additions & 4 deletions bpdocs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')

# check that we are on the right branch
if [ $branch != "updated_documentation" ]; then
echo "Please make sure you issue this command on the 'updated_documentation' branch."
echo "Please make sure you issue this command on an 'updated_documentation' branch."
exit
fi

Expand All @@ -24,16 +24,14 @@ cd ..
# updated docs
git add docs/_build/html
git commit -m "Updated documentation for later gh-pages push"
git push origin updated_documentation

# switch branches and pull the data we want
git checkout gh-pages && rm -rf *
touch .nojekyll
git checkout updated_documentation docs/_build/html

# now we only need html content for gh-pages
mv ./docs/_build/html/* ./
rm -rf ./docs
mv ./docs/_build/html/* ./ && rm -rf ./docs

# add, commit and push gh-pages
git add -A
Expand All @@ -42,3 +40,10 @@ git push origin gh-pages

# switch back to branch
git checkout updated_documentation

# Clean stuff
cd docs
make clean
# Some LaTeX folder that needs to be removed
rm -rf docs/auto
cd ..
1 change: 0 additions & 1 deletion build_skw
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ cd skw
make
make lib
cd ..

7 changes: 3 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import sys
import os
import shlex
import sphinx_bootstrap_theme

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -61,17 +60,17 @@

# General information about the project.
project = u'T4ME'
copyright = u'2016, Espen Flage-Larsen'
copyright = u'2019, Espen Flage-Larsen'
author = u'Espen Flage-Larsen'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
version = '1.1'
# The full version, including alpha/beta/rc tags.
release = '1'
release = '1.1.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
72 changes: 42 additions & 30 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -1,56 +1,68 @@
Installing
==========

Please consult the :file:`setup.py` file for details on
how to configure the location of the include and libraries.
Basic install
-------------
First make sure Spglib is installed

Only Spglib (in principle the only requirement for minimal
functionality against calculations based on first-principle
data) is included as a Git submodule. This can be activated by
::

pip install spglib

Then install T4ME by executing the command

::

git submodule init
git submodule update
pip install t4me

This will give the user the posibility to calculate the transport coefficients
using integration routines in SciPy. For other integration and interpolation routines
the user needs to follow the following recipe.

Advanced install
----------------
For more advanced functionality (interpolation and other integration routines) the
user should determine which external libraries are needed and install them based
on their respective documentation.

The :file:`setup.py` file assume in its supplied form that the user installs the libraries
in the standard folders, e.g. `$HOME/include` and `$HOME/lib` for the include and library
files, respectively. If other locations are needed, please adapt the :file:`setup.py`
file.

And Spglib can be build with the included :file:`build_spglib`
As an example, we want to enable the tetrahedron integration. A Spglib interface needs to be compiled.
This can be build with the included :file:`build_spglib` file.

::

./build_spglib

It is possible to build Spglib elsewhere, but consult
:file:`build_spglib` and make sure that the
:file:`tetrahedron_method.h` is also inside the include
directory. For instance, if access to Git is difficult one
should make a `spglib` folder in the main T4ME directory
and place a recent Spglib version there. This would give the
same data structure as if using the Git submodule.
The build script :file:`build_spglib` can then be executed.
If that was successfull, T4ME can then be built by issuing the following command

All other libraries need to be built externally and linked in.
::

pip install .

Then execute
or

::

python setup.py build_ext --inplace
pip install -e .[dev]

To build the necessary parts of interfaces used in T4ME. You should
now be able to now execute t4me.py which is
the main driver routine
Another example. We want to enable SKW interpolation. The SKW routines can be built (assuming Intel MKL is installed) by issuing

::

python t4me.py
./build_skw

This should execute cleanly. However, it might be usefull
to run T4ME from other locations. In order to for this to
work, the main directory of T4ME needs to be added to
your ``PYTHONPATH`` environmental variable. Usually, this can
be done (in bash) by adding the following to your
:file:`.bashrc` or :file:`.bash_profile`
If successfull, T4ME can then be installed by issuing one of the two commands listed above. If other FFT routines are to be used, please modify :file:`skw/Makefile`.

All other libraries need to be built externally and linked in.

Upon successfull completion of the installation, T4ME is executed with the command

::

export PYTHONPATH=$PYTHONPATH:/home/username/somepath/t4me
t4me

An `input` directory is needed which should contain the input files.
12 changes: 7 additions & 5 deletions docs/preq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ In its basic form T4ME only need the following
dependency:

- `Spglib <https://atztogo.github.io/spglib/>`_.
Which is placed as a Git submodule and handles the
setup of the mapping between the full and reduced k-point
grid.
This can be installed with

::

pip install spglib

Additional optional dependencies include:

- `mpi4py <https://code.google.com/archive/p/pypar/>`_,
Used to parallelize (not yet enabled).
- `Spglib <https://atztogo.github.io/spglib/>`_,
A custom interface to Spglib to enable tetrahedron integration.
- `GNU Scientific Library <https://www.gnu.org/software/gsl/>`_,
Used to solve the analytical Fermi-Dirac integrals.
- `Einspline <http:https://einspline.sourceforge.net/>`_,
Expand Down
14 changes: 9 additions & 5 deletions docs/tests.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
Running tests
=============

Several tests are included, which can be used to test the installation,
but more importantly assist in verify development steps.
Several tests are included, which can be used to test the installation.

Currently only basic functionality is tested and developers
are encouraged to write tests for any added functionality.

Tests can be run by setting the ``run_tests`` in the general parameter file,
typically the file :file:`param.yml`.
Tests are executed by issuing

Most of the tests rely on the GSL library, so please install it.
::

pytest

In the base directory.

Most of the tests rely on the GSL library, so please install it. If it is not present the tests relying on this will skip.

0 comments on commit 7598a7f

Please sign in to comment.