  Simulation schemes that allow to change molecular representation in a
subvolume of the simulation box while preserving the equilibrium with the
surrounding introduce conceptual problems of thermodynamic consistency. In this
work we present a general scheme based on thermodynamic arguments which ensures
thermodynamic equilibrium among the molecules of different representation. The
robustness of the algorithm is tested for two examples, namely an adaptive
resolution simulation, atomistic/coarse-grained, for a liquid of tetrahedral
molecules and an adaptive resolution simulation of a binary mixture of
tetrahedral molecules and spherical solutes.
