File size: 1,581 Bytes
cc5993c
 
846f625
 
 
 
 
 
5521580
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
license: mit
tags:
- chemistry
- MolecularEmbedding
- SMILES
- GED-aware-embedding
- SALSA
---

[SALSA: Semantically-Aware Latent Space Autoencoder](https://doi.org/10.1609/aaai.v38i12.29221) (AAAI 2024)

## Installation

Requires Python 3.11 or newer.

```bash
pip install git+https://github.com/molecularmodelinglab/SALSA.git
```

To work on the code instead:

```bash
git clone https://github.com/molecularmodelinglab/SALSA.git
cd SALSA
pip install -e ".[dev]"
```

Optional extras: `viz` for plotting and UMAP, `dev` for tests and linters.

## Quick Start

Installing provides the `salsa-lit` command:

```bash
salsa-lit mutate molecules.parquet -o mutants/
salsa-lit train mutants/<generated>.parquet -o run/
salsa-lit embed molecules.parquet -m run/ -o embeddings.parquet
```

The same three steps from Python:

```python
from salsa_lit import mutate_dataset, cook_salsa, serve_salsa

df, train_path = mutate_dataset("molecules.parquet",
                                output_file="mutants.parquet")

model, trainer = cook_salsa(train_path, save_dir="run/")

embeddings, smiles = serve_salsa("molecules.parquet", model="run/",
                                 output_file="embeddings.parquet")
```

Datasets are read and written as parquet by default; pass a `.csv` path or
`--format csv` to use CSV instead.

## Citation

Kirchoff, K. E., Maxfield, T., Tropsha, A., & Gomez, S. M. (2024). SALSA:
Semantically-Aware Latent Space Autoencoder. Proceedings of the AAAI Conference
on Artificial Intelligence, 38(12), 13211–13219.
https://doi.org/10.1609/aaai.v38i12.29221