Skip to main content

PDB / AlphaFold

Retrieve 3D protein structures from the RCSB Protein Data Bank or AlphaFold DB. Use pdb_fetch for experimental structures and alphafold_fetch for AI-predicted models.

TOOLpdb_fetch

Fetch metadata and structure coordinates for any PDB entry and optionally save to workspace.

ParameterTypeDescription
pdb_id *string4-character PDB ID (e.g. 6LU7).
formatstringpdb, cif, or fasta (default: pdb).
workspace_idstringSet to save structure file to your workspace.
from smartsbio import SmartsBio

client = SmartsBio(api_key="sk_live_...")
ws_id = client.workspaces.list()[0].id

result = client.tools.run(
    tool_id="pdb_fetch",
    input={
        "pdb_id": "6LU7",            # SARS-CoV-2 main protease
        "format": "pdb",
        "workspace_id": ws_id,
        "output_path": "structures/",
    },
)
print(f"Title      : {result['title']}")
print(f"Method     : {result['method']}")
print(f"Resolution : {result['resolution_a']} Å")
print(f"Chains     : {result['chains']}")
print(f"Deposited  : {result['deposition_date']}")
print(f"File path  : {result['file_path']}")

# Download PDB file
pdb_file = client.files.download(result["file_path"], workspace_id=ws_id, dest="./structures/")
print(f"Saved to   : {pdb_file}")
TOOLalphafold_fetch

Download an AlphaFold predicted structure by UniProt accession. Returns pLDDT confidence scores alongside the structure file.

ParameterTypeDescription
uniprot_id *stringUniProt accession (e.g. P00533).
formatstringpdb or cif (default: pdb).
workspace_idstringSet to save structure to your workspace.
from smartsbio import SmartsBio

client = SmartsBio(api_key="sk_live_...")
ws_id = client.workspaces.list()[0].id

result = client.tools.run(
    tool_id="alphafold_fetch",
    input={
        "uniprot_id": "P00533",   # EGFR
        "format": "pdb",
        "workspace_id": ws_id,
        "output_path": "structures/alphafold/",
    },
)
print(f"Protein   : {result['protein_name']}")
print(f"UniProt   : {result['uniprot_id']}")
print(f"Length    : {result['sequence_length']} aa")
print(f"pLDDT mean: {result['mean_plddt']:.1f}")
print(f"High conf : {result['high_conf_pct']:.0f}% of residues pLDDT ≥ 70")

pdb_path = client.files.download(result["file_path"], workspace_id=ws_id, dest="./alphafold/")
print(f"Saved to  : {pdb_path}")

pLDDT confidence bands

  • ≥ 90 — Very high confidence, suitable for detailed structural analysis.
  • 70–90 — High confidence, most backbone predictions are reliable.
  • 50–70 — Low confidence, treat with caution; may be disordered in vivo.
  • < 50 — Very low confidence; likely intrinsically disordered region.