A novel approach to computer-aided molecular design is illustrated. This approach is based on the calculation of the spectral moments of the bond adjacency matrix of graphs representing molecular structures. Spectral moments are then expressed as linear combinations of the different sub-structures present in molecules. Two series of compounds, one containing sedative/hypnotic and the other containing different classes of drugs were used to find a discriminant function with the present approach. Several compounds from the Merck Index were identified by the model as sedative/hypnotic, five of them were found in the recent literature as possessing this activity. The critical fragments, actives and inactive ones, were detected.