Skip to content

Commit 282dc8f

Browse files
authored
Merge pull request #19 from PhasesResearchLab/docs
Update docs
2 parents da2470f + abc823f commit 282dc8f

23 files changed

+507
-295
lines changed

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
1-
## pyzentropy
1+
# pyzentropy
22
[![Testing](https://github.com/nhew1994/pyzentropy/actions/workflows/test.yml/badge.svg)](https://github.com/nhew1994/pyzentropy/actions/workflows/test.yml)
33

4-
## Installation
5-
It is recommended to first set up a virtual environment using Conda:
4+
# Installation
5+
## Recommended: Create a Virtual Environment
66

7-
conda create -n pyzentropy python=3.12
7+
Using Conda:
8+
9+
conda create -n pyzentropy python=3.12
810
conda activate pyzentropy
911

10-
Clone the main branch of the repository:
11-
12+
## Install pyzentropy
13+
### From PyPI (coming soon)
14+
15+
python -m pip install pyzentropy
16+
17+
<sub>PyPI installation will be available in a future release. For now, please install from source as described below.</sub>
18+
19+
### From Source
20+
21+
Clone the repository:
22+
1223
git clone https://github.com/nhew1994/pyzentropy.git
24+
cd pyzentropy
25+
python -m pip install -e .
1326

1427
Or clone a specific branch:
15-
16-
git clone -b <branch_name> https://github.com/nhew1994/pyzentropy.git
17-
18-
Then move to `pyzentropy` directory and install in editable (`-e`) mode.
1928

29+
git clone -b <branch_name> https://github.com/nhew1994/pyzentropy.git
2030
cd pyzentropy
2131
python -m pip install -e .
2232

23-
## Example notebooks
33+
# Example notebooks
2434
Click the badge below to open the project in GitHub Codespaces.
2535
Then, browse the `examples/codespace` folder to explore and run the example notebooks:
2636

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, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
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/_source/installation.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
# Installation
3+
4+
5+
<span style="font-size:1.3em; font-weight:bold">Recommended: Create a Virtual Environment</span>
6+
7+
Using Conda:
8+
9+
conda create -n pyzentropy python=3.12
10+
conda activate pyzentropy
11+
12+
13+
<span style="font-size:1.3em; font-weight:bold">Install pyzentropy</span>
14+
15+
<span style="font-size:1.1em; font-weight:bold">From PyPI (coming soon)</span>
16+
17+
python -m pip install pyzentropy
18+
19+
**Note:** PyPI installation will be available in a future release. For now, please install from source as described below.
20+
21+
22+
<span style="font-size:1.1em; font-weight:bold">From Source</span>
23+
24+
Clone the repository:
25+
26+
git clone https://github.com/nhew1994/pyzentropy.git
27+
cd pyzentropy
28+
python -m pip install -e .
29+
30+
Or clone a specific branch:
31+
32+
git clone -b <branch_name> https://github.com/nhew1994/pyzentropy.git
33+
cd pyzentropy
34+
python -m pip install -e .

docs/_source/overview.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
==========
2+
pyzentropy
3+
==========
4+
5+
**pyzentropy** is an open-source Python package for first-principles thermodynamic calculations
6+
based on the recursion property of entropy. For a system consisting of multiple configurations,
7+
each with its own intrinsic entropy, the total entropy can be written as
8+
9+
.. math::
10+
11+
S = -k_B \sum_{k=1}^{N} p_k \ln p_k + \sum_{k=1}^{N} p_k S_k
12+
13+
where :math:`k` indexes the :math:`N` configurations and :math:`p_k` is the probability
14+
of configuration :math:`k`. The first term corresponds to the *configurational entropy*,
15+
while the second term is the probability-weighted sum of the *intra-configurational entropies*.
16+
17+
This expression is based on the recursion property of entropy, well known in information
18+
theory, which allows the system’s microstates to be coarse-grained into partitions indexed
19+
by :math:`k`. We also refer to this as the *zentropy* method, which combines *Zustandssumme*
20+
("sum over states") with *entropy*, emphasizing that the total entropy is constructed by
21+
summing over configurations that themselves possess intrinsic entropy.
22+
23+
The zentropy method allows microstates sharing similar physical characteristics to be
24+
grouped into configurations, making the total entropy easier to compute by first calculating
25+
the entropies of individual configurations. In practice, the intra-configurational entropies
26+
:math:`S_k` can be obtained using established open-source tools such as Phonopy and DFTTK.
27+
28+
Key Features
29+
------------
30+
31+
Input Data
32+
^^^^^^^^^^
33+
34+
For each configuration :math:`k`:
35+
36+
- Helmholtz free energy :math:`F_k(T,V)` and its first and second derivatives with respect to :math:`V`
37+
- Entropy :math:`S_k(T,V)` and heat capacity at constant volume :math:`C_{V,k}(T,V)`
38+
39+
Capabilities
40+
^^^^^^^^^^^^
41+
42+
**pyzentropy** enables the following analyses and visualizations:
43+
44+
- Generate 2D plots of configuration-dependent properties as functions of :math:`T` or :math:`V`.
45+
- Compute system-level properties as a function of temperature :math:`T` and volume :math:`V`.
46+
- Calculate thermodynamic properties at fixed pressure :math:`P`.
47+
- Construct :math:`T\!-\!V` and :math:`P\!-\!T` phase diagrams *(currently limited to a single common tangent construction)*.
48+
- Generate 2D plots of system properties as a function of :math:`T` or :math:`V`.
49+
- Generate 2D plots of system properties at fixed :math:`P` as a function of :math:`T`.
50+
- Generate 3D thermodynamic landscapes (in development).

docs/_source/tutorials.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# Tutorials
3+
4+
Below are the currently available examples:
5+
6+
**Examples:**
7+
8+
- **Fe<sub>3</sub>Pt**: Example of applying zentropy to the 3 lowest energy configurations in Fe<sub>3</sub>Pt 12-atom supercell. The Helmholtz energies were calculated using the energy–volume curves and the Debye–Grüneisen model.
9+
10+
The Jupyter notebooks are located in `examples/codespace` and can be run using **GitHub Codespaces** or locally in your preferred IDE (e.g., VS Code).

docs/api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
API Reference
2+
=============
3+
4+
.. toctree::
5+
pyzentropy.configuration
6+
pyzentropy.system
7+
pyzentropy.utilities
8+
:maxdepth: 6

docs/api/api.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/api/api_configuration.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/api/api_system.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/api/api_utilities.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)