-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from vishnu2709/master
Added documentation for lsms using ReadTheDocs
- Loading branch information
Showing
31 changed files
with
672 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "2" | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.10" | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
|
||
sphinx: | ||
configuration: docs/source/conf.py |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
if "%1" == "" goto help | ||
|
||
%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.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sphinx==7.1.2 | ||
sphinx-rtd-theme==1.3.0rc1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
************ | ||
Getting LSMS | ||
************ | ||
|
||
The code can be obtained from the github repo (https://github.com/mstsuite/lsms) | ||
|
||
.. parsed-literal:: | ||
git clone https://github.com/mstsuite/lsms.git | ||
LSMS has the following dependencies | ||
|
||
1. Fortran and C++ | ||
2. Cmake | ||
3. HDF5 | ||
4. BLAS and LAPACK | ||
5. MPI | ||
6. (Optional) CUDA/ROCm for GPU acceleration | ||
|
||
Lua and LibXC are included - if you would like to use a pre-existing lua or LibXC installation it can be linked during the build process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
************************ | ||
Electrical Resistivity | ||
************************ | ||
|
||
lsms can also calculate electrical resistivity from the Kubo-Greenwood equation. To do this, first perform a standard self-consistent calculation. Then copy the converged potential to the starting potential and copy the restart file | ||
|
||
.. parsed-literal:: | ||
cp w_<systemid> v_<systemid> | ||
cp i_lsms.restart i_lsms.dos | ||
Change the mode to conductivity | ||
|
||
.. parsed-literal:: | ||
lsmsMode="kubo" | ||
Then run lsms | ||
|
||
.. parsed-literal:: | ||
mpirun -np <number of MPI ranks> $LSMS_PATH/lsms i_lsms.kubo | ||
The stdout will print the electrical resistivity in units of :math:`\mu\Omega`-cm | ||
|
||
.. parsed-literal:: | ||
TOTAL RESISTIVITY (in microOhm-cm) | ||
412.992 -1.32721 -1.86057 | ||
0.540036 408.027 -0.912385 | ||
-2.64419 -0.598773 416.019 | ||
For a spin-polarized system, the spin up and down resistivities are calculated separately and the resistors are added in parallel. | ||
|
||
.. parsed-literal:: | ||
RESISTIVITY SPIN 1 (in microOhm-cm) | ||
289.029 -0.206822 0.193379 | ||
-0.222593 289.206 0.0590624 | ||
0.0231963 -0.48124 289.46 | ||
RESISTIVITY SPIN 2 (in microOhm-cm) | ||
262.711 0.162251 -0.491042 | ||
-0.173043 261.377 0.476058 | ||
-0.993332 1.08469 262.733 | ||
TOTAL RESISTIVITY (in microOhm-cm) | ||
137.621 -0.00159926 -0.0911053 | ||
-0.0977167 137.294 0.144432 | ||
-0.26754 0.190146 137.724 | ||
Currently the resistivity implementation is non-relativistic. A relativistic implementation will be added in the future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
|
||
# -- Project information | ||
|
||
project = 'LSMS' | ||
copyright = '2023, mstsuite' | ||
author = 'Markus Eisenbach et al' | ||
|
||
release = '0.4' | ||
version = '0.4.0' | ||
|
||
# -- General configuration | ||
|
||
extensions = [ | ||
'sphinx.ext.duration', | ||
'sphinx.ext.doctest', | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.autosummary', | ||
'sphinx.ext.intersphinx', | ||
] | ||
|
||
intersphinx_mapping = { | ||
'python': ('https://docs.python.org/3/', None), | ||
'sphinx': ('https://www.sphinx-doc.org/en/master/', None), | ||
} | ||
intersphinx_disabled_domains = ['std'] | ||
|
||
templates_path = ['_templates'] | ||
|
||
# -- Options for HTML output | ||
|
||
html_theme = 'sphinx_rtd_theme' | ||
|
||
# -- Options for EPUB output | ||
epub_show_urls = 'footnote' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
****************** | ||
Density of States | ||
****************** | ||
|
||
To get DOS, first a standard self-consistent calculation (as described in the previous sections) must be performed. Once that is done, copy the restart file to a new input file and the converged potential as the new starting potential | ||
|
||
.. parsed-literal:: | ||
cp i_lsms.restart i_lsms.dos | ||
cp w_<systemid> v_<systemid> | ||
Edit the i_lsms.dos for dos calculations. First set the mode for DOS | ||
|
||
.. parsed-literal:: | ||
lsmsMode="dos" | ||
Change the energy contour settings so that the points are parallel to the real energy axis | ||
|
||
.. parsed-literal:: | ||
energyContour.grid=3 | ||
energyContour.npts= <number of energy points> | ||
energyContour.ebot= <starting energy value> | ||
energyContour.etop= <final energy value> | ||
energyContour.eibot= <imaginary part> | ||
It is important to specify ``energyContour.eibot`` as we cannot traverse the real energy line due to singularities. Hence adding a small imaginary part to the energy is necessary. Generallyvalues between 0.001 and 0.005 Ryd are good choices. | ||
|
||
lsms will generate an output file called ``dos.out`` with three columns | ||
|
||
1. Real part of the energy. | ||
2. Imaginary part of the energy. | ||
3. Total Density of States |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
****************************************** | ||
Green's Function at Matsubara Frequencies | ||
****************************************** | ||
|
||
lsms can write out the Green's function at the Matsubara frequencies. To do this, set the mode and the required temperature | ||
|
||
.. parsed-literal:: | ||
lsmsMode = "gf_out" | ||
temperature = <Temperature in Kelvin> | ||
The relevant energy points are given by | ||
|
||
.. math:: | ||
E_n = E_F + \pi ik_B T(2n + 1) | ||
To generate these energy points, we need to set the appropriate contour in the input file | ||
|
||
.. parsed-literal:: | ||
energyContour.grid=4 | ||
energyContour.npts= <number of points> | ||
lsms will generate output files of the form ``greens_functions_<atom index>.out``, containing the local Green's function in blocks for each energy. There are five columns in each energy block | ||
|
||
1. Spin index | ||
2. L = (l,m) index | ||
3. L' = (l',m') index | ||
4. Real part of G(L,L') | ||
5. Imaginary part of G(L,L') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Welcome to the LSMS documentation! | ||
=================================== | ||
|
||
**LSMS** is a high-performance software package for scalable first-principles calculations of materials using locally self-consistent multiple scattering theory. | ||
|
||
Use the sidebar to navigate to the required section. | ||
|
||
.. note:: | ||
|
||
This project is under active development. | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
acquisition | ||
installation | ||
running | ||
inputfile | ||
outputfile | ||
dos | ||
gfm | ||
conductivity |
Oops, something went wrong.