pengxingang / Pocket2Mol

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

The initial ligand #9

Open 1121091694 opened 1 year ago

1121091694 commented 1 year ago

Nice Paper,could you tell me how to add the atom and atomic coordinate of the initial ligand in the sample of protein pocket? Just like smiles seq2seq, we give the prompt of sequence like CCCC. In this work, we give the initial ligand like atom and xyz.

pengxingang commented 1 year ago

Thanks for your interest in the work. Pocket2Mol was initially proposed for de novo drug generation (i.e., generating initial atoms by itself). However, since it autoregressively generates atoms, it can be modified to generate molecules given initial atoms.

In order to add the initial atoms (including the element types, coordinates, and the connecting bonds) as prior, you have to modify the codes by yourself. More specifically, you can modify the get_init function in line 140 of sample_for_pdb.py. This function (defined in line 37 of sample.py) is used to generate the initial atoms. In this function, you can remove model.sample_init and directly add the information of your prior atoms into the items of data_next_list.