Skip to content

API Reference

Complete API reference for the Molfun library. Each page documents the public classes, functions, and registries exposed by a subpackage.

Core API

Page Description
MolfunStructureModel Main facade for training, prediction, export, and hub operations
Predict Functions High-level predict_structure, predict_properties, predict_affinity
PEFT Parameter-Efficient Fine-Tuning utilities (LoRA, IA3)

Training

Page Description
Strategies Fine-tuning strategies: Full, HeadOnly, LoRA, Partial
Distributed DDP and FSDP distributed training support

Modular Architecture

Page Description
Registry Generic ModuleRegistry plugin system
Attention Attention implementations: Flash, Standard, Linear, Gated
Blocks Trunk blocks: Pairformer, Evoformer, SimpleTransformer
Structure Modules IPA and Diffusion structure modules
Embedders Input and ESM embedders
ModelBuilder Programmatic model assembly
ModuleSwapper Hot-swap modules in a live model

Data

Page Description
Fetchers PDBFetcher, AffinityFetcher, MSAProvider
Datasets StructureDataset, AffinityDataset, StreamingStructureDataset
Splits DataSplitter: random, temporal, identity
Parsers PDB, mmCIF, A3M, FASTA, SDF, Mol2 parsers
Collections Curated dataset collections

Losses, Tracking, Export & CLI

Page Description
Losses Loss registry and built-in loss functions
Tracking Experiment trackers: W&B, Comet, MLflow, Langfuse, HuggingFace, Console
Export ONNX and TorchScript export utilities
CLI Command-line interface reference