Atomistically Modeling the Chemical Potential of Small Molecules in Dense Polymer Microstructures. 1. Method