Skip to main content

Quickstart

Open Tutorial Notebook Every tool follows the same pattern: create an Input, optionally configure with a Config, call run_tool(), and get an Output with results and metadata. Config is always optional; omit it to use defaults.

Structure Prediction

Predict a protein’s 3D structure from its amino acid sequence:
python
from proto_tools import run_esmfold, ESMFoldInput, Complex, Chain

input_data = ESMFoldInput(
    complexes=[
        Complex(
            chains=[Chain(sequence="MKTAYLLIGLLAIAAFSPQVLA")]
        )
    ]
)
result = run_esmfold(input_data)

structure = result.structures[0]
print(f"pLDDT: {structure.metrics.avg_plddt:.3f}")  # avg_plddt is 0-1, always present
structure.write_cif("prediction.cif")
Search a protein sequence against a database:
python
from proto_tools import run_blast_search, BlastSearchInput, BlastSearchConfig

inputs = BlastSearchInput(query="MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTK...")
config = BlastSearchConfig(program="blastp", database="swissprot")
result = run_blast_search(inputs, config)

print(f"Found {len(result.hits)} hits")
for hit in result.hits[:5]:
    print(f"  {hit.sseqid}: {hit.pident}% identity, E-value {hit.evalue}")

Inverse Folding

Design new sequences that fold into a target structure:
python
from proto_tools import (
    run_proteinmpnn_sample, ProteinMPNNSampleInput, ProteinMPNNSampleConfig,
    InverseFoldingStructureInput,
)

inputs = ProteinMPNNSampleInput(
    inputs=[InverseFoldingStructureInput(structure="target.pdb")]
)
config = ProteinMPNNSampleConfig(
    num_sequences_per_structure=10,
    temperature=0.1,
)
result = run_proteinmpnn_sample(inputs, config)

Batch Execution

For batch workloads, keep the model loaded across calls with ToolInstance.persist():
python
from proto_tools.utils.tool_instance import ToolInstance
from proto_tools import run_esmfold, ESMFoldInput, Complex, Chain

sequences = ["MKTAYLLIGL...", "MVLSPADKTN...", "GIVEQCCTSIC..."]

# Model loads once, reused across all calls in the block
with ToolInstance.persist():
    for seq in sequences:
        result = run_esmfold(
            ESMFoldInput(
                complexes=[Complex(chains=[Chain(sequence=seq)])]
            )
        )
        print(f"{seq[:10]}... pLDDT: {result.structures[0].metrics.avg_plddt:.3f}")

Next Steps

Concepts

Understand the tool pattern, categories, and execution model

Entities

Work with Structure and Ligand data objects

Tool Persistence

Optimize batch workloads with persistent tool instances

Browse Tools

Explore individual tool documentation