Energetics of nonpolar and polar compounds in cationic, anionic, and nonionic micelles studied by all-atom molecular dynamics simulation combined with a theory of solutions.