diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8bbdb045c..ac267c892 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -22,6 +22,7 @@ * Rugnux writes its files in the standard setting, as XDS and POINTLESS do (e.g. P 21 21 2 with the pure two-fold on c rather than P 2 21 21), or in the setting of a reference MTZ, of a model that fits, of the cell given with `-C` or of a non-standard `-S` symbol; `SETTING_OPERATOR=` and `SETTING_SOURCE=` report it. * Rugnux puts the merge onto a reference MTZ's axes before inheriting its free-R flags, and does not inherit them where the merge does not match the reference (`REFERENCE_MISMATCH`); `REFERENCE_OPERATOR=`, `REFERENCE_CC=` and `REFERENCE_MATCHED_FRACTION=` report the match. * Rugnux places a space group given with `-S` on the axes its systematic absences name, so `-S 18` on a cell whose pure two-fold is not its longest axis no longer merges with the screw absences on the wrong rows. +* `rugnux -z` also takes a PDB structure-factor mmCIF (`-sf.cif`, gzipped or not) as the reference, with its R-free set; `--reference` is a new name for `--reference-mtz`. * `rugnux --polarization` is documented as the polarization degree (XDS `FRACTION_OF_POLARIZATION` = (1 + p)/2); the default 0.99 suits undulators. ### 1.0.0-rc.172 diff --git a/docs/CPU_DATA_ANALYSIS_INTEGRATION.md b/docs/CPU_DATA_ANALYSIS_INTEGRATION.md index fd6d4508e..a51501b97 100644 --- a/docs/CPU_DATA_ANALYSIS_INTEGRATION.md +++ b/docs/CPU_DATA_ANALYSIS_INTEGRATION.md @@ -409,7 +409,7 @@ A fraction of the unique reflections (`rfree_fraction`, default 0.05) is flagged On small data, where `rfree_fraction` (default 0.05) would give too few test reflections for a statistically stable R-free (Brünger's ~500–2000 rule), the fraction is **floored** so at least ~500 distinct reflections are free — capped at 10 % so a large test set never steals working data. For ordinary data this floor is inactive and the fraction stays flat at `rfree_fraction`, preserving the cross-dataset-identical property above; it only lifts the fraction on genuinely small datasets, where per-dataset R-free stability outweighs cross-dataset identity (and a shared reference set is the way to keep exact identity there). -When a reference MTZ (`--reference-mtz`) carries a `FreeR_flag` column, its test set is **imported** instead: every merged reflection whose Laue-ASU index matches the reference takes the reference's flag (reflections absent from the reference keep the hash flag). The match is made in the reference's frame — on rotation data the merge is first put onto the reference's axes, choosing among every description of the lattice on them (and every alternative indexing) by the intensity correlation with the reference — and only where the merge then matches it: an intensity CC of at least 0.5 over at least half of the merged reflections in the reference's resolution range. Below that the reference is not the same crystal form on the same axes, its flags would land on unrelated reflections, and they are not imported (`REFERENCE_MISMATCH`). This lets a whole fragment-screening campaign inherit one shared free set from the apo/reference dataset. The CCP4/refmac convention (test set = flag 0, including the historical 0–19 form) is assumed, with the complement taken automatically if flag 0 would be the majority (a phenix-style file where 1 marks free). +When a reference (`--reference`: an MTZ, or a PDB structure-factor mmCIF, which is converted to one with `_refln.status` `f`/`o` becoming flag 0/1) carries a `FreeR_flag` column, its test set is **imported** instead: every merged reflection whose Laue-ASU index matches the reference takes the reference's flag (reflections absent from the reference keep the hash flag). The match is made in the reference's frame — on rotation data the merge is first put onto the reference's axes, choosing among every description of the lattice on them (and every alternative indexing) by the intensity correlation with the reference — and only where the merge then matches it: an intensity CC of at least 0.5 over at least half of the merged reflections in the reference's resolution range. Below that the reference is not the same crystal form on the same axes, its flags would land on unrelated reflections, and they are not imported (`REFERENCE_MISMATCH`). This lets a whole fragment-screening campaign inherit one shared free set from the apo/reference dataset. The CCP4/refmac convention (test set = flag 0, including the historical 0–19 form) is assumed, with the complement taken automatically if flag 0 would be the majority (a phenix-style file where 1 marks free). ### 10.8 French–Wilson amplitudes @@ -433,7 +433,7 @@ Amplitudes are written as MTZ `F`/`SIGF`, mmCIF `_refln.F_meas_au`/`F_meas_sigma ### 10.9 Reference data: fixing the space group and resolving the indexing ambiguity -A reference dataset (`--reference-mtz`) supplies known intensities for the same crystal form, and is used in two ways. +A reference dataset (`--reference`, MTZ or SF-mmCIF) supplies known intensities for the same crystal form, and is used in two ways. **Fix the space group and cell.** Unless overridden on the command line (`-S` for the space group, `-C` for the cell), the reference's space group is adopted and its cell is used as the soft reference cell — indexing may still drift the cell within tolerance, so a small mismatch between reference and data is absorbed rather than rejected. This applies to both stills and rotation data. diff --git a/docs/RUGNUX_ADVANCED.md b/docs/RUGNUX_ADVANCED.md index 5cc0db053..2283b2b54 100644 --- a/docs/RUGNUX_ADVANCED.md +++ b/docs/RUGNUX_ADVANCED.md @@ -10,11 +10,15 @@ validation, re-merging without re-integration, and the full option tables. ## Reference data and the indexing ambiguity -### What a reference MTZ does (`-z`) +### What a reference does (`-z`) `-z reference.mtz` supplies **known intensities of the same crystal form** — a previously merged -dataset, or `F-model` amplitudes computed from a structure. It is read once, before processing -starts, and used for four things: +dataset, or `F-model` amplitudes computed from a structure. The reference can equally be a PDB +structure-factor file (`-z 1abc-sf.cif`, SF-mmCIF), gzipped or not; the format is taken from the +file's content. From an mmCIF the first merged reflection block with a usable column is read (the log +names it), its columns under the MTZ labels `gemmi cif2mtz` gives them (`IMEAN`, `FP`, `FC`, …), and +its R-free set from `_refln.status` (`f` free, `o` working), or from `_refln.pdbx_r_free_flag` where +the status marks no test set. It is read once, before processing starts, and used for four things: - **It fixes the space group and the unit cell** the run works in, unless `-S` / `-C` override them. The cell is a *soft* reference: indexing may still drift within tolerance, so a small mismatch @@ -373,8 +377,8 @@ Scaling and merging: | `--search-min-zeta ` | De-novo space-group search only: also search a merge of just the observations whose Lorentz geometry \|ζ\| reaches this, and report both answers (default: 0.85 for rotation, 0 = single search). Reflections crossing the Ewald sphere near-tangentially are measured worst and can make a real symmetry operator look like a twin law. Where the two searches disagree, the merge of all the observations decides — as it always has for the systematic absences | | `--mosaicity ` | Diagnostic: fix the scaling mosaicity (°) instead of using the per-image seed | | `--scaling-iterations ` | Cap on the per-frame scaling iterations; the loop stops earlier once the scales settle, and a merge that hits the cap is flagged `SCALING_NOT_CONVERGED` (default: 100) | -| `-z, --reference-mtz ` | Reference MTZ of the same crystal form: fixes the space group, its setting and the cell, resolves the [indexing ambiguity](#the-indexing-ambiguity), hands over the R-free set and reports CCref. Not a scale anchor | -| `--reference-column