Build Packages / Unit tests (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 11m6s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m27s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m54s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m25s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m5s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 11m33s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m19s
Build Packages / build:rpm (rocky8) (push) Successful in 12m23s
Build Packages / build:rpm (rocky9) (push) Successful in 13m21s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m30s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m55s
Build Packages / DIALS test (push) Successful in 13m42s
Build Packages / XDS test (durin plugin) (push) Successful in 9m26s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m41s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m12s
Build Packages / Generate python client (push) Successful in 19s
Build Packages / Build documentation (push) Successful in 52s
Build Packages / Create release (push) Skipped
Build Packages / build:viewer-tgz:cpu (push) Successful in 5m29s
Build Packages / build:viewer-tgz:cuda (push) Successful in 6m12s
Build Packages / build:windows:cuda (push) Successful in 18m36s
This is an UNSTABLE release. It includes many experimental features, as well as many AI generated fixes. We recommend using rc.152 for production use. * rugnux: Add `--model model.pdb` - score the merged data against an atomic model and compute initial maps. It reports R-work/R-free (scaling the model to the observed amplitudes with an overall scale, an anisotropic B and a flat bulk solvent - the standard few-parameter model, so a batch of maps stays directly comparable) and writes 2Fo-Fc / Fo-Fc electron-density maps (CCP4) plus a map-coefficient MTZ. The structure itself is not refined; the model is only re-fractionalised into the data cell. * rugnux: The merged reflection output now carries French-Wilson amplitudes (|F| and its sigma) next to the intensities - MTZ `F`/`SIGF`, mmCIF `_refln.F_meas_au`, and the text HKL - computed with the correct centric/acentric Wilson prior and epsilon multiplicity, so a downstream program (e.g. phenix.refine) can refine against amplitudes. The intensity columns are unchanged. * rugnux: R-free test-set flags are now assigned deterministically and consistently across symmetry - a Bijvoet pair I(+)/I(-) is never split between the work and free sets, and the assignment is a reproducible per-hkl hash that depends only on the reflection index, so every dataset of one crystal form gets the same ~5% free set (what a multi-dataset campaign such as PanDDA needs). On small data the fraction is floored so the test set stays large enough for a stable R-free (~500 reflections, capped at 10%); it stays flat at 5% on ordinary data. When a reference MTZ carries a `FreeR_flag` column its test set is imported instead, letting a whole campaign inherit one shared free set. * rugnux: A reference MTZ (`--reference-mtz`) can now fix the space group and cell for rotation data too (previously rejected), without being used to scale - the rotation merge stays self-consistent. When the crystal has an indexing (merohedral) ambiguity - a lattice symmetry higher than its Laue symmetry, e.g. P3/P4/P6/C2 - the reference also resolves it: each candidate reindexing (identity plus the twin-law cosets of the metric symmetry) is scored by its intensity correlation against the reference and the data are re-merged in the best-correlating one. This is a metric-preserving relabelling of hkl (the cell is unchanged) and a no-op for a holohedral crystal such as lysozyme. * rugnux: `--model` validation now aligns the data to the model before scoring - the observed reflections are reindexed into the model's enantiomorph when the two differ only by hand (indistinguishable from merged intensities). A merohedral indexing ambiguity is resolved against the reference MTZ when one is given (so a whole campaign shares one indexing convention); only with a model and no reference does validation fall back to fitting each candidate reindexing and keeping the lowest R-free. * rugnux: De-novo symmetry - recover a genuine high-symmetry group whose data are imperfectly scaled. Such a merge's within-orbit chi² lands just past the self-consistency bound (each real symmetry step adds a little systematic scatter), right where a merohedral twin also lands, so the chi² ratio alone cannot separate them. The candidate is now rescued when the extra intensity-proportional systematic error it invokes stays small relative to the confirmed subgroup - a genuine symmetry step gains multiplicity without inflating the merge error model's b, whereas a twin forces non-equivalent reflections together and b balloons. Fixes cubic insulin (I23 instead of I222) with no change to any other crystal in the test battery, including the twins that must stay in their lower symmetry. * Docs: Document the French-Wilson amplitude estimation, R-free flagging, reference-based space-group/ambiguity resolution, and model-based validation/maps in CPU_DATA_ANALYSIS.md. * Frontend: The status-bar pill now shows a progress bar during detector calibration (previously only during measurement), and the calibration state and its button are labelled "Calibration"/"CALIBRATE" (the internal `Pedestal` state name is unchanged for back-compatibility).Reviewed-on: #69 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
456 lines
14 KiB
C++
456 lines
14 KiB
C++
/**
|
|
* Jungfraujoch
|
|
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0-rc.159
|
|
* Contact: filip.leonarski@psi.ch
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
#include "Indexing_settings.h"
|
|
#include "Helpers.h"
|
|
|
|
#include <sstream>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
Indexing_settings::Indexing_settings()
|
|
{
|
|
m_Fft_max_unit_cell_A = 250.0f;
|
|
m_Fft_min_unit_cell_A = 10.0f;
|
|
m_Fft_high_resolution_A = 2.0f;
|
|
m_Fft_num_vectors = 16384L;
|
|
m_Tolerance = 0.0f;
|
|
m_Thread_count = 0L;
|
|
m_Unit_cell_dist_tolerance = 0.05f;
|
|
m_Viable_cell_min_spots = 10L;
|
|
m_Index_ice_rings = false;
|
|
m_Rotation_indexing = false;
|
|
m_Rotation_indexing_min_angular_range_deg = 20.0f;
|
|
m_Rotation_indexing_angular_stride_deg = 0.5f;
|
|
m_Blocking = true;
|
|
|
|
}
|
|
|
|
void Indexing_settings::validate() const
|
|
{
|
|
std::stringstream msg;
|
|
if (!validate(msg))
|
|
{
|
|
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
|
}
|
|
}
|
|
|
|
bool Indexing_settings::validate(std::stringstream& msg) const
|
|
{
|
|
return validate(msg, "");
|
|
}
|
|
|
|
bool Indexing_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
|
{
|
|
bool success = true;
|
|
const std::string _pathPrefix = pathPrefix.empty() ? "Indexing_settings" : pathPrefix;
|
|
|
|
|
|
|
|
/* Fft_max_unit_cell_A */ {
|
|
const float& value = m_Fft_max_unit_cell_A;
|
|
const std::string currentValuePath = _pathPrefix + ".fftMaxUnitCellA";
|
|
|
|
|
|
if (value < static_cast<float>(50))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 50;";
|
|
}
|
|
if (value > static_cast<float>(500))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 500;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Fft_min_unit_cell_A */ {
|
|
const float& value = m_Fft_min_unit_cell_A;
|
|
const std::string currentValuePath = _pathPrefix + ".fftMinUnitCellA";
|
|
|
|
|
|
if (value < static_cast<float>(5))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 5;";
|
|
}
|
|
if (value > static_cast<float>(40))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 40;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Fft_high_resolution_A */ {
|
|
const float& value = m_Fft_high_resolution_A;
|
|
const std::string currentValuePath = _pathPrefix + ".fftHighResolutionA";
|
|
|
|
|
|
if (value < static_cast<float>(0.5))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0.5;";
|
|
}
|
|
if (value > static_cast<float>(6.0))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 6.0;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Fft_num_vectors */ {
|
|
const int64_t& value = m_Fft_num_vectors;
|
|
const std::string currentValuePath = _pathPrefix + ".fftNumVectors";
|
|
|
|
|
|
if (value < 128ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 128;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Tolerance */ {
|
|
const float& value = m_Tolerance;
|
|
const std::string currentValuePath = _pathPrefix + ".tolerance";
|
|
|
|
|
|
if (value < static_cast<float>(0.0))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0.0;";
|
|
}
|
|
if (value > static_cast<float>(0.5))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 0.5;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Thread_count */ {
|
|
const int64_t& value = m_Thread_count;
|
|
const std::string currentValuePath = _pathPrefix + ".threadCount";
|
|
|
|
|
|
if (value < 1ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 1;";
|
|
}
|
|
if (value > 64ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 64;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Unit_cell_dist_tolerance */ {
|
|
const float& value = m_Unit_cell_dist_tolerance;
|
|
const std::string currentValuePath = _pathPrefix + ".unitCellDistTolerance";
|
|
|
|
|
|
if (value < static_cast<float>(0.00010))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0.00010;";
|
|
}
|
|
if (value > static_cast<float>(0.2001))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 0.2001;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Viable_cell_min_spots */ {
|
|
const int64_t& value = m_Viable_cell_min_spots;
|
|
const std::string currentValuePath = _pathPrefix + ".viableCellMinSpots";
|
|
|
|
|
|
if (value < 5ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 5;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Rotation_indexing_min_angular_range_deg */ {
|
|
const float& value = m_Rotation_indexing_min_angular_range_deg;
|
|
const std::string currentValuePath = _pathPrefix + ".rotationIndexingMinAngularRangeDeg";
|
|
|
|
|
|
if (value < static_cast<float>(1.0))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 1.0;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Rotation_indexing_angular_stride_deg */ {
|
|
const float& value = m_Rotation_indexing_angular_stride_deg;
|
|
const std::string currentValuePath = _pathPrefix + ".rotationIndexingAngularStrideDeg";
|
|
|
|
|
|
if (value < static_cast<float>(0))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
return success;
|
|
}
|
|
|
|
bool Indexing_settings::operator==(const Indexing_settings& rhs) const
|
|
{
|
|
return
|
|
|
|
|
|
(getAlgorithm() == rhs.getAlgorithm())
|
|
&&
|
|
|
|
(getFftMaxUnitCellA() == rhs.getFftMaxUnitCellA())
|
|
&&
|
|
|
|
(getFftMinUnitCellA() == rhs.getFftMinUnitCellA())
|
|
&&
|
|
|
|
(getFftHighResolutionA() == rhs.getFftHighResolutionA())
|
|
&&
|
|
|
|
(getFftNumVectors() == rhs.getFftNumVectors())
|
|
&&
|
|
|
|
(getTolerance() == rhs.getTolerance())
|
|
&&
|
|
|
|
(getThreadCount() == rhs.getThreadCount())
|
|
&&
|
|
|
|
(getGeomRefinementAlgorithm() == rhs.getGeomRefinementAlgorithm())
|
|
&&
|
|
|
|
(getUnitCellDistTolerance() == rhs.getUnitCellDistTolerance())
|
|
&&
|
|
|
|
(getViableCellMinSpots() == rhs.getViableCellMinSpots())
|
|
&&
|
|
|
|
(isIndexIceRings() == rhs.isIndexIceRings())
|
|
&&
|
|
|
|
(isRotationIndexing() == rhs.isRotationIndexing())
|
|
&&
|
|
|
|
(getRotationIndexingMinAngularRangeDeg() == rhs.getRotationIndexingMinAngularRangeDeg())
|
|
&&
|
|
|
|
(getRotationIndexingAngularStrideDeg() == rhs.getRotationIndexingAngularStrideDeg())
|
|
&&
|
|
|
|
(isBlocking() == rhs.isBlocking())
|
|
|
|
|
|
;
|
|
}
|
|
|
|
bool Indexing_settings::operator!=(const Indexing_settings& rhs) const
|
|
{
|
|
return !(*this == rhs);
|
|
}
|
|
|
|
void to_json(nlohmann::json& j, const Indexing_settings& o)
|
|
{
|
|
j = nlohmann::json::object();
|
|
j["algorithm"] = o.m_Algorithm;
|
|
j["fft_max_unit_cell_A"] = o.m_Fft_max_unit_cell_A;
|
|
j["fft_min_unit_cell_A"] = o.m_Fft_min_unit_cell_A;
|
|
j["fft_high_resolution_A"] = o.m_Fft_high_resolution_A;
|
|
j["fft_num_vectors"] = o.m_Fft_num_vectors;
|
|
j["tolerance"] = o.m_Tolerance;
|
|
j["thread_count"] = o.m_Thread_count;
|
|
j["geom_refinement_algorithm"] = o.m_Geom_refinement_algorithm;
|
|
j["unit_cell_dist_tolerance"] = o.m_Unit_cell_dist_tolerance;
|
|
j["viable_cell_min_spots"] = o.m_Viable_cell_min_spots;
|
|
j["index_ice_rings"] = o.m_Index_ice_rings;
|
|
j["rotation_indexing"] = o.m_Rotation_indexing;
|
|
j["rotation_indexing_min_angular_range_deg"] = o.m_Rotation_indexing_min_angular_range_deg;
|
|
j["rotation_indexing_angular_stride_deg"] = o.m_Rotation_indexing_angular_stride_deg;
|
|
j["blocking"] = o.m_Blocking;
|
|
|
|
}
|
|
|
|
void from_json(const nlohmann::json& j, Indexing_settings& o)
|
|
{
|
|
j.at("algorithm").get_to(o.m_Algorithm);
|
|
j.at("fft_max_unit_cell_A").get_to(o.m_Fft_max_unit_cell_A);
|
|
j.at("fft_min_unit_cell_A").get_to(o.m_Fft_min_unit_cell_A);
|
|
j.at("fft_high_resolution_A").get_to(o.m_Fft_high_resolution_A);
|
|
j.at("fft_num_vectors").get_to(o.m_Fft_num_vectors);
|
|
j.at("tolerance").get_to(o.m_Tolerance);
|
|
j.at("thread_count").get_to(o.m_Thread_count);
|
|
j.at("geom_refinement_algorithm").get_to(o.m_Geom_refinement_algorithm);
|
|
j.at("unit_cell_dist_tolerance").get_to(o.m_Unit_cell_dist_tolerance);
|
|
j.at("viable_cell_min_spots").get_to(o.m_Viable_cell_min_spots);
|
|
j.at("index_ice_rings").get_to(o.m_Index_ice_rings);
|
|
j.at("rotation_indexing").get_to(o.m_Rotation_indexing);
|
|
j.at("rotation_indexing_min_angular_range_deg").get_to(o.m_Rotation_indexing_min_angular_range_deg);
|
|
j.at("rotation_indexing_angular_stride_deg").get_to(o.m_Rotation_indexing_angular_stride_deg);
|
|
j.at("blocking").get_to(o.m_Blocking);
|
|
|
|
}
|
|
|
|
org::openapitools::server::model::Indexing_algorithm Indexing_settings::getAlgorithm() const
|
|
{
|
|
return m_Algorithm;
|
|
}
|
|
void Indexing_settings::setAlgorithm(org::openapitools::server::model::Indexing_algorithm const& value)
|
|
{
|
|
m_Algorithm = value;
|
|
}
|
|
float Indexing_settings::getFftMaxUnitCellA() const
|
|
{
|
|
return m_Fft_max_unit_cell_A;
|
|
}
|
|
void Indexing_settings::setFftMaxUnitCellA(float const value)
|
|
{
|
|
m_Fft_max_unit_cell_A = value;
|
|
}
|
|
float Indexing_settings::getFftMinUnitCellA() const
|
|
{
|
|
return m_Fft_min_unit_cell_A;
|
|
}
|
|
void Indexing_settings::setFftMinUnitCellA(float const value)
|
|
{
|
|
m_Fft_min_unit_cell_A = value;
|
|
}
|
|
float Indexing_settings::getFftHighResolutionA() const
|
|
{
|
|
return m_Fft_high_resolution_A;
|
|
}
|
|
void Indexing_settings::setFftHighResolutionA(float const value)
|
|
{
|
|
m_Fft_high_resolution_A = value;
|
|
}
|
|
int64_t Indexing_settings::getFftNumVectors() const
|
|
{
|
|
return m_Fft_num_vectors;
|
|
}
|
|
void Indexing_settings::setFftNumVectors(int64_t const value)
|
|
{
|
|
m_Fft_num_vectors = value;
|
|
}
|
|
float Indexing_settings::getTolerance() const
|
|
{
|
|
return m_Tolerance;
|
|
}
|
|
void Indexing_settings::setTolerance(float const value)
|
|
{
|
|
m_Tolerance = value;
|
|
}
|
|
int64_t Indexing_settings::getThreadCount() const
|
|
{
|
|
return m_Thread_count;
|
|
}
|
|
void Indexing_settings::setThreadCount(int64_t const value)
|
|
{
|
|
m_Thread_count = value;
|
|
}
|
|
org::openapitools::server::model::Geom_refinement_algorithm Indexing_settings::getGeomRefinementAlgorithm() const
|
|
{
|
|
return m_Geom_refinement_algorithm;
|
|
}
|
|
void Indexing_settings::setGeomRefinementAlgorithm(org::openapitools::server::model::Geom_refinement_algorithm const& value)
|
|
{
|
|
m_Geom_refinement_algorithm = value;
|
|
}
|
|
float Indexing_settings::getUnitCellDistTolerance() const
|
|
{
|
|
return m_Unit_cell_dist_tolerance;
|
|
}
|
|
void Indexing_settings::setUnitCellDistTolerance(float const value)
|
|
{
|
|
m_Unit_cell_dist_tolerance = value;
|
|
}
|
|
int64_t Indexing_settings::getViableCellMinSpots() const
|
|
{
|
|
return m_Viable_cell_min_spots;
|
|
}
|
|
void Indexing_settings::setViableCellMinSpots(int64_t const value)
|
|
{
|
|
m_Viable_cell_min_spots = value;
|
|
}
|
|
bool Indexing_settings::isIndexIceRings() const
|
|
{
|
|
return m_Index_ice_rings;
|
|
}
|
|
void Indexing_settings::setIndexIceRings(bool const value)
|
|
{
|
|
m_Index_ice_rings = value;
|
|
}
|
|
bool Indexing_settings::isRotationIndexing() const
|
|
{
|
|
return m_Rotation_indexing;
|
|
}
|
|
void Indexing_settings::setRotationIndexing(bool const value)
|
|
{
|
|
m_Rotation_indexing = value;
|
|
}
|
|
float Indexing_settings::getRotationIndexingMinAngularRangeDeg() const
|
|
{
|
|
return m_Rotation_indexing_min_angular_range_deg;
|
|
}
|
|
void Indexing_settings::setRotationIndexingMinAngularRangeDeg(float const value)
|
|
{
|
|
m_Rotation_indexing_min_angular_range_deg = value;
|
|
}
|
|
float Indexing_settings::getRotationIndexingAngularStrideDeg() const
|
|
{
|
|
return m_Rotation_indexing_angular_stride_deg;
|
|
}
|
|
void Indexing_settings::setRotationIndexingAngularStrideDeg(float const value)
|
|
{
|
|
m_Rotation_indexing_angular_stride_deg = value;
|
|
}
|
|
bool Indexing_settings::isBlocking() const
|
|
{
|
|
return m_Blocking;
|
|
}
|
|
void Indexing_settings::setBlocking(bool const value)
|
|
{
|
|
m_Blocking = value;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|