merge latest app4trqs skeleton changes

This commit is contained in:
Alexander Hampel 2021-09-17 14:24:22 -04:00
commit 29c7c337b1
19 changed files with 188 additions and 80 deletions

View File

@ -39,6 +39,7 @@ jobs:
libclang-12-dev
libc++-12-dev
libc++abi-12-dev
libomp-12-dev
libfftw3-dev
libgfortran5
libgmp-dev

View File

@ -19,11 +19,8 @@
#
# ##############################################################################
cmake_minimum_required(VERSION 3.9.6 FATAL_ERROR)
cmake_policy(VERSION 3.9.6)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
cmake_minimum_required(VERSION 3.12.4 FATAL_ERROR)
cmake_policy(VERSION 3.12.4)
if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()

11
Jenkinsfile vendored
View File

@ -81,14 +81,15 @@ for (int i = 0; i < osxPlatforms.size(); i++) {
def hdf5 = "${env.BREW}/opt/hdf5@1.10"
dir(buildDir) { withEnv(platformEnv[1].collect { it.replace('\$BREW', env.BREW) } + [
"PATH=$venv/bin:${env.BREW}/bin:/usr/bin:/bin:/usr/sbin",
"HDF5_ROOT=$hdf5",
"PATH=$venv/bin:${env.BREW}/bin:/usr/bin:/bin:/usr/sbin",
"HDF5_ROOT=$hdf5",
"C_INCLUDE_PATH=$hdf5/include:${env.BREW}/include",
"CPLUS_INCLUDE_PATH=$venv/include:$hdf5/include:${env.BREW}/include",
"LIBRARY_PATH=$venv/lib:$hdf5/lib:${env.BREW}/lib",
"CPLUS_INCLUDE_PATH=$venv/include:$hdf5/include:${env.BREW}/include",
"LIBRARY_PATH=$venv/lib:$hdf5/lib:${env.BREW}/lib",
"LD_LIBRARY_PATH=$hdf5/lib",
"PYTHONPATH=$installDir/lib/python3.9/site-packages",
"CMAKE_PREFIX_PATH=$venv/lib/cmake/triqs"]) {
"CMAKE_PREFIX_PATH=$venv/lib/cmake/triqs",
"OMP_NUM_THREADS=2"]) {
deleteDir()
/* note: this is installing into the parent (triqs) venv (install dir), which is thus shared among apps and so not be completely safe */
sh "pip3 install -U -r $srcDir/requirements.txt"

View File

@ -49,7 +49,7 @@ if(ANALYZE_SOURCES)
TARGET ${PROJECT_NAME}_c
COMMAND ${CPPCHECK_EXECUTABLE}
--enable=warning,style,performance,portability
--std=c++17
--std=c++20
--template=gcc
--verbose
--force

View File

@ -76,6 +76,6 @@ endif()
# ---------------------------------
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ COMPONENT documentation DESTINATION share/doc/${PROJECT_NAME}
FILES_MATCHING
REGEX "\\.(html|pdf|png|gif|jpg|svg|js|xsl|css|py|txt|inv|bib)$"
REGEX "\\.(html|pdf|png|gif|jpg|svg|js|xsl|css|py|txt|inv|bib|ttf|woff2|eot)$"
PATTERN "_*"
)

View File

@ -1,5 +1,9 @@
Version 3.0.0
=============
(changelog)=
# Changelog
## Version 3.0.0
DFTTools Version 3.0.0 is a major release that
@ -10,12 +14,12 @@ DFTTools Version 3.0.0 is a major release that
* brings a major update of the block structure functionalities especially for SOC calculations, with detailed documentation and tutorials. Allows more control over the block structure coming from DFT, cutting out certain orbitals or throwing away off-diagonal elements when preparing input for the solver.
* New option in dmftproj to select the projection window using band indices instead of energie
Restructuring
-------------
### Restructuring
To be aligned with other applications for TRIQS, various files and folders had to be moved to new locations. The c++, fortran and python parts all are now in separate folders. The converter files have been more logically split into their own folders and name spaces. For example the Vasp converter is now located under `python/triqs_dft_tools/converters/vasp.py`. Especially the test folder structure was adapted to fit to the app4triqs skeleton, which separate folders for C++ and python tests.
Dependency Management
--------------------
### Dependency Management
We are managing the interdependencies of the various library components of triqs now using cmake.
Per default cmake will pull those dependencies from their corresponding
GitHub repositories, build them, and install these components together
@ -27,8 +31,8 @@ This behavior can be altered using the additional cmake options
during the configuration step. See also the TRIQS documentation for more detailed instructions.
Other Changes:
-------------
### Other Changes:
* Run port_to_triqs3 script
* Port py files to python3
* Update triqs python module name
@ -69,8 +73,7 @@ Thanks to all commit-contributors (in alphabetical order):
Markus Aichhorn, Alexander Hampel, Gernot Kraberger, Oleg Peil, Hermann Schnait, Malte Schueler, Nils Wentzell, Manuel Zingl
Version 2.2.1
=============
## Version 2.2.1
DFTTools Version 2.2.1 makes the application available
through the Anaconda package manager. We adjust
@ -81,8 +84,7 @@ We provide a more detailed description of the changes below.
* Add a LICENSE and AUTHORS file to the repository
Version 2.2.0
=============
## Version 2.2.0
* Ensure that the chemical potential calculations results in a real number
* Fix a bug in reading Wien2k optics files in SO/SP cases
@ -95,8 +97,7 @@ Thanks to all commit-contributors (in alphabetical order):
Markus Aichhorn, Dylan Simon, Erik van Loon, Nils Wentzell, Manuel Zingl
Version 2.1.x (changes since 1.4)
=================================
## Version 2.1.x (changes since 1.4)
* Added Debian Packaging
* Compatibility changes for TRIQS 2.1.x

5
doc/_static/css/custom.css vendored Normal file
View File

@ -0,0 +1,5 @@
@import url("theme.css");
.wy-nav-content {
max-width: 70em;
}

BIN
doc/_static/logo_flatiron.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
doc/_static/logo_simons.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -1,3 +1,8 @@
.. _about:
About
******
License
=======

View File

@ -1,8 +0,0 @@
.. _changelog:
Changelog
=========
This document describes the main changes in TRIQS_DFT_TOOLS.
.. include:: ChangeLog.md

View File

@ -16,34 +16,114 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.githubpages',
'sphinx_autorun',
'nbsphinx',
'myst_parser',
'matplotlib.sphinxext.plot_directive',
'nbsphinx',
'IPython.sphinxext.ipython_console_highlighting',
'numpydoc']
myst_enable_extensions = [
"amsmath",
"colon_fence",
"deflist",
"dollarmath",
"html_admonition",
"html_image",
"linkify",
"replacements",
"smartquotes",
"substitution",
"tasklist",
]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
source_suffix = '.rst'
project = '@PROJECT_NAME@'
project = 'TRIQS DFTTools'
version = '@PROJECT_VERSION@'
copyright = '2011-2020'
copyright = '2011-2021'
mathjax_path = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=default"
templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_templates']
html_theme = 'triqs'
html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/themes']
# this requires the sphinx_rtd_theme to be installed via pip
html_theme = 'sphinx_rtd_theme'
# this loads the custom css file to change the page width
html_style = 'css/custom.css'
#html_favicon = '@CMAKE_CURRENT_SOURCE_DIR@/logos/favicon.ico'
#html_logo = '@CMAKE_CURRENT_SOURCE_DIR@/logos/logo.png'
# options for the the rtd theme
html_theme_options = {
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'vcs_pageview_mode': '',
'style_nav_header_background': '#7E588A',
# Toc options
'collapse_navigation': False,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False
}
html_show_sphinx = False
html_context = {'header_title': 'dft tools',
'header_subtitle': 'connecting <a class="triqs" style="font-size: 12px" href="http://triqs.github.io/triqs">TRIQS</a> to DFT packages',
'header_links': [['Install', 'install'],
['Documentation', 'documentation'],
['Tutorials', 'tutorials'],
['Issues', 'issues'],
['About DFTTools', 'about']]}
html_context = {'header_title': 'TRIQS DFTTools'}
html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
html_sidebars = {'index': ['sideb.html', 'searchbox.html']}
htmlhelp_basename = '@PROJECT_NAME@doc'
intersphinx_mapping = {'python': ('https://docs.python.org/3.8', None), 'triqslibs': ('https://triqs.github.io/triqs/latest', None), 'triqscthyb': ('https://triqs.github.io/cthyb/latest', None)}
intersphinx_mapping = {'python': ('https://docs.python.org/3.8', None), 'triqslibs': ('https://triqs.github.io/triqs/latest', None)}
# open links in new tab instead of same window
from sphinx.writers.html import HTMLTranslator
from docutils import nodes
from docutils.nodes import Element
class PatchedHTMLTranslator(HTMLTranslator):
def visit_reference(self, node: Element) -> None:
atts = {'class': 'reference'}
if node.get('internal') or 'refuri' not in node:
atts['class'] += ' internal'
else:
atts['class'] += ' external'
# ---------------------------------------------------------
# Customize behavior (open in new tab, secure linking site)
atts['target'] = '_blank'
atts['rel'] = 'noopener noreferrer'
# ---------------------------------------------------------
if 'refuri' in node:
atts['href'] = node['refuri'] or '#'
if self.settings.cloak_email_addresses and atts['href'].startswith('mailto:'):
atts['href'] = self.cloak_mailto(atts['href'])
self.in_mailto = True
else:
assert 'refid' in node, \
'References must have "refuri" or "refid" attribute.'
atts['href'] = '#' + node['refid']
if not isinstance(node.parent, nodes.TextElement):
assert len(node) == 1 and isinstance(node[0], nodes.image)
atts['class'] += ' image-reference'
if 'reftitle' in node:
atts['title'] = node['reftitle']
if 'target' in node:
atts['target'] = node['target']
self.body.append(self.starttag(node, 'a', '', **atts))
if node.get('secnumber'):
self.body.append(('%s' + self.secnumber_suffix) %
'.'.join(map(str, node['secnumber'])))
def setup(app):
app.set_translator('html', PatchedHTMLTranslator)

