Extracting conformational ensembles of small molecules from molecular dynamics simulations: ampicillin as a test case