BenevolentAI / DeeplyTough

DeeplyTough: Learning Structural Comparison of Protein Binding Sites
Other
154 stars 37 forks source link

Using DeeplyTough as an embedder #16

Open vinbl opened 2 years ago

vinbl commented 2 years ago

Hello Josh,

I am thinking of the possibility of using DeeplyTough as an embedder for protein pockets, so that each pocket is mapped to a vector of descriptors. Could you provide some guidance on how these could be obtained?

Also, is it possible to process a custom pdb as the input containing only the pocket residues, instead of relying on the automated pocket detection?

Thank you very much

JoshuaMeyers commented 2 years ago

Hello @vinbl, thanks for raising an issue! Yep, DeeplyTough could be exactly what you're looking for. Apologies for the delay.

Obtaining the descriptors for each pocket is relatively straightforward, there are many strategies but I'll suggest the one with the fewest code changes.

  1. A pre-requisite is that you can run 'custom_evaluation.py' on the README. This involves running deeplytough pairwise pocket matching for a set of (pdb, pocket) pairs defined in pairs.csv.
  2. Within custom_evaluation.py the calculation of the entries dictionary here involves calculating descriptors for each pocket so if you modify the code to save this dict somewhere you should be good to go.
  3. The simplest way to setup pairs.csv would be to just duplicate your pocket entries (it will essentially be calculating the distance between pocket 1 and pocket 1 which should be 0. This allows you to loop over just the pockets you care about without needing to modify the current interface.

p.s. I would suggest starting from our image on Dockerhub, or building the docker image yourself since this repo has a few stale dependencies now which can be a bit fiddly to install (docker pull joshuameyers/deeplytough)

Hope this helps