A new paradigm is suggested for pattern recognition of drugs. The approach is based on the combined application of the 4D/3D quantitative structure-activity relationship (QSAR) algorithms BiS and ConGO. The first algorithm, BiS/MC (multiconformational), is used for the search for the conformers interacting with a receptor. The second algorithm, ConGO, has been suggested for the detailed study of the selected conformers' electron density and for the search for the electron structure fragments that determine the pharmacophore and antipharmacophore parts of the compounds. In this work we suggest using a new AlteQ method for the evaluation of the molecular electron density. AlteQ describes the experimental electron density (determined by low-temperature highly accurate X-ray analysis) much better than a number of quantum approaches. Herein this is shown using a comparison of the computed electron density with the results of highly accurate X-ray analysis. In the present study the desirability function is used for the first time for the analysis of the effects of the electron structure in the process of pattern recognition of active and inactive compounds. The suggested method for pattern recognition has been used for the investigation of various sets of compounds such as DNA-antimetabolites, fXa inhibitors, 5-HT(1A), and alpha(1)-AR receptors inhibitors. The pharmacophore and antipharmacophore fragments have been found in the electron structures of the compounds. It has been shown that the pattern recognition cross-validation quality for the datasets is unity.