Classifying chemicals