View File

@ -1,13 +0,0 @@
Table of contents
=================
.. toctree::
:maxdepth: 2
index
install
documentation
tutorials
issues
changelog
about

View File

@ -3,20 +3,20 @@
Interface with Elk
=====================
This is the first iteration of the Elk-TRIQS interface, so certain inputs may change in later updates. The Elk part of the interface is not currently in the main distribution, but it can be found :ref:`here <https://github.com/AlynJ/Elk_interface-TRIQS>`.
This is the first iteration of the Elk-TRIQS interface, so certain inputs may change in later updates. The Elk part of the interface is not currently in the main distribution, but it can be found `here <https://github.com/AlynJ/Elk_interface-TRIQS>`_.
We assume that the user has obtained a self-consistent solution of the
Kohn-Sham equations with Elk (a full tutorial can be found here :ref:`Elk SVO tutorial <SrVO3_elk>`). Also, the user needs to be familiar with the main in/output files of Elk, and how to run
the DFT code. Further information about Elk can be found on the :ref:`official Elk website <http://elk.sourceforge.net/>`.
the DFT code. Further information about Elk can be found on the `official Elk website <http://elk.sourceforge.net/>`_.
Conversion for the DMFT self-consistency cycle
----------------------------------------------
Once the user has obtained the groundstate calculation, they will have to rerun Elk but with some small changes to the inputs in the elk.in file which will be explained below. The Elk part of the interface calculates and outputs the Wannier projectors. All downfolding related flags are set in the elk input file, and Elk determines automatically by symmetry equivalent sites. The TRIQS Elk converter then reads in these projectors along with the other Elk ascii files which would have been generated in the Elk ground state calculation. This information is then packed into the HDF5 file.
In the following, we use SrVO3 as an example to explain the flags required in the elk.in input file. An example elk.in of SrVO3 is available in the :ref:`SrVO3 tutorial <elk_SVO>`.
In the following, we use SrVO3 as an example to explain the flags required in the elk.in input file. An example elk.in of SrVO3 is available in the :ref:`SrVO3 tutorial <SrVO3_elk>`:
.. literalinclude:: ../tutorials/images_scripts/elk.in_SVO
.. literalinclude:: ../tutorials/svo_elk/elk.in
The projectors are generated in Elk using these alterations in the elk.in file::
@ -135,7 +135,7 @@ This outputs the total spectral function and the partial spectral function if en
Spectral function Contour Plots (Fermi Surfaces) from Elk inputs
---------------------------------------------------------------
-----------------------------------------------------------------
Here, we will discuss how to plot the Fermi surface contour or any other non-zero omega spectral function contour plot. This is currently tailored for the Elk inputs. From this point, we will refer to these contours as Fermi surfaces. The energy eigenvalues, projectors and so on required for the Fermi surface plot needs to be outputed from Elk. This is done by using::

