The expanded ensemble method, developed to calculate solvation free energies, is applied to calculate octanol/water partition coefficients P for some organic drug-related molecules and compared with experimental results. The experimental log P results were obtained by a miniaturized vial procedure using liquid chromatography with UV for quantification. The expanded ensemble technique, implemented within molecular dynamics scheme, is adapted to treat molecules of arbitrary size and type. For octanol, both all-atom and united atom models are evaluated. The solvation free energy of the organic solute molecules is found to be sensitive to the used sets of partial charges on the atoms in polar groups, particularly in water but also in the saturated octanol phase. Although this effect partially cancels out in the calculated partition coefficients, the charges obtained from ab initio Mulliken population analysis give consistently larger log P values than those obtained in simulations with the larger empirical at...