pengxingang / Pocket2Mol

Pocket2Mol: Efficient Molecular Sampling Based on 3D Protein Pockets
MIT License
258 stars 70 forks source link

Controlling Ligand Size #10

Closed CoryKornowicz closed 1 year ago

CoryKornowicz commented 1 year ago

This is a great network and one that works smoothly! However, is there an option to control the ligand size? It often generates 2-4 atom molecules for a couple of rounds.

pengxingang commented 1 year ago

Thanks for your interest in the work. First of all, the ligand size cannot be directly set manually but you can set the hyperparameters beam_size and num_samples in the sampling yaml file. The parameter beam_size is the number of molecules during sampling rounds, and the num_samples is the number of generated molecules when terminating. In order to sample larger molecules, you can set a relatively small beam_size (e.g., 20, 50) and a large num_sample (e.g., 200, 400).

Second, as you said it often generates only 2-4 atom molecules, it is also possible that the position of the pocket is wrong. You can check whether the position of the pocket (specified by the argument center and bbox_size) is correct.

CNDOTA commented 1 year ago

The initially generated molecules are short but the later generated molecules are longer and longer. If I want to generate 10 molecules for the testing protein, should I use the initial 10 molecules to evaluate the method?

pengxingang commented 1 year ago

The parameters in the sampling config file actually influence the sizes of the generated molecules. In our original paper, we used the the parameters in the provided sampling config file for all test pockets to benchmark our model.

If you only generate 10 molecules, you can tune the parameter beam_size as 50. A smaller beam_size generally results in larger molecules.