> For the complete documentation index, see [llms.txt](https://ersilia.gitbook.io/ersilia-workshops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ersilia.gitbook.io/ersilia-workshops/rafiki/rafiki-workshop.md).

# RAFIKI workshop

8-11 September 2026, Nairobi, Kenya

Welcome to the AI for Drug Discovery session of the [workshop](https://rafiki-project.eu/2026/05/19/comprehensive-drug-discovery-and-development-workshop-nairobi-kenya/) organised by the RAFIKI consortium, delivered by [Ersilia](https://ersilia.io/).

A few pointers to get started:

* If you did not attend the plenary session, make sure to look at the [slides](https://drive.google.com/file/d/1-gRb4cUlutgdrGgZMWgM0Nm--U6ng100/view?usp=sharing) beforehand, we will assume many concepts from there.
* The Ersilia Model Hub is deployed [online](https://hub.ersilia.io/) for small model runs. You can [browse](https://catalog.ersilia.io/) it here.
* Ersilia has an extensive [documentation database](https://ersilia.gitbook.com/ersilia-book) you can browse.
* Don't get stuck! Contact us at [hello\[at\]ersilia.io](mailto:hello@ersilia.io) now or in the future with any questions or requests and we will do our best to help.

## Quick links

* Course [app](https://rafiki.streamlit.app/).
* [Publications](https://drive.google.com/drive/folders/1fk-nfM5hU2O5MwufJNSCBEfypi-nGqD6?usp=drive_link) referred to in the presentations and exercises.
* Ersilia Model Hub [catalog](https://catalog.ersilia.io/).

### Cheatsheet

Remember the AI/ML model classification we have presented:

<figure><img src="https://2911290384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDUJ94RG1X9bOehNiO0nT%2Fuploads%2FHxnkBFfqryzrUGUKVXlh%2FScreenshot%202026-09-08%20at%2014.49.54.png?alt=media&amp;token=ba000285-5b62-4065-aab7-50443fa6abaf" alt=""><figcaption><p>AI/ML model classification for drug discovery in the Ersilia Model Hub</p></figcaption></figure>

## Hands-on exercise

As you have seen in the plenary presentation, AI/ML models for drug discovery can be categorised into Annotation, Representation and Sampling. In this activity, we will play with the different models and understand how we could apply them to a real-world example.&#x20;

For this demo, we will get in the shoes of a scientist working on *Staphylococcus aureus* drug discovery. *S.aureus* is a Gram-positive bacteria causing from minor skin infections to serious conditions such as pneumonia and sepsis. Multi-drug resistant *S.aureus* is one of the critical pathogenic threats identified by the [WHO Bacterial Priority Pathogens List](https://www.who.int/publications/i/item/9789240093461). We have a library of purchasable compounds that we would like to select based on their predicted *S.aureus* inhibition and, if possible, optimise potential hits to make them better drug candidates.

Follow the app step by step and take time to answer the questions in each section! Below you will find some further guidance in case it is needed.

{% hint style="info" %}
The course app will provide pre-calculated results, but all the models used come from the Ersilia Model Hub and can be easily run online (small tests) or, for more expert users, locally in your systems (large experiments).
{% endhint %}

### Step 1: Bioactivity against S. aureus

One of the first things that comes to mind for our problem is, of course, "[Do we have a model that predicts bioactivity against *S. aureus*?](#user-content-fn-1)[^1]". In the Ersilia Model Hub, we have several bioactivity-related endpoints (**Annotation**) that we could use, but for the demo we will mock-train a model based on publicly available data. A good model would be a binary classifier that tells us whether a molecule is active (1) or inactive (0), based on a chemically diverse library.

We have looked into the collection available at EU-OPENSCREEN and identified a suitable primary assay screening \~100,000 compounds against *S. aureus* ([EOS300078](https://ecbd.eu/assays/EOS300078)). Luckily for us, the EU Open Screen collection is a well curated, well annotated database and it is almost straight-forward to use, but there are still a few questions we need to answer before we can train our model.

Hop onto the app and look at the data presented there, try to answer the questions by looking at the information on the assay card in the ECBD. The app also includes a 2D **projection** (in this case, a t-SNE) built with model [eos1klk](https://github.com/ersilia-os/eos1klk) so you can see then chemical space of the active/inactive compounds.

{% hint style="warning" %}
We have down-sampled the dataset to 10K for the demo purposes, so the hit rate is about ten times lower than what you see on the app!
{% endhint %}

### Step 2: Train a classifier model

To train a model, we first need to featurise the molecules as numerical vectors. The Ersilia Model Hub contains several **Representation** models, from simple binary vectors (i.e: presence or absence of a given chemical feature) to more complex embeddings (not directly interpretable).

For this demo, we have chosen two featurisers:&#x20;

* Morgan Fingerprints ([eos4wt0](https://github.com/ersilia-os/eos4wt0); [paper](https://pubs.acs.org/jcisd8/article-abstract/50/5/742/1231687/Extended-Connectivity-FingerprintsExtended))
* ChMeleon Embeddings ([eos9o72](https://github.com/ersilia-os/eos9o72); [paper](https://arxiv.org/abs/2506.15792))

Those are passed to a Random Forest algorithm that trains 5 submodels using a train/test split of 80%:20% of the data. We evaluate the performance of those models on the split using an Area Under the ROC Curve (AUROC). If you are not familiar with this concept, just keep in mind for now that the closer to 1, the better.

{% hint style="warning" %}
We have implemented a very quick algorithm in a downsampled library. A real world exercise would take more iterations and longer training times.
{% endhint %}

### Step 3: Bioactivity prediction

Each group / participant will be assigned a different library of a downsampled example of 1000 potential candidates. The first screen will use the Ersilia-trained bioactivity model for S.aureus [eos8lcw](https://github.com/ersilia-os/eos8lcw) (instead of our quick-and-dirty modelling example), but its outcome should be equally interpretable.&#x20;

For more information in the actual model, you can find here how it performs on unseen data from EU-OPENSCREEN:

<figure><img src="https://2911290384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDUJ94RG1X9bOehNiO0nT%2Fuploads%2FcUyzPTXEmw1UnaRZB4Hb%2Feos8lcw_validation.png?alt=media&amp;token=f32c9ab5-a4e4-41b8-bc5f-3ddbfbb295ca" alt=""><figcaption></figcaption></figure>

### Step 4: Virtual screening with the Ersilia Model Hub

We have selected a few models from the Ersilia Model Hub related to compound annotation. You could run these yourself in our free online platform: [hub.ersilia.io](https://hub.ersilia.io). Note that we have selected only a few endpoints (columns) from each model to simplify the exercise, there are even more datapoints you could consider using!

Look at the information available for each model to understand what are the values associated to the compounds telling us. Select 5 candidates that, according to you, have a good profile as starting hits for drug discovery campaigns.

{% hint style="warning" %}
The 1000-molecule exercise libraries are pre-made libraries with known hits in them to engage in discussion, a real-case study would be more complex and the hit rate would be lower.
{% endhint %}

### Step 5: Collaborate

Look at the candidates from other participants and try to find a known antibiotic natural product in there! This should be a group discussion. There is no right or wrong answer.

### Step 6: Hit expansion

Together, we will identify the known NP antibiotic. We could look into applying some **generative** models to expand the series, or make it more easily synthesisable. Don't go to this step until you have finished the discussion on step 5, or you'll spoil the exercise!

We have selected two exemplary generative models:

* LibInvent ([eos6ost](https://github.com/ersilia-os/eos6ost); [paper](https://link.springer.com/article/10.1186/s13321-024-00812-5))
* CReM ([eos4q1a](https://github.com/ersilia-os/eos4q1a); [paper](https://link.springer.com/article/10.1186/s13321-020-00431-w))

[^1]:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ersilia.gitbook.io/ersilia-workshops/rafiki/rafiki-workshop.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
