openprotein.embeddings.EmbeddingsAPI#

class openprotein.embeddings.EmbeddingsAPI(session)[source]#

Embeddings API providing the interface for creating embeddings using protein language models.

You can access all our models either via get_model() or directly through the session’s embedding attribute using the model’s ID and the desired method. For example, to use the attention method on the protein sequence model, you would use session.embedding.prot_seq.attn().

Examples

Accessing a model’s method:

# To call the attention method on the protein sequence model:
import openprotein
session = openprotein.connect(username="user", password="password")
session.embedding.prot_seq.attn()

Using the get_model method:

# Get a model instance by name:
import openprotein
session = openprotein.connect(username="user", password="password")
# list available models:
print(session.embedding.list_models() )
# init model by name
model = session.embedding.get_model('prot-seq')
Parameters:

session (APISession)

__init__(session)[source]#
Parameters:

session (APISession)

Methods

__init__(session)

get_model(name)

Get model by model_id.

list_models()

list models available for creating embeddings of your sequences

Attributes

poet2

PoET-2 model

poet

PoET model

prot_seq

Prot-seq model

rotaprot_large_uniref50w

Rotaprot model trained on UniRef50

rotaprot_large_uniref90_ft

Rotaprot model trained on UniRef90

poet_2

esm1b

ESM1b model

esm1b_t33_650M_UR50S

esm1v

ESM1v model

esm1v_t33_650M_UR90S_1

esm1v_t33_650M_UR90S_2

esm1v_t33_650M_UR90S_3

esm1v_t33_650M_UR90S_4

esm1v_t33_650M_UR90S_5

esm2

ESM2 model

esm2_t12_35M_UR50D

esm2_t30_150M_UR50D

esm2_t33_650M_UR50D

esm2_t36_3B_UR50D

esm2_t6_8M_UR50D