Instructions to use kohbanye/clamnp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kohbanye/clamnp with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("kohbanye/clamnp", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from kohbanye/clamnp: direct link, hf CLI and curl.
- Browser
- Download file 1.84 kB
-
https://huggingface.co/kohbanye/clamnp/resolve/main/README.md
- Command line
-
hf download hf://kohbanye/clamnp/README.md
-
curl -L -o README.md https://huggingface.co/kohbanye/clamnp/resolve/main/README.md
1.84 kB
| 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). | |
| ## Training data | |
| The three models are trained on a joint scaffold split: the scaffolds of all three | |
| datasets are pooled and clustered together (ECFP4 Tanimoto >= 0.6), and each | |
| cluster goes to a single split, so no scaffold is shared between the training data | |
| of one dataset and the evaluation data of another. The split is built by | |
| [`scripts/joint_split.py`](https://github.com/ohuelab/clamnp/blob/main/scripts/joint_split.py). | |
| - `natural`: COCONUT, August 2025 release (`coconut_csv-08-2025.zip`) | |
| - `synthetic`: 700,000 compounds drawn at random from ZINC 22. A random draw | |
| cannot be repeated, so the sample is deposited here as `data/zinc22_sample.smi` | |
| (one SMILES per line, as standardized for training). | |
| - `general`: ChEMBL 35 | |
| ## 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") | |
| ``` | |