Automatic knowledge extraction from chemical structures: the case of mutagenicity prediction