Predicting the properties of ligands using molecular dynamics and machine learning