Basics of statistical mechanics and thermodynamics of classical and quantum systems. Concept of ensembles, microcanonical and canonical ensembles, ergodic theorem. Molecular and canonical partition functions and their connection with classical thermodynamics. Quantum statistics. Translational, rotational, vibrational, electronic and nuclear spin partition functions of gases. Determination of the equilibrium constants of gas phase reactions. Description of ideal gases and ideal crystals. Lattice models, mixing entropy of polymers, and entropic elasticity.