""" This file includes all the constant content shown in the app """ # -------------------------------------------------------------------------------------- summary_text = (''' This application allows you to make **activity predictions** for **biological targets** for which you have only a **little knowledge** in terms of known active and inactive molecules. **Provide** via the sidebar:\n - some active molecules, - some inactive molecules, and - molecules you want to predict. Hit **Predict** and explore the predictions! For more **information** about the **model** and **how to provide the molecules**, please visit the **Additional Information** tab. If you encounter any problems, we would be glad if you could report them to us: **schimunek@ml.jku.at**. ''') mhnfs_text =('''
MHNfs is a few-shot drug discovery model which consists of a context module , a cross-attention module , and a similarity module as described here: https://openreview.net/pdf?id=XrMWUuEevr.

Abstract. A central task in computational drug discovery is to construct models from known active molecules to find further promising molecules for subsequent screening. However, typically only very few active molecules are known. Therefore, few-shot learning methods have the potential to improve the effectiveness of this critical phase of the drug discovery process. We introduce a new method for few-shot drug discovery. Its main idea is to enrich a molecule representation by knowledge about known context or reference molecules. Our novel concept for molecule representation enrichment is to associate molecules from both the support set and the query set with a large set of reference (context) molecules through a modern Hopfield network. Intuitively, this enrichment step is analogous to a human expert who would associate a given molecule with familiar molecules whose properties are known. The enrichment step reinforces and amplifies the covariance structure of the data, while simultaneously removing spurious correlations arising from the decoration of molecules. Our approach is compared with other few-shot methods for drug discovery on the FS-Mol benchmark dataset. On FS-Mol, our approach outperforms all compared methods and therefore sets a new state-of-the art for few-shot learning in drug discovery. An ablation study shows that the enrichment step of our method is the key to improve the predictive quality. In a domain shift experiment, we further demonstrate the robustness of our method. Code is available at https://github.com/ml-jku/MHNfs.


''') citation_text = ''' ### @inproceedings{ schimunek2023contextenriched, title={Context-enriched molecule representations improve few-shot drug discovery}, author={Johannes Schimunek and Philipp Seidl and Lukas Friedrich and Daniel Kuhn and Friedrich Rippmann and Sepp Hochreiter and Günter Klambauer}, booktitle={The Eleventh International Conference on Learning Representations}, year={2023}, url={https://openreview.net/forum?id=XrMWUuEevr} } ''' few_shot_learning_text = ( '''
Few-shot learning is a machine learning sub-field which aims to provide predictive models for scenarios in which only little data is known/available.

MHNfs is a few-shot learning model which is specifically designed for drug discovery applications. It is built to use the input prompts in a way such that the provided available knowledge, i.e. the known active and inactive molecules, functions as context to predict the activity of the new requested molecules. Precisely, the provided active and inactive molecules are associated with a large set of general molecules - called context molecules - to enrich the provided information and to remove spurious correlations arising from the decoration of molecules. This is analogous to a Large Language Model which would not only use the provided information in the current prompt as context but would also have access to way more information, e.g., a prompting history.
''') under_the_hood_text = ('''
The predictive model (MHNfs) used in this application was specifically designed and trained for low-data scenarios. The model predicts whether a molecule is active or inactive. The predicted activity value is a continuous value between 0 and 1, and, similar to a probability, the higher/lower the value, the more confident the model is that the molecule is active/inactive. The model was trained on the FS-Mol dataset which includes 5120 tasks (roughly 5000 tasks were used for training, rest for evaluation). The training tasks are listed here: https://github.com/microsoft/FS-Mol/tree/main/datasets/targets.
''') usage_text = ('''
To use this application, you need to provide 3 different sets of molecules:
  1. active molecules: set of known active molecules,
  2. inactive molecules: set of known inactive molecules, and
  3. molecules to predict: set of molecules you want to predict.
These three sets can be provided via the sidebar. The sidebar also includes two buttons predict and reset to run the prediction pipeline and to reset it.
''') data_text = ('''
''') trust_text = ('''
Just like all other machine learning models, the performance of MHNfs varies and, generally, the model works well if the task is somehow close to tasks which were used to train the model. The model performance for very different tasks is unclear and might be poor.

