Mining large chemical spaces in lead and drug discovery