Build Packages / Create release (push) Successful in 26s
Build Packages / Build documentation (push) Successful in 1m43s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 5m7s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 11m48s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 7m22s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 12m24s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m30s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 25m29s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 29m41s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 21m44s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 24m41s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 26m9s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 26m3s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 28m28s
Build Packages / Generate python client (push) Successful in 27s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 31m16s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 20m44s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 26m27s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 22m52s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 27m44s
Build Packages / Unit tests (push) Successful in 1h46m55s
Build Packages / Validation Battery (push) Successful in 52m50s
* Rugnux: Several rotation sweeps of one crystal are merged as one dataset (`rugnux a_master.h5 b_master.h5`), on a common indexing and cell, with a non-isomorphous sweep left out and reported; `--sweeps separate` processes each sweep on its own. Bruker `.sfrm` frames and imgCIF files with a full goniometer axis chain are read. * Rugnux: More robust rotation processing - a retry with a more sensitive spot finder when no lattice is found, a self-consistent detector distance, long axes and doubled cells tested as hypotheses, a `-C` supercell multiple stepped down, and each ice ring merged, down-weighted or rejected on its own. * Rugnux: Serial stills are merged with a partiality-aware error model, reported as `ERROR_MODEL_A/B/C` with no ISa or R_merge/R_meas/R_pim; runs without `-S` have an overall intensity scale about 0.86-0.88 times that of earlier versions, with unchanged statistics. A second crystal form is left out of the merge and reported, the indexing ambiguity is resolved more reliably, and `--model` no longer influences processing. * Rugnux: The reported CC1/2 is the standard unweighted one, which can be lower than before on sweeps with weak frames; ISa comes with a 95% interval (`ISA_LOW`/`ISA_HIGH`). * Rugnux: Model refinement adds anisotropic/TLS, local NCS and twin refinement where R-free supports them; building waters and relabelling ions is now off by default (`--refine-solvent` turns it on). * NXmx: A detector of several modules is written as `module_0` ... `module_N` only, so DIALS reads each module as its own panel. * Other: JPEG previews use a bundled encoder (libjpeg-turbo no longer needed), Rugnux prints how to cite it, and the release archives contain the HTML documentation. Reviewed-on: #92 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
55 lines
3.1 KiB
C++
55 lines
3.1 KiB
C++
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "gemmi/mtz.hpp"
|
|
#include "gemmi/unitcell.hpp"
|
|
|
|
#include "../common/Reflection.h"
|
|
|
|
// Merged reflections a refinement is given (rugnux --mode refine), as their file held them: an MTZ or a
|
|
// structure-factor mmCIF (as the PDB holds them), gzipped or not, the format taken from the content. The
|
|
// columns are found, not named: amplitudes with their sigmas where the file has them, else intensities (the
|
|
// caller turns those into amplitudes), and the free-set flags where there are any. The caller parses; the
|
|
// analysis reads no file.
|
|
struct RugnuxReflections {
|
|
std::string name; // what the report calls the file
|
|
std::string source; // "MTZ" or "mmCIF block <name>"
|
|
gemmi::UnitCell cell;
|
|
std::string space_group; // extended Hermann-Mauguin symbol
|
|
double wavelength_A = 0; // 0: the file does not say
|
|
// h, k, l and d, with F/sigmaF where amplitudes were read, I/sigma where intensities were; rfree_flag
|
|
// where the file has free-set flags.
|
|
std::vector<MergedReflection> reflections;
|
|
bool amplitudes = true; // false: intensities, no amplitudes in the file
|
|
std::string value_column, sigma_column;
|
|
std::string free_column; // empty: the file has no free-set flags
|
|
int n_free = 0;
|
|
// A structure-factor mmCIF's numeric free-set classes (_refln.pdbx_r_free_flag) per reflection, -1 where it
|
|
// gives none; empty for an MTZ or where the file has no such column. free_column marks one class of them
|
|
// (_refln.status 'f', or the flag by the convention above), which need not be the depositors' test set.
|
|
std::vector<int> free_class;
|
|
};
|
|
|
|
// The columns of `mtz` (an MTZ, or an mmCIF converted to one), found as RugnuxReflections describes:
|
|
// - amplitudes: a type-F column followed by its type-Q sigma, by the usual names first (F, FP, FOBS, F-obs,
|
|
// FMEAN, ...), then any such pair that is not a calculated or map coefficient (FC, FWT, DELFWT, F-model ...);
|
|
// - else intensities: a type-J column with its type-Q sigma (IMEAN, I, IOBS, I-obs, ... first); the
|
|
// anomalous pairs F(+)/F(-) (G/L) or I(+)/I(-) (K/M) averaged where there is nothing else;
|
|
// - free flags: a type-I column named as a free set (FreeR_flag, FREE, R-free-flags, ...: any with "free" in
|
|
// its name). The test set is flag 0 in the CCP4 convention (0-19 thin shells included); where 0 marks the
|
|
// majority (1 marks the test set, as phenix and CNS write it), the minority is taken.
|
|
// Throws where there is neither.
|
|
RugnuxReflections RugnuxReflectionsFromMtz(const gemmi::Mtz &mtz, const std::string &name);
|
|
|
|
// The reflections of a file's bytes, the format from the content (MTZ by its magic, else mmCIF: the first
|
|
// merged block that holds amplitudes or intensities). Throws where the bytes hold none.
|
|
RugnuxReflections ParseRugnuxReflections(const std::string &bytes, const std::string &name);
|
|
|
|
// The file at `path`, named by it.
|
|
RugnuxReflections ReadRugnuxReflectionFile(const std::string &path);
|