chenruduan / OAReactDiff

An object-aware diffusion model for generating chemical reactions
MIT License
110 stars 28 forks source link

Generating multiple TSs for a given set of reatants and products #4

Closed jycho1217 closed 5 months ago

jycho1217 commented 6 months ago

Hello,

I am currently exploring the OAReactDiff for my research project and have found it extremely valuable. I began by using the tutorial ipynb file and was able to successfully generate a transition state (TS) for a specific set of reactants and products. However, the process is limited to creating only a single TS structure. Could you please assist me in modifying the existing code below to enable the generation of multiple TS structures for the given reactants and products?

out_samples, out_masks = ddpm_trainer.ddpm.inpaint( n_samples=n_samples, fragments_nodes=fragments_nodes, conditions=conditions, return_frames=1, resamplings=5, jump_length=5, timesteps=None, xh_fixed=xh_fixed, frag_fixed=[0, 2], )

chenruduan commented 6 months ago

Thanks for the interest! The same code should work for generating multiple TS structures in one run. It can be done by expanding the n_samples.