File size: 1,100 Bytes
5e6bfe3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7033c50
5e6bfe3
7033c50
5e6bfe3
 
 
 
 
 
 
 
 
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
---
license: mit
library_name: transformers
tags:
  - chemistry
  - cheminformatics
  - natural-products
  - smiles
---

# CLaM-NP

SMILES language models for **natural-product-likeness** scoring (CLaM-NP Score).

This repository hosts up to three causal language models, one per subfolder:

| Subfolder    | Training data | Role                          |
|--------------|---------------|-------------------------------|
| `natural`    | COCONUT       | P(x \| natural)               |
| `synthetic`  | ZINC22        | P(x \| synthetic)             |
| `general`    | ChEMBL        | P(x \| general) — stabilizer  |

Tokenizer: [`kohbanye/SmilesTokenizer_PubChem_1M`](https://huggingface.co/kohbanye/SmilesTokenizer_PubChem_1M).

## Usage

```python
from clamnp import CLaMNPScorer

scorer = CLaMNPScorer.from_pretrained()          # this repo
print(scorer.score("CC(=O)Oc1ccccc1C(=O)O"))         # CLaM-NP Score
```

Or load a single model directly:

```python
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("kohbanye/clamnp", subfolder="natural")
```