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 usesession.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)
Methods
__init__(session)get_model(name)Get model by model_id.
list_models()list models available for creating embeddings of your sequences
Attributes
poet2PoET-2 model
poetPoET model
prot_seqProt-seq model
rotaprot_large_uniref50wRotaprot model trained on UniRef50
rotaprot_large_uniref90_ftRotaprot model trained on UniRef90
poet_2esm1bESM1b model
esm1b_t33_650M_UR50Sesm1vESM1v model
esm1v_t33_650M_UR90S_1esm1v_t33_650M_UR90S_2esm1v_t33_650M_UR90S_3esm1v_t33_650M_UR90S_4esm1v_t33_650M_UR90S_5esm2ESM2 model
esm2_t12_35M_UR50Desm2_t30_150M_UR50Desm2_t33_650M_UR50Desm2_t36_3B_UR50Desm2_t6_8M_UR50D