pyzentropy

pyzentropy is an open-source Python package for first-principles thermodynamic calculations based on the recursion property of entropy. For a system consisting of multiple configurations, each with its own intrinsic entropy, the total entropy can be written as

\[S = -k_B \sum_{k=1}^{N} p_k \ln p_k + \sum_{k=1}^{N} p_k S_k\]

where \(k\) indexes the \(N\) configurations and \(p_k\) is the probability of configuration \(k\). The first term corresponds to the configurational entropy, while the second term is the probability-weighted sum of the intra-configurational entropies.

This expression is based on the recursion property of entropy, well known in information theory, which allows the system’s microstates to be coarse-grained into partitions indexed by \(k\). We also refer to this as the zentropy method, which combines Zustandssumme (“sum over states”) with entropy, emphasizing that the total entropy is constructed by summing over configurations that themselves possess intrinsic entropy.

The zentropy method allows microstates sharing similar physical characteristics to be grouped into configurations, making the total entropy easier to compute by first calculating the entropies of individual configurations. In practice, the intra-configurational entropies \(S_k\) can be obtained using established open-source tools such as Phonopy and DFTTK.

Key Features

Input Data

For each configuration \(k\):

  • Helmholtz free energy \(F_k(T,V)\) and its first and second derivatives with respect to \(V\)

  • Entropy \(S_k(T,V)\) and heat capacity at constant volume \(C_{V,k}(T,V)\)

Capabilities

pyzentropy enables the following analyses and visualizations:

  • Generate 2D plots of configuration-dependent properties as functions of \(T\) or \(V\).

  • Compute system-level properties as a function of temperature \(T\) and volume \(V\).

  • Calculate thermodynamic properties at fixed pressure \(P\).

  • Construct \(T\!-\!V\) and \(P\!-\!T\) phase diagrams (currently limited to a single common tangent construction).

  • Generate 2D plots of system properties as a function of \(T\) or \(V\).

  • Generate 2D plots of system properties at fixed \(P\) as a function of \(T\).

  • Generate 3D thermodynamic landscapes (in development).