Skip to main content

Module input_types

Module input_types 

Source
Expand description

Input builder types for ESMFold2 structure prediction.

This module provides typed builder structs for constructing the StructurePredictionInput required by the ESMFold2 API. It mirrors the Python esm.models.esmfold2 SDK, supporting protein chains, DNA chains with optional chemical modifications, and small-molecule ligands specified by CCD (Chemical Component Dictionary) codes.

§Example

use ferritin_plms::esmfold2::input_types::{
    DNAInput, LigandInput, ProteinInput, StructurePredictionInput,
};

let protein = ProteinInput::new("A", "MKTAYIAK").unwrap();
let ligand  = LigandInput::from_ccd("L", "ATP");
let input   = StructurePredictionInput::new()
    .add_protein(protein)
    .add_ligand(ligand);

assert_eq!(input.num_chains(), 2);

Structs§

DNAInput
A single DNA chain, optionally carrying chemical modifications.
LigandInput
A small-molecule ligand described by one or more CCD codes.
Modification
A chemical modification at a specific position within a nucleic-acid chain.
ProteinInput
A single protein chain for structure prediction.
StructurePredictionInput
The top-level input for an ESMFold2 structure prediction request.

Enums§

ChainInput
One chain in a multi-entity structure prediction request.

Functions§

validate_dna_sequence
Validate that every character in a DNA sequence belongs to the accepted alphabet.
validate_protein_sequence
Validate that every character in a protein sequence belongs to the accepted alphabet.