Skip to content

Commit 58dfc00

Browse files
committed
Add all current files of version 1.0.0
with slightly modification
0 parents  commit 58dfc00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+53135
-0
lines changed

.gitignore

Lines changed: 548 additions & 0 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# qha: A powerful tool for quasi-harmonic approximation
2+
3+
[TOC]
4+
5+
This repo is created by [Tian Qin](mailto:[email protected]) (Sunny), for in-group use for [Renata Wentzcovitch](mailto:[email protected]). It is now maintained by [Qi Zhang](mailto:[email protected]) and Sunny.
6+
7+
## What can be done
8+
9+
This code is designed to calculate the thermodynamics properties of crystalline phases with contribution from Phonons (Vibrational Energy). In short, calculate the volume ($V(T, P)$), bulk modulus ($B(T, P)$), enthalpy ($H(T, P)$), Helmholtz free energy ($F(T, P)$), Gibbs free energy ($G(T, P)$) at certain pressure ($P$) and Temperature ($T$).
10+
11+
## Input files needed
12+
13+
1. Input data file: `input`
14+
2. Input control file: You can create your own settings according to the template given in `settings.yaml`.
15+
16+
## Output files
17+
18+
volume ($V(T, P)$), bulk modulus ($B(T, P)$), enthalpy ($H(T, P)$), Helmholtz free energy ($F(T, P)$), Gibbs free energy ($G(T, P)$) at certain pressure ($P$) and Temperature ($T$).
19+
20+
## Where to get it
21+
22+
The source code is currently hosted on [Bitbucket](https://bitbucket.org/singularitti/qha).
23+
24+
Binary installers for the latest released version are available at the Python package index and on conda.
25+
26+
```shell
27+
# conda
28+
$ conda install qha
29+
```
30+
31+
```shell
32+
# or PyPI
33+
$ pip install qha
34+
```
35+
36+
## Dependencies
37+
38+
- [bigfloat](https://pypi.python.org/pypi/bigfloat)[^1]
39+
- [lazy-property](https://github.com/jackmaney/lazy-property)
40+
- [matplotlib](https://matplotlib.org)
41+
- [Numba](http://numba.pydata.org)
42+
- [NumPy](http://www.numpy.org)
43+
- [pandas](https://pandas.pydata.org)
44+
- [PyYAML](http://pyyaml.org)
45+
- [scientific-string](https://github.com/singularitti/scientific-string)
46+
- [SciPy](https://www.scipy.org)
47+
- [text-stream](https://github.com/singularitti/text-stream)
48+
49+
[^1]: `GMP` and `MPFR` libraries are required to use `bigfloat` package. On macOS, install these libraries via `brew install mpfr`; on Linux, install `libmpfr-dev` , for example, on Ubuntu use `[sudo] apt-get install libmpfr-dev`; on Windows, `bigfloat` can be installed from the binary file, please check "[Unofficial Windows Binaries for Python Extension Packages](https://www.lfd.uci.edu/~gohlke/pythonlibs/)"
50+
51+
## Installation from sources
52+
53+
Download the latest release, and go to the top-level directory, run
54+
55+
```shell
56+
$ python setup.py install
57+
```
58+
59+
Notice that you have to use Python version above 3.5 to install.
60+
61+
## Simple run
62+
63+
```shell
64+
$ qha /path/to/settings.yaml
65+
```
66+
67+
## License
68+
69+
GNU General Public License 3

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = qha
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=qha
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

docs/source/api.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. currentmodule:: qha
2+
.. _api:
3+
4+
API Reference
5+
=============
6+
7+
.. contents:: Table of contents:
8+
:local:
9+
10+
.. autosummary::
11+
12+
eos

docs/source/conf.py

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
#
4+
# qha documentation build configuration file, created by
5+
# sphinx-quickstart on Fri Feb 2 20:24:08 2018.
6+
#
7+
# This file is execfile()d with the current directory set to its
8+
# containing dir.
9+
#
10+
# Note that not all possible configuration values are present in this
11+
# autogenerated file.
12+
#
13+
# All configuration values have a default; values that are commented out
14+
# serve to show the default.
15+
16+
# If extensions (or modules to document with autodoc) are in another directory,
17+
# add these directories to sys.path here. If the directory is relative to the
18+
# documentation root, use os.path.abspath to make it absolute, like shown here.
19+
#
20+
import os
21+
import sys
22+
23+
import sphinx_bootstrap_theme
24+
25+
sys.path.insert(0, os.path.abspath('../../'))
26+
27+
28+
# -- General configuration ------------------------------------------------
29+
30+
# If your documentation needs a minimal Sphinx version, state it here.
31+
#
32+
# needs_sphinx = '1.0'
33+
34+
# Add any Sphinx extension module names here, as strings. They can be
35+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36+
# ones.
37+
extensions = ['sphinx.ext.autodoc',
38+
'sphinx.ext.autosummary',
39+
'sphinx.ext.doctest',
40+
'sphinx.ext.intersphinx',
41+
'sphinx.ext.todo',
42+
'sphinx.ext.coverage',
43+
'sphinx.ext.mathjax',
44+
'sphinx.ext.ifconfig',
45+
'sphinx.ext.viewcode',
46+
'sphinx.ext.githubpages',
47+
'sphinx_autodoc_typehints']
48+
49+
# Add any paths that contain templates here, relative to this directory.
50+
templates_path = ['_templates']
51+
52+
# The suffix(es) of source filenames.
53+
# You can specify multiple suffix as a list of string:
54+
#
55+
# source_suffix = ['.rst', '.md']
56+
source_suffix = '.rst'
57+
58+
# The master toctree document.
59+
master_doc = 'index'
60+
61+
# General information about the project.
62+
project = 'qha'
63+
copyright = '2018, Tian Qin, Qi Zhang'
64+
author = 'Tian Qin, Qi Zhang'
65+
66+
# The version info for the project you're documenting, acts as replacement for
67+
# |version| and |release|, also used in various other places throughout the
68+
# built documents.
69+
#
70+
# The short X.Y version.
71+
version = '0.0.1'
72+
# The full version, including alpha/beta/rc tags.
73+
release = '0.0.1'
74+
75+
# The language for content autogenerated by Sphinx. Refer to documentation
76+
# for a list of supported languages.
77+
#
78+
# This is also used if you do content translation via gettext catalogs.
79+
# Usually you set "language" from the command line for these cases.
80+
language = None
81+
82+
# List of patterns, relative to source directory, that match files and
83+
# directories to ignore when looking for source files.
84+
# This patterns also effect to html_static_path and html_extra_path
85+
exclude_patterns = []
86+
87+
# The name of the Pygments (syntax highlighting) style to use.
88+
pygments_style = 'sphinx'
89+
90+
# If true, `todo` and `todoList` produce output, else they produce nothing.
91+
todo_include_todos = True
92+
93+
94+
# -- Options for HTML output ----------------------------------------------
95+
96+
# The theme to use for HTML and HTML Help pages. See the documentation for
97+
# a list of builtin themes.
98+
#
99+
html_theme = 'bootstrap'
100+
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
101+
102+
# Theme options are theme-specific and customize the look and feel of a theme
103+
# further. For a list of options available for each theme, see the
104+
# documentation.
105+
#
106+
html_theme_options = {'bootswatch_theme': "paper", }
107+
108+
# Add any paths that contain custom static files (such as style sheets) here,
109+
# relative to this directory. They are copied after the builtin static files,
110+
# so a file named "default.css" will overwrite the builtin "default.css".
111+
html_static_path = ['_static']
112+
113+
# Custom sidebar templates, must be a dictionary that maps document names
114+
# to template names.
115+
#
116+
# This is required for the alabaster theme
117+
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
118+
html_sidebars = {
119+
'**': [
120+
# 'relations.html', # needs 'show_related': True theme option to display
121+
# 'searchbox.html',
122+
]
123+
}
124+
125+
126+
# -- Options for HTMLHelp output ------------------------------------------
127+
128+
# Output file base name for HTML help builder.
129+
htmlhelp_basename = 'qhadoc'
130+
131+
132+
# -- Options for LaTeX output ---------------------------------------------
133+
134+
latex_elements = {
135+
# The paper size ('letterpaper' or 'a4paper').
136+
#
137+
# 'papersize': 'letterpaper',
138+
139+
# The font size ('10pt', '11pt' or '12pt').
140+
#
141+
# 'pointsize': '10pt',
142+
143+
# Additional stuff for the LaTeX preamble.
144+
#
145+
# 'preamble': '',
146+
147+
# Latex figure (float) alignment
148+
#
149+
# 'figure_align': 'htbp',
150+
}
151+
152+
# Grouping the document tree into LaTeX files. List of tuples
153+
# (source start file, target name, title,
154+
# author, documentclass [howto, manual, or own class]).
155+
latex_documents = [
156+
(master_doc, 'qha.tex', 'qha Documentation',
157+
'Tian Qin, Qi Zhang', 'manual'),
158+
]
159+
160+
161+
# -- Options for manual page output ---------------------------------------
162+
163+
# One entry per manual page. List of tuples
164+
# (source start file, name, description, authors, manual section).
165+
man_pages = [
166+
(master_doc, 'qha', 'qha Documentation',
167+
[author], 1)
168+
]
169+
170+
171+
# -- Options for Texinfo output -------------------------------------------
172+
173+
# Grouping the document tree into Texinfo files. List of tuples
174+
# (source start file, target name, title, author,
175+
# dir menu entry, description, category)
176+
texinfo_documents = [
177+
(master_doc, 'qha', 'qha Documentation',
178+
author, 'qha', 'One line description of project.',
179+
'Miscellaneous'),
180+
]
181+
182+
183+
# -- Options for Epub output ----------------------------------------------
184+
185+
# Bibliographic Dublin Core info.
186+
epub_title = project
187+
epub_author = author
188+
epub_publisher = author
189+
epub_copyright = copyright
190+
191+
# The unique identifier of the text. This can be a ISBN number
192+
# or the project homepage.
193+
#
194+
# epub_identifier = ''
195+
196+
# A unique identification for the text.
197+
#
198+
# epub_uid = ''
199+
200+
# A list of files that should not be packed into the epub file.
201+
epub_exclude_files = ['search.html']
202+
203+
204+
# Example configuration for intersphinx: refer to the Python standard library.
205+
intersphinx_mapping = {'https://docs.python.org/': None}

docs/source/contributing.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. _contributing:
2+
3+
*********************
4+
Contributing to qha
5+
*********************
6+
7+
.. contents:: Table of contents:
8+
:local:
9+

docs/source/index.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. qha documentation master file, created by
2+
sphinx-quickstart on Fri Feb 2 20:24:08 2018.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
qha documentation
7+
=================
8+
9+
.. toctree::
10+
:numbered:
11+
:maxdepth: 2
12+
13+
user/index
14+
reference/index
15+
contributing
16+
17+
Indices and tables
18+
==================
19+
20+
* :ref:`genindex`
21+
* :ref:`modindex`

docs/source/reference/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Reference Manual
2+
================
3+
4+
.. toctree::
5+
6+
type

0 commit comments

Comments
 (0)