The spatial arrangement of chemical groups or features in a molecule that determine its activity.