E2 Objective Functions
Once the scores have been computed, they are passed to an LLM in the following format.
Molecule Optimization Prompt
Given a docking and a druglikeness score, and a molecule as a SMILES string provide a short criticism to improve the druglikeness of this molecule and its binding affinity with the protein {protein_name}. For docking, lower is better (less than is considered good) and for druglikeness, 1 is the best and 0 is the worst (greater than 0.8 is considered good). In terms of prioritization, the docking score is {vina_qed_ratio} times as important as the druglikeness score. Make sure your criticism is very succinct and to the point.
\`\`\`python\` our experiments, we do not to attempt to provide similar geometric information, as not all LLMs support multimodal inputs. However, we do include the protein_name in the loss prompt to inject supplementary structural information.
In practice, drug efficacy is typically a higher priority than absorbtion efficiency [101, 102], so we set the vina_qed_ratio to be 10. Empirically, we observe that by scaling this prioritization factor, we can tune TEXTGRAD's generation towards molecules with differing binding affinity and druglikness tradeoffs. This prioritization also allows us to simplify post- hoc selection and ranking of the generated molecules with a single "overall" score defined as follows, where a lower overall score indicates a better molecule.
Since the QED score is bounded between 0 and 1, and the Vina score typically ranges between to kcal/mol, this overall score places approximately 10 times more emphasis on binding affinity than druglikeness.