Specifying Ligands and Modifications
AlphaFold 3 supports modeling ligands, ions, and modified residues using multiple formats. This guide covers all three methods for specifying small molecules and modifications.Overview
Ligands can be specified using three approaches:- CCD Codes - Use standard Chemical Component Dictionary codes (easiest)
- SMILES Strings - Define custom ligands not in the CCD
- User-Provided CCD - Define custom ligands with full control (most flexible)
Method 1: CCD Codes
AlphaFold 3 uses the CCD from 2022-09-28. Standard codes like
ATP, HEM, NAD, etc. are supported.Single Component Ligands
Multiple Copies
Specify multiple IDs for the same ligand:Multi-Component Ligands (Glycans)
For ligands composed of multiple chemical components:Ions
Ions are treated as ligands:- Magnesium Ion
- Calcium Ion
- Zinc Ion
Method 2: SMILES Strings
Use SMILES to define ligands not present in the CCD.Basic SMILES Ligand
SMILES JSON Escaping
Escaping SMILES Strings
- Using jq
- Using Python
"CCC[C@@H](O)CC\\C=C\\C=C\\C#CC#C\\C=C\\CO"SMILES Limitations
RDKit Conformer Generation
AlphaFold 3 uses RDKit to generate 3D conformers from SMILES. If generation fails:Method 3: User-Provided CCD
Define custom ligands in CCD mmCIF format for maximum control.When to Use User-Provided CCD
1
Bonded Custom Ligands
When you need to define bonds between a custom ligand and other entities (SMILES can’t do this).
2
Multi-Component Glycans
When defining complex glycans that need to be bonded together.
3
Reference Coordinates
When RDKit fails to generate conformers and you want to provide ideal coordinates.
4
Custom Bond Orders
When you need precise control over atom names, bond orders, and charges.
Basic User CCD Structure
Naming Convention:
- Use custom names that don’t clash with standard CCD codes
- Avoid underscores (
_) in names (can cause mmCIF format issues) - Example:
MY-LIG-1,CUSTOM-MOL-42,LIGAND-X7F
User CCD via External File
Instead of inline, reference an external file:Supported formats:
- Plain text (
.cif) - gzip (
.cif.gz) - xz (
.cif.xz) - zstd (
.cif.zst)
User CCD Format
Here’s a complete example redefining component X7F:Required Fields
- Singular Fields
- Per-Atom Fields
- Per-Bond Fields
These fields contain single values:
_chem_comp.id- Component ID (must matchdata_record)_chem_comp.name- Full name (or?if unknown)_chem_comp.type- Type (typicallynon-polymer)_chem_comp.formula- Chemical formula (or?)_chem_comp.mon_nstd_parent_comp_id- Parent ID (or?)_chem_comp.pdbx_synonyms- Synonyms (or?)_chem_comp.formula_weight- Weight (or?)
Overriding Standard CCD Entries
You can redefine standard CCD components:Protein/RNA/DNA Modifications
Protein Post-Translational Modifications (PTMs)
PTM codes:
- Use standard CCD codes (e.g.,
HY3,P1L,SEP,TPO) - Do not include the
CCD_prefix - Position is 1-based (first residue = 1)
RNA Modifications
2MG, 5MC, 5MU, PSU, 1MA, M2G
DNA Modifications
6MA, 6OG, 5MC, 5HC
Complete Example
Code References
Fromfolding_input.py:789-827: