Skip to Content

openprotein.align

SDK release/v0.18.0

Some tools (e.g. PoET, AlphaFold2) require an MSA to be generated. The tools below will help you achieve this.

Create an alignment, inspect its first few rows, and attach it to a protein:

from itertools import islice

from openprotein.molecules import Protein

sequence = "ACDEFGHIK"
msa = session.align.create_msa(sequence)
for name, aligned_sequence in islice(msa.wait(timeout=600), 3):
    print(name, aligned_sequence)

protein = Protein(sequence)
protein.msa = msa

wait() returns an iterator of (name, aligned_sequence) pairs. Attach the future msa itself; reading the rows is optional. Protein.msa also accepts a stored MSA handle or an ID. For a single-sequence model, protein.msa = Protein.single_sequence_mode explicitly selects no MSA; do not use that sentinel in place of an alignment for an MSA-requiring model. Model support varies.

For prompt sampling, MSAFuture.sample_prompt uses num_sequences and num_residues; session.data.prompts.sample_msa calls the corresponding limits max_msa_sequences and max_msa_tokens. Their defaults and validation differ.

12source

AbNumber supports the following schemes:

4source

3source

5source

3source

3source

4source

3source

Types referenced by the interfaces above.

3source

On this page