Representations of molecules. (a) Fingerprints calculated as MACCSFP by rdkit [18] in binary. (b) The SMILES. (c) The graph. (d) The proposed hierarchical graph representation, where molecules can be characterized by a set of motifs. Each motif may correspond to a certain type of local substructures and functions.