MHNfs was trained on the FS-Mol dataset which includes 5120 tasks (roughly 5000 tasks were used for training, rest for evaluation). The training tasks are listed here: https://github.com/microsoft/FS-Mol/tree/main/datasets/targets.
''') example_trustworthy_text = ('''
Since the predicitve model has seen a lot of kinase related tasks during training, the model is expected to generally perform well on kinase targets. For this example, we use data for the target CHEMBL5914. Notably, this specific kinase has not been seen during training. Precisely, we use the available inhibition data while molecules with an inhibition value greater (smaller) than 50 % are considered as active (inactive).
From the known available data, we have selected 4 "known" active molecules, 8 "known" inactive molecules, and 11 molecules to predict.
Molecules to predict:
FC(F)(F)c1ccc(Cl)cc1CN1CCNc2ncc(-c3ccnc(N4CCNCC4)c3)cc21,
CS(=O)(=O)c1ccc(-n2nc(-c3cnc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(OC)c(OC)cc23)c1,
CN(C1CC1)S(=O)(=O)c1ccc(-c2cnc(N)c(-c3ccc4c(c3)CCNC4=O)c2)c(F)c1,
CCN1CCN(Cc2ccc(NC(=O)c3ccc(C)c(C#Cc4cnc5[nH]ccc5c4)c3)cc2C(F)(F)F)CC1,
CC(C)n1cc(-c2cc(-c3ccc(CN4CCOCC4)cc3)cnc2N)nn1,
CC(C)(O)[C@H](F)CN1Cc2cc(NC(=O)c3cnn4cccnc34)c(N3CCOCC3)cc2C1=O,
[2H]C([2H])([2H])C1(C([2H])([2H])[2H])Cn2nc(-c3ccc(F)cn3)c(-c3ccnc4[nH]ncc34)c2CO1

Predictions:
''') example_nottrustworthy_text = ('''
For this example, we use data for the auxiliary transport protein target CHEMBL5738. Precisely, we use the available Ki data while molecules with a pCHEMBL value greater (smaller) than 5 are considered as active (inactive).
From the known available data, we have selected 4 "known" active molecules, 3 "known" inactive molecules, and 10 molecules to predict.
Molecules to predict:
CC(C(=O)O)c1ccc(-c2ccccc2)c(F)c1,
O=S(=O)(O)Oc1cccc2cccc(Nc3ccccc3)c12,
CCCCCCCC/C=C\CCCCCCCC(=O)O,
C[C@]12C=CC(=O)C=C1CC[C@@H]1[C@@H]2[C@@H](O)C[C@@]2(C)[C@H]1CC[C@]2(O)C(=O)CO,
CCOC(=O)C(C)(C)Oc1ccc(Cl)cc1,
Cc1ccc(Cl)c(Nc2ccccc2C(=O)O)c1Cl,
O=C(O)Cc1ccccc1Nc1c(Cl)cccc1Cl,
CC(C)(Oc1ccc(CCNC(=O)c2ccc(Cl)cc2)cc1)C(=O)O,
O=C(c1ccccc1)c1ccc2n1CCC2C(=O)O,
CC(C)OC(=O)C(C)(C)Oc1ccc(C(=O)c2ccc(Cl)cc2)cc1

Known active molecules:
CC(C(=O)O)c1ccc(N2Cc3ccccc3C2=O)cc1,
CN1C(=O)CN=C(c2ccccc2)c2cc(Cl)ccc21,
CC(C)(Oc1ccc(C(=O)c2ccc(Cl)cc2)cc1)C(=O)O,
CC(=O)[C@H]1CC[C@H]2[C@@H]3CCC4=CC(=O)CC[C@]4(C)[C@H]3CC[C@]12C

Known inactive molecules:
CC(C)Cc1ccc(C(C)C(=O)O)cc1,
O=C1Nc2ccc(Cl)cc2C(c2ccccc2Cl)=NC1O,
C[C@@H]1C[C@H]2[C@@H]3CCC4=CC(=O)C=C[C@]4(C)[C@@]3(F)[C@@H](O)C[C@]2(C)[C@@]1(O)C(=O)CO

Predictions:
''')