> ## Documentation Index
> Fetch the complete documentation index at: https://docs.biohub.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# fold_all_atom

> (ESMFold2) Folds molecular complexes containing proteins, dna, rna, and ligands. Defaults to esmfold2-fast-2026-05 if no model is given



## OpenAPI

````yaml openapi/biohub-platform-openapi.json POST /api/v1/fold_all_atom
openapi: 3.1.0
info:
  title: Biohub Platform API
  version: 1.0.0
servers:
  - url: https://biohub.ai
security: []
paths:
  /api/v1/fold_all_atom:
    post:
      tags:
        - v1
      summary: >-
        (ESMFold2) Folds molecular complexes containing proteins, dna, rna, and
        ligands. Defaults to esmfold2-fast-2026-05 if no model is given
      operationId: fold_all_atom_api_v1_fold_all_atom_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FoldAllAtomRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FoldResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    FoldAllAtomRequest:
      properties:
        model:
          type:
            - string
            - 'null'
          enum:
            - esmfold2-fast-2026-05
            - esmfold2-2026-05
            - null
          description: >-
            You may have access to additional, private models as well. These
            will be visible on the Rate Limits page under the Developer Console
        potential_sequence_of_concern:
          type: boolean
          description: >-
            Disclose potential sequences of concern. For approved users, such
            sequences will not go through additional safety filtering. Reach out
            if you are interested in using this.
          default: false
        sequence:
          anyOf:
            - type: string
            - type: 'null'
          description: Input sequence to be folded.
        msa:
          anyOf:
            - $ref: '#/components/schemas/MSA'
            - type: 'null'
          description: MSA data for the query sequence.
        num_loops:
          type: integer
          maximum: 20
          minimum: 0
          description: Number of trunk loops for iterative refinement.
          default: 20
        num_sampling_steps:
          type: integer
          maximum: 100
          minimum: 1
          description: Diffusion ODE solver steps. Lower for speed, higher for quality.
          default: 100
        lm_dropout:
          type: number
          maximum: 1
          minimum: 0
          description: >-
            Dropout probability on LM pair embeddings. When > 0, dropout is
            applied.
          default: 0.3
        lm_mask_pct:
          type: number
          maximum: 1
          minimum: 0
          description: >-
            Fraction of sequence residues randomly masked before the PLM
            backbone. If not provided, defaults to 0.1 for ESMFOLD2_FAST and 0.0
            for ESMFOLD2
          default: 0
        msa_max_depth:
          anyOf:
            - type: integer
              maximum: 16384
              minimum: 1
            - type: 'null'
          description: >-
            Number of MSA rows randomly subsampled each loop. Set to null to
            disable (sets msa_subsample_at_inference to False).
          default: 1024
        msa_column_mask_rate:
          type: number
          maximum: 1
          minimum: 0
          description: >-
            Fraction of MSA columns randomly masked in non-query rows for
            inference-time diversity.
          default: 0.1
        include_distogram:
          type: boolean
          description: Whether to include distogram predictions in the response.
          default: false
        include_pae:
          type: boolean
          description: >-
            Whether to include Predicted Aligned Error (PAE) matrix in the
            response.
          default: false
        include_pair_chains_iptm:
          type: boolean
          description: Whether to include pair-chain IPTM predictions in the response.
          default: false
        all_atom_input:
          anyOf:
            - $ref: '#/components/schemas/FoldAllAtomInput'
            - type: 'null'
          description: >-
            All atom input (protein, RNA, DNA, and ligand) to fold. If provided,
            performs all-atom folding and ignores the sequence and msa inputs.
        include_embeddings:
          type: boolean
          description: Whether to include sequence and pair embeddings in the response.
          default: false
      type: object
    FoldResponse:
      properties:
        model:
          type: string
          enum:
            - esm3-open-2024-03
            - esmfold2-fast-2026-05
            - esmfold2-2026-05
          description: >-
            You may have access to additional, private models as well. These
            will be visible on the Rate Limits page under the Developer Console
        created:
          type: string
          description: ISO formatted date time
        potential_sequence_of_concern:
          type: boolean
          description: Indicate that the returned sequence may be of potential concerns.
          default: false
        warning_messages:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Warning messages returned by FastAPI.
        coordinates:
          anyOf:
            - items:
                items:
                  items:
                    anyOf:
                      - type: number
                      - type: 'null'
                  type: array
                type: array
              type: array
            - type: 'null'
          description: Coordinates of the N, CA, C atom sequence as a Nx37x3 array.
        complex:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Molecular complex with support for proteins, nucleic acids, and
            ligands.
        plddt:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          description: >-
            Per position plddt predictions for a protein or molecular complex.
            Usually produced by structure decoder.
        ptm:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Predicted TM score of a protein or molecular complex. Usually
            produced by structure decoder.
        interface_ptm:
          anyOf:
            - type: number
            - type: 'null'
          description: Interface TM score of a protein or molecular complex.
        pae:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Predicted Aligned Error matrix for the protein or molecular complex.
            Shape is L x L. Values are rounded to 2 decimals (well within 0.5 A
            bin width)
        pair_chains_iptm:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Pair-chain IPTM predictions for a protein. Shape is C x C, where C
            is the number of chains in the protein.
        output_embedding_sequence:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: Output embedding sequence from the model. Only present if requested.
        output_embedding_pair_pooled:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Output embedding pair mean-pooled from the model. Only present if
            requested.
        residue_index:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            Residue indexes from the model. Only present if embeddings are
            requested.
        entity_id:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            Entity ids (e.g. chain ids) from the model. Only present if
            embeddings are requested.
      type: object
      required:
        - model
        - created
        - tokens_used
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    MSA:
      properties:
        sequences:
          items:
            type: string
          type: array
        deletions:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Optional per-(row, match-column) a3m deletion counts, shape (depth,
            query_length).
      type: object
      required:
        - sequences
    FoldAllAtomInput:
      properties:
        sequences:
          items:
            oneOf:
              - $ref: '#/components/schemas/ProteinInput'
              - $ref: '#/components/schemas/RNAInput'
              - $ref: '#/components/schemas/DNAInput'
              - $ref: '#/components/schemas/LigandInput'
            discriminator:
              propertyName: type
              mapping:
                dna:
                  $ref: '#/components/schemas/DNAInput'
                ligand:
                  $ref: '#/components/schemas/LigandInput'
                protein:
                  $ref: '#/components/schemas/ProteinInput'
                rna:
                  $ref: '#/components/schemas/RNAInput'
          type: array
        covalent_bonds:
          anyOf:
            - items:
                $ref: '#/components/schemas/CovalentBond'
              type: array
            - type: 'null'
          description: List of covalent bonds between chains in the molecular complex.
        pocket:
          anyOf:
            - $ref: '#/components/schemas/PocketConditioning'
            - type: 'null'
          description: Pocket conditioning for binder design.
        distogram_conditioning:
          anyOf:
            - items:
                $ref: '#/components/schemas/DistogramConditioning'
              type: array
            - type: 'null'
          description: List of distogram conditioning for chains.
      type: object
      required:
        - sequences
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
    ProteinInput:
      properties:
        id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
        sequence:
          type: string
        msa:
          anyOf:
            - $ref: '#/components/schemas/MSA'
            - type: 'null'
        modifications:
          anyOf:
            - items:
                $ref: '#/components/schemas/Modification'
              type: array
            - type: 'null'
        type:
          type: string
          const: protein
      type: object
      required:
        - sequence
        - type
    RNAInput:
      properties:
        id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
        sequence:
          type: string
        modifications:
          anyOf:
            - items:
                $ref: '#/components/schemas/Modification'
              type: array
            - type: 'null'
        type:
          type: string
          const: rna
      type: object
      required:
        - sequence
        - type
    DNAInput:
      properties:
        id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
        sequence:
          type: string
        modifications:
          anyOf:
            - items:
                $ref: '#/components/schemas/Modification'
              type: array
            - type: 'null'
        type:
          type: string
          const: dna
      type: object
      required:
        - sequence
        - type
    LigandInput:
      properties:
        id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
        smiles:
          anyOf:
            - type: string
            - type: 'null'
        ccd:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
        type:
          type: string
          const: ligand
      type: object
      required:
        - type
    CovalentBond:
      properties:
        chain_id1:
          type: string
          description: First chain ID in the covalent bond.
        res_idx1:
          type: integer
          description: Residue index in the first chain.
        atom_idx1:
          type: integer
          description: Atom index in the first residue.
        chain_id2:
          type: string
          description: Second chain ID in the covalent bond.
        res_idx2:
          type: integer
          description: Residue index in the second chain.
        atom_idx2:
          type: integer
          description: Atom index in the second residue.
      type: object
      required:
        - chain_id1
        - res_idx1
        - atom_idx1
        - chain_id2
        - res_idx2
        - atom_idx2
    PocketConditioning:
      properties:
        binder_chain_id:
          type: string
          description: Chain ID of the binder.
        contacts:
          items:
            prefixItems:
              - type: string
              - type: integer
            type: array
            maxItems: 2
            minItems: 2
          type: array
          description: List of contacts as tuples of (chain_id, residue_index).
      type: object
      required:
        - binder_chain_id
        - contacts
    DistogramConditioning:
      properties:
        chain_id:
          type: string
          description: Chain ID for distogram conditioning.
      type: object
      required:
        - chain_id
        - distogram
    Modification:
      properties:
        position:
          type: integer
          description: >-
            Zero-indexed position in the sequence where modification should be
            applied.
        ccd:
          type: string
          description: Chemical Component Dictionary (CCD) code for the modification.
      type: object
      required:
        - position
        - ccd
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````