Skip to content

Commit

Permalink
Merge pull request #72 from issp-center-dev/develop
Browse files Browse the repository at this point in the history
Version 2.0.2 release
  • Loading branch information
k-yoshimi authored Nov 18, 2019
2 parents 43c0d5f + 5aed396 commit c012167
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 6 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Version number of the application
set (DCORE_VERSION "2.0")
set (DCORE_RELEASE "2.0.0")
set (DCORE_VERSION "2.0.2")

# Append triqs installed files to the cmake load path
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
Expand Down Expand Up @@ -46,6 +45,15 @@ if (BUILD_DCORE)
message(WARNING "TRIQS Version ${TRIQS_VERSION} may be imcompatible with DCore.")
endif()

# Check if DFTools is installed.
get_filename_component(DFTToolsPath1 "${TRIQS_SITE_PACKAGES}/triqs_dft_tools" REALPATH "${CMAKE_BINARY_DIR}")
get_filename_component(DFTToolsPath2 "${TRIQS_SITE_PACKAGES}/pytriqs/applications/dft" REALPATH "${CMAKE_BINARY_DIR}")
if ( (NOT IS_DIRECTORY ${DFTToolsPath1}) AND (NOT IS_DIRECTORY ${DFTToolsPath2}))
message(FATAL_ERROR "TRIQS/DFTTools not found! Please install TRIQS/DFTTools first.")
else()
message(STATUS "Found TRIQS/DFTTools")
endif()

set(DCORE_SITE_PACKAGES "${CMAKE_INSTALL_PREFIX}/lib/python2.7/site-packages")
set(DCORE_DEP_PYTHONPATH "${DCORE_SITE_PACKAGES}:${TRIQS_SITE_PACKAGES}")

Expand Down
1 change: 1 addition & 0 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ COMPONENT documentation DEST
PATTERN "*.ini"
PATTERN "*.in"
PATTERN "*.win"
PATTERN "*.dat"
)
1 change: 0 additions & 1 deletion doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ todo_include_todos = True
project = u'DCore'
copyright = u'2017, The University of Tokyo'
version = '@DCORE_VERSION@'
release = '@DCORE_RELEASE@'

#mathjax_path = "@TRIQS_MATHJAX_PATH@/MathJax.js?config=default"
templates_path = ['@CMAKE_SOURCE_DIR@/doc/_templates']
Expand Down
54 changes: 54 additions & 0 deletions doc/install_triqs14x.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

.. highlight:: bash

.. _installation_triqs14x:

Installation
============

#. You first need to install `TRIQS <https://triqs.github.io/triqs/>`_ library.
``TRIQS`` will be installed in directory *path_to_triqs*.

.. note::

``DCore`` supports ``TRIQS`` version **1.4.2** (the support for the current version 2.1.x is still experimental).
Since the installation manual in the TRIQS official website is not compatible with **1.4.2**, we briefly describe below how to install it.
Please study `the official document for TRIQS 1.4.x <https://triqs.github.io/triqs/1.4.x/>`_.

#. You can download the zip file or tar file from https://github.com/TRIQS/triqs/releases/tag/1.4.2.
The version **1.4.2** is not compatible with the latest version of h5py (>=2.8.0).
If you encounter any problem, you can clone the repository and checkout **1.4.x** branch, which contains bug fixes.
We suppose that source files are located in *path_to_triqs_src* directory.

#. In an empty directory, type the following command:

.. code-block:: bash
$ cmake -DCMAKE_INSTALL_PREFIX=path_to_triqs path_to_triqs_src
$ make
$ make test
$ make install
#. You also need `DFTTools <https://triqs.github.io/dft_tools>`_, which runs on the ``TRIQS`` library.

.. note::

The current version in the GitHub repository is not compatible with ``TRIQS`` version 1.4.2.
You need to get old code that is compatible with 1.4.2.

#. Clone the repository, and checkout commit **d005756**.

.. code-block:: bash
$ git clone [email protected]:TRIQS/dft_tools.git
$ cd dft_tools
$ git checkout d005756
#. To build the source files, make an empty directory, move into it, and then type the following command:

.. code-block:: bash
$ cmake -DTRIQS_PATH=path_to_triqs path_to_dft_tools
$ make
$ make test
$ make install
13 changes: 13 additions & 0 deletions doc/install_triqs21x.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

.. highlight:: bash

.. _installation_triqs21x:

Installation
============

#. First, please install `TRIQS <https://triqs.github.io/triqs/>`_ library following the instruction in the official documentation.
In the following, we assume that ``TRIQS`` is installed in directory *path_to_triqs*.

#. Second, please install `DFTTools <https://triqs.github.io/dft_tools>`_.

2 changes: 1 addition & 1 deletion python/program_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def parse_knode(knode_string):

KNode = namedtuple('KNode', ('kvec', 'label'))

knode_list = re.findall(r'\(\w+,\s*-?\s*\d+\.?\d*,\s*-?\s*\d+\.?\d*,\s*-?\s*\d+\.?\d*\)', knode_string)
knode_list = re.findall(r'\(\w+,\s*-?\s*\d+\.?\d*,\s*-?\s*\d+\.?\d*,\s*-?\s*\d+\.?\d*\)', knode_string.replace(" ", ""))
knode = []
try:
for _list in knode_list:
Expand Down
2 changes: 1 addition & 1 deletion python/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def load_giw(h5file, path, g):
assert h5file[path + '/__version'][()] == 'DCore_GfImFreq_v1'

g.data[...] = float_to_complex_array(h5file[path + '/data'][()])
if triqs_major_version == 1:
if triqs_major_version == 1 and path + '/tail' in h5file:
g.tail.data[...] = float_to_complex_array(h5file[path + '/tail'][()])

omega_imag = numpy.array([complex(x) for x in g.mesh]).imag
Expand Down
2 changes: 1 addition & 1 deletion tools/w90tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, file_name, spin_orbital_order='up_up_down_down', verbose=0):
self.HamR_full = numpy.zeros((self.nrpts, 2, self.norb, 2, self.norb), dtype=complex)
for isp in range(2):
self.HamR_full[:, isp, :, isp, :] = self.HamR
self.HamR_full = self.HamR.reshape((self.nrpts, 2 * self.norb, 2 * self.norb))
self.HamR_full = self.HamR_full.reshape((self.nrpts, 2 * self.norb, 2 * self.norb))
else:
raise RuntimeError("Invalid spin_orbital_order: {}".format(spin_orbital_order))

Expand Down

0 comments on commit c012167

Please sign in to comment.