diff --git a/broker/JFJochBrokerHttp.cpp b/broker/JFJochBrokerHttp.cpp index a6e7255a6..b417085ab 100644 --- a/broker/JFJochBrokerHttp.cpp +++ b/broker/JFJochBrokerHttp.cpp @@ -262,10 +262,16 @@ void JFJochBrokerHttp::register_routes(httplib::Server &server) { server.Put("/config/rugnux/model", bind_req(&JFJochBrokerHttp::config_rugnux_model_put)); server.Delete("/config/rugnux/model", bind_noarg(&JFJochBrokerHttp::config_rugnux_model_delete)); server.Get("/rugnux/status", bind_noarg(&JFJochBrokerHttp::rugnux_status_get)); - server.Get("/rugnux/model.cif", bind_noarg(&JFJochBrokerHttp::rugnux_model_cif_get)); + server.Get("/rugnux/model.cif", [this](const httplib::Request &req, httplib::Response &res) { + try { + rugnux_model_cif_get(parse_query_string(req, "stage"), res); + } catch (const std::exception &e) { + send_error(res, handleOperationException(e)); + } + }); server.Get("/rugnux/map.ccp4", [this](const httplib::Request &req, httplib::Response &res) { try { - rugnux_map_ccp4_get(parse_query_string(req, "type"), res); + rugnux_map_ccp4_get(parse_query_string(req, "type"), parse_query_string(req, "stage"), res); } catch (const std::exception &e) { send_error(res, handleOperationException(e)); } @@ -1036,8 +1042,26 @@ void JFJochBrokerHttp::rugnux_status_get(httplib::Response &response) { ProcessOutput(Convert(state_machine.GetRugnuxStatus()), response); } -void JFJochBrokerHttp::rugnux_model_cif_get(httplib::Response &response) { - const auto structure = state_machine.GetRugnuxStatus().structure; +// The structure a viewer route serves: `stage` placed or refined; by default the refined one where there is one. +// Null where there is none, or for an unknown stage (with the 400 already set). +static std::shared_ptr RugnuxStage(const RugnuxLiveSnapshot &s, + const std::optional &stage, + httplib::Response &response) { + if (!stage) + return s.refined_structure ? s.refined_structure : s.structure; + if (stage == "placed") + return s.structure; + if (stage == "refined") + return s.refined_structure; + response.status = 400; + response.set_content("Unknown stage " + stage.value(), "text/plain"); + return nullptr; +} + +void JFJochBrokerHttp::rugnux_model_cif_get(const std::optional &stage, httplib::Response &response) { + const auto structure = RugnuxStage(state_machine.GetRugnuxStatus(), stage, response); + if (response.status == 400) + return; if (!structure) { response.status = 404; return; @@ -1045,16 +1069,23 @@ void JFJochBrokerHttp::rugnux_model_cif_get(httplib::Response &response) { response.set_content(structure->ModelCif(), "chemical/x-mmcif"); } -void JFJochBrokerHttp::rugnux_map_ccp4_get(const std::optional &type, httplib::Response &response) { +void JFJochBrokerHttp::rugnux_map_ccp4_get(const std::optional &type, + const std::optional &stage, httplib::Response &response) { const std::string t = type.value_or("2fofc"); if (t != "2fofc" && t != "fofc" && t != "anom") { response.status = 400; response.set_content("Unknown map type " + t, "text/plain"); return; } - const auto structure = state_machine.GetRugnuxStatus().structure; + const RugnuxLiveSnapshot status = state_machine.GetRugnuxStatus(); + auto structure = RugnuxStage(status, stage, response); + if (response.status == 400) + return; const RugnuxMapType map_type = t == "2fofc" ? RugnuxMapType::TwoFoFc : t == "fofc" ? RugnuxMapType::FoFc : RugnuxMapType::Anomalous; + // The refined model's coefficients carry no anomalous map: it stays on the placed model's phases. + if (map_type == RugnuxMapType::Anomalous && structure) + structure = status.structure; const std::string map = structure ? structure->Map(map_type) : std::string(); if (map.empty()) { response.status = 404; diff --git a/broker/JFJochBrokerHttp.h b/broker/JFJochBrokerHttp.h index a5ff26c41..f5085c6cf 100644 --- a/broker/JFJochBrokerHttp.h +++ b/broker/JFJochBrokerHttp.h @@ -206,8 +206,9 @@ class JFJochBrokerHttp { void config_rugnux_model_put(const httplib::Request &request, httplib::Response &response); void config_rugnux_model_delete(httplib::Response &response); void rugnux_status_get(httplib::Response &response); - void rugnux_model_cif_get(httplib::Response &response); - void rugnux_map_ccp4_get(const std::optional &type, httplib::Response &response); + void rugnux_model_cif_get(const std::optional &stage, httplib::Response &response); + void rugnux_map_ccp4_get(const std::optional &type, const std::optional &stage, + httplib::Response &response); void config_bragg_integration_get(httplib::Response &response); void config_bragg_integration_put(const org::openapitools::server::model::Bragg_integration_settings &braggIntegrationSettings, httplib::Response &response); diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp index d7bb080ce..a49a9afb6 100644 --- a/broker/OpenAPIConvert.cpp +++ b/broker/OpenAPIConvert.cpp @@ -1278,6 +1278,7 @@ org::openapitools::server::model::Rugnux_live_status Convert(const RugnuxLiveSna ret.setSummary(summary); ret.setWarnings(input.warnings); ret.setPlacedModel(input.structure != nullptr); + ret.setRefinedModel(input.refined_structure != nullptr); ret.setAnomalousMap(input.structure != nullptr && input.structure->HasAnomalousMap()); ret.setAnomalousSignal(input.anomalous_signal); if (!input.space_group.empty()) @@ -1309,6 +1310,34 @@ org::openapitools::server::model::Rugnux_live_status Convert(const RugnuxLiveSna if (m.mr_d_min) model.setMrDMin(m.mr_d_min.value()); model.setAnomalousSite(m.anomalous_site); if (m.anomalous_site_sigma) model.setAnomalousSiteSigma(m.anomalous_site_sigma.value()); + if (m.refinement) { + const RugnuxLiveRefinement &r = m.refinement.value(); + org::openapitools::server::model::Rugnux_live_refinement refinement; + refinement.setPerformed(r.performed); + refinement.setReason(r.reason); + refinement.setOnGpu(r.on_gpu); + refinement.setSeconds(r.seconds); + if (r.r_work) refinement.setRWork(r.r_work.value()); + if (r.r_free) refinement.setRFree(r.r_free.value()); + if (r.rmsd_bonds_A) refinement.setRmsdBondsA(r.rmsd_bonds_A.value()); + if (r.rmsd_angles_deg) refinement.setRmsdAnglesDeg(r.rmsd_angles_deg.value()); + refinement.setBlobCount(r.blob_count); + std::vector blobs; + for (const auto &b: r.blobs) { + org::openapitools::server::model::Rugnux_live_blob blob; + blob.setKind(b.kind); + blob.setX(b.x); + blob.setY(b.y); + blob.setZ(b.z); + blob.setPeakSigma(b.peak_sigma); + blob.setVolumeA3(b.volume_A3); + blob.setNearestAtom(b.nearest_atom); + blob.setNearestAtomDistanceA(b.nearest_atom_distance_A); + blobs.push_back(blob); + } + refinement.setBlobs(blobs); + model.setRefinement(refinement); + } ret.setModel(model); } return ret; diff --git a/broker/gen/model/Rugnux_live_blob.cpp b/broker/gen/model/Rugnux_live_blob.cpp new file mode 100644 index 000000000..62a4eade4 --- /dev/null +++ b/broker/gen/model/Rugnux_live_blob.cpp @@ -0,0 +1,189 @@ +/** +* 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.180 +* 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 "Rugnux_live_blob.h" +#include "Helpers.h" + +#include + +namespace org::openapitools::server::model +{ + +Rugnux_live_blob::Rugnux_live_blob() +{ + m_Kind = ""; + m_x = 0.0; + m_y = 0.0; + m_z = 0.0; + m_Peak_sigma = 0.0; + m_Volume_A3 = 0.0; + m_Nearest_atom = ""; + m_Nearest_atom_distance_A = 0.0; + +} + +void Rugnux_live_blob::validate() const +{ + std::stringstream msg; + if (!validate(msg)) + { + throw org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool Rugnux_live_blob::validate(std::stringstream& msg) const +{ + return validate(msg, ""); +} + +bool Rugnux_live_blob::validate(std::stringstream& msg, const std::string& pathPrefix) const +{ + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Rugnux_live_blob" : pathPrefix; + + + return success; +} + +bool Rugnux_live_blob::operator==(const Rugnux_live_blob& rhs) const +{ + return + + + (getKind() == rhs.getKind()) + && + + (getX() == rhs.getX()) + && + + (getY() == rhs.getY()) + && + + (getZ() == rhs.getZ()) + && + + (getPeakSigma() == rhs.getPeakSigma()) + && + + (getVolumeA3() == rhs.getVolumeA3()) + && + + (getNearestAtom() == rhs.getNearestAtom()) + && + + (getNearestAtomDistanceA() == rhs.getNearestAtomDistanceA()) + + + ; +} + +bool Rugnux_live_blob::operator!=(const Rugnux_live_blob& rhs) const +{ + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const Rugnux_live_blob& o) +{ + j = nlohmann::json::object(); + j["kind"] = o.m_Kind; + j["x"] = o.m_x; + j["y"] = o.m_y; + j["z"] = o.m_z; + j["peak_sigma"] = o.m_Peak_sigma; + j["volume_A3"] = o.m_Volume_A3; + j["nearest_atom"] = o.m_Nearest_atom; + j["nearest_atom_distance_A"] = o.m_Nearest_atom_distance_A; + +} + +void from_json(const nlohmann::json& j, Rugnux_live_blob& o) +{ + j.at("kind").get_to(o.m_Kind); + j.at("x").get_to(o.m_x); + j.at("y").get_to(o.m_y); + j.at("z").get_to(o.m_z); + j.at("peak_sigma").get_to(o.m_Peak_sigma); + j.at("volume_A3").get_to(o.m_Volume_A3); + j.at("nearest_atom").get_to(o.m_Nearest_atom); + j.at("nearest_atom_distance_A").get_to(o.m_Nearest_atom_distance_A); + +} + +std::string Rugnux_live_blob::getKind() const +{ + return m_Kind; +} +void Rugnux_live_blob::setKind(std::string const& value) +{ + m_Kind = value; +} +double Rugnux_live_blob::getX() const +{ + return m_x; +} +void Rugnux_live_blob::setX(double const value) +{ + m_x = value; +} +double Rugnux_live_blob::getY() const +{ + return m_y; +} +void Rugnux_live_blob::setY(double const value) +{ + m_y = value; +} +double Rugnux_live_blob::getZ() const +{ + return m_z; +} +void Rugnux_live_blob::setZ(double const value) +{ + m_z = value; +} +double Rugnux_live_blob::getPeakSigma() const +{ + return m_Peak_sigma; +} +void Rugnux_live_blob::setPeakSigma(double const value) +{ + m_Peak_sigma = value; +} +double Rugnux_live_blob::getVolumeA3() const +{ + return m_Volume_A3; +} +void Rugnux_live_blob::setVolumeA3(double const value) +{ + m_Volume_A3 = value; +} +std::string Rugnux_live_blob::getNearestAtom() const +{ + return m_Nearest_atom; +} +void Rugnux_live_blob::setNearestAtom(std::string const& value) +{ + m_Nearest_atom = value; +} +double Rugnux_live_blob::getNearestAtomDistanceA() const +{ + return m_Nearest_atom_distance_A; +} +void Rugnux_live_blob::setNearestAtomDistanceA(double const value) +{ + m_Nearest_atom_distance_A = value; +} + + +} // namespace org::openapitools::server::model + diff --git a/broker/gen/model/Rugnux_live_blob.h b/broker/gen/model/Rugnux_live_blob.h new file mode 100644 index 000000000..5d667f55b --- /dev/null +++ b/broker/gen/model/Rugnux_live_blob.h @@ -0,0 +1,126 @@ +/** +* 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.180 +* 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. +*/ +/* + * Rugnux_live_blob.h + * + * A blob of positive mFo-DFc density the refined model leaves unexplained, with its likely reading: a rule on what is measured, to point a person at the density - not an identification. + */ + +#ifndef Rugnux_live_blob_H_ +#define Rugnux_live_blob_H_ + + +#include +#include + +namespace org::openapitools::server::model +{ + +/// +/// A blob of positive mFo-DFc density the refined model leaves unexplained, with its likely reading: a rule on what is measured, to point a person at the density - not an identification. +/// +class Rugnux_live_blob +{ +public: + Rugnux_live_blob(); + virtual ~Rugnux_live_blob() = default; + + + /// + /// Validate the current data in the model. Throws a ValidationException on failure. + /// + void validate() const; + + /// + /// Validate the current data in the model. Returns false on error and writes an error + /// message into the given stringstream. + /// + bool validate(std::stringstream& msg) const; + + /// + /// Helper overload for validate. Used when one model stores another model and calls it's validate. + /// Not meant to be called outside that case. + /// + bool validate(std::stringstream& msg, const std::string& pathPrefix) const; + + bool operator==(const Rugnux_live_blob& rhs) const; + bool operator!=(const Rugnux_live_blob& rhs) const; + + ///////////////////////////////////////////// + /// Rugnux_live_blob members + + /// + /// + /// + std::string getKind() const; + void setKind(std::string const& value); + /// + /// Centroid, Cartesian Angstrom, in the frame of the refined model (`/rugnux/model.cif`) + /// + double getX() const; + void setX(double const value); + /// + /// + /// + double getY() const; + void setY(double const value); + /// + /// + /// + double getZ() const; + void setZ(double const value); + /// + /// The highest point, in map sigma + /// + double getPeakSigma() const; + void setPeakSigma(double const value); + /// + /// Volume above 3 sigma, in cubic Angstrom + /// + double getVolumeA3() const; + void setVolumeA3(double const value); + /// + /// e.g. \"OG1 THR A42\" + /// + std::string getNearestAtom() const; + void setNearestAtom(std::string const& value); + /// + /// + /// + double getNearestAtomDistanceA() const; + void setNearestAtomDistanceA(double const value); + + friend void to_json(nlohmann::json& j, const Rugnux_live_blob& o); + friend void from_json(const nlohmann::json& j, Rugnux_live_blob& o); +protected: + std::string m_Kind; + + double m_x; + + double m_y; + + double m_z; + + double m_Peak_sigma; + + double m_Volume_A3; + + std::string m_Nearest_atom; + + double m_Nearest_atom_distance_A; + + +}; + +} // namespace org::openapitools::server::model + +#endif /* Rugnux_live_blob_H_ */ diff --git a/broker/gen/model/Rugnux_live_model.cpp b/broker/gen/model/Rugnux_live_model.cpp index 74394f202..da7ba982d 100644 --- a/broker/gen/model/Rugnux_live_model.cpp +++ b/broker/gen/model/Rugnux_live_model.cpp @@ -54,6 +54,7 @@ Rugnux_live_model::Rugnux_live_model() m_Anomalous_site = ""; m_Anomalous_site_sigma = 0.0; m_Anomalous_site_sigmaIsSet = false; + m_RefinementIsSet = false; } @@ -76,7 +77,7 @@ bool Rugnux_live_model::validate(std::stringstream& msg, const std::string& path bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Rugnux_live_model" : pathPrefix; - + return success; } @@ -143,7 +144,10 @@ bool Rugnux_live_model::operator==(const Rugnux_live_model& rhs) const && - ((!anomalousSiteSigmaIsSet() && !rhs.anomalousSiteSigmaIsSet()) || (anomalousSiteSigmaIsSet() && rhs.anomalousSiteSigmaIsSet() && getAnomalousSiteSigma() == rhs.getAnomalousSiteSigma())) + ((!anomalousSiteSigmaIsSet() && !rhs.anomalousSiteSigmaIsSet()) || (anomalousSiteSigmaIsSet() && rhs.anomalousSiteSigmaIsSet() && getAnomalousSiteSigma() == rhs.getAnomalousSiteSigma())) && + + + ((!refinementIsSet() && !rhs.refinementIsSet()) || (refinementIsSet() && rhs.refinementIsSet() && getRefinement() == rhs.getRefinement())) ; } @@ -189,6 +193,8 @@ void to_json(nlohmann::json& j, const Rugnux_live_model& o) j["anomalous_site"] = o.m_Anomalous_site; if(o.anomalousSiteSigmaIsSet()) j["anomalous_site_sigma"] = o.m_Anomalous_site_sigma; + if(o.refinementIsSet()) + j["refinement"] = o.m_Refinement; } @@ -266,6 +272,11 @@ void from_json(const nlohmann::json& j, Rugnux_live_model& o) j.at("anomalous_site_sigma").get_to(o.m_Anomalous_site_sigma); o.m_Anomalous_site_sigmaIsSet = true; } + if(j.find("refinement") != j.end()) + { + j.at("refinement").get_to(o.m_Refinement); + o.m_RefinementIsSet = true; + } } @@ -546,6 +557,23 @@ void Rugnux_live_model::unsetAnomalous_site_sigma() { m_Anomalous_site_sigmaIsSet = false; } +org::openapitools::server::model::Rugnux_live_refinement Rugnux_live_model::getRefinement() const +{ + return m_Refinement; +} +void Rugnux_live_model::setRefinement(org::openapitools::server::model::Rugnux_live_refinement const& value) +{ + m_Refinement = value; + m_RefinementIsSet = true; +} +bool Rugnux_live_model::refinementIsSet() const +{ + return m_RefinementIsSet; +} +void Rugnux_live_model::unsetRefinement() +{ + m_RefinementIsSet = false; +} } // namespace org::openapitools::server::model diff --git a/broker/gen/model/Rugnux_live_model.h b/broker/gen/model/Rugnux_live_model.h index 38237298c..d8ce3ced3 100644 --- a/broker/gen/model/Rugnux_live_model.h +++ b/broker/gen/model/Rugnux_live_model.h @@ -12,7 +12,7 @@ /* * Rugnux_live_model.h * - * What the run made of the model it was given, as the report's MODEL VALIDATION section states it. Nothing is refined: the R-factors are those of the placed model with its own coordinates and B factors. A value that is absent was not computed - the model was not placed, or not by molecular replacement. + * What the run made of the model it was given, as the report's MODEL VALIDATION section states it. The R-factors here are those of the placed model with its own coordinates and B factors; what refinement made of it is in `refinement`. A value that is absent was not computed - the model was not placed, or not by molecular replacement. */ #ifndef Rugnux_live_model_H_ @@ -20,13 +20,14 @@ #include +#include "Rugnux_live_refinement.h" #include namespace org::openapitools::server::model { /// -/// What the run made of the model it was given, as the report's MODEL VALIDATION section states it. Nothing is refined: the R-factors are those of the placed model with its own coordinates and B factors. A value that is absent was not computed - the model was not placed, or not by molecular replacement. +/// What the run made of the model it was given, as the report's MODEL VALIDATION section states it. The R-factors here are those of the placed model with its own coordinates and B factors; what refinement made of it is in `refinement`. A value that is absent was not computed - the model was not placed, or not by molecular replacement. /// class Rugnux_live_model { @@ -184,6 +185,13 @@ public: void setAnomalousSiteSigma(double const value); bool anomalousSiteSigmaIsSet() const; void unsetAnomalous_site_sigma(); + /// + /// + /// + org::openapitools::server::model::Rugnux_live_refinement getRefinement() const; + void setRefinement(org::openapitools::server::model::Rugnux_live_refinement const& value); + bool refinementIsSet() const; + void unsetRefinement(); friend void to_json(nlohmann::json& j, const Rugnux_live_model& o); friend void from_json(const nlohmann::json& j, Rugnux_live_model& o); @@ -228,6 +236,8 @@ protected: double m_Anomalous_site_sigma; bool m_Anomalous_site_sigmaIsSet; + org::openapitools::server::model::Rugnux_live_refinement m_Refinement; + bool m_RefinementIsSet; }; diff --git a/broker/gen/model/Rugnux_live_refinement.cpp b/broker/gen/model/Rugnux_live_refinement.cpp new file mode 100644 index 000000000..570b258a6 --- /dev/null +++ b/broker/gen/model/Rugnux_live_refinement.cpp @@ -0,0 +1,297 @@ +/** +* 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.180 +* 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 "Rugnux_live_refinement.h" +#include "Helpers.h" + +#include + +namespace org::openapitools::server::model +{ + +Rugnux_live_refinement::Rugnux_live_refinement() +{ + m_Performed = false; + m_Reason = ""; + m_On_gpu = false; + m_Seconds = 0.0; + m_R_work = 0.0; + m_R_workIsSet = false; + m_R_free = 0.0; + m_R_freeIsSet = false; + m_Rmsd_bonds_A = 0.0; + m_Rmsd_bonds_AIsSet = false; + m_Rmsd_angles_deg = 0.0; + m_Rmsd_angles_degIsSet = false; + m_Blob_count = 0L; + +} + +void Rugnux_live_refinement::validate() const +{ + std::stringstream msg; + if (!validate(msg)) + { + throw org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool Rugnux_live_refinement::validate(std::stringstream& msg) const +{ + return validate(msg, ""); +} + +bool Rugnux_live_refinement::validate(std::stringstream& msg, const std::string& pathPrefix) const +{ + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Rugnux_live_refinement" : pathPrefix; + + + + /* Blobs */ { + const std::vector& value = m_Blobs; + const std::string currentValuePath = _pathPrefix + ".blobs"; + + + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const org::openapitools::server::model::Rugnux_live_blob& value : value) + { + const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; + + success = value.validate(msg, currentValuePath + ".blobs") && success; + + i++; + } + } + + } + + return success; +} + +bool Rugnux_live_refinement::operator==(const Rugnux_live_refinement& rhs) const +{ + return + + + (isPerformed() == rhs.isPerformed()) + && + + (getReason() == rhs.getReason()) + && + + (isOnGpu() == rhs.isOnGpu()) + && + + (getSeconds() == rhs.getSeconds()) + && + + + ((!rWorkIsSet() && !rhs.rWorkIsSet()) || (rWorkIsSet() && rhs.rWorkIsSet() && getRWork() == rhs.getRWork())) && + + + ((!rFreeIsSet() && !rhs.rFreeIsSet()) || (rFreeIsSet() && rhs.rFreeIsSet() && getRFree() == rhs.getRFree())) && + + + ((!rmsdBondsAIsSet() && !rhs.rmsdBondsAIsSet()) || (rmsdBondsAIsSet() && rhs.rmsdBondsAIsSet() && getRmsdBondsA() == rhs.getRmsdBondsA())) && + + + ((!rmsdAnglesDegIsSet() && !rhs.rmsdAnglesDegIsSet()) || (rmsdAnglesDegIsSet() && rhs.rmsdAnglesDegIsSet() && getRmsdAnglesDeg() == rhs.getRmsdAnglesDeg())) && + + (getBlobCount() == rhs.getBlobCount()) + && + + (getBlobs() == rhs.getBlobs()) + + + ; +} + +bool Rugnux_live_refinement::operator!=(const Rugnux_live_refinement& rhs) const +{ + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const Rugnux_live_refinement& o) +{ + j = nlohmann::json::object(); + j["performed"] = o.m_Performed; + j["reason"] = o.m_Reason; + j["on_gpu"] = o.m_On_gpu; + j["seconds"] = o.m_Seconds; + if(o.rWorkIsSet()) + j["r_work"] = o.m_R_work; + if(o.rFreeIsSet()) + j["r_free"] = o.m_R_free; + if(o.rmsdBondsAIsSet()) + j["rmsd_bonds_A"] = o.m_Rmsd_bonds_A; + if(o.rmsdAnglesDegIsSet()) + j["rmsd_angles_deg"] = o.m_Rmsd_angles_deg; + j["blob_count"] = o.m_Blob_count; + j["blobs"] = o.m_Blobs; + +} + +void from_json(const nlohmann::json& j, Rugnux_live_refinement& o) +{ + j.at("performed").get_to(o.m_Performed); + j.at("reason").get_to(o.m_Reason); + j.at("on_gpu").get_to(o.m_On_gpu); + j.at("seconds").get_to(o.m_Seconds); + if(j.find("r_work") != j.end()) + { + j.at("r_work").get_to(o.m_R_work); + o.m_R_workIsSet = true; + } + if(j.find("r_free") != j.end()) + { + j.at("r_free").get_to(o.m_R_free); + o.m_R_freeIsSet = true; + } + if(j.find("rmsd_bonds_A") != j.end()) + { + j.at("rmsd_bonds_A").get_to(o.m_Rmsd_bonds_A); + o.m_Rmsd_bonds_AIsSet = true; + } + if(j.find("rmsd_angles_deg") != j.end()) + { + j.at("rmsd_angles_deg").get_to(o.m_Rmsd_angles_deg); + o.m_Rmsd_angles_degIsSet = true; + } + j.at("blob_count").get_to(o.m_Blob_count); + j.at("blobs").get_to(o.m_Blobs); + +} + +bool Rugnux_live_refinement::isPerformed() const +{ + return m_Performed; +} +void Rugnux_live_refinement::setPerformed(bool const value) +{ + m_Performed = value; +} +std::string Rugnux_live_refinement::getReason() const +{ + return m_Reason; +} +void Rugnux_live_refinement::setReason(std::string const& value) +{ + m_Reason = value; +} +bool Rugnux_live_refinement::isOnGpu() const +{ + return m_On_gpu; +} +void Rugnux_live_refinement::setOnGpu(bool const value) +{ + m_On_gpu = value; +} +double Rugnux_live_refinement::getSeconds() const +{ + return m_Seconds; +} +void Rugnux_live_refinement::setSeconds(double const value) +{ + m_Seconds = value; +} +double Rugnux_live_refinement::getRWork() const +{ + return m_R_work; +} +void Rugnux_live_refinement::setRWork(double const value) +{ + m_R_work = value; + m_R_workIsSet = true; +} +bool Rugnux_live_refinement::rWorkIsSet() const +{ + return m_R_workIsSet; +} +void Rugnux_live_refinement::unsetR_work() +{ + m_R_workIsSet = false; +} +double Rugnux_live_refinement::getRFree() const +{ + return m_R_free; +} +void Rugnux_live_refinement::setRFree(double const value) +{ + m_R_free = value; + m_R_freeIsSet = true; +} +bool Rugnux_live_refinement::rFreeIsSet() const +{ + return m_R_freeIsSet; +} +void Rugnux_live_refinement::unsetR_free() +{ + m_R_freeIsSet = false; +} +double Rugnux_live_refinement::getRmsdBondsA() const +{ + return m_Rmsd_bonds_A; +} +void Rugnux_live_refinement::setRmsdBondsA(double const value) +{ + m_Rmsd_bonds_A = value; + m_Rmsd_bonds_AIsSet = true; +} +bool Rugnux_live_refinement::rmsdBondsAIsSet() const +{ + return m_Rmsd_bonds_AIsSet; +} +void Rugnux_live_refinement::unsetRmsd_bonds_A() +{ + m_Rmsd_bonds_AIsSet = false; +} +double Rugnux_live_refinement::getRmsdAnglesDeg() const +{ + return m_Rmsd_angles_deg; +} +void Rugnux_live_refinement::setRmsdAnglesDeg(double const value) +{ + m_Rmsd_angles_deg = value; + m_Rmsd_angles_degIsSet = true; +} +bool Rugnux_live_refinement::rmsdAnglesDegIsSet() const +{ + return m_Rmsd_angles_degIsSet; +} +void Rugnux_live_refinement::unsetRmsd_angles_deg() +{ + m_Rmsd_angles_degIsSet = false; +} +int64_t Rugnux_live_refinement::getBlobCount() const +{ + return m_Blob_count; +} +void Rugnux_live_refinement::setBlobCount(int64_t const value) +{ + m_Blob_count = value; +} +std::vector Rugnux_live_refinement::getBlobs() const +{ + return m_Blobs; +} +void Rugnux_live_refinement::setBlobs(std::vector const& value) +{ + m_Blobs = value; +} + + +} // namespace org::openapitools::server::model + diff --git a/broker/gen/model/Rugnux_live_refinement.h b/broker/gen/model/Rugnux_live_refinement.h new file mode 100644 index 000000000..620141804 --- /dev/null +++ b/broker/gen/model/Rugnux_live_refinement.h @@ -0,0 +1,150 @@ +/** +* 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.180 +* 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. +*/ +/* + * Rugnux_live_refinement.h + * + * The placed model refined against the merge it was placed on, as the report's REFINE_ keys state it. Set where a placed model was refined or its refinement failed; absent where the model was not placed, or refinement is off (it runs only with a GPU in live mode). + */ + +#ifndef Rugnux_live_refinement_H_ +#define Rugnux_live_refinement_H_ + + +#include "Rugnux_live_blob.h" +#include +#include +#include + +namespace org::openapitools::server::model +{ + +/// +/// The placed model refined against the merge it was placed on, as the report's REFINE_ keys state it. Set where a placed model was refined or its refinement failed; absent where the model was not placed, or refinement is off (it runs only with a GPU in live mode). +/// +class Rugnux_live_refinement +{ +public: + Rugnux_live_refinement(); + virtual ~Rugnux_live_refinement() = default; + + + /// + /// Validate the current data in the model. Throws a ValidationException on failure. + /// + void validate() const; + + /// + /// Validate the current data in the model. Returns false on error and writes an error + /// message into the given stringstream. + /// + bool validate(std::stringstream& msg) const; + + /// + /// Helper overload for validate. Used when one model stores another model and calls it's validate. + /// Not meant to be called outside that case. + /// + bool validate(std::stringstream& msg, const std::string& pathPrefix) const; + + bool operator==(const Rugnux_live_refinement& rhs) const; + bool operator!=(const Rugnux_live_refinement& rhs) const; + + ///////////////////////////////////////////// + /// Rugnux_live_refinement members + + /// + /// Refinement ran to the end; false with `reason` where it failed + /// + bool isPerformed() const; + void setPerformed(bool const value); + /// + /// Why refinement did not run to the end; empty otherwise + /// + std::string getReason() const; + void setReason(std::string const& value); + /// + /// + /// + bool isOnGpu() const; + void setOnGpu(bool const value); + /// + /// Wall time of the refinement + /// + double getSeconds() const; + void setSeconds(double const value); + /// + /// R-work of the refined model (after the restrained stage, else after the rigid body and grouped B) + /// + double getRWork() const; + void setRWork(double const value); + bool rWorkIsSet() const; + void unsetR_work(); + /// + /// R-free of the refined model, on the same reflections as `r_work` + /// + double getRFree() const; + void setRFree(double const value); + bool rFreeIsSet() const; + void unsetR_free(); + /// + /// RMS deviation of the bond lengths from the dictionary, where the restrained stage ran + /// + double getRmsdBondsA() const; + void setRmsdBondsA(double const value); + bool rmsdBondsAIsSet() const; + void unsetRmsd_bonds_A(); + /// + /// RMS deviation of the bond angles from the dictionary, where the restrained stage ran + /// + double getRmsdAnglesDeg() const; + void setRmsdAnglesDeg(double const value); + bool rmsdAnglesDegIsSet() const; + void unsetRmsd_angles_deg(); + /// + /// Unexplained blobs of the refined model's mFo-DFc map (above 3 sigma, peaking above 4) + /// + int64_t getBlobCount() const; + void setBlobCount(int64_t const value); + /// + /// The strongest blobs, at most 50, strongest first + /// + std::vector getBlobs() const; + void setBlobs(std::vector const& value); + + friend void to_json(nlohmann::json& j, const Rugnux_live_refinement& o); + friend void from_json(const nlohmann::json& j, Rugnux_live_refinement& o); +protected: + bool m_Performed; + + std::string m_Reason; + + bool m_On_gpu; + + double m_Seconds; + + double m_R_work; + bool m_R_workIsSet; + double m_R_free; + bool m_R_freeIsSet; + double m_Rmsd_bonds_A; + bool m_Rmsd_bonds_AIsSet; + double m_Rmsd_angles_deg; + bool m_Rmsd_angles_degIsSet; + int64_t m_Blob_count; + + std::vector m_Blobs; + + +}; + +} // namespace org::openapitools::server::model + +#endif /* Rugnux_live_refinement_H_ */ diff --git a/broker/gen/model/Rugnux_live_status.cpp b/broker/gen/model/Rugnux_live_status.cpp index bd80c8796..8b5032085 100644 --- a/broker/gen/model/Rugnux_live_status.cpp +++ b/broker/gen/model/Rugnux_live_status.cpp @@ -23,6 +23,7 @@ Rugnux_live_status::Rugnux_live_status() { m_State = ""; m_Placed_model = false; + m_Refined_model = false; m_Anomalous_map = false; m_Anomalous_signal = false; m_ModelIsSet = false; @@ -77,7 +78,7 @@ bool Rugnux_live_status::validate(std::stringstream& msg, const std::string& pat bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Rugnux_live_status" : pathPrefix; - + if (stepProgressIsSet()) { const float& value = m_Step_progress; @@ -174,6 +175,9 @@ bool Rugnux_live_status::operator==(const Rugnux_live_status& rhs) const (isPlacedModel() == rhs.isPlacedModel()) && + (isRefinedModel() == rhs.isRefinedModel()) + && + (isAnomalousMap() == rhs.isAnomalousMap()) && @@ -259,6 +263,7 @@ void to_json(nlohmann::json& j, const Rugnux_live_status& o) j = nlohmann::json::object(); j["state"] = o.m_State; j["placed_model"] = o.m_Placed_model; + j["refined_model"] = o.m_Refined_model; j["anomalous_map"] = o.m_Anomalous_map; j["anomalous_signal"] = o.m_Anomalous_signal; if(o.modelIsSet()) @@ -302,6 +307,7 @@ void from_json(const nlohmann::json& j, Rugnux_live_status& o) { j.at("state").get_to(o.m_State); j.at("placed_model").get_to(o.m_Placed_model); + j.at("refined_model").get_to(o.m_Refined_model); j.at("anomalous_map").get_to(o.m_Anomalous_map); j.at("anomalous_signal").get_to(o.m_Anomalous_signal); if(j.find("model") != j.end()) @@ -393,6 +399,14 @@ void Rugnux_live_status::setPlacedModel(bool const value) { m_Placed_model = value; } +bool Rugnux_live_status::isRefinedModel() const +{ + return m_Refined_model; +} +void Rugnux_live_status::setRefinedModel(bool const value) +{ + m_Refined_model = value; +} bool Rugnux_live_status::isAnomalousMap() const { return m_Anomalous_map; diff --git a/broker/gen/model/Rugnux_live_status.h b/broker/gen/model/Rugnux_live_status.h index b86d7a24d..5bc63f942 100644 --- a/broker/gen/model/Rugnux_live_status.h +++ b/broker/gen/model/Rugnux_live_status.h @@ -73,6 +73,11 @@ public: bool isPlacedModel() const; void setPlacedModel(bool const value); /// + /// The run refined the placed model: `/rugnux/model.cif` and `/rugnux/map.ccp4` serve the refined model and its maps unless asked for `stage=placed`. + /// + bool isRefinedModel() const; + void setRefinedModel(bool const value); + /// /// The merge kept the Bijvoet pairs, so with the placed model there is an anomalous difference map (`/rugnux/map.ccp4?type=anom`). /// bool isAnomalousMap() const; @@ -224,6 +229,8 @@ protected: bool m_Placed_model; + bool m_Refined_model; + bool m_Anomalous_map; bool m_Anomalous_signal; diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 9496e6d0b..b04579a05 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -2770,9 +2770,10 @@ components: rugnux_live_model: type: object description: | - What the run made of the model it was given, as the report's MODEL VALIDATION section states it. Nothing - is refined: the R-factors are those of the placed model with its own coordinates and B factors. A value - that is absent was not computed - the model was not placed, or not by molecular replacement. + What the run made of the model it was given, as the report's MODEL VALIDATION section states it. The + R-factors here are those of the placed model with its own coordinates and B factors; what refinement made + of it is in `refinement`. A value that is absent was not computed - the model was not placed, or not by + molecular replacement. required: - placement - model_name @@ -2850,6 +2851,101 @@ components: type: number format: double description: Anomalous difference density at that atom, in map sigma + refinement: + $ref: '#/components/schemas/rugnux_live_refinement' + rugnux_live_refinement: + type: object + description: | + The placed model refined against the merge it was placed on, as the report's REFINE_ keys state it. Set + where a placed model was refined or its refinement failed; absent where the model was not placed, or + refinement is off (it runs only with a GPU in live mode). + required: + - performed + - reason + - on_gpu + - seconds + - blob_count + - blobs + properties: + performed: + type: boolean + description: Refinement ran to the end; false with `reason` where it failed + reason: + type: string + description: Why refinement did not run to the end; empty otherwise + on_gpu: + type: boolean + seconds: + type: number + format: double + description: Wall time of the refinement + r_work: + type: number + format: double + description: R-work of the refined model (after the restrained stage, else after the rigid body and grouped B) + r_free: + type: number + format: double + description: R-free of the refined model, on the same reflections as `r_work` + rmsd_bonds_A: + type: number + format: double + description: RMS deviation of the bond lengths from the dictionary, where the restrained stage ran + rmsd_angles_deg: + type: number + format: double + description: RMS deviation of the bond angles from the dictionary, where the restrained stage ran + blob_count: + type: integer + format: int64 + description: Unexplained blobs of the refined model's mFo-DFc map (above 3 sigma, peaking above 4) + blobs: + type: array + description: The strongest blobs, at most 50, strongest first + items: + $ref: '#/components/schemas/rugnux_live_blob' + rugnux_live_blob: + type: object + description: | + A blob of positive mFo-DFc density the refined model leaves unexplained, with its likely reading: a rule on + what is measured, to point a person at the density - not an identification. + required: + - kind + - x + - y + - z + - peak_sigma + - volume_A3 + - nearest_atom + - nearest_atom_distance_A + properties: + kind: + type: string + enum: [WATER, ION, LIGAND, MODEL_ERROR, UNASSIGNED] + x: + type: number + format: double + description: Centroid, Cartesian Angstrom, in the frame of the refined model (`/rugnux/model.cif`) + y: + type: number + format: double + z: + type: number + format: double + peak_sigma: + type: number + format: double + description: The highest point, in map sigma + volume_A3: + type: number + format: double + description: Volume above 3 sigma, in cubic Angstrom + nearest_atom: + type: string + description: e.g. "OG1 THR A42" + nearest_atom_distance_A: + type: number + format: double rugnux_live_status: type: object description: | @@ -2869,6 +2965,7 @@ components: - warnings - probe - placed_model + - refined_model - anomalous_map - anomalous_signal properties: @@ -2880,6 +2977,11 @@ components: description: | The run placed the model: it can be fetched from `/rugnux/model.cif` and its maps from `/rugnux/map.ccp4`. + refined_model: + type: boolean + description: | + The run refined the placed model: `/rugnux/model.cif` and `/rugnux/map.ccp4` serve the refined model and + its maps unless asked for `stage=placed`. anomalous_map: type: boolean description: | @@ -3724,6 +3826,17 @@ paths: The model placed against the data by molecular replacement or validation, as mmCIF - the same text as the `_model.cif` file written beside the data: the data's cell and space group, with the input model's own metadata (entities, sequences, references, authors, software) kept. Kept as long as `/rugnux/status`. + Where the run refined the model, the refined model unless asked for `stage=placed`. + parameters: + - in: query + name: stage + required: false + schema: + type: string + enum: [placed, refined] + description: | + `placed`: the model as placed; `refined`: the model refined (`refined_model` in `/rugnux/status`). + Default: the refined model where there is one, otherwise the placed one. security: - bearerAuth: [] responses: @@ -3734,6 +3847,12 @@ paths: schema: type: string format: binary + "400": + description: Unknown stage + content: + text/plain: + schema: + type: string "401": description: The current dataset is protected and no valid bearer token was presented. content: @@ -3741,7 +3860,7 @@ paths: schema: type: string "404": - description: The last rugnux live run placed no model + description: The last rugnux live run placed no model, or (`stage=refined`) refined none /rugnux/map.ccp4: get: summary: Get an electron-density map of the last rugnux live run @@ -3749,7 +3868,9 @@ paths: The map of the placed model (`/rugnux/model.cif`) in CCP4 format (mode 2, float), made from the map coefficients written to `_maps.mtz` (FWT/PHWT, DELFWT/PHDELWT, ANOM/PHANOM). It covers one unit cell centred on the model - along an axis where the model reaches further than the cell, the model plus 5 A instead - sampled every d_min/3; the mean and - RMS in its header are those of the unit cell, so contour levels in sigma are the usual ones. + RMS in its header are those of the unit cell, so contour levels in sigma are the usual ones. Where the run + refined the model, the 2mFo-DFc and mFo-DFc maps are the refined model's unless asked for `stage=placed`; + the anomalous map stays on the placed model's phases. parameters: - in: query name: type @@ -3762,6 +3883,15 @@ paths: `2fofc`: the 2mFo-DFc map; `fofc`: the mFo-DFc difference map; `anom`: the anomalous difference map, (F(+) - F(-)) on the model phases less 90 degrees, where the merge kept the Bijvoet pairs (`anomalous_map` in `/rugnux/status`) + - in: query + name: stage + required: false + schema: + type: string + enum: [placed, refined] + description: | + `placed`: the model as placed; `refined`: the model refined (`refined_model` in `/rugnux/status`). + Default: the refined model where there is one, otherwise the placed one. security: - bearerAuth: [] responses: @@ -3773,7 +3903,7 @@ paths: type: string format: binary "400": - description: Unknown map type + description: Unknown map type or stage content: text/plain: schema: @@ -3785,7 +3915,7 @@ paths: schema: type: string "404": - description: The last rugnux live run placed no model or made no maps, or (`anom`) has no Bijvoet pairs + description: The last rugnux live run placed no model or made no maps, or (`anom`) has no Bijvoet pairs, or (`stage=refined`) refined none /config/zeromq_preview: put: summary: Set ZeroMQ preview settings diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 463f2b486..2037f0bb2 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -864,24 +864,32 @@ and validation of every following rugnux live collection, until it is removed wi
Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "state": "Idle",
  • "placed_model": true,
  • "anomalous_map": true,
  • "anomalous_signal": true,
  • "model": {
    },
  • "space_group": "string",
  • "d_min": 0.1,
  • "isa": 0.1,
  • "probe": "string",
  • "probe_s": 0.1,
  • "start_to_first_image_s": 0.1,
  • "message": "string",
  • "images_expected": 0,
  • "expected_collection_s": 0.1,
  • "images_received": 0,
  • "elapsed_s": 0.1,
  • "step_progress": 1,
  • "steps": [
    ],
  • "last_image_s": 0.1,
  • "cut": "string",
  • "cut_s": 0.1,
  • "last_image_to_written_s": 0.1,
  • "verdict": "string",
  • "verdict_text": "string",
  • "summary": [
    ],
  • "warnings": [
    ]
}

Get the model as placed by the last rugnux live run

The model placed against the data by molecular replacement or validation, as mmCIF - the same text as the +

http://localhost:5232/rugnux/status

Response samples

Content type
application/json
{
  • "state": "Idle",
  • "placed_model": true,
  • "refined_model": true,
  • "anomalous_map": true,
  • "anomalous_signal": true,
  • "model": {
    },
  • "space_group": "string",
  • "d_min": 0.1,
  • "isa": 0.1,
  • "probe": "string",
  • "probe_s": 0.1,
  • "start_to_first_image_s": 0.1,
  • "message": "string",
  • "images_expected": 0,
  • "expected_collection_s": 0.1,
  • "images_received": 0,
  • "elapsed_s": 0.1,
  • "step_progress": 1,
  • "steps": [
    ],
  • "last_image_s": 0.1,
  • "cut": "string",
  • "cut_s": 0.1,
  • "last_image_to_written_s": 0.1,
  • "verdict": "string",
  • "verdict_text": "string",
  • "summary": [
    ],
  • "warnings": [
    ]
}

Get the model as placed by the last rugnux live run

The model placed against the data by molecular replacement or validation, as mmCIF - the same text as the _model.cif file written beside the data: the data's cell and space group, with the input model's own -metadata (entities, sequences, references, authors, software) kept. Kept as long as /rugnux/status.

-
Authorizations:
bearerAuth

Responses

Authorizations:
bearerAuth
query Parameters
stage
string
Enum: "placed" "refined"

placed: the model as placed; refined: the model refined (refined_model in /rugnux/status). +Default: the refined model where there is one, otherwise the placed one.

+

Responses

Get an electron-density map of the last rugnux live run

The map of the placed model (/rugnux/model.cif) in CCP4 format (mode 2, float), made from the map coefficients written to _maps.mtz (FWT/PHWT, DELFWT/PHDELWT, ANOM/PHANOM). It covers one unit cell centred on the model - along an axis where the model reaches further than the cell, the model plus 5 A instead - sampled every d_min/3; the mean and -RMS in its header are those of the unit cell, so contour levels in sigma are the usual ones.

-
Authorizations:
bearerAuth
query Parameters
type
string
Default: "2fofc"
Enum: "2fofc" "fofc" "anom"

2fofc: the 2mFo-DFc map; fofc: the mFo-DFc difference map; anom: the anomalous difference map, +RMS in its header are those of the unit cell, so contour levels in sigma are the usual ones. Where the run +refined the model, the 2mFo-DFc and mFo-DFc maps are the refined model's unless asked for stage=placed; +the anomalous map stays on the placed model's phases.

+
Authorizations:
bearerAuth
query Parameters
type
string
Default: "2fofc"
Enum: "2fofc" "fofc" "anom"

2fofc: the 2mFo-DFc map; fofc: the mFo-DFc difference map; anom: the anomalous difference map, (F(+) - F(-)) on the model phases less 90 degrees, where the merge kept the Bijvoet pairs (anomalous_map in /rugnux/status)

+
stage
string
Enum: "placed" "refined"

placed: the model as placed; refined: the model refined (refined_model in /rugnux/status). +Default: the refined model where there is one, otherwise the placed one.

Responses

Set ZeroMQ preview settings

Jungfraujoch can generate preview message stream on ZeroMQ SUB socket. Here settings of the socket can be adjusted. @@ -1115,7 +1123,7 @@ then image might be replaced in the buffer between calling /images and /image.cb