Validating ligands with phenix.validate_ligands
Author(s)
- validate_ligands: Dorothee Liebschner
Purpose
phenix.validate_ligands assesses the ligands in a model, one ligand instance at
a time. For every ligand it reports how well the ligand is supported by the
density, how it interacts with its environment, and whether its geometry,
B-factors, occupancies and alternate conformations are sensible.
A ligand here is any residue that is not an amino acid, a nucleotide, a water or
a single element (ion). Each alternate conformation of a ligand is treated as a
separate entry.
Usage
phenix.validate_ligands runs with a model alone, with a model and X-ray data,
or with a model and a cryo-EM map:
phenix.validate_ligands model.pdb
phenix.validate_ligands model.pdb data.mtz
phenix.validate_ligands model.pdb map.mrc
Without data, only the metrics that do not need a map are computed (geometry,
B-factors, occupancies, clashes, missing atoms, alternate conformations). With
experimental data, the real-space metrics are added; these are usually the most
informative ones, so supplying data is strongly recommended.
The resolution of a cryo-EM map is estimated from the map itself. Override it
with resolution when the estimate is wrong:
phenix.validate_ligands model.pdb map.mrc validate_ligands.resolution=3.2
Hydrogen atoms are required for the contact analysis. By default the tool places
them itself with reduce2 (run_reduce2), discarding any hydrogens already
present. The model used for all calculations is therefore the
hydrogen-completed one, not the input file as-is.
How it works
- The model is scanned for ligands. If none are found, the run stops. The
search can be restricted to particular compounds with ligand_code.
- Hydrogen atoms are placed and optimized with reduce2, unless
run_reduce2=False.
- If reflection data were supplied, an fmodel is built and scaled, and R-work
and R-free are reported.
- Each ligand is split into rigid fragments. Fragments are the unit at
which locally poor density is detected -- a ligand can have a good overall
RSCC while one end of it has no density at all.
- Per-ligand metrics are computed and printed as a summary table.
Metrics
Real-space fit. With reflection data, the ligand RSCC is the correlation,
over grid points within 1.5 A of the ligand's non-hydrogen atoms, between a
2mFo-DFc map computed with the ligand omitted from the model and a DFmodel map
computed with it present. Using an omit map means the reported value is not
biased by the ligand itself. For a cryo-EM map the quantity is different; see
Real-space fit for cryo-EM maps.
RSCC overall - for the whole ligand.
RSCC fragments - the same quantity computed separately for each rigid
fragment.
RSCC sites - the same quantity for the surrounding protein, DNA and RNA
atoms within 3 A, printed on the sites line beneath the ligand. This is
the reference value that matters most: a ligand RSCC of 0.75 means something
quite different when its environment is at 0.95 than when the environment is
also at 0.75.
fragment flag - OK, or inspect when either (A) a fragment's RSCC
falls delta_weak below the whole-ligand RSCC (localized weak density), or
(B) the ratio of modelled to observed density differs by at least
balance_ratio between fragments (an occupancy or B-factor imbalance,
i.e. parts of the ligand modelled at inconsistent levels). The flag is only
raised for ligands whose overall RSCC is at least 0.70; below that the ligand
is already suspect as a whole. On a cryo-EM map only check (A) is applied.
Real-space fit for cryo-EM maps. The ligand RSCC is the
correlation between the experimental map and a calculated map of the whole
model, over grid points within 2 A of the ligand's non-hydrogen atoms.
The difference-density metrics (% bad map values Fo-Fc, bad blobs) are computed
from an mFo-DFc map and are reported for reflection data only.
Difference density. Computed from an mFo-DFc map with the ligand present.
% bad map values Fo-Fc - the percentage of ligand non-hydrogen atoms
sitting at a difference density value at or beyond +/-3 sigma. Note this is
unsigned: it counts positive and negative peaks together, so it ranks
ligands for inspection but does not by itself say whether the ligand is too
heavy or too light.
bad blobs # and bad blobs % grid - the number of connected difference
density blobs beyond +/-3 sigma within 2 A of the ligand, and the fraction of
the sampled grid points they occupy.
Contacts. From nonbonded overlaps, using the hydrogen-completed model.
clashes and H-bonds - the number of steric clashes and hydrogen bonds
between the ligand and everything within 3 A. A ligand with several clashes
deserves a look.
B-factors and occupancies.
ADPs min/max/mean - for the ligand, with the corresponding values for the
environment within 3 A on the sites line. A ligand whose mean B is far
above its surroundings is a classic signature of a partially occupied, wrongly
identified, or absent compound.
occupancies min/max/mean - for the ligand.
Geometry. Bond, angle and dihedral RMSZ, each with the number of outliers
(beyond 4 sigma) and the total number of restraints of that type, written
rmsz n_outliers(n_total). Poor geometry usually points at the restraint
dictionary rather than at the fit, so check the CIF before rebuilding.
Completeness and disorder.
missing heavy atoms - non-hydrogen atoms present in the chemical
component definition but absent from the model, listed by name.
alt conf - the alternate-conformation state: - (single conformation),
A/B (proper alternate conformations), lone X (an altloc with no
partner conformation), split X -> chain resseq altloc (the partner
conformation is modelled under a different residue number), or sym
(the ligand overlaps its own symmetry mate, i.e. it sits on or near a special
position). A leading ! marks a case worth inspecting: a lone altloc, a
ligand-ligand split, alternate conformations that model chemically different
compounds, occupancies that do not sum to 1.0 (within occ_tol), or a
symmetry overlap.
Output
The results are written to the log as a summary table, preceded by the list of
rigid fragments per ligand and the residues within 3 A of each ligand. For
example, for ATP in the nsf-d2-ligand example:
| | RSCC | fragment | % bad | bad |
ligand | overall | fragments | flag | Fo-Fc | blobs # | ...
----------------------------------------------------------------------------
ATP A 858 | 0.97 | 0.97, 0.97, | OK | 0.0 | 4 | ...
sites | 0.89 | | | | | ...
----------------------------------------------------------------------------
Optional files:
- save_reduce2_model - write the hydrogen-completed model used for the
calculations, as <basename>_newH.cif.
- save_map_coeffs - write 2mFo-DFc and mFo-DFc map coefficients to
<basename>_map_coeffs.mtz, with column labels that Coot recognizes
automatically. Requires reflection data.
Options
ligand_code - restrict the analysis to the given compound code(s). May be
given more than once. By default all ligands are analyzed.
nproc - number of processors to use.
scattering_table - scattering table for the structure factor calculation
(n_gaussian, wk1995, it1992, neutron, electron). Applies
to the reflection-data path only; a map input always uses electron.
run_reduce2 - place hydrogen atoms with reduce2 before analysis
(default True). Turning this off disables the clash and hydrogen bond
analysis, which needs hydrogens.
save_reduce2_model, save_map_coeffs - write the optional output files
described above.
resolution - resolution used for the calculated map. With reflection data
it comes from the data. With a cryo-EM map it is estimated from the map;
set this to override that estimate.
frag_consistency.delta_weak, .obs_floor, .balance_ratio - control
the fragment consistency flag. The defaults are provisional and may be
recalibrated in a future version.
alt_conf.overlap_dist, .sym_overlap_dist, .occ_tol - control the
alternate conformation analysis: the search distance used to pair a
conformation modelled under a different residue number, the coincidence
distance used to detect a symmetry mate overlapping the ligand, and the
tolerance on the summed occupancy of an alternate conformation set.
Examples
Validate every ligand in a model against X-ray data:
phenix.validate_ligands model.pdb data.mtz
Look at one compound only, and keep the maps for inspection in Coot:
phenix.validate_ligands model.pdb data.mtz ligand_code=ATP save_map_coeffs=True
Validate against a cryo-EM map, letting the resolution be estimated from it:
phenix.validate_ligands model.pdb map.mrc
The same, with the resolution given explicitly:
phenix.validate_ligands model.pdb map.mrc validate_ligands.resolution=3.2
Geometry and environment only, without any experimental data:
phenix.validate_ligands model.pdb
GUI
The tool is available in the Phenix GUI under Ligands -> Validate Ligands.
Supply a model and, optionally, reflection data or a cryo-EM map. For reflection
data, select the data and R-free column labels. For a map, the Cryo-EM map
section holds the map resolution; leave it blank to have it estimated from the
map. Reflection data and a map cannot be used together.
The Results tab shows one row per ligand. Ligands whose RSCC is at or below 0.6
are highlighted in yellow; this is a deliberately conventional cutoff meant to
draw the eye to the clearest problem cases, not a pass/fail criterion. Ligands
for which no RSCC could be computed (no data supplied) are not highlighted.
Selecting a row shows the full set of metrics for that ligand together with a
diagram of its rigid fragments, and recentres Coot on the ligand if Coot is
open. Save CSV writes every metric for every ligand, including the values
not shown in the summary table.
Possible Problems
- phenix.validate_ligands is aimed primarily at models refined against X-ray
data. The cryo-EM map path is newer and reports fewer metrics.
- A map input is assumed to be a cryo-EM map.
- Multi-model files (multiple MODEL/ENDMDL records) are not supported.
- Without reflection data, all real-space metrics are reported as NA. This
is the expected behaviour, not a failure.
- With a cryo-EM map, no difference-density metrics (% bad map values Fo-Fc,
bad blobs) are reported.
- If reduce2 cannot place hydrogens the run stops. Use run_reduce2=False to
continue without hydrogens, at the cost of the clash and hydrogen bond
analysis.
- Poor geometry RMSZ values usually indicate a problem with the restraint
dictionary rather than with the fit to density. Supply the correct CIF for
the ligand and run again.
- RSCC depends on resolution and on data quality. Compare a ligand against the
sites value for its own environment rather than against an absolute
threshold taken from another structure. This matters more on the cryo-EM
path, where the ligand is in the calculated map and the value is not an omit
map result.
List of all available keywords
- scattering_table = *n_gaussian wk1995 it1992 neutron electron Scattering table for structure factors calculations
- run_reduce2 = True
- save_reduce2_model = False
- save_map_coeffs = False Write 2mFo-DFc and mFo-DFc map coefficients (from fmodel) to <basename>_map_coeffs.mtz. Requires reflection data.
- verbose = False
- validate_ligands
- resolution = None Resolution (A) of the input cryo-EM map. Leave blank to estimate it from the map itself. Ignored when reflection data are supplied, where the resolution comes from the data.
- ligand_code = None
- nproc = 1
- within_radius = 3.0 Radius (A) around the ligand that defines its environment ('sites'): the residues used for the surrounding-ADP comparison and for the sites RSCC. A residue is included when any of its atoms falls inside the radius. The upper bound is deliberate: the same radius selects the atoms removed from the model before the sites omit map is recomputed, and deleting a wide shell degrades the scaling and makes that map noisier and more bias-prone.
- model_fn_reduce2 = None
- save_fragment_png = False
- run_qmr = False
- interactions = False Per ligand: H-bonds, salt bridges and possible salt bridges, clashes and vdW contacts (probe2's so, cc, wc), with symmetry copies and the pnp/probe2 cross-check (mmtbx.validation.ligand_interactions). Needs H: from run_reduce2 or in the model; without H the profile is skipped. Settings: validate_ligands.ligand_interactions. Writes <basename>_ligand_interactions.json.
- ligand_interactions
- pair_class_order = bo hb so cc wc Pair class for an atom pair with dots of several probe2 classes: the first class in this list that has dots. Must list every class that can occur: with allow_weak_hydrogen_bonds (wh) or separate_worse_clashes (wo) use e.g. wo bo hb wh so cc wc.
- patch_link_distance = 0.5 Contact patches: ligand -> environment dots closer than this (A) are linked. At probe density 16 dots/A^2 the nearest-neighbour spacing is 0.256 A (median; 90th percentile 0.261); 0.5 A bridges the seams between neighbouring atoms' dot sets. 5XH3 ligand 856: 11 patches at 0.4 A, 9 at 0.45-0.5 A, 6 at 0.55-0.7 A.
- use_neutron_distances = False probe2's use_neutron_distances (electron-cloud H is the convention).
- separate_worse_clashes = False probe2's output.separate_worse_clashes (class wo).
- probe_neighbourhood = True probe2 gets only the ligand's neighbourhood (probe_neighbourhood_input), not the whole model: same pairs, dots and gaps, much faster for large models. False runs probe2 on the whole model (for checks).
- symmetry = True Contacts with symmetry copies: probe2's (probe2_symmetry_input) and pnp's. False where the crystal symmetry is not a lattice, e.g. the box of a cryo-EM map (validate_ligands sets it for map input).
- probe
- probe_radius = 0.25 Probe radius (half distance between touched atoms) (-radius in probe)
- density = 16.0 Probe dots per square angstrom on atom surface (-density in probe)
- worse_clash_cutoff = 0.5 Cutoff for worse clashes, a positive (-divworse in probe)
- clash_cutoff = 0.4 Cutoff for the clashes, a positive number (-divlow in probe)
- contact_cutoff = 0.25 Cutoff for the contact (-divhigh in probe)
- uncharged_hydrogen_cutoff = 0.6 Cutoff for uncharged hydrogen overlap (-hbregular in probe)
- charged_hydrogen_cutoff = 0.8 Cutoff for charged hydrogen overlap (-hbcharged in probe)
- bump_weight = 10.0 Weight applied to bump score (-bumpweight in probe)
- hydrogen_bond_weight = 4.0 Weight applied to hydrogen bond score (-hbweight in probe)
- gap_weight = 0.25 Weight applied to gap score (-gapweight in probe). Should be no smaller than probe_radius.
- allow_weak_hydrogen_bonds = False Separately account for weak hydrogen bonds (-LweakHbonds in probe)
- ignore_ion_interactions = False Ignore interactions with ions
- set_polar_hydrogen_radius = True Override the radius of polar Hydrogens with to ensure it has the expected value. (-usepolarh in probe)
- hbondprocess_nonbonded_proxies (pnp) H-bond criteria, passed to pnp.manager as h_bond_params. Defaults are pnp.h_bond()'s values, which validate_ligands uses.
- d_HA_cutoff = 1.4 2.8 H...A distance range (A).
- d_DA_cutoff = 2.4 4.1 D...A distance range (A).
- a_DHA_cutoff = 120 Minimum D-H...A angle (deg).
- a_YAH_cutoff = 90 180 Y-A...H angle range (deg); stored by pnp but not applied.
- min_bonds_H_A = 5 H and A at least this many bonds apart (same copy).
- hydrogen_elements = H D
- donor_elements = O N S
- acceptor_elements = O N S F CL
- metalMetal coordination: a metal of mmtbx.ions' table (ion_parameters.cif) and one of its allowed coordinating atoms, one in the ligand, the other in the environment, typed by the bond valence v = exp((R0 - d) / 0.37) with R0 from mmtbx.ions (Brese & O'Keeffe, Acta Cryst. B47, 192 (1991)).
- min_valence = 0.1 Bond valence (v.u.) a metal-donor pair needs to be a coordination entry; 0.1 v.u. is d <= R0 + 0.85 A (Zn-N, R0 1.77 A: d <= 2.62 A).
- untyped_cutoff = 3.0 A metal-donor pair without an R0 in mmtbx.ions is not typed; it is listed (metal_untyped) when its atoms are within this distance (A).
- pi_stackingPi stacking between a ligand ring and an environment ring (aromatic rings: find_aromatic_rings), criteria of PLIP (Salentin et al., Nucleic Acids Res. 43, W443 (2015)). Offset: the distance of one centroid from the other ring's normal through its centroid, the smaller of the two.
- centroid_distance = 5.5 A. Maximum distance between the ring centroids (PLIP PISTACK_DIST_MAX).
- parallel_angle = 30 Deg. Parallel: angle between the ring planes at most this (PLIP PISTACK_ANG_DEV).
- t_shaped_angle = 60 Deg. T-shaped: angle between the ring planes at least this (90 - PISTACK_ANG_DEV).
- offset = 2.0 A. Maximum offset, both subtypes (PLIP PISTACK_OFFSET_MAX).
- planarity_rms = 0.1 A. Aromatic rings with a larger rms distance from their least-squares plane are reported (nonplanar_rings) and kept; conjugated rings with a larger rms are not pi rings (conjugated_rings_not_planar).
- salt_bridgeSalt bridges between oppositely charged groups.
- criterion = *atom_pair charge_centre atom_pair: at least one pair of charged atoms of the two groups within atom_pair_cutoff (Barlow & Thornton, J. Mol. Biol. 168, 867 (1983)). charge_centre: charge centres within charge_centre_cutoff (PLIP, Salentin et al., Nucleic Acids Res. 43, W443 (2015)), a looser variant.
- atom_pair_cutoff = 4.0 A. Barlow & Thornton (1983): ion pair if <= 4 A between charged groups.
- charge_centre_cutoff = 5.5 A. PLIP's SALTBRIDGE_DIST_MAX: Barlow & Thornton's 4 A + 1.5 A.
- kumar_nussinov_cutoff = 4.0 A. Subtype after Kumar & Nussinov, Biophys. J. 83, 1595 (2002): salt bridge if the charge centres and at least one N-O pair are within this, N-O bridge if only an N-O pair is, longer-range otherwise.
- frag_consistency
- delta_weak = 0.20 Flag a fragment as localized-weak if its RSCC is this far below the overall ligand RSCC. Provisional default; calibrate on more ligands.
- obs_floor = 0.30 Minimum mean observed (omit-map, sigma) density for a fragment to enter the model/observed balance check. Provisional default.
- balance_ratio = 1.5 Flag inconsistent modeling if max/min of per-fragment (mean model / mean observed) density across ordered fragments reaches this. Provisional default.
- alt_conf
- overlap_dist = 2.0 Distance (A) for the symmetry-aware 'within' search that pairs a ligand's alternate conformation modelled under a different residue number. Provisional default; tunable.
- sym_overlap_dist = 1.5 Tight coincidence cutoff (A) for detecting a ligand's own crystallographic-symmetry mate overlapping it (special position / symmetry axis). Below ordinary packing contacts (~2.4 A). Provisional default; tunable.
- occ_tol = 0.02 Tolerance on how far the summed occupancy of an alternate-conformation set may deviate from 1.0 before it is flagged. Provisional default; tunable.
- probe
- probe_radius = 0.25 Probe radius (half distance between touched atoms) (-radius in probe)
- density = 16.0 Probe dots per square angstrom on atom surface (-density in probe)
- worse_clash_cutoff = 0.5 Cutoff for worse clashes, a positive (-divworse in probe)
- clash_cutoff = 0.4 Cutoff for the clashes, a positive number (-divlow in probe)
- contact_cutoff = 0.25 Cutoff for the contact (-divhigh in probe)
- uncharged_hydrogen_cutoff = 0.6 Cutoff for uncharged hydrogen overlap (-hbregular in probe)
- charged_hydrogen_cutoff = 0.8 Cutoff for charged hydrogen overlap (-hbcharged in probe)
- bump_weight = 10.0 Weight applied to bump score (-bumpweight in probe)
- hydrogen_bond_weight = 4.0 Weight applied to hydrogen bond score (-hbweight in probe)
- gap_weight = 0.25 Weight applied to gap score (-gapweight in probe). Should be no smaller than probe_radius.
- allow_weak_hydrogen_bonds = False Separately account for weak hydrogen bonds (-LweakHbonds in probe)
- ignore_ion_interactions = False Ignore interactions with ions
- set_polar_hydrogen_radius = True Override the radius of polar Hydrogens with to ensure it has the expected value. (-usepolarh in probe)
- guiGUI-specific parameters
- output_dir = None
- data_column_label = None
- free_column_label = None