MolecularAI / Reinvent

Apache License 2.0
339 stars 110 forks source link

Project workflows #42

Closed WoutVanEynde closed 2 years ago

WoutVanEynde commented 2 years ago

Hello,

I had some questions regarding setting up my own project using the Reinforcement_Learning notebook:

I hope these questions are clear and not too much of a problem!

Thank you for your time and warm regards, Wout Van Eynde

GuoJeff commented 2 years ago

Hi @WoutVanEynde,

  1. The Model_Building_Demo notebook goes through an example of constructing your own QSAR model. The Create_Model_Demo notebook trains a new prior/agent
  2. Yes, the Create_Model_Demo creates the initial prior/agent generative model by generating its vocabulary based on the input training data. The vocabulary dictates what tokens the model is capable of proposing which directly controls the possible atom types in the output SMILES. The Transfer_Learning notebook trains the generative model and the final output from this notebook is what you can use in the "prior" and "agent" fields in the reinforcement learning configuration JSON.
  3. If you want to train a QSAR model for your target, you should use the Model_Building_Demo notebook. The SMILES in the notebook are transformed into fingerprints and act as the input. The output in that specific notebook is binary activity (0 if inactive and 1 if active). If your target doesn't have any known actives, then you may want to evaluate if training a QSAR model would be a good way forward as you need to trust that the model's output at the very least, correlates with what you are trying to achieve (for example, activity). Alternatively, you could train a QSAR model to output "predicted activity" measured via docking scores for example, where a "better" docking score is considered to be "more active". While possible, this makes the assumption that "better" docking scores do indeed mean "more active", which may very well not be the case. I would advise against this, but just wanted to show that it is still possible to train a QSAR model if you wanted to.
  4. Create_Model creates the vocabulary of the base generative model (prior/agent). Model_Building builds QSAR models that can be used in the Scoring Function of REINVENT
  5. In the case of no known actives:
    • you could generate molecule ideas completely de novo, by running REINVENT with reinforcement learning (and optimizing for certain molecular properties you would want to see, such as predicted solubility). The output results could then be analyzed and put through more expensive physics-based approximations of binding affinity/molecular dynamic simulations to gain a better prediction of whether those molecules do indeed bind. In the case of known actives:
    • you could run REINVENT with reinforcement learning with a trained QSAR model based on the actives. Alternatively, you could validate a docking protocol (see if the docking score can distinguish between actives and inactives). If yes, you could use docking as an approximation to activity and have REINVENT optimize docking scores
  6. For creating your own generative model from scratch, I would recommend having SMILES in the 100,000 or larger. If training a QSAR model, even a few hundred SMILES (with known activity) is possible but generally, the more data, the better.

I hope this is helpful and thank you for your interest in REINVENT.

WoutVanEynde commented 2 years ago

The continuation of these comments can be found in the ReinventCommunity repository (https://github.com/MolecularAI/ReinventCommunity/issues/29).