This application relates to a molecular optimization method and
system based on
protein structure and affinity guidance. The method includes: inputting structural data of
protein pockets and the molecular backbone into a
diffusion model; in the forward process,
noise is progressively introduced from a
Gaussian distribution at each
time step, and prior guidance features of the R-group are extracted using a pre-trained prior guidance model, with the
mean shift of the
atomic coordinates of the R-group calculated and added to the forward process; in the reverse process, sampling from the
Gaussian distribution is used as a starting point, and the R-group matching the molecular backbone is generated through progressive denoising at each
time step, based on the
protein pockets and the molecular backbone; simultaneously, at each
time step, a guidance correction term is calculated based on the prior guidance features to guide the correction of the
atomic coordinates of the R-group generated at the
current time step; after denoising, the molecular backbone and the R-group are assembled into a complete molecule and output. This invention can improve the binding affinity between molecules and protein pockets.