A Framework for Molecular Simulation