Sample essay with math and code

· #sample, #math

Sample essay for testing the theme; delete before launch.

Math

Inline math such as eiπ+1=0e^{i\pi} + 1 = 0 renders at build time as MathML. A display equation:

ΔG=−kBTln⁡Z1Z0 \Delta G = -k_B T \ln \frac{Z_1}{Z_0}

And a multi-line one:

⟨A⟩=1Z∫A(x) e−βU(x) dxZ=∫e−βU(x) dx \begin{aligned} \langle A \rangle &= \frac{1}{Z} \int A(x)\, e^{-\beta U(x)}\, dx \\ Z &= \int e^{-\beta U(x)}\, dx \end{aligned}

Code

import numpy as np

def free_energy(u_kn: np.ndarray, beta: float) -> float:
    """Exponential averaging (Zwanzig) estimate."""
    return -np.log(np.mean(np.exp(-beta * u_kn))) / beta

Plain text after the code block.