Adsorption of associating molecules in micropores and application to water on carbon