task_categories:text-generation language:en license:cc-by-4.0 size_categories:100K<n<1M modality:text region:us Large Language Models Chemistry Molecule Optimization
---
license: cc-by-4.0
task_categories:
- text-generation
language:
- en
tags:
- Large Language Models
- Chemistry
- Molecule Optimization
size_categories:
- 100K<n<1M
---

# Dataset Card for ECInstruct

MuMOInstruct comprises 63 tasks, with 42 tasks aiming to improve at least 3 molecular properties simultaneously, 
out of which 10 tasks are divided into IND and OOD tasks for evaluation in in- and out-of-domain settings.

## Dataset Sources

<!-- Provide the basic links for the dataset. -->

- **Repository:** [GitHub](https://github.com/ninglab/GeLLMO)


## Usage

As detailed in the paper, 
for each IND task, we conduct evaluation under 2 settings: with seen and unseen instruction.
For example, `instr_setting = seen`, `task = bbbp+drd2+qed` in `test.json` indicates
the test set on the BDQ task (optimizing bbbp, drd2 and qed simultaneously) with seen instructions.

## Quick Start
Run the following command to get the data:
```python
from datasets import load_dataset

dataset = load_dataset("vdey/MuMOInstruct")
```

To train a model on BDQ, BPQ and BDPQ tasks, after loading the dataset, select the 3 tasks as:
```python
tasks = ['bbbp+drd2+qed', 'bbbp+plogp+qed', 'bbbp+drd2+plogp+qed']
dataset = pd.DataFrame(dataset)
train_data = dataset[(dataset['split'] == 'train') & (dataset['task'].isin(tasks))]
val_data = dataset[(dataset['split'] == 'val') & (dataset['task'].isin(tasks))]
```

To test on a task (e.g., MPQ that optimizes mutagenicity, plogP and QED) with unseen instruction,
load the test data as:
```python
task = 'mutagenicity+plogp+qed'
test_data = load_dataset("vdey/MuMOInstruct")['test']
test_data = pd.DataFrame(test_data)
test_data = test_data[(test_data['task'] == task) & (test_data['instr_setting'] == setting)]
```