Skip to main content

A python library for extracting molecular SMILES embeddings from language models pre-trained with various objectives and/or architectures.

Project description

SMILES Featurizers

Extract SMILES embeddings from language models pre-trained with various objectives architectures.

Getting Started

pip install smiles-featurizers

Model List

Our released models are listed as following. You can import these models by using the smiles-featurizers package or using HuggingFace's Transformers.

Model Type
shahrukhx01/smole-bert Bert
shahrukhx01/smole-bert-mtr Bert
shahrukhx01/smole-bart Bart
shahrukhx01/muv2x-simcse-smole-bart Simcse
shahrukhx01/siamese-smole-bert-muv-1x SentenceTransformer

Use SMILES Featurizers

Bert Featurizer

from smiles_featurizers import BertFeaturizer
import torch

## set device
use_gpu = True if torch.cuda.is_available() else False

featurizer = BertFeaturizer("shahrukhx01/smole-bert", use_gpu=use_gpu)
embeddings = featurizer.embed(["CCC(C)(C)Br"])

Bart (Encoder) Featurizer

from smiles_featurizers import BartFeaturizer

featurizer = BartFeaturizer("shahrukhx01/smole-bart")
embeddings = featurizer.embed(["CCC(C)(C)Br"], embedder="encoder")

Bart (Decoder) Featurizer

from smiles_featurizers import BartFeaturizer

featurizer = BartFeaturizer("shahrukhx01/smole-bart")
embeddings = featurizer.embed(["CCC(C)(C)Br"], embedder="decoder")

SimCSE Featurizer

from smiles_featurizers import SimcseFeaturizer
import torch

## set device
device = "cuda" if torch.cuda.is_available() else "cpu"

featurizer = SimcseFeaturizer("shahrukhx01/mv2x-simcse-smole-bert", device=device)
embeddings = featurizer.embed(["CCC(C)(C)Br"])

SentenceTransformer Featurizer

from smiles_featurizers import SentenceTransformersFeaturizer
import torch

## set device
device = "cuda" if torch.cuda.is_available() else "cpu"

featurizer = SentenceTransformersFeaturizer("shahrukhx01/siamese-smole-bert-muv-1x", device=device)
embeddings = featurizer.embed(["CCC(C)(C)Br"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

smiles_featurizers-1.0.7-py2.py3-none-any.whl (9.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file smiles_featurizers-1.0.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for smiles_featurizers-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3d9375c2647abf82aae70098331302556e6af2831a4cd4c0f258da2c4485ca47
MD5 98890cfce800d2d31a2a7a18f196cef5
BLAKE2b-256 423a2cc2981de9ab8d2027c396cb966693d6b87c156c823e49c288c8cbca06b8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page