Skip to main content

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:
  1. CCD Codes - Use standard Chemical Component Dictionary codes (easiest)
  2. SMILES Strings - Define custom ligands not in the CCD
  3. 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:
For multi-component ligands, you must define bonds between components using the bondedAtomPairs field (see Covalent Bonds).

Ions

Ions are treated as ligands:

Method 2: SMILES Strings

Use SMILES to define ligands not present in the CCD.

Basic SMILES Ligand

SMILES JSON Escaping

Backslashes in SMILES strings must be escaped as double backslashes (\\) in JSON, otherwise parsing will fail.

Escaping SMILES Strings

Output: "CCC[C@@H](O)CC\\C=C\\C=C\\C#CC#C\\C=C\\CO"

SMILES Limitations

SMILES-defined ligands cannot be used in bonds because SMILES doesn’t provide unique atom names. If you need to define bonds to a custom ligand, use the User-Provided CCD method instead.

RDKit Conformer Generation

AlphaFold 3 uses RDKit to generate 3D conformers from SMILES. If generation fails:
Alternatively, provide a reference structure using User-Provided CCD.

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)
Paths can be absolute or relative to the input JSON.
userCCD and userCCDPath are mutually exclusive. Use one or the other, not both.

User CCD Format

Here’s a complete example redefining component X7F:

Required Fields

These fields contain single values:
  • _chem_comp.id - Component ID (must match data_ record)
  • _chem_comp.name - Full name (or ? if unknown)
  • _chem_comp.type - Type (typically non-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:
This is useful for providing custom ideal coordinates.

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

Common RNA modifications: 2MG, 5MC, 5MU, PSU, 1MA, M2G

DNA Modifications

Common DNA modifications: 6MA, 6OG, 5MC, 5HC

Complete Example

Code References

From folding_input.py:789-827: