Ligand parameterization¶
Generate force-field parameters (topology + coordinates) for the ligands and cofactors in a PDB, for use in GROMACS or AMBER MD simulations.
Description¶
Per ligand found in the input PDB (selected with --ligands/--chains/--model, or every heteroatom
residue if omitted), the workflow:
Extracts the ligand from the input PDB (
extract_heteroatoms).Builds its topology + coordinates, branching on whether a custom AMBER parameter set is supplied for that ligand name (
--ligand_parameters):Custom parameters available —
leap_gen_topbuilds the topology directly from the.frcmod/.prepset (AMBER); converted to GROMACS.itp/.growithacpype_convert_amber_to_gmxwhen--format gromacs.No custom parameters — protonates the ligand (
--protonation_tool), minimizes it (babel_minimize, unless--skip_min), then parameterizes it with GAFF atom types and AM1-BCC charges via antechamber/acpype (acpype_params_gmxoracpype_params_ac).
Copies the resulting topology + coordinates into
--output_top_path, renamed to the ligand name; GROMACS.topfiles are stripped of their[ defaults ]/[ molecules ]sections and written as.itp, so they can be#included into a master topology.
Note: for the GROMACS format, the produced coordinates .gro must agree with the PDB file being simulated, so the workflow must be re-run for every new PDB (the coordinates change for every system even if the ligand is the same). For AMBER, tleap can parameterize from the .prep/.lib files independently of the ligand coordinates, so .frcmod + .prep/.lib sets can be reused across PDBs without re-running the ligand parameterization workflow.
Usage¶
conda activate biobb_md
ligand_parameterization --input_pdb data/complex.pdb --ligands JZ4 --chains A --format gromacs --output output
The config.yml is auto-generated from the CLI arguments into the output folder. --restart resumes from the last completed step. Run ligand_parameterization --help for the full option list.
Options¶
Inputs¶
Input modes are resolved at runtime and can be combined if there are different ligands. E.g. a cofactor with a parameter set and a ligand without:
--input_pdb+--ligand_parameters— Build the topology using the parameter set (.frcmod+.prepfiles). The ligands present in ligand_parameters, keep the charge and protonation state of their template. The name of the files should be the name of the ligand they refer to.--input_pdb— when no custom parameter set is available, the ligand is protonated with (--protonation_tool), minimized (unless--skip_min), and parameterized with GAFF via antechamber and acpype.
Flag |
Default |
Description |
|---|---|---|
|
required |
Input PDB file containing the ligands to parameterize. |
|
all ligands |
Ligand names (from the PDB) to parameterize. |
|
|
Chain IDs to extract ligands from. |
|
|
Model number to extract ligands from. |
|
|
Folder with |
Parameters¶
Flag |
Default |
Description |
|---|---|---|
|
|
Output topology format: |
|
guessed |
Per-ligand charges as |
|
|
Ligand protonation tool: |
|
|
Skip the minimization step. |
|
|
Force fields for LEaP (only used with custom parameters). See |
|
|
Restart from the last completed step. |
|
‘topologies’ inside |
Output folder for the ligand topologies/coordinates. |
|
‘output’ |
Output directory. |
Recommendations¶
Choosing a parameterization path¶
Prefer a curated custom AMBER parameter set when one exists: pass it with --ligand_parameters
(<LIG>.frcmod + <LIG>.prep, named after the ligand). These are literature-validated and keep the
template’s charge and protonation, so they are more reliable than automatically generated parameters.
Common ligands and cofactors are available in the Amber Parameter Database, Manchester.
Otherwise the GAFF path parameterizes the ligand automatically (antechamber atom types + AM1-BCC charges) — adequate for most drug-like organic molecules. Both paths can run in the same job (e.g. a cofactor with custom parameters alongside a GAFF-parameterized ligand).
Charges and protonation¶
Get protonation right first: it fixes the ligand’s net charge, and GAFF/acpype derives the AM1-BCC
partial charges from the protonated 3D structure. Choose the tool with --protonation_tool:
ambertools(reduce, default) — places hydrogens from local geometry and a connectivity dictionary (the wwPDB Chemical Component Dictionary), then optimizes the rotatable polar hydrogens (OH/SH/NH) to satisfy local hydrogen bonding and avoid steric clashes. It is geometry/contact-based, not pKa-based. Reliable for standard PDB ligands, but may skip or misplace hydrogens for novel molecules absent from the dictionary or with nonstandard atom names.obabel— perceives bonds from the 3D coordinates and protonates for pH 7.4 using tabulated per-group pKa rules. More robust for arbitrary/novel small molecules and assigns a physiological charge state.none— keep the input protonation unchanged; use when the ligand is already correctly protonated (e.g. from an upstream preparation tool). Choose this path if your ligand is not protonated correctly or tautomers have to be taken into account.
acpype guesses the net charge from the protonation state; check it is reasonable and override with
--charges LIG:<q> (GAFF path only) if it is wrong.
Output¶
Checklist:
For GROMACS the
.gro/.itp pair is system-specific and must be regenerated per PDB, whereas
AMBER .frcmod/.prep sets are reusable. Note how these files are consumed by
md_gromacs via --ligands_folder.
Check the guessed charge of the ligand is reasonable when using GAFF/acpype to parameterize
Files:
A
topologies/folder with one topology + coordinate pair per ligand:<LIG>.gro+<LIG>.itp(GROMACS) or<LIG>.frcmod+<LIG>.prep/.lib(AMBER).Per-ligand working directories and
log.outfor inspection.
Limitations¶
Approximate protonation. No rigorous pKa calculation is performed:
ambertools/reduce is geometry/contact-based and pH-agnostic, whileobabelapplies fixed tabulated pKa rules at pH 7.4. In both cases the ligand is protonated in isolation from the protein, so hydrogen orientations do not reflect the binding site.Neither enumerates or selects tautomers for general ligands (reduce only does this for histidine, using the local H-bond network — a signal unavailable here since the ligand is protonated in isolation).GAFF / AM1-BCC quality. The automatic path (antechamber + acpype) uses general atom types and semi-empirical charges. It covers most drug-like organic molecules but is unreliable for metals and metal coordination, uncommon elements, and unusual chemistries — prefer curated custom parameters there.
Input atom names. Nonstandard or duplicate atom names in the input PDB can break reduce and later steps.
GROMACS outputs are system-specific.
.gro/.itppairs must be regenerated per PDB; AMBER.frcmod/.prepsets are reusable.