The invention relates to the technical field of molecular generation, and discloses a reverse design method using a molecular spectrum as a medium to be applied to
virus protein drug molecules, which comprises the following steps: firstly, constructing a
data set containing a molecular SMILES identifier and a corresponding molecular spectrum, and carrying out
drug-likeness and false positive preliminary screening on compounds by adopting Lipinski five rules and a PAINS mode; then training a conditional
diffusion model, and generating a target molecular spectrum by taking specific
drug properties as conditions; the spectrum is mapped into a molecular SMILES structure through a Transform decoder, so that accurate conversion from the spectrum to the molecule is realized; finally, through conformation optimization and stability
verification, candidate drug molecules meeting specific treatment requirements are output. The method effectively avoids the invalid structure problem caused by cross-dimension generation, significantly improves the synthesizability and
patent medicine potential of generated molecules, and is suitable for efficient molecular design of antiviral drugs, inhibitors and the like.