## Partial molar properties from molecular simulation using multiple linear regression

Partial molar volumes, energies, and enthalpies can be computed from *NpT*-Gibbs ensemble simulations through a post-processing procedure that leverages fluctuations in composition, total volume, and total energy of a simulation box. By recording the instantaneous box volumes *V* and instantaneous number of molecules ${N}_{i}$ of each of *n* species for *M* frames, a large $M\times n$ matrix $N$ is constructed, as well as the $M\times 1$ vector $V$. The $1\times n$ vector of partial molar volumes $V\xaf$ may then be solved using $N\cdot V\xaf=V$. A similar construction permits calculation of partial molar energies using *M* instantaneous measurements of the total energy of the simulation box, and $N\cdot U\xaf=U$. Partial molar enthalpies may be derived from $U\xaf$, $V\xaf$, and pressure *p*. These properties may be used to calculate enthalpy and entropy of transfer (absorption, extraction, and adsorption) for species in complex mixtures. The method is demonstrated on three systems in the *NpT*-Gibbs ensemble: a highly compressible natural gas condensate of methane, *n*-butane, and *n*-decane, the liquid-phase adsorption of 1,5-pentanediol and ethanol onto the MFI zeolite, and a relatively incompressible mixture of ethanol, *n*-dodecane, and water at liquid-liquid equilibrium. Property predictions are compared to those from numerical differentiation of simulation data sequentially changing the composition and from equations of state. The method can also be extended to reaction equilibria in a closed system and is applied to a reactive first-principles Monte Carlo simulation of compressed nitrogen/oxygen.