View File

@ -1,31 +1,68 @@
.. index:: DFTTools
.. module:: triqs_dft_tools
.. _dft:
.. _welcome:
#########
DFTTools
========
#########
.. sidebar:: DFTTools 3.0
.. sidebar:: DFTTools 3.0.0
This is the homepage of DFTTools v3.0.0.
For changes see the :ref:`changelog page <changelog>`.
.. image:: _static/logo_github.png
:width: 75%
:align: center
:target: https://github.com/triqs/dft_tools
This is the homepage DFTTools Version 3.0
For the changes in DFTTools, Cf :ref:`changelog page <changelog>`
This :ref:`TRIQS-based <triqslibs:welcome>`-based application is aimed
at ab-initio calculations for
correlated materials, combining realistic DFT band-structure
calculations with the dynamical mean-field theory. Together with the
necessary tools to perform the DMFT self-consistency loop for
realistic multi-band problems, the package provides a full-fledged
realistic multi-band problems. The package provides a full-fledged
charge self-consistent interface to the `Wien2K package
<http://www.wien2k.at>`_. In addition, if Wien2k is not available, it
provides a generic interface for one-shot DFT+DMFT calculations, where
only the single-particle Hamiltonian in orbital space has to be
provided.
<http://www.wien2k.at>`_, and `VASP package <https://www.vasp.at>`_.
In addition, it provides a generic interface for one-shot DFT+DMFT
calculations, where only the single-particle Hamiltonian in
orbital space has to be provided. The Hamiltonian can be
generated from the above mentioned DFT codes,
`wannier90 <http://www.wannier.org/>`_ output files, or with the
built-in generic H(k) converter.
Learn how to use this package in the :ref:`documentation` and the :ref:`tutorials`.
.. image:: _static/logo_cea.png
:width: 14%
:target: http://ipht.cea.fr
.. image:: _static/logo_x.png
:width: 14%
:target: "https://www.cpht.polytechnique.fr
.. image:: _static/logo_cnrs.png
:width: 14%
:target: https://www.cnrs.fr
.. image:: _static/logo_erc.jpg
:width: 14%
.. image:: _static/logo_flatiron.png
:width: 20%
:target: https://www.simonsfoundation.org/flatiron
.. image:: _static/logo_simons.jpg
:width: 20%
:target: https://www.simonsfoundation.org
.. toctree::
:maxdepth: 2
:hidden:
install
documentation
tutorials
issues
ChangeLog.md
about

View File

@ -2,6 +2,8 @@
.. _install:
Installation
************
Packaged Versions of DFTTools
=============================

View File

@ -1,7 +1,7 @@
.. _issues:
Reporting issues
================
*****************
Please report all problems and bugs directly at the github issue page
`<https://github.com/TRIQS/dft_tools/issues>`_. In order to make it easier for us

View File

@ -24,7 +24,7 @@ foreach(test ${all_tests})
TARGET ${test_name}
COMMAND ${CPPCHECK_EXECUTABLE}
--enable=warning,style,performance,portability
--std=c++17
--std=c++20
--template=gcc
--verbose
--force