The workflow. In the generation stage, SeqGAN model and MolGPT model are used for generation. In the molecular evaluation stage, the properties of the generated molecules are calculated and compared with the data of original fentanyl and its analogues. In the validation stage, the selected molecules are verified by NMR, mass spectrometry and IR spectroscopy.