Physics and chemistry of molecular systems
Laws
Key Equations
# Thermodynamic relationships
def gibbs_free_energy(H, S, T):
"""
Determine spontaneity.
G = H - TS
"""
return H - T * S
def equilibrium_constant(dG):
"""
Calculate K from ΔG°.
ΔG° = -RT ln K
"""
R = 8.314 # J/(mol·K)
return np.exp(-dG / (R * 298))
def nernst_potential(E, Q, n):
"""
Concentration effect on potential.
E = E° - (RT/nF) ln Q
"""
return E - (0.0592 / n) * np.log10(Q)