Formulation design and optimization using molecular dynamics