From 88701b31db5004a24e1e1f7ec3cd3f17522fd9a0 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 3 Feb 2026 14:11:51 +0100 Subject: [PATCH 01/81] jfjoch_writer: Save partiality --- common/Reflection.h | 1 + docs/CBOR.md | 1 + frame_serialize/CBORStream2Deserializer.cpp | 2 ++ frame_serialize/CBORStream2Serializer.cpp | 2 ++ reader/JFJochHDF5Reader.cpp | 9 ++++++++- writer/HDF5DataFilePluginReflection.cpp | 4 +++- 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/common/Reflection.h b/common/Reflection.h index 2682087e..03517ee1 100644 --- a/common/Reflection.h +++ b/common/Reflection.h @@ -24,6 +24,7 @@ struct Reflection { float rlp; bool observed = false; float S_x, S_y, S_z; + float partiality; }; #endif //JFJOCH_REFLECTION_H diff --git a/docs/CBOR.md b/docs/CBOR.md index 3a6344d9..4e0c6735 100644 --- a/docs/CBOR.md +++ b/docs/CBOR.md @@ -147,6 +147,7 @@ See [DECTRIS documentation](https://github.com/dectris/documentation/tree/main/s | - image | float | image number (present for each spot) | | | | - dist_ewald | float | distance to Ewald sphere (present only for indexed spots) | | | | - rlp | float | Reciprocal Lorentz and polarization corrections | | | +| - partiality | float | Partiality of the reflection | | | | spot_count | uint64 | Spot count | | | | spot_count_ice_rings | uint64 | Number of spots within identified rings (experimental) | | | | spot_count_low_res | uint64 | Number of spots in low resolution (prior to filtering) | | | diff --git a/frame_serialize/CBORStream2Deserializer.cpp b/frame_serialize/CBORStream2Deserializer.cpp index d56ffc9b..7285d712 100644 --- a/frame_serialize/CBORStream2Deserializer.cpp +++ b/frame_serialize/CBORStream2Deserializer.cpp @@ -467,6 +467,8 @@ namespace { r.rlp = GetCBORFloat(map_value); else if (key == "rp") r.dist_ewald = GetCBORFloat(map_value); + else if (key == "partiality") + r.partiality = GetCBORFloat(map_value); else cbor_value_advance(&map_value); } diff --git a/frame_serialize/CBORStream2Serializer.cpp b/frame_serialize/CBORStream2Serializer.cpp index 06027d43..e3c47f89 100644 --- a/frame_serialize/CBORStream2Serializer.cpp +++ b/frame_serialize/CBORStream2Serializer.cpp @@ -244,6 +244,8 @@ inline void CBOR_ENC(CborEncoder &encoder, const Reflection& r) { CBOR_ENC(mapEncoder, "image", r.image_number); CBOR_ENC(mapEncoder, "rp", r.dist_ewald); CBOR_ENC(mapEncoder, "rlp", r.rlp); + CBOR_ENC(mapEncoder, "partiality", r.partiality); + cborErr(cbor_encoder_close_container(&encoder, &mapEncoder)); } diff --git a/reader/JFJochHDF5Reader.cpp b/reader/JFJochHDF5Reader.cpp index e017a77e..985859db 100644 --- a/reader/JFJochHDF5Reader.cpp +++ b/reader/JFJochHDF5Reader.cpp @@ -681,6 +681,7 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset auto int_err = source_file->ReadOptVector(image_group_name + "/int_err"); auto bkg = source_file->ReadOptVector(image_group_name + "/background_mean"); auto lp = source_file->ReadOptVector(image_group_name + "/lp"); + auto partiality = source_file->ReadOptVector(image_group_name + "/partiality"); if (h.size() != l.size() || h.size() != k.size() || h.size() != d.size() || h.size() != predicted_x.size() || h.size() != predicted_y.size() @@ -691,6 +692,11 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset float lp_val = 0.0; if (lp.size() > i && lp[i] != 0.0f) lp_val = 1.0f / lp[i]; + + float partiality_val = 0.0f; + if (partiality.size() > i && partiality[i] != 0.0f) + partiality_val = partiality[i]; + Reflection r{ .h = h.at(i), .k = k.at(i), @@ -701,7 +707,8 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset .I = int_sum.at(i), .bkg = bkg.at(i), .sigma = int_err.at(i), - .rlp = lp_val + .rlp = lp_val, + .partiality = partiality_val }; message.reflections.emplace_back(r); } diff --git a/writer/HDF5DataFilePluginReflection.cpp b/writer/HDF5DataFilePluginReflection.cpp index 2b9fc2e5..8f826b29 100644 --- a/writer/HDF5DataFilePluginReflection.cpp +++ b/writer/HDF5DataFilePluginReflection.cpp @@ -17,7 +17,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ std::vector h, k, l; std::vector I, sigma, d, lp; - std::vector image, pred_x, pred_y, bkg; + std::vector image, pred_x, pred_y, bkg, partiality; for (const auto &refl : msg.reflections) { image.emplace_back(refl.image_number); @@ -31,6 +31,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ pred_y.emplace_back(refl.predicted_y); bkg.emplace_back(refl.bkg); lp.emplace_back(1.0/refl.rlp); + partiality.emplace_back(refl.partiality); } std::string image_group_name = fmt::format("image_{:06d}", image_number); @@ -47,6 +48,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ image_group.SaveVector("background_mean", bkg); image_group.SaveVector("observed_frame", image); image_group.SaveVector("lp", lp); + image_group.SaveVector("partiality", partiality); } void HDF5DataFilePluginReflection::WriteFinal(HDF5File &data_file) { -- 2.52.0 From 7edad6b7c176cdaf4fef751c990db209dfd2c4ce Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 3 Feb 2026 14:31:29 +0100 Subject: [PATCH 02/81] BraggPrediction: Add partiality calculation --- image_analysis/IndexAndRefine.cpp | 12 ++- .../bragg_prediction/BraggPrediction.h | 3 +- .../bragg_prediction/BraggPredictionRot.cpp | 19 ++++- .../bragg_prediction/BraggPredictionRotGPU.cu | 81 ++++++++++++------- .../bragg_prediction/BraggPredictionRotGPU.h | 3 +- 5 files changed, 81 insertions(+), 37 deletions(-) diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index 3a9896a1..68377ef7 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -167,11 +167,14 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg, if (experiment.GetBraggIntegrationSettings().GetFixedProfileRadius_recipA()) ewald_dist_cutoff = experiment.GetBraggIntegrationSettings().GetFixedProfileRadius_recipA().value() * 3.0f; - float max_angle_deg = 0.2f; + float wedge_deg = 0.0f; + float mos_deg = 0.1f; + if (experiment.GetGoniometer().has_value()) { - max_angle_deg = experiment.GetGoniometer()->GetWedge_deg() / 2.0; + wedge_deg = experiment.GetGoniometer()->GetWedge_deg() / 2.0; + if (msg.mosaicity_deg) - max_angle_deg += msg.mosaicity_deg.value(); + mos_deg = msg.mosaicity_deg.value(); } const BraggPredictionSettings settings_prediction{ @@ -179,7 +182,8 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg, .ewald_dist_cutoff = ewald_dist_cutoff, .max_hkl = 100, .centering = outcome.symmetry.centering, - .max_angle_deg = max_angle_deg + .wedge_deg = std::fabs(wedge_deg), + .mosaicity_deg = std::fabs(mos_deg) }; auto nrefl = prediction.Calc(outcome.experiment, latt, settings_prediction); diff --git a/image_analysis/bragg_prediction/BraggPrediction.h b/image_analysis/bragg_prediction/BraggPrediction.h index 75d2e8a1..ddb4e6b4 100644 --- a/image_analysis/bragg_prediction/BraggPrediction.h +++ b/image_analysis/bragg_prediction/BraggPrediction.h @@ -15,7 +15,8 @@ struct BraggPredictionSettings { float ewald_dist_cutoff = 0.0005; int max_hkl = 100; char centering = 'P'; - float max_angle_deg = 0.2f; + float wedge_deg = 0.1f; + float mosaicity_deg = 0.2f; }; class BraggPrediction { diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 94a1d437..77b7d377 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -45,7 +45,10 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys const float m3_S0 = m3 * S0; int i = 0; - const float max_angle_rad = settings.max_angle_deg * static_cast(M_PI) / 180.f; + + const float mos_angle_rad = settings.mosaicity_deg * static_cast(M_PI) / 180.f; + const float wedge_angle_rad = settings.wedge_deg * static_cast(M_PI) / 180.f; + const float max_angle_rad = wedge_angle_rad / 2 + mos_angle_rad; for (int h = -settings.max_hkl; h <= settings.max_hkl; h++) { // Precompute A* h contribution @@ -93,11 +96,18 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys float phi = -1.0f * std::atan2(sinphi, cosphi); - if (phi > max_angle_rad || phi < -max_angle_rad) + if (phi > wedge_angle_rad || phi < -max_angle_rad) continue; - const float lorentz_reciprocal = std::fabs(m2 * (S % S0))/(S*S0); + const Coord e1 = (S % S0).Normalize(); + const float zeta_abs = std::fabs(m2 * e1); + + const float lorentz_reciprocal = std::fabs(m2 * (S % S0))/(S*S0); + const float c1 = std::sqrt(2.0f) * mos_angle_rad / zeta_abs; + + const float partiality = (std::erf(zeta_abs * (phi + wedge_angle_rad / 2.0f) * c1) + - std::erf(zeta_abs * (phi - wedge_angle_rad / 2.0f) * c1)) / 2.0f; // Inlined RecipToDector with rot1 and rot2 (rot3 = 0) // Apply rotation matrix transpose float S_rot_x = rot[0] * S.x + rot[1] * S.y + rot[2] * S.z; @@ -127,7 +137,8 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys .rlp = lorentz_reciprocal, .S_x = S.x, .S_y = S.y, - .S_z = S.z + .S_z = S.z, + .partiality = partiality }; i++; } diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index 7c764123..300be4e0 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -99,15 +99,33 @@ namespace { float Sy = C.S0.y + py; float Sz = C.S0.z + pz; - float phi = -1.0f * atan2f(sinphi, cosphi) * 180.0f / static_cast(M_PI); - if (phi > C.max_angle_deg || phi < -C.max_angle_deg) + float phi = -1.0f * atan2f(sinphi, cosphi); + float phi_deg = phi * 180.0f / static_cast(M_PI); + float max_angle_rad = C.mos_angle_rad + C.wedge_angle_rad / 2.0f; + + if (phi_deg > max_angle_rad || phi_deg < -max_angle_rad) continue; + // e1 = normalize(S x S0) - direction perpendicular to both S and S0 + float e1x, e1y, e1z; + cross3(Sx, Sy, Sz, C.S0.x, C.S0.y, C.S0.z, e1x, e1y, e1z); + normalize3(e1x, e1y, e1z); + + // zeta = |m2 · e1| - the "lorentz-like" geometric factor for partiality + float zeta_abs = fabsf(dot3(C.m2.x, C.m2.y, C.m2.z, e1x, e1y, e1z)); + float cx, cy, cz; cross3(Sx, Sy, Sz, C.S0.x, C.S0.y, C.S0.z, cx, cy, cz); float lorentz = fabsf(dot3(C.m2.x, C.m2.y, C.m2.z, cx, cy, cz)) / dot3(Sx, Sy, Sz, C.S0.x, C.S0.y, C.S0.z); + // Partiality calculation (Kabsch et al.) + // c1 = sqrt(2) * sigma / zeta, where sigma = mosaicity + float c1 = sqrtf(2.0f) * C.mos_angle_rad / zeta_abs; + float half_wedge = C.wedge_angle_rad / 2.0f; + float partiality = (erff(zeta_abs * (phi + half_wedge) * c1) + - erff(zeta_abs * (phi - half_wedge) * c1)) / 2.0f; + // Use S (rotated) for projection float Srx = C.rot[0] * Sx + C.rot[1] * Sy + C.rot[2] * Sz; float Sry = C.rot[3] * Sx + C.rot[4] * Sy + C.rot[5] * Sz; @@ -135,6 +153,7 @@ namespace { out[count].S_x = Sx; out[count].S_y = Sy; out[count].S_z = Sz; + out[count].partiality = partiality; count++; } return count; @@ -167,35 +186,40 @@ namespace { } inline KernelConstsRot BuildKernelConstsRot(const DiffractionExperiment &experiment, - const CrystalLattice &lattice, - float high_res_A, - float max_angle_deg, - char centering) { - KernelConstsRot kc{}; - auto geom = experiment.GetDiffractionGeometry(); + const CrystalLattice &lattice, + float high_res_A, + float mos_angle_deg, + float wedge_angle_deg, + char centering) { + KernelConstsRot kc{}; + auto geom = experiment.GetDiffractionGeometry(); - kc.det_width_pxl = static_cast(experiment.GetXPixelsNum()); - kc.det_height_pxl = static_cast(experiment.GetYPixelsNum()); - kc.beam_x = geom.GetBeamX_pxl(); - kc.beam_y = geom.GetBeamY_pxl(); - kc.coeff_const = geom.GetDetectorDistance_mm() / geom.GetPixelSize_mm(); + kc.det_width_pxl = static_cast(experiment.GetXPixelsNum()); + kc.det_height_pxl = static_cast(experiment.GetYPixelsNum()); + kc.beam_x = geom.GetBeamX_pxl(); + kc.beam_y = geom.GetBeamY_pxl(); + kc.coeff_const = geom.GetDetectorDistance_mm() / geom.GetPixelSize_mm(); - float one_over_dmax = 1.0f / high_res_A; - kc.one_over_dmax_sq = one_over_dmax * one_over_dmax; - kc.one_over_wavelength = 1.0f / geom.GetWavelength_A(); - kc.max_angle_deg = max_angle_deg; + float one_over_dmax = 1.0f / high_res_A; + kc.one_over_dmax_sq = one_over_dmax * one_over_dmax; + kc.one_over_wavelength = 1.0f / geom.GetWavelength_A(); + kc.max_angle_deg = wedge_angle_deg / 2.0f + mos_angle_deg; - kc.Astar = lattice.Astar(); - kc.Bstar = lattice.Bstar(); - kc.Cstar = lattice.Cstar(); - kc.S0 = geom.GetScatteringVector(); + // Store mosaicity and wedge in radians for partiality calculation + kc.mos_angle_rad = mos_angle_deg * static_cast(M_PI) / 180.0f; + kc.wedge_angle_rad = wedge_angle_deg * static_cast(M_PI) / 180.0f; - auto rotT = geom.GetPoniRotMatrix().transpose().arr(); - for (int i = 0; i < 9; ++i) kc.rot[i] = rotT[i]; + kc.Astar = lattice.Astar(); + kc.Bstar = lattice.Bstar(); + kc.Cstar = lattice.Cstar(); + kc.S0 = geom.GetScatteringVector(); - kc.centering = centering; - return kc; - } + auto rotT = geom.GetPoniRotMatrix().transpose().arr(); + for (int i = 0; i < 9; ++i) kc.rot[i] = rotT[i]; + + kc.centering = centering; + return kc; + } inline void BuildGoniometerBasis(const DiffractionExperiment &experiment, KernelConstsRot &kc) { const auto gon_opt = experiment.GetGoniometer(); @@ -237,7 +261,10 @@ BraggPredictionRotGPU::BraggPredictionRotGPU(int max_reflections) int BraggPredictionRotGPU::Calc(const DiffractionExperiment &experiment, const CrystalLattice &lattice, const BraggPredictionSettings &settings) { - KernelConstsRot hK = BuildKernelConstsRot(experiment, lattice, settings.high_res_A, settings.max_angle_deg, + KernelConstsRot hK = BuildKernelConstsRot(experiment, lattice, + settings.high_res_A, + settings.mosaicity_deg, + settings.wedge_deg, settings.centering); BuildGoniometerBasis(experiment, hK); diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.h b/image_analysis/bragg_prediction/BraggPredictionRotGPU.h index 77656de4..067bccd4 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.h +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.h @@ -16,7 +16,8 @@ struct KernelConstsRot { float coeff_const; float one_over_wavelength; float one_over_dmax_sq; - float max_angle_deg; + float mos_angle_rad; + float wedge_angle_rad; Coord Astar, Bstar, Cstar, S0; Coord m1, m2, m3; float m2_S0; -- 2.52.0 From 60e03bfda67fbe23b3e485029aa6cdb700286066 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 3 Feb 2026 16:32:15 +0100 Subject: [PATCH 03/81] BraggPrediction: Fix for GPU code --- image_analysis/bragg_prediction/BraggPredictionRotGPU.cu | 1 - 1 file changed, 1 deletion(-) diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index 300be4e0..935a901a 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -203,7 +203,6 @@ namespace { float one_over_dmax = 1.0f / high_res_A; kc.one_over_dmax_sq = one_over_dmax * one_over_dmax; kc.one_over_wavelength = 1.0f / geom.GetWavelength_A(); - kc.max_angle_deg = wedge_angle_deg / 2.0f + mos_angle_deg; // Store mosaicity and wedge in radians for partiality calculation kc.mos_angle_rad = mos_angle_deg * static_cast(M_PI) / 180.0f; -- 2.52.0 From f388922515d48a9b815521a62b4b3d20792034aa Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 4 Feb 2026 08:47:40 +0100 Subject: [PATCH 04/81] XtalOptimizer: Fix rotation angles (Claude Opus suggestion :) ) --- .../geom_refinement/XtalOptimizer.cpp | 57 ++++++++++++------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/image_analysis/geom_refinement/XtalOptimizer.cpp b/image_analysis/geom_refinement/XtalOptimizer.cpp index c2d9b1ba..44fd8dc8 100644 --- a/image_analysis/geom_refinement/XtalOptimizer.cpp +++ b/image_analysis/geom_refinement/XtalOptimizer.cpp @@ -24,29 +24,44 @@ struct XtalResidual { } template - bool operator()(const T *const beam_x, - const T *const beam_y, - const T *const distance_mm, - const T *const detector_rot, - const T *const rotation_axis, - const T *const p0, - const T *const p1, - const T *const p2, - T *residual) const { - T c1 = ceres::cos(T(detector_rot[0])); - T c2 = ceres::cos(T(detector_rot[1])); - T s1 = ceres::sin(T(detector_rot[0])); - T s2 = ceres::sin(T(detector_rot[1])); + bool operator()(const T *const beam_x, + const T *const beam_y, + const T *const distance_mm, + const T *const detector_rot, + const T *const rotation_axis, + const T *const p0, + const T *const p1, + const T *const p2, + T *residual) const { + // PyFAI convention (left-handed for rot1/rot2): + // poni_rot = Rz(-rot3) * Rx(-rot2) * Ry(+rot1) + // detector_rot[0] = rot1, detector_rot[1] = rot2 (rot3 = 0 assumed) - // x_lab in mm - T x_lab = (T(obs_x) - beam_x[0]) * T(pixel_size); - T y_lab = (T(obs_y) - beam_y[0]) * T(pixel_size); - T z_lab = T(distance_mm[0]); + const T rot1 = detector_rot[0]; + const T rot2 = detector_rot[1]; - // apply rotations - T x = x_lab * c1 + z_lab * s1; - T y = y_lab * c2 + (-x_lab * s1 + z_lab * c1) * s2; - T z = -y_lab * s2 + (-x_lab * s1 + z_lab * c1) * c2; + // Ry(+rot1): rotation around Y-axis + const T c1 = ceres::cos(rot1); + const T s1 = ceres::sin(rot1); + + // Rx(-rot2): rotation around X-axis with inverted sign (PyFAI left-handed) + const T c2 = ceres::cos(-rot2); + const T s2 = ceres::sin(-rot2); + + // Detector coordinates in mm + T det_x = (T(obs_x) - beam_x[0]) * T(pixel_size); + T det_y = (T(obs_y) - beam_y[0]) * T(pixel_size); + T det_z = T(distance_mm[0]); + + // Apply Ry(rot1) first: rotate around Y + T t1_x = c1 * det_x + s1 * det_z; + T t1_y = det_y; + T t1_z = -s1 * det_x + c1 * det_z; + + // Then apply Rx(-rot2): rotate around X + T x = t1_x; + T y = c2 * t1_y - s2 * t1_z; + T z = s2 * t1_y + c2 * t1_z; // convert to recip space T lab_norm = ceres::sqrt(x * x + y * y + z * z); -- 2.52.0 From fed8fd0f578b0d98bef528aa9f275907a0680bc1 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 4 Feb 2026 08:48:14 +0100 Subject: [PATCH 05/81] AnalyzeIndexing: Log-likelihood approach for mosaicity calculation (like XDS) --- image_analysis/indexing/AnalyzeIndexing.cpp | 158 +++++++++++++++++++- 1 file changed, 157 insertions(+), 1 deletion(-) diff --git a/image_analysis/indexing/AnalyzeIndexing.cpp b/image_analysis/indexing/AnalyzeIndexing.cpp index 51e884ff..13397226 100644 --- a/image_analysis/indexing/AnalyzeIndexing.cpp +++ b/image_analysis/indexing/AnalyzeIndexing.cpp @@ -3,6 +3,9 @@ #include #include +#include +#include + #include "AnalyzeIndexing.h" #include "FitProfileRadius.h" @@ -31,6 +34,89 @@ namespace { return deg; } + // XDS convention: zeta = |m2 · e1| where e1 = (S × S0) / |S × S0| + // This is the Lorentz factor component related to the rotation axis + inline float calc_zeta(const Coord& S, const Coord& S0, const Coord& m2) { + Coord S_cross_S0 = S % S0; + float len = S_cross_S0.Length(); + if (len < 1e-12f) return 0.0f; + Coord e1 = S_cross_S0 * (1.0f / len); + return std::fabs(m2 * e1); + } + + // XDS R(τ; σM/ζ) function - fraction of observed reflection intensity + // τ = angular difference between reflection and Bragg maximum (radians) + // delta_phi = oscillation range (radians) + // sigma_M = mosaicity (radians) + // zeta = |m2 · e1| Lorentz factor component + inline float R_fraction(float tau, float delta_phi, float sigma_M, float zeta) { + if (zeta < 1e-6f || sigma_M < 1e-9f) + return 0.0f; + + const float sigma_eff = sigma_M / zeta; + const float sqrt2_sigma = std::sqrt(2.0f) * sigma_eff; + + if (sqrt2_sigma < 1e-12f) + return 0.0f; + + const float arg_plus = (tau + delta_phi / 2.0f) / sqrt2_sigma; + const float arg_minus = (tau - delta_phi / 2.0f) / sqrt2_sigma; + + return 0.5f * (std::erf(arg_plus) - std::erf(arg_minus)); + } + + // Log-likelihood for a given sigma_M value + // Returns sum of log(R) for all reflections + inline double log_likelihood(const std::vector& tau_values, + const std::vector& zeta_values, + float delta_phi, + float sigma_M) { + double ll = 0.0; + for (size_t i = 0; i < tau_values.size(); ++i) { + float R = R_fraction(tau_values[i], delta_phi, sigma_M, zeta_values[i]); + if (R > 1e-30f) { + ll += std::log(static_cast(R)); + } else { + ll += -70.0; // Large penalty for zero probability + } + } + return ll; + } + + // Golden section search for maximum likelihood sigma_M + inline float find_sigma_M_mle(const std::vector& tau_values, + const std::vector& zeta_values, + float delta_phi, + float sigma_min_deg = 0.001f, + float sigma_max_deg = 2.0f) { + const float golden = 0.618033988749895f; + + float a = deg_to_rad(sigma_min_deg); + float b = deg_to_rad(sigma_max_deg); + + float c = b - golden * (b - a); + float d = a + golden * (b - a); + + const float tol = 1e-6f; + + while (std::fabs(b - a) > tol) { + double fc = log_likelihood(tau_values, zeta_values, delta_phi, c); + double fd = log_likelihood(tau_values, zeta_values, delta_phi, d); + + if (fc > fd) { + b = d; + d = c; + c = b - golden * (b - a); + } else { + a = c; + c = d; + d = a + golden * (b - a); + } + } + + return (a + b) / 2.0f; + } + // Solve A cos(phi) + B sin(phi) + D = 0, return solutions in [phi0, phi1] (radians) inline int solve_trig(float A, float B, float D, float phi0, float phi1, @@ -117,6 +203,76 @@ namespace { return rad_to_deg(best_phi); } + // XDS-style mosaicity calculation using maximum likelihood + // Following Kabsch (2010) Acta Cryst. D66, 133-144 + std::optional CalcMosaicityXDS(const DiffractionExperiment& experiment, + const std::vector &spots, + const Coord &astar, const Coord &bstar, const Coord &cstar) { + const auto &axis_opt = experiment.GetGoniometer(); + if (!axis_opt.has_value()) + return std::nullopt; + + const GoniometerAxis& axis = *axis_opt; + const Coord m2 = axis.GetAxis().Normalize(); // XDS notation: m2 is rotation axis + const Coord S0 = experiment.GetScatteringVector(); + const float delta_phi_rad = deg_to_rad(axis.GetWedge_deg()); + + std::vector tau_values; + std::vector zeta_values; + tau_values.reserve(spots.size()); + zeta_values.reserve(spots.size()); + + for (const auto &s : spots) { + if (!s.indexed) + continue; + + const Coord pstar = astar * static_cast(s.h) + + bstar * static_cast(s.k) + + cstar * static_cast(s.l); + + // Find predicted phi angle + const auto phi_pred_opt = predict_phi_deg_local(pstar, S0, m2, 0.0f, axis.GetWedge_deg()); + if (!phi_pred_opt.has_value()) + continue; + + // τ (tau) = angular deviation from Bragg position to center of oscillation range + float tau_rad = deg_to_rad(wrap_deg_pm180(phi_pred_opt.value())); + + // Calculate diffracted beam direction S = S0 + p (at diffracting condition) + // For zeta calculation, we need S at the predicted phi angle + const float phi_pred_rad = deg_to_rad(phi_pred_opt.value()); + const float cos_phi = std::cos(phi_pred_rad); + const float sin_phi = std::sin(phi_pred_rad); + + // Rotate pstar by predicted phi around m2 axis + const float p_m2 = pstar * m2; + const Coord p_parallel = m2 * p_m2; + const Coord p_perp = pstar - p_parallel; + const Coord m2_cross_p = m2 % pstar; + + const Coord p_rotated = p_parallel + p_perp * cos_phi + m2_cross_p * sin_phi; + const Coord S = S0 + p_rotated; + + // Calculate zeta (XDS convention) + float zeta = calc_zeta(S, S0, m2); + + // Filter out reflections with very small zeta (poorly determined) + if (zeta < 0.1f) + continue; + + tau_values.push_back(tau_rad); + zeta_values.push_back(zeta); + } + + if (tau_values.size() < 10) + return std::nullopt; + + // Find sigma_M by maximizing log-likelihood + float sigma_M_rad = find_sigma_M_mle(tau_values, zeta_values, delta_phi_rad); + + return rad_to_deg(sigma_M_rad); + } + std::optional CalcMosaicity(const DiffractionExperiment& experiment, const std::vector &spots, const Coord &astar, const Coord &bstar, const Coord &cstar) { @@ -221,7 +377,7 @@ bool AnalyzeIndexing(DataMessage &message, message.spot_count_indexed = nspots_indexed; message.indexing_lattice = latt; message.indexing_unit_cell = latt.GetUnitCell(); - message.mosaicity_deg = CalcMosaicity(experiment, message.spots, astar, bstar, cstar); + message.mosaicity_deg = CalcMosaicityXDS(experiment, message.spots, astar, bstar, cstar); return true; } -- 2.52.0 From e0b75944298b03dc3d47ba4c0270f646bfbd129c Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 4 Feb 2026 10:49:58 +0100 Subject: [PATCH 06/81] BraggPredictionRot: Getting it (slowly) right with XDS implementation --- .../bragg_prediction/BraggPrediction.h | 2 + .../bragg_prediction/BraggPredictionRot.cpp | 11 +++-- .../bragg_prediction/BraggPredictionRotGPU.cu | 46 +++++++++---------- .../bragg_prediction/BraggPredictionRotGPU.h | 2 + 4 files changed, 35 insertions(+), 26 deletions(-) diff --git a/image_analysis/bragg_prediction/BraggPrediction.h b/image_analysis/bragg_prediction/BraggPrediction.h index ddb4e6b4..218fc00e 100644 --- a/image_analysis/bragg_prediction/BraggPrediction.h +++ b/image_analysis/bragg_prediction/BraggPrediction.h @@ -17,6 +17,8 @@ struct BraggPredictionSettings { char centering = 'P'; float wedge_deg = 0.1f; float mosaicity_deg = 0.2f; + float min_zeta = 0.05; + float mosaicity_multiplier = 4.0; }; class BraggPrediction { diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 77b7d377..6f142cb3 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -96,13 +96,18 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys float phi = -1.0f * std::atan2(sinphi, cosphi); - if (phi > wedge_angle_rad || phi < -max_angle_rad) - continue; - const Coord e1 = (S % S0).Normalize(); const float zeta_abs = std::fabs(m2 * e1); + if (zeta_abs < settings.min_zeta) + continue; + + float epsilon3 = std::fabs(phi * zeta_abs); + + if (epsilon3 > settings.mosaicity_multiplier * mos_angle_rad) + continue; + const float lorentz_reciprocal = std::fabs(m2 * (S % S0))/(S*S0); const float c1 = std::sqrt(2.0f) * mos_angle_rad / zeta_abs; diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index 935a901a..8363d780 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -100,11 +100,6 @@ namespace { float Sz = C.S0.z + pz; float phi = -1.0f * atan2f(sinphi, cosphi); - float phi_deg = phi * 180.0f / static_cast(M_PI); - float max_angle_rad = C.mos_angle_rad + C.wedge_angle_rad / 2.0f; - - if (phi_deg > max_angle_rad || phi_deg < -max_angle_rad) - continue; // e1 = normalize(S x S0) - direction perpendicular to both S and S0 float e1x, e1y, e1z; @@ -114,17 +109,27 @@ namespace { // zeta = |m2 · e1| - the "lorentz-like" geometric factor for partiality float zeta_abs = fabsf(dot3(C.m2.x, C.m2.y, C.m2.z, e1x, e1y, e1z)); + // Check min_zeta threshold (consistent with CPU) + if (zeta_abs < C.min_zeta) + continue; + + // epsilon3 cutoff check (consistent with CPU, Kabsch formulation) + float epsilon3 = fabsf(phi * zeta_abs); + if (epsilon3 > C.mosaicity_multiplier * C.mos_angle_rad) + continue; + float cx, cy, cz; cross3(Sx, Sy, Sz, C.S0.x, C.S0.y, C.S0.z, cx, cy, cz); - float lorentz = fabsf(dot3(C.m2.x, C.m2.y, C.m2.z, cx, cy, cz)) / - dot3(Sx, Sy, Sz, C.S0.x, C.S0.y, C.S0.z); + float S_dot_S0 = dot3(Sx, Sy, Sz, C.S0.x, C.S0.y, C.S0.z); + float lorentz = fabsf(dot3(C.m2.x, C.m2.y, C.m2.z, cx, cy, cz)) / S_dot_S0; - // Partiality calculation (Kabsch et al.) + // Partiality calculation (Kabsch formulation) // c1 = sqrt(2) * sigma / zeta, where sigma = mosaicity float c1 = sqrtf(2.0f) * C.mos_angle_rad / zeta_abs; float half_wedge = C.wedge_angle_rad / 2.0f; float partiality = (erff(zeta_abs * (phi + half_wedge) * c1) - - erff(zeta_abs * (phi - half_wedge) * c1)) / 2.0f; + - erff(zeta_abs * (phi - half_wedge) * c1)) / 2.0f; + // Use S (rotated) for projection float Srx = C.rot[0] * Sx + C.rot[1] * Sy + C.rot[2] * Sz; @@ -186,11 +191,8 @@ namespace { } inline KernelConstsRot BuildKernelConstsRot(const DiffractionExperiment &experiment, - const CrystalLattice &lattice, - float high_res_A, - float mos_angle_deg, - float wedge_angle_deg, - char centering) { + const CrystalLattice &lattice, + const BraggPredictionSettings &settings) { KernelConstsRot kc{}; auto geom = experiment.GetDiffractionGeometry(); @@ -200,13 +202,15 @@ namespace { kc.beam_y = geom.GetBeamY_pxl(); kc.coeff_const = geom.GetDetectorDistance_mm() / geom.GetPixelSize_mm(); - float one_over_dmax = 1.0f / high_res_A; + float one_over_dmax = 1.0f / settings.high_res_A; kc.one_over_dmax_sq = one_over_dmax * one_over_dmax; kc.one_over_wavelength = 1.0f / geom.GetWavelength_A(); // Store mosaicity and wedge in radians for partiality calculation - kc.mos_angle_rad = mos_angle_deg * static_cast(M_PI) / 180.0f; - kc.wedge_angle_rad = wedge_angle_deg * static_cast(M_PI) / 180.0f; + kc.mos_angle_rad = settings.mosaicity_deg * static_cast(M_PI) / 180.0f; + kc.wedge_angle_rad = settings.wedge_deg * static_cast(M_PI) / 180.0f; + kc.min_zeta = settings.min_zeta; + kc.mosaicity_multiplier = settings.mosaicity_multiplier; kc.Astar = lattice.Astar(); kc.Bstar = lattice.Bstar(); @@ -216,7 +220,7 @@ namespace { auto rotT = geom.GetPoniRotMatrix().transpose().arr(); for (int i = 0; i < 9; ++i) kc.rot[i] = rotT[i]; - kc.centering = centering; + kc.centering = settings.centering; return kc; } @@ -260,11 +264,7 @@ BraggPredictionRotGPU::BraggPredictionRotGPU(int max_reflections) int BraggPredictionRotGPU::Calc(const DiffractionExperiment &experiment, const CrystalLattice &lattice, const BraggPredictionSettings &settings) { - KernelConstsRot hK = BuildKernelConstsRot(experiment, lattice, - settings.high_res_A, - settings.mosaicity_deg, - settings.wedge_deg, - settings.centering); + KernelConstsRot hK = BuildKernelConstsRot(experiment, lattice, settings); BuildGoniometerBasis(experiment, hK); cudaMemcpyAsync(dK, &hK, sizeof(KernelConstsRot), cudaMemcpyHostToDevice, stream); diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.h b/image_analysis/bragg_prediction/BraggPredictionRotGPU.h index 067bccd4..bf4a0d13 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.h +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.h @@ -18,6 +18,8 @@ struct KernelConstsRot { float one_over_dmax_sq; float mos_angle_rad; float wedge_angle_rad; + float min_zeta; + float mosaicity_multiplier; Coord Astar, Bstar, Cstar, S0; Coord m1, m2, m3; float m2_S0; -- 2.52.0 From 787e781eb222b1c96c3ada804d0a6d94908986c9 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 4 Feb 2026 11:14:32 +0100 Subject: [PATCH 07/81] jfjoch_tests: Add more tests --- tests/CalcBraggPredictionTest.cpp | 49 +++++++++++++++++++++++++++++ tests/DiffractionGeometryTest.cpp | 52 +++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/tests/CalcBraggPredictionTest.cpp b/tests/CalcBraggPredictionTest.cpp index fee29973..0a49cb25 100644 --- a/tests/CalcBraggPredictionTest.cpp +++ b/tests/CalcBraggPredictionTest.cpp @@ -365,4 +365,53 @@ TEST_CASE("BraggPredictionGPU_backscattering") { } } +TEST_CASE("BraggPrediction_CPU_GPU_consistency_tilted") { + // Verify CPU and GPU implementations produce identical results with tilted detector + DiffractionExperiment experiment(DetJF4M()); + experiment.DetectorDistance_mm(100.0).BeamX_pxl(1500.0).BeamY_pxl(1000.0) + .PoniRot1_rad(0.04).PoniRot2_rad(-0.025) + .IncidentEnergy_keV(12.0); + + CrystalLattice lattice(Coord{30, 10, 0}, Coord{-15, 45, 0}, Coord{0, 0, 150}); + + BraggPredictionSettings settings{ + .high_res_A = 2.0, + .ewald_dist_cutoff = 0.0015, + .max_hkl = 30 + }; + + BraggPrediction cpu_pred; + BraggPredictionGPU gpu_pred; + + int cpu_count = cpu_pred.Calc(experiment, lattice, settings); + int gpu_count = gpu_pred.Calc(experiment, lattice, settings); + + REQUIRE(cpu_count > 0); + REQUIRE(gpu_count > 0); + + // Build map of GPU reflections by hkl + std::map, const Reflection*> gpu_refl_map; + for (int i = 0; i < gpu_count; ++i) { + const auto& r = gpu_pred.GetReflections().at(i); + gpu_refl_map[{r.h, r.k, r.l}] = &r; + } + + // Check that each CPU reflection has a matching GPU reflection + int matched = 0; + for (int i = 0; i < cpu_count; ++i) { + const auto& cpu_r = cpu_pred.GetReflections().at(i); + auto key = std::make_tuple(cpu_r.h, cpu_r.k, cpu_r.l); + auto it = gpu_refl_map.find(key); + if (it != gpu_refl_map.end()) { + const auto& gpu_r = *it->second; + CHECK(cpu_r.predicted_x == Catch::Approx(gpu_r.predicted_x).margin(0.1)); + CHECK(cpu_r.predicted_y == Catch::Approx(gpu_r.predicted_y).margin(0.1)); + CHECK(cpu_r.d == Catch::Approx(gpu_r.d).margin(0.01)); + matched++; + } + } + + // Most reflections should match (allow for some numerical differences at boundaries) + CHECK(matched > cpu_count * 0.95); +} #endif diff --git a/tests/DiffractionGeometryTest.cpp b/tests/DiffractionGeometryTest.cpp index 231613a3..ef307613 100644 --- a/tests/DiffractionGeometryTest.cpp +++ b/tests/DiffractionGeometryTest.cpp @@ -471,4 +471,56 @@ TEST_CASE("ResPhiToPxl_poni_rot") { out = geom.ResPhiToPxl(2.0, 0.7567); CHECK(geom.PxlToRes(out.first, out.second) == Catch::Approx(2.0)); CHECK(fabs(geom.Phi_rad(out.first, out.second) - 0.7567) < 0.001 ); +} + +TEST_CASE("DiffractionGeometry_DetectorToRecip_RecipToDetector_tilted") { + // Verify roundtrip consistency with non-zero rot1/rot2 + DiffractionGeometry geom; + geom.BeamX_pxl(1000).BeamY_pxl(1000).DetectorDistance_mm(150) + .PixelSize_mm(0.075).Wavelength_A(1.0) + .PoniRot1_rad(0.05).PoniRot2_rad(-0.03); + + // Test multiple points across the detector + std::vector> test_points = { + {500, 500}, {1500, 500}, {500, 1500}, {1500, 1500}, + {800, 1200}, {1200, 800}, {300, 1700}, {1700, 300} + }; + + for (const auto& [x, y] : test_points) { + Coord recip = geom.DetectorToRecip(x, y); + auto [proj_x, proj_y] = geom.RecipToDector(recip); + + CHECK(proj_x == Catch::Approx(x).margin(0.001)); + CHECK(proj_y == Catch::Approx(y).margin(0.001)); + } +} + +TEST_CASE("DiffractionGeometry_PONI_matrix_consistency") { + // Verify that the PONI rotation matrix gives consistent results + // when used for both forward and inverse transformations + DiffractionGeometry geom; + geom.BeamX_pxl(1000).BeamY_pxl(1000).DetectorDistance_mm(100) + .PixelSize_mm(0.075).Wavelength_A(1.0) + .PoniRot1_rad(0.04).PoniRot2_rad(-0.025); + + const auto& poni_rot = geom.GetPoniRotMatrix(); + const auto poni_rot_T = poni_rot.transpose(); + + // Test: poni_rot * poni_rot^T should be identity (orthogonal matrix) + for (int i = 0; i < 3; ++i) { + for (int j = 0; j < 3; ++j) { + Coord ei, ej; + ei[i] = 1.0f; + ej[j] = 1.0f; + float expected = (i == j) ? 1.0f : 0.0f; + CHECK((poni_rot * (poni_rot_T * ej))[i] == Catch::Approx(expected).margin(1e-6)); + } + } + + // Test: S0 vector transformation + Coord S0 = geom.GetScatteringVector(); + // For beam along z, S0 = (0, 0, 1/λ) + CHECK(S0.x == Catch::Approx(0.0f)); + CHECK(S0.y == Catch::Approx(0.0f)); + CHECK(S0.z == Catch::Approx(1.0f)); } \ No newline at end of file -- 2.52.0 From 392af1401361af6e3a04c839a0d38fa873a986ae Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 4 Feb 2026 14:46:35 +0100 Subject: [PATCH 08/81] RotationSpotAccumulator: Add (Claude 4.5 Opus) --- image_analysis/CMakeLists.txt | 4 +- image_analysis/RotationSpotAccumulator.cpp | 5 + image_analysis/RotationSpotAccumulator.h | 330 +++++++++++++++++++++ 3 files changed, 338 insertions(+), 1 deletion(-) create mode 100644 image_analysis/RotationSpotAccumulator.cpp create mode 100644 image_analysis/RotationSpotAccumulator.h diff --git a/image_analysis/CMakeLists.txt b/image_analysis/CMakeLists.txt index 1720f70f..104967bd 100644 --- a/image_analysis/CMakeLists.txt +++ b/image_analysis/CMakeLists.txt @@ -30,7 +30,9 @@ ADD_LIBRARY(JFJochImageAnalysis STATIC RotationIndexer.cpp RotationIndexer.h RotationParameters.cpp - RotationParameters.h) + RotationParameters.h + RotationSpotAccumulator.cpp + RotationSpotAccumulator.h) FIND_PACKAGE(Eigen3 3.4 REQUIRED NO_MODULE) # provides Eigen3::Eigen diff --git a/image_analysis/RotationSpotAccumulator.cpp b/image_analysis/RotationSpotAccumulator.cpp new file mode 100644 index 00000000..2ac876ac --- /dev/null +++ b/image_analysis/RotationSpotAccumulator.cpp @@ -0,0 +1,5 @@ +// +// Created by jungfrau on 2/4/26. +// + +#include "RotationSpotAccumulator.h" \ No newline at end of file diff --git a/image_analysis/RotationSpotAccumulator.h b/image_analysis/RotationSpotAccumulator.h new file mode 100644 index 00000000..66af67b9 --- /dev/null +++ b/image_analysis/RotationSpotAccumulator.h @@ -0,0 +1,330 @@ +// RotationSpotAccumulator.h +// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute +// SPDX-License-Identifier: GPL-3.0-only + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +#include "../common/SpotToSave.h" +#include "../common/GoniometerAxis.h" +#include "../common/DiffractionGeometry.h" + +// Forward declaration +struct RotationSpot3D; + +// Spatial grid cell key +struct GridCell { + int32_t cx, cy; + + bool operator==(const GridCell& o) const { + return cx == o.cx && cy == o.cy; + } +}; + +struct GridCellHash { + size_t operator()(const GridCell& c) const { + return std::hash{}((static_cast(c.cx) << 32) | + static_cast(c.cy)); + } +}; + +// A pending spot that may still be merged +struct PendingSpot { + SpotToSave spot; + size_t merged_spot_id; // ID of the RotationSpot3D it belongs to (or SIZE_MAX if new) +}; + +// Accumulated 3D spot data +struct RotationSpot3D { + // Intensity-weighted centroid + float x = 0, y = 0; + float phi_centroid_deg = 0; + float intensity = 0; + int64_t maxc = 0; + float d_A = 0; + + int64_t first_image = INT64_MAX; + int64_t last_image = INT64_MIN; + + bool ice_ring = false; + + // For weighted averaging + double sum_x_I = 0, sum_y_I = 0, sum_phi_I = 0; + + // Images that contributed to this spot + std::unordered_set contributing_images; + + void AddObservation(const SpotToSave& s, float phi_deg) { + sum_x_I += s.x * s.intensity; + sum_y_I += s.y * s.intensity; + sum_phi_I += phi_deg * s.intensity; + intensity += s.intensity; + + if (intensity > 0) { + x = static_cast(sum_x_I / intensity); + y = static_cast(sum_y_I / intensity); + phi_centroid_deg = static_cast(sum_phi_I / intensity); + } + + maxc = std::max(maxc, s.maxc); + d_A = s.d_A; // Will be recalculated at finalization + ice_ring = ice_ring || s.ice_ring; + + first_image = std::min(first_image, s.image); + last_image = std::max(last_image, s.image); + contributing_images.insert(s.image); + } + + bool IsComplete(int64_t min_confirmed_image, int64_t max_image_gap) const { + // A spot is complete when we've received all images that could + // possibly contribute (i.e., gap after last_image is confirmed) + return min_confirmed_image > last_image + max_image_gap; + } +}; + +class RotationSpotAccumulator { +public: + struct Config { + float xy_tolerance_pxl = 2.0f; + int64_t max_image_gap = 1; + float grid_cell_size = 10.0f; // pixels + int64_t window_size = 10; // images to keep in pending buffer + }; + +private: + mutable std::mutex mutex_; + + const DiffractionGeometry& geom_; + const GoniometerAxis& axis_; + Config config_; + + // Per-image spatial grid of pending spots + // image_number -> (grid_cell -> list of spot indices in pending_spots_) + std::map, GridCellHash>> image_grids_; + + // All pending spots (indexed by ID) + std::vector pending_spots_; + std::vector free_list_; // Recycled IDs + + // Accumulated 3D spots (indexed by ID) + std::vector spots_3d_; + std::vector free_3d_list_; + + // Track which images we've seen + std::unordered_set received_images_; + int64_t min_received_image_ = INT64_MAX; + int64_t max_received_image_ = INT64_MIN; + + // Completed spots ready for output + std::vector completed_; + + GridCell GetGridCell(float x, float y) const { + return GridCell{ + static_cast(std::floor(x / config_.grid_cell_size)), + static_cast(std::floor(y / config_.grid_cell_size)) + }; + } + + // Get neighboring cells (3x3 neighborhood) + std::vector GetNeighborCells(const GridCell& c) const { + std::vector neighbors; + neighbors.reserve(9); + for (int dx = -1; dx <= 1; ++dx) { + for (int dy = -1; dy <= 1; ++dy) { + neighbors.push_back({c.cx + dx, c.cy + dy}); + } + } + return neighbors; + } + + size_t AllocatePendingSpot() { + if (!free_list_.empty()) { + size_t id = free_list_.back(); + free_list_.pop_back(); + return id; + } + size_t id = pending_spots_.size(); + pending_spots_.emplace_back(); + return id; + } + + size_t Allocate3DSpot() { + if (!free_3d_list_.empty()) { + size_t id = free_3d_list_.back(); + free_3d_list_.pop_back(); + spots_3d_[id] = RotationSpot3D{}; + return id; + } + size_t id = spots_3d_.size(); + spots_3d_.emplace_back(); + return id; + } + + float GetPhiCenter(int64_t image) const { + return axis_.GetAngle_deg(image) + axis_.GetWedge_deg() / 2.0f; + } + + // Find a matching 3D spot in adjacent images + std::optional FindMatch(const SpotToSave& spot) { + GridCell cell = GetGridCell(spot.x, spot.y); + auto neighbors = GetNeighborCells(cell); + + float best_dist_sq = config_.xy_tolerance_pxl * config_.xy_tolerance_pxl; + std::optional best_match; + + // Search adjacent images + for (int64_t delta = -config_.max_image_gap; delta <= config_.max_image_gap; ++delta) { + if (delta == 0) continue; // Skip same image + + int64_t adj_image = spot.image + delta; + auto grid_it = image_grids_.find(adj_image); + if (grid_it == image_grids_.end()) continue; + + for (const auto& nc : neighbors) { + auto cell_it = grid_it->second.find(nc); + if (cell_it == grid_it->second.end()) continue; + + for (size_t pending_id : cell_it->second) { + const auto& ps = pending_spots_[pending_id]; + float dx = ps.spot.x - spot.x; + float dy = ps.spot.y - spot.y; + float dist_sq = dx * dx + dy * dy; + + if (dist_sq < best_dist_sq) { + best_dist_sq = dist_sq; + best_match = ps.merged_spot_id; + } + } + } + } + + return best_match; + } + + void FlushOldImages(int64_t current_min_image) { + // Remove images that are too old to merge + int64_t cutoff = current_min_image - config_.window_size; + + std::vector to_remove; + for (auto& [img, grid] : image_grids_) { + if (img < cutoff) { + to_remove.push_back(img); + // Free pending spots from this image + for (auto& [cell, ids] : grid) { + for (size_t id : ids) { + free_list_.push_back(id); + } + } + } + } + + for (int64_t img : to_remove) { + image_grids_.erase(img); + } + + // Check which 3D spots are now complete + for (size_t i = 0; i < spots_3d_.size(); ++i) { + auto& s = spots_3d_[i]; + if (s.intensity > 0 && s.IsComplete(cutoff, config_.max_image_gap)) { + // Finalize resolution at centroid + s.d_A = geom_.PxlToRes(s.x, s.y); + completed_.push_back(std::move(s)); + s = RotationSpot3D{}; // Clear + free_3d_list_.push_back(i); + } + } + } + +public: + RotationSpotAccumulator(const DiffractionGeometry& geom, + const GoniometerAxis& axis, + Config config = {}) + : geom_(geom), axis_(axis), config_(config) {} + + // Add spots from one image (thread-safe, handles out-of-order) + void AddImage(int64_t image, const std::vector& spots) { + std::lock_guard lock(mutex_); + + // Track received images + received_images_.insert(image); + min_received_image_ = std::min(min_received_image_, image); + max_received_image_ = std::max(max_received_image_, image); + + float phi_center = GetPhiCenter(image); + + // Create grid for this image if needed + auto& grid = image_grids_[image]; + + for (const auto& spot : spots) { + // Look for match in adjacent images + auto match = FindMatch(spot); + + size_t spot_3d_id; + if (match.has_value()) { + spot_3d_id = *match; + } else { + spot_3d_id = Allocate3DSpot(); + } + + // Add observation to 3D spot + spots_3d_[spot_3d_id].AddObservation(spot, phi_center); + + // Store pending spot for future matching + size_t pending_id = AllocatePendingSpot(); + pending_spots_[pending_id] = PendingSpot{ + .spot = spot, + .merged_spot_id = spot_3d_id + }; + + // Add to spatial grid + GridCell cell = GetGridCell(spot.x, spot.y); + grid[cell].push_back(pending_id); + } + + // Periodically flush old data + if (received_images_.size() % 10 == 0) { + FlushOldImages(min_received_image_); + } + } + + // Get completed spots (empties the completed buffer) + std::vector GetCompleted() { + std::lock_guard lock(mutex_); + return std::move(completed_); + } + + // Finalize all remaining spots (call at end of dataset) + std::vector FinalizeAll() { + std::lock_guard lock(mutex_); + + std::vector result = std::move(completed_); + + for (auto& s : spots_3d_) { + if (s.intensity > 0) { + s.d_A = geom_.PxlToRes(s.x, s.y); + result.push_back(std::move(s)); + } + } + + // Clear state + spots_3d_.clear(); + pending_spots_.clear(); + image_grids_.clear(); + free_list_.clear(); + free_3d_list_.clear(); + + return result; + } + + size_t PendingCount() const { + std::lock_guard lock(mutex_); + return spots_3d_.size() - free_3d_list_.size(); + } +}; -- 2.52.0 From 1f6477e34f6431d9a7389e71ae08f0139fa83180 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 5 Feb 2026 10:53:50 +0100 Subject: [PATCH 09/81] RotationSpotAccumulator: Works, but super slow --- image_analysis/RotationSpotAccumulator.cpp | 112 +++++++- image_analysis/RotationSpotAccumulator.h | 299 ++------------------- tests/CMakeLists.txt | 1 + tests/RotationScanAccumulatorTest.cpp | 70 +++++ 4 files changed, 201 insertions(+), 281 deletions(-) create mode 100644 tests/RotationScanAccumulatorTest.cpp diff --git a/image_analysis/RotationSpotAccumulator.cpp b/image_analysis/RotationSpotAccumulator.cpp index 2ac876ac..39324b01 100644 --- a/image_analysis/RotationSpotAccumulator.cpp +++ b/image_analysis/RotationSpotAccumulator.cpp @@ -2,4 +2,114 @@ // Created by jungfrau on 2/4/26. // -#include "RotationSpotAccumulator.h" \ No newline at end of file +#include "RotationSpotAccumulator.h" + +RotationSpot3D::RotationSpot3D(SpotToSave s, float phi_deg, int64_t image) { + x = s.x * s.intensity; + y = s.y * s.intensity; + phi = phi_deg * s.intensity; + intensity = s.intensity; + maxc = s.maxc; + first_image = image; + last_image = image; +} + +void RotationSpot3D::Add(const SpotToSave& s, float phi_deg, int64_t image) { + x += s.x * s.intensity; + y += s.y * s.intensity; + phi += phi_deg * s.intensity; + intensity += s.intensity; + maxc = std::max(maxc, s.maxc); + ice_ring = ice_ring || s.ice_ring; + first_image = std::min(first_image, image); + last_image = std::max(last_image, image); +} + +float RotationSpot3D::calcX() const { + return x / intensity; +} + +float RotationSpot3D::calcY() const { + return y / intensity; +} + +float RotationSpot3D::calcPhi() const { + return phi / intensity; +} + +float RotationSpot3D::calcI() const { + return intensity; +} + +int64_t RotationSpot3D::calcMAXC() const { + return maxc; +} + +int64_t RotationSpot3D::getLastImage() const { + return last_image; +} + +void RotationSpotAccumulator::AddImage(int64_t image, const std::vector& in_spots) { + std::lock_guard lock(mutex_); + spots[image] = in_spots; +} + + +std::vector RotationSpotAccumulator::FinalizeAll() { + std::lock_guard lock(mutex_); + + int64_t image0 = INT64_MIN; + + std::vector completed_; + std::vector pending_; + + for (auto& [image, v]: spots) { + float image_angle = axis_.GetIncrement_deg() * image + axis_.GetWedge_deg() / 2.0f; + + std::vector tmp; + + if (image == image0 + 1) { + for (const auto &p: pending_) { + if (p.getLastImage() != image - 1) { + completed_.push_back(p); + } else { + tmp.push_back(p); + } + } + + for (const auto &s: v) { + bool matched = false; + + for (int i = 0; i < tmp.size(); i++) { + float dist_x = s.x - tmp[i].calcX(); + float dist_y = s.y - tmp[i].calcY(); + + if (std::fabs(dist_x * dist_x + dist_y * dist_y) < config_.xy_tolerance_pxl_sq) { + tmp[i].Add(s, image_angle, image); + matched = true; + break; + } + } + + if (!matched) + tmp.emplace_back(s, image_angle, image); + } + + + } else { + for (const auto &p: pending_) + completed_.push_back(p); + + for (const auto &s: v) + tmp.emplace_back(s, image_angle, image); + + } + pending_ = tmp; + image0 = image; + } + + for (const auto &p: pending_) + completed_.push_back(p); + + return completed_; +} diff --git a/image_analysis/RotationSpotAccumulator.h b/image_analysis/RotationSpotAccumulator.h index 66af67b9..72d2239f 100644 --- a/image_analysis/RotationSpotAccumulator.h +++ b/image_analysis/RotationSpotAccumulator.h @@ -17,85 +17,33 @@ #include "../common/DiffractionGeometry.h" // Forward declaration -struct RotationSpot3D; - -// Spatial grid cell key -struct GridCell { - int32_t cx, cy; - - bool operator==(const GridCell& o) const { - return cx == o.cx && cy == o.cy; - } -}; - -struct GridCellHash { - size_t operator()(const GridCell& c) const { - return std::hash{}((static_cast(c.cx) << 32) | - static_cast(c.cy)); - } -}; - -// A pending spot that may still be merged -struct PendingSpot { - SpotToSave spot; - size_t merged_spot_id; // ID of the RotationSpot3D it belongs to (or SIZE_MAX if new) -}; - -// Accumulated 3D spot data -struct RotationSpot3D { - // Intensity-weighted centroid - float x = 0, y = 0; - float phi_centroid_deg = 0; +class RotationSpot3D { + float x = 0; + float y = 0; + float phi = 0; float intensity = 0; int64_t maxc = 0; - float d_A = 0; + bool ice_ring = false; int64_t first_image = INT64_MAX; int64_t last_image = INT64_MIN; - bool ice_ring = false; +public: + RotationSpot3D(SpotToSave s, float phi_deg, int64_t image); + void Add(const SpotToSave& s, float phi_deg, int64_t image); - // For weighted averaging - double sum_x_I = 0, sum_y_I = 0, sum_phi_I = 0; - - // Images that contributed to this spot - std::unordered_set contributing_images; - - void AddObservation(const SpotToSave& s, float phi_deg) { - sum_x_I += s.x * s.intensity; - sum_y_I += s.y * s.intensity; - sum_phi_I += phi_deg * s.intensity; - intensity += s.intensity; - - if (intensity > 0) { - x = static_cast(sum_x_I / intensity); - y = static_cast(sum_y_I / intensity); - phi_centroid_deg = static_cast(sum_phi_I / intensity); - } - - maxc = std::max(maxc, s.maxc); - d_A = s.d_A; // Will be recalculated at finalization - ice_ring = ice_ring || s.ice_ring; - - first_image = std::min(first_image, s.image); - last_image = std::max(last_image, s.image); - contributing_images.insert(s.image); - } - - bool IsComplete(int64_t min_confirmed_image, int64_t max_image_gap) const { - // A spot is complete when we've received all images that could - // possibly contribute (i.e., gap after last_image is confirmed) - return min_confirmed_image > last_image + max_image_gap; - } + float calcX() const; + float calcY() const; + float calcPhi() const; + float calcI() const; + int64_t calcMAXC() const; + int64_t getLastImage() const; }; class RotationSpotAccumulator { public: struct Config { - float xy_tolerance_pxl = 2.0f; - int64_t max_image_gap = 1; - float grid_cell_size = 10.0f; // pixels - int64_t window_size = 10; // images to keep in pending buffer + float xy_tolerance_pxl_sq = 2.0f * 2.0f; }; private: @@ -105,226 +53,17 @@ private: const GoniometerAxis& axis_; Config config_; - // Per-image spatial grid of pending spots - // image_number -> (grid_cell -> list of spot indices in pending_spots_) - std::map, GridCellHash>> image_grids_; - - // All pending spots (indexed by ID) - std::vector pending_spots_; - std::vector free_list_; // Recycled IDs - - // Accumulated 3D spots (indexed by ID) - std::vector spots_3d_; - std::vector free_3d_list_; - - // Track which images we've seen - std::unordered_set received_images_; - int64_t min_received_image_ = INT64_MAX; - int64_t max_received_image_ = INT64_MIN; - - // Completed spots ready for output - std::vector completed_; - - GridCell GetGridCell(float x, float y) const { - return GridCell{ - static_cast(std::floor(x / config_.grid_cell_size)), - static_cast(std::floor(y / config_.grid_cell_size)) - }; - } - - // Get neighboring cells (3x3 neighborhood) - std::vector GetNeighborCells(const GridCell& c) const { - std::vector neighbors; - neighbors.reserve(9); - for (int dx = -1; dx <= 1; ++dx) { - for (int dy = -1; dy <= 1; ++dy) { - neighbors.push_back({c.cx + dx, c.cy + dy}); - } - } - return neighbors; - } - - size_t AllocatePendingSpot() { - if (!free_list_.empty()) { - size_t id = free_list_.back(); - free_list_.pop_back(); - return id; - } - size_t id = pending_spots_.size(); - pending_spots_.emplace_back(); - return id; - } - - size_t Allocate3DSpot() { - if (!free_3d_list_.empty()) { - size_t id = free_3d_list_.back(); - free_3d_list_.pop_back(); - spots_3d_[id] = RotationSpot3D{}; - return id; - } - size_t id = spots_3d_.size(); - spots_3d_.emplace_back(); - return id; - } - - float GetPhiCenter(int64_t image) const { - return axis_.GetAngle_deg(image) + axis_.GetWedge_deg() / 2.0f; - } - - // Find a matching 3D spot in adjacent images - std::optional FindMatch(const SpotToSave& spot) { - GridCell cell = GetGridCell(spot.x, spot.y); - auto neighbors = GetNeighborCells(cell); - - float best_dist_sq = config_.xy_tolerance_pxl * config_.xy_tolerance_pxl; - std::optional best_match; - - // Search adjacent images - for (int64_t delta = -config_.max_image_gap; delta <= config_.max_image_gap; ++delta) { - if (delta == 0) continue; // Skip same image - - int64_t adj_image = spot.image + delta; - auto grid_it = image_grids_.find(adj_image); - if (grid_it == image_grids_.end()) continue; - - for (const auto& nc : neighbors) { - auto cell_it = grid_it->second.find(nc); - if (cell_it == grid_it->second.end()) continue; - - for (size_t pending_id : cell_it->second) { - const auto& ps = pending_spots_[pending_id]; - float dx = ps.spot.x - spot.x; - float dy = ps.spot.y - spot.y; - float dist_sq = dx * dx + dy * dy; - - if (dist_sq < best_dist_sq) { - best_dist_sq = dist_sq; - best_match = ps.merged_spot_id; - } - } - } - } - - return best_match; - } - - void FlushOldImages(int64_t current_min_image) { - // Remove images that are too old to merge - int64_t cutoff = current_min_image - config_.window_size; - - std::vector to_remove; - for (auto& [img, grid] : image_grids_) { - if (img < cutoff) { - to_remove.push_back(img); - // Free pending spots from this image - for (auto& [cell, ids] : grid) { - for (size_t id : ids) { - free_list_.push_back(id); - } - } - } - } - - for (int64_t img : to_remove) { - image_grids_.erase(img); - } - - // Check which 3D spots are now complete - for (size_t i = 0; i < spots_3d_.size(); ++i) { - auto& s = spots_3d_[i]; - if (s.intensity > 0 && s.IsComplete(cutoff, config_.max_image_gap)) { - // Finalize resolution at centroid - s.d_A = geom_.PxlToRes(s.x, s.y); - completed_.push_back(std::move(s)); - s = RotationSpot3D{}; // Clear - free_3d_list_.push_back(i); - } - } - } + std::map> spots; public: RotationSpotAccumulator(const DiffractionGeometry& geom, const GoniometerAxis& axis, - Config config = {}) + Config config) : geom_(geom), axis_(axis), config_(config) {} // Add spots from one image (thread-safe, handles out-of-order) - void AddImage(int64_t image, const std::vector& spots) { - std::lock_guard lock(mutex_); - - // Track received images - received_images_.insert(image); - min_received_image_ = std::min(min_received_image_, image); - max_received_image_ = std::max(max_received_image_, image); - - float phi_center = GetPhiCenter(image); - - // Create grid for this image if needed - auto& grid = image_grids_[image]; - - for (const auto& spot : spots) { - // Look for match in adjacent images - auto match = FindMatch(spot); - - size_t spot_3d_id; - if (match.has_value()) { - spot_3d_id = *match; - } else { - spot_3d_id = Allocate3DSpot(); - } - - // Add observation to 3D spot - spots_3d_[spot_3d_id].AddObservation(spot, phi_center); - - // Store pending spot for future matching - size_t pending_id = AllocatePendingSpot(); - pending_spots_[pending_id] = PendingSpot{ - .spot = spot, - .merged_spot_id = spot_3d_id - }; - - // Add to spatial grid - GridCell cell = GetGridCell(spot.x, spot.y); - grid[cell].push_back(pending_id); - } - - // Periodically flush old data - if (received_images_.size() % 10 == 0) { - FlushOldImages(min_received_image_); - } - } - - // Get completed spots (empties the completed buffer) - std::vector GetCompleted() { - std::lock_guard lock(mutex_); - return std::move(completed_); - } + void AddImage(int64_t image, const std::vector& in_spots); // Finalize all remaining spots (call at end of dataset) - std::vector FinalizeAll() { - std::lock_guard lock(mutex_); - - std::vector result = std::move(completed_); - - for (auto& s : spots_3d_) { - if (s.intensity > 0) { - s.d_A = geom_.PxlToRes(s.x, s.y); - result.push_back(std::move(s)); - } - } - - // Clear state - spots_3d_.clear(); - pending_spots_.clear(); - image_grids_.clear(); - free_list_.clear(); - free_3d_list_.clear(); - - return result; - } - - size_t PendingCount() const { - std::lock_guard lock(mutex_); - return spots_3d_.size() - free_3d_list_.size(); - } + std::vector FinalizeAll(); }; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 248d7dac..79a6b38b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,6 +64,7 @@ ADD_EXECUTABLE(jfjoch_test RotationIndexerTest.cpp TopPixelsTest.cpp HKLKeyTest.cpp + RotationScanAccumulatorTest.cpp ) target_link_libraries(jfjoch_test Catch2WithMain JFJochBroker JFJochReceiver JFJochReader JFJochWriter JFJochImageAnalysis JFJochCommon JFJochHLSSimulation JFJochPreview) diff --git a/tests/RotationScanAccumulatorTest.cpp b/tests/RotationScanAccumulatorTest.cpp new file mode 100644 index 00000000..d8f10fd2 --- /dev/null +++ b/tests/RotationScanAccumulatorTest.cpp @@ -0,0 +1,70 @@ +// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute +// SPDX-License-Identifier: GPL-3.0-only + +#include + +#include +#include "../image_analysis//RotationSpotAccumulator.h" + +TEST_CASE("RotationSpotAccumulator") { + DiffractionGeometry geometry; + geometry.BeamX_pxl(1000).BeamY_pxl(1000).DetectorDistance_mm(100); + + GoniometerAxis axis("U", 0, 0.1, Coord{1, 0, 0}, std::nullopt); + + RotationSpotAccumulator::Config config{}; + RotationSpotAccumulator accumulator(geometry, axis, config); + + accumulator.AddImage(2, { + SpotToSave{.x = 500, .y = 500, .intensity = 100}, + SpotToSave{.x = 101, .y = 101, .intensity = 50} + }); + + accumulator.AddImage(0, { + SpotToSave{.x = 100, .y = 100, .intensity = 50}, + SpotToSave{.x = 200, .y = 200, .intensity = 50} + }); + + accumulator.AddImage(1, { + SpotToSave{.x = 500, .y = 500, .intensity = 100}, + SpotToSave{.x = 101, .y = 100, .intensity = 100} + }); + + accumulator.AddImage(4, { + SpotToSave{.x = 500, .y = 500, .intensity = 100} + }); + + auto v = accumulator.FinalizeAll(); + + struct Expect { + float x, y, phi, I; + }; + + std::vector expected = { + {200.0f, 200.0f, 0.05f, 50.0f}, + {500.0f, 500.0f, 0.2f, 200.0f}, + {100.75f, 100.25f, 0.15f, 200.0f}, + {500.0f, 500.0f, 0.45f, 100.0f} + }; + + auto key = [](const Expect& e) { return std::pair(e.x, e.y); }; + + std::vector got; + got.reserve(v.size()); + for (const auto& s : v) { + got.push_back({s.calcX(), s.calcY(), s.calcPhi(), s.calcI()}); + } + + std::sort(expected.begin(), expected.end(), + [&](const Expect& a, const Expect& b){ return key(a) < key(b); }); + std::sort(got.begin(), got.end(), + [&](const Expect& a, const Expect& b){ return key(a) < key(b); }); + + REQUIRE(got.size() == expected.size()); + for (size_t i = 0; i < got.size(); ++i) { + CHECK(got[i].x == Catch::Approx(expected[i].x)); + CHECK(got[i].y == Catch::Approx(expected[i].y)); + CHECK(got[i].phi == Catch::Approx(expected[i].phi)); + CHECK(got[i].I == Catch::Approx(expected[i].I)); + } +} -- 2.52.0 From ecc924fe4a5614cf1d1e15dab537523b99a198fa Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 5 Feb 2026 11:00:02 +0100 Subject: [PATCH 10/81] RotationSpotAccumulator: Should be a bit faster --- image_analysis/RotationSpotAccumulator.cpp | 52 ++++++++++++++++------ image_analysis/RotationSpotAccumulator.h | 1 + 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/image_analysis/RotationSpotAccumulator.cpp b/image_analysis/RotationSpotAccumulator.cpp index 39324b01..0e1aa09f 100644 --- a/image_analysis/RotationSpotAccumulator.cpp +++ b/image_analysis/RotationSpotAccumulator.cpp @@ -55,7 +55,7 @@ void RotationSpotAccumulator::AddImage(int64_t image, const std::vector RotationSpotAccumulator::FinalizeAll() { + std::vector RotationSpotAccumulator::FinalizeAll() { std::lock_guard lock(mutex_); int64_t image0 = INT64_MIN; @@ -67,6 +67,7 @@ std::vector RotationSpotAccumulator::FinalizeAll() { float image_angle = axis_.GetIncrement_deg() * image + axis_.GetWedge_deg() / 2.0f; std::vector tmp; + tmp.reserve(pending_.size() + v.size()); if (image == image0 + 1) { for (const auto &p: pending_) { @@ -77,34 +78,59 @@ std::vector RotationSpotAccumulator::FinalizeAll() { } } + // Spatial hash for tmp (pending) + const float cell_size = config_.grid_cell_size; + const float inv_cell = (cell_size > 0.0f) ? (1.0f / cell_size) : 1.0f; + + std::unordered_map> grid; + grid.reserve(tmp.size() * 2); + + auto cell_key = [](int32_t cx, int32_t cy) -> int64_t { + return (static_cast(cx) << 32) ^ static_cast(cy); + }; + + for (int i = 0; i < static_cast(tmp.size()); ++i) { + const int32_t cx = static_cast(std::floor(tmp[i].calcX() * inv_cell)); + const int32_t cy = static_cast(std::floor(tmp[i].calcY() * inv_cell)); + grid[cell_key(cx, cy)].push_back(i); + } + for (const auto &s: v) { bool matched = false; - for (int i = 0; i < tmp.size(); i++) { - float dist_x = s.x - tmp[i].calcX(); - float dist_y = s.y - tmp[i].calcY(); + const int32_t scx = static_cast(std::floor(s.x * inv_cell)); + const int32_t scy = static_cast(std::floor(s.y * inv_cell)); - if (std::fabs(dist_x * dist_x + dist_y * dist_y) < config_.xy_tolerance_pxl_sq) { - tmp[i].Add(s, image_angle, image); - matched = true; - break; + for (int dx = -1; dx <= 1 && !matched; ++dx) { + for (int dy = -1; dy <= 1 && !matched; ++dy) { + auto it = grid.find(cell_key(scx + dx, scy + dy)); + if (it == grid.end()) + continue; + + for (int idx : it->second) { + float dist_x = s.x - tmp[idx].calcX(); + float dist_y = s.y - tmp[idx].calcY(); + + if (dist_x * dist_x + dist_y * dist_y < config_.xy_tolerance_pxl_sq) { + tmp[idx].Add(s, image_angle, image); + matched = true; + break; + } + } } } if (!matched) tmp.emplace_back(s, image_angle, image); } - - } else { for (const auto &p: pending_) completed_.push_back(p); for (const auto &s: v) tmp.emplace_back(s, image_angle, image); - } - pending_ = tmp; + pending_ = std::move(tmp); image0 = image; } @@ -112,4 +138,4 @@ std::vector RotationSpotAccumulator::FinalizeAll() { completed_.push_back(p); return completed_; -} + } diff --git a/image_analysis/RotationSpotAccumulator.h b/image_analysis/RotationSpotAccumulator.h index 72d2239f..a92f5566 100644 --- a/image_analysis/RotationSpotAccumulator.h +++ b/image_analysis/RotationSpotAccumulator.h @@ -44,6 +44,7 @@ class RotationSpotAccumulator { public: struct Config { float xy_tolerance_pxl_sq = 2.0f * 2.0f; + float grid_cell_size = 10.0f; // pixels }; private: -- 2.52.0 From a40e4118e6525c04a5ef8e13d56e79a69a1fb1eb Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 5 Feb 2026 11:15:34 +0100 Subject: [PATCH 11/81] DiffractionGeometry: Store rotation matrix --- common/DiffractionExperiment.cpp | 3 ++- common/DiffractionGeometry.cpp | 9 +++++++++ common/DiffractionGeometry.h | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/common/DiffractionExperiment.cpp b/common/DiffractionExperiment.cpp index bfeda9a2..88fd6e22 100644 --- a/common/DiffractionExperiment.cpp +++ b/common/DiffractionExperiment.cpp @@ -1420,7 +1420,8 @@ DiffractionGeometry DiffractionExperiment::GetDiffractionGeometry() const { .DetectorDistance_mm(dataset.GetDetectorDistance_mm()) .PoniRot1_rad(dataset.GetPoniRot1_rad()) .PoniRot2_rad(dataset.GetPoniRot2_rad()) - .PoniRot3_rad(dataset.GetPoniRot3_rad()); + .PoniRot3_rad(dataset.GetPoniRot3_rad()) + .Rotation(dataset.GetGoniometer()); return g; } diff --git a/common/DiffractionGeometry.cpp b/common/DiffractionGeometry.cpp index 283b6a71..2fc01047 100644 --- a/common/DiffractionGeometry.cpp +++ b/common/DiffractionGeometry.cpp @@ -244,3 +244,12 @@ Coord DiffractionGeometry::ProjectToEwaldSphere(const Coord &p0) const { const RotMatrix &DiffractionGeometry::GetPoniRotMatrix() const { return poni_rot; } + +std::optional DiffractionGeometry::GetRotation() const { + return axis; +} + +DiffractionGeometry &DiffractionGeometry::Rotation(const std::optional &input) { + axis = input; + return *this; +} diff --git a/common/DiffractionGeometry.h b/common/DiffractionGeometry.h index b2e6435c..f03c7a42 100644 --- a/common/DiffractionGeometry.h +++ b/common/DiffractionGeometry.h @@ -6,6 +6,7 @@ #include "JFJochException.h" #include "Coord.h" +#include "GoniometerAxis.h" class DiffractionGeometry { float beam_x_pxl = 0.0; @@ -17,6 +18,8 @@ class DiffractionGeometry { float poni_rot_2 = 0.0f; float poni_rot_3 = 0.0f; RotMatrix poni_rot; + + std::optional axis; void UpdatePoniRotMatrix(); public: DiffractionGeometry &BeamX_pxl(float input); @@ -27,6 +30,7 @@ public: DiffractionGeometry &PoniRot1_rad(float input); DiffractionGeometry &PoniRot2_rad(float input); DiffractionGeometry &PoniRot3_rad(float input); + DiffractionGeometry &Rotation(const std::optional &input); [[nodiscard]] float GetBeamX_pxl() const; [[nodiscard]] float GetBeamY_pxl() const; @@ -38,6 +42,7 @@ public: [[nodiscard]] float GetPoniRot2_rad() const; [[nodiscard]] float GetPoniRot3_rad() const; [[nodiscard]] std::pair GetDirectBeam_pxl() const; + [[nodiscard]] std::optional GetRotation() const; [[nodiscard]] Coord LabCoord(float x, float y) const; [[nodiscard]] Coord DetectorToRecip(float x, float y) const; @@ -60,6 +65,8 @@ public: [[nodiscard]] float AngleFromEwaldSphere_deg(const Coord &p0) const; [[nodiscard]] const RotMatrix& GetPoniRotMatrix() const; + + }; #endif //JUNGFRAUJOCH_DIFFRACTIONGEOMETRY_H -- 2.52.0 From f9cc99f3c0313dcaf4e5946f88783bd5f1a229d9 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 5 Feb 2026 11:18:19 +0100 Subject: [PATCH 12/81] SpotToSave: Include phi angle of the spot --- common/DiffractionSpot.cpp | 6 ++++++ common/SpotToSave.h | 1 + 2 files changed, 7 insertions(+) diff --git a/common/DiffractionSpot.cpp b/common/DiffractionSpot.cpp index 0f71be57..dd8fe53d 100644 --- a/common/DiffractionSpot.cpp +++ b/common/DiffractionSpot.cpp @@ -68,9 +68,15 @@ void DiffractionSpot::ConvertToImageCoordinates(const DiffractionExperiment &exp SpotToSave DiffractionSpot::Export(const DiffractionGeometry &geometry, int64_t image_num) const { auto d = geometry.PxlToRes(x / (float) photons, y / (float) photons); + float phi = 0.0f; + if (geometry.GetRotation()) { + phi = geometry.GetRotation()->GetIncrement_deg() * image_num + geometry.GetRotation()->GetWedge_deg(); + } + return { .x = x / static_cast(photons), .y = y / static_cast(photons), + .phi = phi, .intensity = static_cast(photons), .maxc = max_photons, .d_A = d, diff --git a/common/SpotToSave.h b/common/SpotToSave.h index ccdef978..9efb978d 100644 --- a/common/SpotToSave.h +++ b/common/SpotToSave.h @@ -9,6 +9,7 @@ struct SpotToSave { float x = 0; float y = 0; + float phi = 0; float intensity = 0; int64_t maxc = 0; float d_A = 0.0; -- 2.52.0 From e2ab97c09bc66c9cbe1bb98caeb99105e28859f2 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 5 Feb 2026 11:21:17 +0100 Subject: [PATCH 13/81] XtalOptimizer: Use rotation angle from spot (so it should work for centroid angles) --- image_analysis/geom_refinement/XtalOptimizer.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/image_analysis/geom_refinement/XtalOptimizer.cpp b/image_analysis/geom_refinement/XtalOptimizer.cpp index 44fd8dc8..bf5564ee 100644 --- a/image_analysis/geom_refinement/XtalOptimizer.cpp +++ b/image_analysis/geom_refinement/XtalOptimizer.cpp @@ -450,20 +450,13 @@ bool XtalOptimizerInternal(XtalOptimizerData &data, if (!data.index_ice_rings && pt.ice_ring) continue; - Eigen::Matrix3d gonio_back_rot = Eigen::Matrix3d::Identity(); - - Coord axis = Coord(1,0,0); float angle_rad = 0.0; - Coord recip = data.geom.DetectorToRecip(pt.x, pt.y); + Coord recip = pt.ReciprocalCoord(data.geom); if (data.axis) { - const float angle_deg = data.axis->GetAngle_deg(pt.image) + data.axis->GetWedge_deg() / 2.0f; - auto rot = data.axis->GetTransformationAngle(angle_deg); - recip = rot * recip; - - angle_rad = angle_deg * M_PI / 180.0; - axis = data.axis->GetAxis(); + recip = data.axis->GetTransformationAngle(pt.phi) * recip; + angle_rad = pt.phi * M_PI / 180.0; } double h_fp = recip * vec0; -- 2.52.0 From ae4c28f127b368525808a94d38e4a85c8e8a2ade Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 5 Feb 2026 11:26:23 +0100 Subject: [PATCH 14/81] XtalOptimizer: Fix test to include phi angle --- tests/XtalOptimizerTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/XtalOptimizerTest.cpp b/tests/XtalOptimizerTest.cpp index 96bc42ee..94e2705c 100644 --- a/tests/XtalOptimizerTest.cpp +++ b/tests/XtalOptimizerTest.cpp @@ -587,6 +587,7 @@ TEST_CASE("XtalOptimizer_rotation") { s.x = r.predicted_x; s.y = r.predicted_y; s.image = img; // provide image index for rotation-aware refinement + s.phi = angle_deg; s.intensity = 1.0f; // minimal positive value s.ice_ring = false; s.indexed = true; @@ -668,6 +669,7 @@ TEST_CASE("XtalOptimizer_refine_rotation_axis") { s.y = r.predicted_y; s.image = img; // provide image index for rotation-aware refinement s.intensity = 1.0f; // minimal positive value + s.phi = angle_deg; s.ice_ring = false; s.indexed = true; spots.push_back(s); -- 2.52.0 From cb7e7ad576fe12568129b88a72b470a69d2aad5a Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 5 Feb 2026 11:34:25 +0100 Subject: [PATCH 15/81] XtalOptimizer: Fix test to include phi angle --- tests/RotationIndexerTest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/RotationIndexerTest.cpp b/tests/RotationIndexerTest.cpp index 87f0d7b7..45b561a5 100644 --- a/tests/RotationIndexerTest.cpp +++ b/tests/RotationIndexerTest.cpp @@ -65,6 +65,7 @@ TEST_CASE("RotationIndexer") { s.y = r.predicted_y; s.image = img; // provide image index for rotation-aware refinement s.intensity = 1.0f; // minimal positive value + s.phi = angle_deg; s.ice_ring = false; s.indexed = true; spots.push_back(s); -- 2.52.0 From aac982a239f1ecd41859c07917cbf46d35b0545c Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 5 Feb 2026 13:46:59 +0100 Subject: [PATCH 16/81] DiffractionSpot: Consistent definition of rotation angle --- common/DiffractionSpot.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/DiffractionSpot.cpp b/common/DiffractionSpot.cpp index dd8fe53d..90ac1181 100644 --- a/common/DiffractionSpot.cpp +++ b/common/DiffractionSpot.cpp @@ -70,7 +70,9 @@ SpotToSave DiffractionSpot::Export(const DiffractionGeometry &geometry, int64_t float phi = 0.0f; if (geometry.GetRotation()) { - phi = geometry.GetRotation()->GetIncrement_deg() * image_num + geometry.GetRotation()->GetWedge_deg(); + // Rotation angle is considered as increment + half wedge. + // It ignores the starting angle. + phi = geometry.GetRotation()->GetAngle_deg(image_num) + geometry.GetRotation()->GetWedge_deg() / 2.0f; } return { -- 2.52.0 From 4edebe888ef4693d5751e3a968f3d9d93d377ee4 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 6 Feb 2026 11:02:27 +0100 Subject: [PATCH 17/81] IndexAndRefine: Simple optimization was not good enough - using a non-linear solver leads to considerably better predictions. --- image_analysis/IndexAndRefine.cpp | 70 +++++----- image_analysis/geom_refinement/CMakeLists.txt | 2 - .../SimpleRotXtalOptimizer.cpp | 122 ------------------ .../geom_refinement/SimpleRotXtalOptimizer.h | 24 ---- 4 files changed, 32 insertions(+), 186 deletions(-) delete mode 100644 image_analysis/geom_refinement/SimpleRotXtalOptimizer.cpp delete mode 100644 image_analysis/geom_refinement/SimpleRotXtalOptimizer.h diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index 68377ef7..8f542f89 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -93,49 +93,43 @@ void IndexAndRefine::RefineGeometryIfNeeded(DataMessage &msg, IndexAndRefine::In if (!outcome.lattice_candidate) return; + XtalOptimizerData data{ + .geom = outcome.experiment.GetDiffractionGeometry(), + .latt = *outcome.lattice_candidate, + .crystal_system = outcome.symmetry.crystal_system, + .min_spots = experiment.GetIndexingSettings().GetViableCellMinSpots(), + .refine_beam_center = true, + .refine_distance_mm = false, + .refine_detector_angles = false, + .max_time = 0.04 // 40 ms is max allowed time for the operation + }; + if (experiment.IsRotationIndexing()) { - SimpleRotXtalOptimizerData data{ - .geom = outcome.experiment.GetDiffractionGeometry(), - .latt = *outcome.lattice_candidate, - .min_spots = experiment.GetIndexingSettings().GetViableCellMinSpots(), - }; - if (SimpleRotXtalOptimizer(data, msg.spots)) { - outcome.lattice_candidate = data.latt; - } - } else { - XtalOptimizerData data{ - .geom = outcome.experiment.GetDiffractionGeometry(), - .latt = *outcome.lattice_candidate, - .crystal_system = outcome.symmetry.crystal_system, - .min_spots = experiment.GetIndexingSettings().GetViableCellMinSpots(), - .refine_beam_center = true, - .refine_distance_mm = false, - .refine_detector_angles = false, - .max_time = 0.04 // 40 ms is max allowed time for the operation - }; + data.refine_beam_center = false; + data.refine_rotation_axis = false; + data.refine_unit_cell = false; + } + if (outcome.symmetry.crystal_system == gemmi::CrystalSystem::Trigonal) + data.crystal_system = gemmi::CrystalSystem::Hexagonal; - if (outcome.symmetry.crystal_system == gemmi::CrystalSystem::Trigonal) - data.crystal_system = gemmi::CrystalSystem::Hexagonal; + switch (experiment.GetIndexingSettings().GetGeomRefinementAlgorithm()) { + case GeomRefinementAlgorithmEnum::None: + break; + case GeomRefinementAlgorithmEnum::BeamCenter: + if (XtalOptimizer(data, msg.spots)) { + outcome.experiment.BeamX_pxl(data.geom.GetBeamX_pxl()) + .BeamY_pxl(data.geom.GetBeamY_pxl()); + outcome.beam_center_updated = true; + } + break; + } - switch (experiment.GetIndexingSettings().GetGeomRefinementAlgorithm()) { - case GeomRefinementAlgorithmEnum::None: - break; - case GeomRefinementAlgorithmEnum::BeamCenter: - if (XtalOptimizer(data, msg.spots)) { - outcome.experiment.BeamX_pxl(data.geom.GetBeamX_pxl()) - .BeamY_pxl(data.geom.GetBeamY_pxl()); - outcome.beam_center_updated = true; - } - break; - } + outcome.lattice_candidate = data.latt; - outcome.lattice_candidate = data.latt; - - if (outcome.beam_center_updated) { - msg.beam_corr_x = data.beam_corr_x; - msg.beam_corr_y = data.beam_corr_y; - } + if (outcome.beam_center_updated) { + msg.beam_corr_x = data.beam_corr_x; + msg.beam_corr_y = data.beam_corr_y; } } diff --git a/image_analysis/geom_refinement/CMakeLists.txt b/image_analysis/geom_refinement/CMakeLists.txt index 71bdd41e..a81b8b54 100644 --- a/image_analysis/geom_refinement/CMakeLists.txt +++ b/image_analysis/geom_refinement/CMakeLists.txt @@ -6,8 +6,6 @@ ADD_LIBRARY(JFJochGeomRefinement STATIC AssignSpotsToRings.h XtalOptimizer.cpp XtalOptimizer.h - SimpleRotXtalOptimizer.cpp - SimpleRotXtalOptimizer.h ) TARGET_LINK_LIBRARIES(JFJochGeomRefinement Ceres::ceres Eigen3::Eigen JFJochCommon) diff --git a/image_analysis/geom_refinement/SimpleRotXtalOptimizer.cpp b/image_analysis/geom_refinement/SimpleRotXtalOptimizer.cpp deleted file mode 100644 index 2b7cc017..00000000 --- a/image_analysis/geom_refinement/SimpleRotXtalOptimizer.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute -// SPDX-License-Identifier: GPL-3.0-only - -#include "SimpleRotXtalOptimizer.h" - -#include - -static bool SimpleRotXtalOptimizerInternal( - SimpleRotXtalOptimizerData &data, - const std::vector &spots, - float tolerance, - Eigen::Matrix3d &r_total) -{ - Coord vec0 = data.latt.Vec0(); - Coord vec1 = data.latt.Vec1(); - Coord vec2 = data.latt.Vec2(); - - const double tol_sq = tolerance * tolerance; - - std::vector obs; - std::vector exp; - - // Collect reflections - for (const auto &pt : spots) { - if (!data.index_ice_rings && pt.ice_ring) - continue; - - Coord recip = data.geom.DetectorToRecip(pt.x, pt.y); - - double h_fp = recip * vec0; - double k_fp = recip * vec1; - double l_fp = recip * vec2; - - double h = std::round(h_fp); - double k = std::round(k_fp); - double l = std::round(l_fp); - - double d2 = - (h - h_fp)*(h - h_fp) + - (k - k_fp)*(k - k_fp) + - (l - l_fp)*(l - l_fp); - - if (d2 > tol_sq) - continue; - - obs.emplace_back(h_fp, k_fp, l_fp); - exp.emplace_back(h, k, l); - } - - if (obs.size() < data.min_spots) - return false; - - const int N = static_cast(obs.size()); - - // Build linear system A * omega = b - Eigen::MatrixXd A(3*N, 3); - Eigen::VectorXd b(3*N); - - for (int i = 0; i < N; i++) { - const auto &h = obs[i]; - const auto &e = exp[i]; - - // Cross-product matrix of h_obs: [h]× such that [h]× · ω = h × ω - // But we need ω × h = -h × ω, so use -[h]× - A.row(3*i + 0) << 0.0, h.z(), -h.y(); - A.row(3*i + 1) << -h.z(), 0.0, h.x(); - A.row(3*i + 2) << h.y(), -h.x(), 0.0; - - b.segment<3>(3*i) = e - h; - } - - // Solve least squares - Eigen::Vector3d omega = A.colPivHouseholderQr().solve(b); - - // Optional sanity check - if (!omega.allFinite()) - return false; - - // Apply incremental rotation and accumulate it - const double angle = omega.norm(); - Eigen::Matrix3d r_inc = Eigen::Matrix3d::Identity(); - if (angle > 0.0) - r_inc = Eigen::AngleAxisd(angle, omega / angle).toRotationMatrix(); - - r_total = r_inc * r_total; - - if (angle > 0.0) { - // Build the current lattice matrix (columns = a, b, c) - Eigen::Matrix3d L; - L.col(0) = Eigen::Vector3d(vec0.x, vec0.y, vec0.z); - L.col(1) = Eigen::Vector3d(vec1.x, vec1.y, vec1.z); - L.col(2) = Eigen::Vector3d(vec2.x, vec2.y, vec2.z); - - // The HKL-space rotation R transforms: h_new = R * h_old - // This corresponds to: L_new = L_old * R^T (real-space lattice) - Eigen::Matrix3d L_new = L * r_inc.transpose(); - - data.latt = CrystalLattice( - Coord(L_new(0,0), L_new(1,0), L_new(2,0)), - Coord(L_new(0,1), L_new(1,1), L_new(2,1)), - Coord(L_new(0,2), L_new(1,2), L_new(2,2)) - ); - } - - return true; -} - -bool SimpleRotXtalOptimizer(SimpleRotXtalOptimizerData &data, const std::vector &spots) { - Eigen::Matrix3d r_total = Eigen::Matrix3d::Identity(); - - if (!SimpleRotXtalOptimizerInternal(data, spots, 0.3, r_total)) - return false; - SimpleRotXtalOptimizerInternal(data, spots, 0.2, r_total); - const bool ok = SimpleRotXtalOptimizerInternal(data, spots, 0.1, r_total); - - Eigen::AngleAxisd aa(r_total); - data.rotation[0] = aa.axis().x(); - data.rotation[1] = aa.axis().y(); - data.rotation[2] = aa.axis().z(); - data.angle = aa.angle() * 180.0 / M_PI; - return ok; -} diff --git a/image_analysis/geom_refinement/SimpleRotXtalOptimizer.h b/image_analysis/geom_refinement/SimpleRotXtalOptimizer.h deleted file mode 100644 index b158f8e6..00000000 --- a/image_analysis/geom_refinement/SimpleRotXtalOptimizer.h +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute -// SPDX-License-Identifier: GPL-3.0-only - -#ifndef JFJOCH_ROTOPTIMIZER_H -#define JFJOCH_ROTOPTIMIZER_H - -#include -#include "../common/SpotToSave.h" -#include "../common/CrystalLattice.h" -#include "../common/GoniometerAxis.h" - -struct SimpleRotXtalOptimizerData { - DiffractionGeometry geom; - CrystalLattice latt; - int64_t min_spots = 8; - - bool index_ice_rings = true; - double rotation[3] = {0,0,0}; - double angle = 0.0; -}; - -bool SimpleRotXtalOptimizer(SimpleRotXtalOptimizerData &data, const std::vector &spots); - -#endif //JFJOCH_ROTOPTIMIZER_H \ No newline at end of file -- 2.52.0 From b7a3fb09ef92bac1eee51c0e8658cd1519921144 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 6 Feb 2026 11:40:02 +0100 Subject: [PATCH 18/81] IndexAndRefine: Fix wrong include file --- image_analysis/IndexAndRefine.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index 8f542f89..f9a50e16 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -9,7 +9,6 @@ #include "indexing/AnalyzeIndexing.h" #include "indexing/FFTIndexer.h" #include "lattice_search/LatticeSearch.h" -#include "geom_refinement/SimpleRotXtalOptimizer.h" IndexAndRefine::IndexAndRefine(const DiffractionExperiment &x, IndexerThreadPool *indexer) : index_ice_rings(x.GetIndexingSettings().GetIndexIceRings()), -- 2.52.0 From 70343ec0585e5a8f9c54fb95105a2a3c426feaae Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 12:39:29 +0100 Subject: [PATCH 19/81] Reflection: Add delta_phi --- common/Reflection.h | 2 +- frame_serialize/CBORStream2Deserializer.cpp | 2 ++ frame_serialize/CBORStream2Serializer.cpp | 1 + image_analysis/bragg_prediction/BraggPredictionRot.cpp | 1 + image_analysis/bragg_prediction/BraggPredictionRotGPU.cu | 1 + tools/jfjoch_extract_hkl.cpp | 2 +- writer/HDF5DataFilePluginReflection.cpp | 4 +++- 7 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common/Reflection.h b/common/Reflection.h index 03517ee1..7d5b009c 100644 --- a/common/Reflection.h +++ b/common/Reflection.h @@ -13,7 +13,7 @@ struct Reflection { int64_t k; int64_t l; float image_number; // Can be in-between for 3D integration - float angle_deg; // phi angle from XDS + float delta_phi; // phi angle from XDS - difference from middle of current frame (NOT an absolute angle) float predicted_x; float predicted_y; float d; diff --git a/frame_serialize/CBORStream2Deserializer.cpp b/frame_serialize/CBORStream2Deserializer.cpp index 7285d712..52748861 100644 --- a/frame_serialize/CBORStream2Deserializer.cpp +++ b/frame_serialize/CBORStream2Deserializer.cpp @@ -449,6 +449,8 @@ namespace { r.k = GetCBORInt(map_value); else if (key == "l") r.l = GetCBORInt(map_value); + else if (key == "phi") + r.delta_phi = GetCBORFloat(map_value); else if (key == "x") r.predicted_x = GetCBORFloat(map_value); else if (key == "y") diff --git a/frame_serialize/CBORStream2Serializer.cpp b/frame_serialize/CBORStream2Serializer.cpp index e3c47f89..b07b5879 100644 --- a/frame_serialize/CBORStream2Serializer.cpp +++ b/frame_serialize/CBORStream2Serializer.cpp @@ -235,6 +235,7 @@ inline void CBOR_ENC(CborEncoder &encoder, const Reflection& r) { CBOR_ENC(mapEncoder, "h", r.h); CBOR_ENC(mapEncoder, "k", r.k); CBOR_ENC(mapEncoder, "l", r.l); + CBOR_ENC(mapEncoder, "phi", r.delta_phi); CBOR_ENC(mapEncoder, "x", r.predicted_x); CBOR_ENC(mapEncoder, "y", r.predicted_y); CBOR_ENC(mapEncoder, "d", r.d); diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 6f142cb3..453e4844 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -135,6 +135,7 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys .h = h, .k = k, .l = l, + .delta_phi = phi * 180.0f / static_cast(M_PI), .predicted_x = x, .predicted_y = y, .d = d, diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index 8363d780..8af6bb47 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -150,6 +150,7 @@ namespace { out[count].h = h; out[count].k = k; out[count].l = l; + out[count].delta_phi = phi; out[count].predicted_x = x; out[count].predicted_y = y; out[count].d = 1.0f / sqrtf(p0_sq); diff --git a/tools/jfjoch_extract_hkl.cpp b/tools/jfjoch_extract_hkl.cpp index f12412e7..951be721 100644 --- a/tools/jfjoch_extract_hkl.cpp +++ b/tools/jfjoch_extract_hkl.cpp @@ -157,7 +157,7 @@ int main(int argc, char **argv) { if (dist < max_dist_ewald_sphere) f << r.l << " " << r.k << " " << r.h << " " << r.I << " " << r.sigma << " " << dist << " " - << r.predicted_x << " " << r.predicted_y << " " << r.angle_deg + << r.predicted_x << " " << r.predicted_y << " " << r.delta_phi << std::endl; } } diff --git a/writer/HDF5DataFilePluginReflection.cpp b/writer/HDF5DataFilePluginReflection.cpp index 8f826b29..53c3545e 100644 --- a/writer/HDF5DataFilePluginReflection.cpp +++ b/writer/HDF5DataFilePluginReflection.cpp @@ -17,7 +17,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ std::vector h, k, l; std::vector I, sigma, d, lp; - std::vector image, pred_x, pred_y, bkg, partiality; + std::vector image, phi, pred_x, pred_y, bkg, partiality; for (const auto &refl : msg.reflections) { image.emplace_back(refl.image_number); @@ -32,6 +32,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ bkg.emplace_back(refl.bkg); lp.emplace_back(1.0/refl.rlp); partiality.emplace_back(refl.partiality); + phi.emplace_back(refl.delta_phi); } std::string image_group_name = fmt::format("image_{:06d}", image_number); @@ -41,6 +42,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ image_group.SaveVector("k", k); image_group.SaveVector("l", l); image_group.SaveVector("d", d)->Units("Angstrom"); + image_group.SaveVector("delta_phi", phi); image_group.SaveVector("predicted_x", pred_x); image_group.SaveVector("predicted_y", pred_y); image_group.SaveVector("int_sum", I); -- 2.52.0 From 666b52ffc105365ce447dfe43f27ad9dc8eab6da Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 13:00:56 +0100 Subject: [PATCH 20/81] JFJochHDF5Reader: Read delta phi --- reader/JFJochHDF5Reader.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/reader/JFJochHDF5Reader.cpp b/reader/JFJochHDF5Reader.cpp index 985859db..0a28b0de 100644 --- a/reader/JFJochHDF5Reader.cpp +++ b/reader/JFJochHDF5Reader.cpp @@ -682,7 +682,7 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset auto bkg = source_file->ReadOptVector(image_group_name + "/background_mean"); auto lp = source_file->ReadOptVector(image_group_name + "/lp"); auto partiality = source_file->ReadOptVector(image_group_name + "/partiality"); - + auto phi = source_file->ReadOptVector(image_group_name + "/delta_phi"); if (h.size() != l.size() || h.size() != k.size() || h.size() != d.size() || h.size() != predicted_x.size() || h.size() != predicted_y.size() || h.size() != int_sum.size() || h.size() != int_err.size() || h.size() != bkg.size()) @@ -693,14 +693,18 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset if (lp.size() > i && lp[i] != 0.0f) lp_val = 1.0f / lp[i]; - float partiality_val = 0.0f; - if (partiality.size() > i && partiality[i] != 0.0f) + float partiality_val = -1.0f; + if (partiality.size() > i && partiality[i] >= 0.0f) partiality_val = partiality[i]; + float delta_phi_val = NAN; + if (phi.size() > i) + delta_phi_val = phi[i]; Reflection r{ .h = h.at(i), .k = k.at(i), .l = l.at(i), + .delta_phi = delta_phi_val, .predicted_x = predicted_x.at(i), .predicted_y = predicted_y.at(i), .d = d.at(i), -- 2.52.0 From e15944ab562448b5a7f5847ecb4eee7cd81b01c8 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 13:10:06 +0100 Subject: [PATCH 21/81] Reflection: Save zeta --- common/Reflection.h | 1 + frame_serialize/CBORStream2Deserializer.cpp | 2 ++ frame_serialize/CBORStream2Serializer.cpp | 1 + image_analysis/bragg_prediction/BraggPrediction.cpp | 5 ++++- image_analysis/bragg_prediction/BraggPredictionGPU.cu | 3 +++ image_analysis/bragg_prediction/BraggPredictionRot.cpp | 3 ++- image_analysis/bragg_prediction/BraggPredictionRotGPU.cu | 1 + reader/JFJochHDF5Reader.cpp | 8 +++++++- writer/HDF5DataFilePluginReflection.cpp | 4 +++- 9 files changed, 24 insertions(+), 4 deletions(-) diff --git a/common/Reflection.h b/common/Reflection.h index 7d5b009c..87865869 100644 --- a/common/Reflection.h +++ b/common/Reflection.h @@ -25,6 +25,7 @@ struct Reflection { bool observed = false; float S_x, S_y, S_z; float partiality; + float zeta; }; #endif //JFJOCH_REFLECTION_H diff --git a/frame_serialize/CBORStream2Deserializer.cpp b/frame_serialize/CBORStream2Deserializer.cpp index 52748861..e2b102dc 100644 --- a/frame_serialize/CBORStream2Deserializer.cpp +++ b/frame_serialize/CBORStream2Deserializer.cpp @@ -471,6 +471,8 @@ namespace { r.dist_ewald = GetCBORFloat(map_value); else if (key == "partiality") r.partiality = GetCBORFloat(map_value); + else if (key == "zeta") + r.zeta = GetCBORFloat(map_value); else cbor_value_advance(&map_value); } diff --git a/frame_serialize/CBORStream2Serializer.cpp b/frame_serialize/CBORStream2Serializer.cpp index b07b5879..7b76c42d 100644 --- a/frame_serialize/CBORStream2Serializer.cpp +++ b/frame_serialize/CBORStream2Serializer.cpp @@ -246,6 +246,7 @@ inline void CBOR_ENC(CborEncoder &encoder, const Reflection& r) { CBOR_ENC(mapEncoder, "rp", r.dist_ewald); CBOR_ENC(mapEncoder, "rlp", r.rlp); CBOR_ENC(mapEncoder, "partiality", r.partiality); + CBOR_ENC(mapEncoder, "zeta", r.zeta); cborErr(cbor_encoder_close_container(&encoder, &mapEncoder)); } diff --git a/image_analysis/bragg_prediction/BraggPrediction.cpp b/image_analysis/bragg_prediction/BraggPrediction.cpp index df9d180b..81adf248 100644 --- a/image_analysis/bragg_prediction/BraggPrediction.cpp +++ b/image_analysis/bragg_prediction/BraggPrediction.cpp @@ -96,6 +96,7 @@ int BraggPrediction::Calc(const DiffractionExperiment &experiment, const Crystal .h = h, .k = k, .l = l, + .delta_phi = NAN, .predicted_x = x, .predicted_y = y, .d = d, @@ -103,7 +104,9 @@ int BraggPrediction::Calc(const DiffractionExperiment &experiment, const Crystal .rlp = 1.0, .S_x = S_x, .S_y = S_y, - .S_z = S_z + .S_z = S_z, + .partiality = 1.0, + .zeta = NAN }; ++i; } diff --git a/image_analysis/bragg_prediction/BraggPredictionGPU.cu b/image_analysis/bragg_prediction/BraggPredictionGPU.cu index b71ecb5c..0f4b2789 100644 --- a/image_analysis/bragg_prediction/BraggPredictionGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionGPU.cu @@ -77,6 +77,7 @@ namespace { out.h = h; out.k = k; out.l = l; + out.delta_phi = NAN; out.predicted_x = x; out.predicted_y = y; out.d = 1.0f / sqrtf(recip_sq); @@ -85,6 +86,8 @@ namespace { out.S_y = Sy; out.S_z = Sz; out.rlp = 1.0f; + out.partiality = 1.0f; + out.zeta = NAN; return true; } diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 453e4844..49b0a9d8 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -144,7 +144,8 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys .S_x = S.x, .S_y = S.y, .S_z = S.z, - .partiality = partiality + .partiality = partiality, + .zeta = zeta_abs }; i++; } diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index 8af6bb47..ab9122ac 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -160,6 +160,7 @@ namespace { out[count].S_y = Sy; out[count].S_z = Sz; out[count].partiality = partiality; + out[count].zeta = zeta_abs; count++; } return count; diff --git a/reader/JFJochHDF5Reader.cpp b/reader/JFJochHDF5Reader.cpp index 0a28b0de..497a0513 100644 --- a/reader/JFJochHDF5Reader.cpp +++ b/reader/JFJochHDF5Reader.cpp @@ -683,6 +683,8 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset auto lp = source_file->ReadOptVector(image_group_name + "/lp"); auto partiality = source_file->ReadOptVector(image_group_name + "/partiality"); auto phi = source_file->ReadOptVector(image_group_name + "/delta_phi"); + auto zeta = source_file->ReadOptVector(image_group_name + "/zeta"); + if (h.size() != l.size() || h.size() != k.size() || h.size() != d.size() || h.size() != predicted_x.size() || h.size() != predicted_y.size() || h.size() != int_sum.size() || h.size() != int_err.size() || h.size() != bkg.size()) @@ -699,6 +701,9 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset float delta_phi_val = NAN; if (phi.size() > i) delta_phi_val = phi[i]; + float zeta_val = NAN; + if (zeta.size() > i) + zeta_val = zeta[i]; Reflection r{ .h = h.at(i), @@ -712,7 +717,8 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset .bkg = bkg.at(i), .sigma = int_err.at(i), .rlp = lp_val, - .partiality = partiality_val + .partiality = partiality_val, + .zeta = zeta_val }; message.reflections.emplace_back(r); } diff --git a/writer/HDF5DataFilePluginReflection.cpp b/writer/HDF5DataFilePluginReflection.cpp index 53c3545e..778e7bad 100644 --- a/writer/HDF5DataFilePluginReflection.cpp +++ b/writer/HDF5DataFilePluginReflection.cpp @@ -17,7 +17,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ std::vector h, k, l; std::vector I, sigma, d, lp; - std::vector image, phi, pred_x, pred_y, bkg, partiality; + std::vector image, phi, pred_x, pred_y, bkg, partiality, zeta; for (const auto &refl : msg.reflections) { image.emplace_back(refl.image_number); @@ -33,6 +33,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ lp.emplace_back(1.0/refl.rlp); partiality.emplace_back(refl.partiality); phi.emplace_back(refl.delta_phi); + zeta.emplace_back(refl.zeta); } std::string image_group_name = fmt::format("image_{:06d}", image_number); @@ -51,6 +52,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ image_group.SaveVector("observed_frame", image); image_group.SaveVector("lp", lp); image_group.SaveVector("partiality", partiality); + image_group.SaveVector("zeta", zeta); } void HDF5DataFilePluginReflection::WriteFinal(HDF5File &data_file) { -- 2.52.0 From 7177d0fed0c53d5034f4d36df5b92ae9385d0f1b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 14:25:52 +0100 Subject: [PATCH 22/81] BraggPredictionRot: Fix partiality --- image_analysis/bragg_prediction/BraggPredictionRot.cpp | 4 ++-- image_analysis/bragg_prediction/BraggPredictionRotGPU.cu | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 49b0a9d8..11547f6f 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -111,8 +111,8 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys const float lorentz_reciprocal = std::fabs(m2 * (S % S0))/(S*S0); const float c1 = std::sqrt(2.0f) * mos_angle_rad / zeta_abs; - const float partiality = (std::erf(zeta_abs * (phi + wedge_angle_rad / 2.0f) * c1) - - std::erf(zeta_abs * (phi - wedge_angle_rad / 2.0f) * c1)) / 2.0f; + const float partiality = (std::erf((phi + wedge_angle_rad / 2.0f) * c1) + - std::erf((phi - wedge_angle_rad / 2.0f) * c1)) / 2.0f; // Inlined RecipToDector with rot1 and rot2 (rot3 = 0) // Apply rotation matrix transpose float S_rot_x = rot[0] * S.x + rot[1] * S.y + rot[2] * S.z; diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index ab9122ac..fb557633 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -127,8 +127,8 @@ namespace { // c1 = sqrt(2) * sigma / zeta, where sigma = mosaicity float c1 = sqrtf(2.0f) * C.mos_angle_rad / zeta_abs; float half_wedge = C.wedge_angle_rad / 2.0f; - float partiality = (erff(zeta_abs * (phi + half_wedge) * c1) - - erff(zeta_abs * (phi - half_wedge) * c1)) / 2.0f; + float partiality = (erff((phi + half_wedge) * c1) + - erff((phi - half_wedge) * c1)) / 2.0f; // Use S (rotated) for projection -- 2.52.0 From fb493e8ac25c6123df3065311b829968ce0a9edc Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 14:26:08 +0100 Subject: [PATCH 23/81] ScaleAndMerge: Add rotation partiality model --- image_analysis/scale_merge/ScaleAndMerge.cpp | 114 ++++++++++++++----- image_analysis/scale_merge/ScaleAndMerge.h | 11 ++ 2 files changed, 97 insertions(+), 28 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 9d134fd2..412d7b8b 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -71,6 +71,12 @@ inline int SafeToInt(int64_t x) { return static_cast(x); } +inline double SafeInv(double x, double fallback) { + if (!std::isfinite(x) || x == 0.0) + return fallback; + return 1.0 / x; +} + // Canonicalize HKL according to Gemmi Reciprocal ASU if space group is provided. // If merge_friedel==true -> Friedel mates collapse (key.is_positive always true). // If merge_friedel==false -> keep I+ vs I- separate by key.is_positive. @@ -111,32 +117,52 @@ inline HKLKey CanonicalizeHKLKey(const Reflection& r, const ScaleMergeOptions& o } struct IntensityResidual { - IntensityResidual(double Iobs, double sigma, double s2, bool refine_b) - : Iobs_(Iobs), inv_sigma_(1.0 / sigma), s2_(s2), refine_b_(refine_b) {} + IntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, double s2, bool refine_b, + bool partiality_model) + : Iobs_(static_cast(r.I)), + inv_sigma_(SafeInv(sigma_obs, 1.0)), + delta_phi_rad_(static_cast(r.delta_phi) * M_PI / 180.0), + lp_(SafeInv(static_cast(r.rlp), 1.0)), // rlp stores reciprocal Lorentz in this codebase + half_wedge_rad_(wedge_deg * M_PI / 180.0 / 2.0), + c1_(std::sqrt(2.0) * SafeInv(static_cast(r.zeta), 1.0)), + s2_(s2), + refine_b_(refine_b) {} - template + template bool operator()(const T* const log_k, const T* const b, - const T* const log_Ihkl, + const T* const mosaicity_rad, + const T* const log_Itrue, T* residual) const { const T k = ceres::exp(log_k[0]); - const T Ihkl = ceres::exp(log_Ihkl[0]); + const T Itrue = ceres::exp(log_Itrue[0]); - T atten = T(1); + T partiality = T(1.0); + if (partiality_model) { + // partiality = 0.5 * [ erf( (Δφ+Δω/2) * (sqrt(2)*η/ζ) ) - erf( (Δφ-Δω/2) * (sqrt(2)*η/ζ) ) ] + const T arg_plus = T(delta_phi_rad_ + half_wedge_rad_) * (T(c1_) * mosaicity_rad[0]); + const T arg_minus = T(delta_phi_rad_ - half_wedge_rad_) * (T(c1_) * mosaicity_rad[0]); + partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); + } + T wilson = T(1.0); if (refine_b_) { - // I_pred = k * exp(-B*s^2) * I_hkl - atten = ceres::exp(-b[0] * T(s2_)); + wilson = ceres::exp(-b[0] * T(s2_)); } - const T Ipred = k * atten * Ihkl; + const T Ipred = k * wilson * partiality * T(lp_) * Itrue; residual[0] = (Ipred - T(Iobs_)) * T(inv_sigma_); return true; } double Iobs_; double inv_sigma_; + double delta_phi_rad_; + double lp_; + double half_wedge_rad_; + double c1_; double s2_; bool refine_b_; + bool partiality_model; }; } // namespace @@ -147,11 +173,11 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob struct ObsRef { const Reflection* r = nullptr; - int img_id = 0; // rounded/quantized image id - int img_slot = -1; // compact [0..nimg) - int hkl_slot = -1; // compact [0..nhkl) + int img_id = 0; + int img_slot = -1; + int hkl_slot = -1; double s2 = 0.0; - double sigma = 0.0; + double sigma = 0.0; // sanitized sigma for weighting }; std::vector obs; @@ -170,6 +196,12 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob if (!std::isfinite(r.I)) continue; + // Need valid zeta/rlp for the model to behave. + if (!std::isfinite(r.zeta) || r.zeta <= 0.0f) + continue; + if (!std::isfinite(r.rlp) || r.rlp == 0.0f) + continue; + const double sigma = SafeSigma(static_cast(r.sigma), opt.min_sigma); const double s2 = 1.0 / (d * d); @@ -197,7 +229,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob hkl_slot = it->second; } } catch (...) { - continue; // skip problematic HKL + continue; } ObsRef o; @@ -223,9 +255,12 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob std::vector log_k(nimg, 0.0); std::vector b(nimg, 0.0); - std::vector log_Ihkl(nhkl, 0.0); + std::vector log_Itrue(nhkl, 0.0); - // Initialize Ihkl from per-HKL median of observed intensities. + // Global mosaicity (radians) + double mosaicity_rad = opt.mosaicity_init_rad; + + // Initialize Itrue from per-HKL median of observed intensities (rough; model contains partiality/LP) { std::vector> per_hkl_I(nhkl); for (const auto& o : obs) { @@ -234,14 +269,14 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob for (int h = 0; h < nhkl; ++h) { auto& v = per_hkl_I[h]; if (v.empty()) { - log_Ihkl[h] = std::log(std::max(opt.min_sigma, 1e-6)); + log_Itrue[h] = std::log(std::max(opt.min_sigma, 1e-6)); continue; } std::nth_element(v.begin(), v.begin() + static_cast(v.size() / 2), v.end()); double med = v[v.size() / 2]; if (!std::isfinite(med) || med <= opt.min_sigma) med = opt.min_sigma; - log_Ihkl[h] = std::log(med); + log_Itrue[h] = std::log(med); } } @@ -252,17 +287,19 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob loss = std::make_unique(opt.huber_delta); } - for (const auto& o : obs) { - const double Iobs = static_cast(o.r->I); + bool partiality_model = opt.wedge_deg > 0.0; - auto* cost = new ceres::AutoDiffCostFunction( - new IntensityResidual(Iobs, o.sigma, o.s2, opt.refine_b_factor)); + for (const auto& o : obs) { + auto* cost = new ceres::AutoDiffCostFunction( + new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, o.s2, opt.refine_b_factor, + partiality_model)); problem.AddResidualBlock(cost, loss.get(), &log_k[o.img_slot], &b[o.img_slot], - &log_Ihkl[o.hkl_slot]); + &mosaicity_rad, + &log_Itrue[o.hkl_slot]); } // Fix gauge freedom: anchor first image scale to 1.0 @@ -285,6 +322,15 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } + if (!opt.refine_mosaicity) { + problem.SetParameterBlockConstant(&mosaicity_rad); + } else { + if (opt.mosaicity_min_rad) + problem.SetParameterLowerBound(&mosaicity_rad, 0, *opt.mosaicity_min_rad); + if (opt.mosaicity_max_rad) + problem.SetParameterUpperBound(&mosaicity_rad, 0, *opt.mosaicity_max_rad); + } + ceres::Solver::Options options; options.linear_solver_type = ceres::SPARSE_NORMAL_CHOLESKY; options.minimizer_progress_to_stdout = false; @@ -306,19 +352,31 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob slotToHKL[kv.second] = kv.first; } - // crude sigma estimate from model residual scatter + // sigma estimate consistent with the optimized forward model std::vector n_per_hkl(nhkl, 0); std::vector ss_per_hkl(nhkl, 0.0); + const double half_wedge_rad = opt.wedge_deg * M_PI / 180.0 / 2.0; + for (const auto& o : obs) { const int i = o.img_slot; const int h = o.hkl_slot; const double k = std::exp(log_k[i]); const double atten = opt.refine_b_factor ? std::exp(-b[i] * o.s2) : 1.0; - const double Ihkl = std::exp(log_Ihkl[h]); + const double Itrue = std::exp(log_Itrue[h]); - const double Ipred = k * atten * Ihkl; + const double zeta = static_cast(o.r->zeta); + const double c1 = std::sqrt(2.0) * (mosaicity_rad / zeta); + + const double delta_phi_rad = static_cast(o.r->delta_phi) * M_PI / 180.0; + const double partiality = partiality_model ? + (std::erf((delta_phi_rad + half_wedge_rad) * c1) - std::erf((delta_phi_rad - half_wedge_rad) * c1)) / 2.0 + : 1.0; + + const double lp = SafeInv(static_cast(o.r->rlp), 1.0); + + const double Ipred = k * atten * partiality * lp * Itrue; const double r = (Ipred - static_cast(o.r->I)); n_per_hkl[h] += 1; @@ -331,7 +389,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob m.h = slotToHKL[h].h; m.k = slotToHKL[h].k; m.l = slotToHKL[h].l; - m.I = static_cast(std::exp(log_Ihkl[h])); + m.I = static_cast(std::exp(log_Itrue[h])); if (n_per_hkl[h] >= 2) { const double rms = std::sqrt(ss_per_hkl[h] / static_cast(n_per_hkl[h] - 1)); @@ -344,4 +402,4 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } return out; -} \ No newline at end of file +} diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index f14658df..93806712 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -34,6 +34,17 @@ struct ScaleMergeOptions { // If true, treat Friedel mates as equivalent (merge anomalous pairs). // If false, keep them separate by including a sign flag in the HKL key. bool merge_friedel = true; + + // --- New: parameters for Kabsch(XDS)-style partiality model --- + // Rotation range (wedge) used in partiality calculation. + double wedge_deg = 1.0; + + // Refine global mosaicity (sigma, in radians). If false, mosaicity is fixed. + bool refine_mosaicity = true; + double mosaicity_init_rad = 0.003; // ~0.17 deg + std::optional mosaicity_min_rad = 1e-5; + std::optional mosaicity_max_rad = 0.2; // generous upper bound + }; struct MergedReflection { -- 2.52.0 From 068ea2eea768c9fbf230c45576bf0b8b3285b786 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 14:36:06 +0100 Subject: [PATCH 24/81] ScaleAndMerge: Further improvement --- image_analysis/scale_merge/ScaleAndMerge.cpp | 90 ++++++++++++++++---- image_analysis/scale_merge/ScaleAndMerge.h | 22 +++-- 2 files changed, 90 insertions(+), 22 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 412d7b8b..bc85d816 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -126,7 +126,8 @@ struct IntensityResidual { half_wedge_rad_(wedge_deg * M_PI / 180.0 / 2.0), c1_(std::sqrt(2.0) * SafeInv(static_cast(r.zeta), 1.0)), s2_(s2), - refine_b_(refine_b) {} + refine_b_(refine_b), + partiality_model_(partiality_model) {} template bool operator()(const T* const log_k, @@ -138,7 +139,7 @@ struct IntensityResidual { const T Itrue = ceres::exp(log_Itrue[0]); T partiality = T(1.0); - if (partiality_model) { + if (partiality_model_) { // partiality = 0.5 * [ erf( (Δφ+Δω/2) * (sqrt(2)*η/ζ) ) - erf( (Δφ-Δω/2) * (sqrt(2)*η/ζ) ) ] const T arg_plus = T(delta_phi_rad_ + half_wedge_rad_) * (T(c1_) * mosaicity_rad[0]); const T arg_minus = T(delta_phi_rad_ - half_wedge_rad_) * (T(c1_) * mosaicity_rad[0]); @@ -162,7 +163,21 @@ struct IntensityResidual { double c1_; double s2_; bool refine_b_; - bool partiality_model; + bool partiality_model_; +}; + +struct ScaleRegularizationResidual { + explicit ScaleRegularizationResidual(double sigma_k) + : inv_sigma_(SafeInv(sigma_k, 1.0)) {} + + template + bool operator()(const T* const log_k, T* residual) const { + const T k = ceres::exp(log_k[0]); + residual[0] = (k - T(1.0)) * T(inv_sigma_); + return true; + } + + double inv_sigma_; }; } // namespace @@ -257,8 +272,17 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob std::vector b(nimg, 0.0); std::vector log_Itrue(nhkl, 0.0); - // Global mosaicity (radians) - double mosaicity_rad = opt.mosaicity_init_rad; + auto deg2rad = [](double deg) { return deg * M_PI / 180.0; }; + + // Mosaicity: either global or per-image (always stored in radians internally) + std::vector mosaicity_rad; + double mosaicity_rad_global = deg2rad(opt.mosaicity_init_deg); + + if (opt.mosaicity_per_image) { + mosaicity_rad.assign(nimg, deg2rad(opt.mosaicity_init_deg)); + } else { + mosaicity_rad_global = deg2rad(opt.mosaicity_init_deg); + } // Initialize Itrue from per-HKL median of observed intensities (rough; model contains partiality/LP) { @@ -282,26 +306,36 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob ceres::Problem problem; - std::unique_ptr loss; + std::unique_ptr loss; if (opt.use_huber_loss) { loss = std::make_unique(opt.huber_delta); } - bool partiality_model = opt.wedge_deg > 0.0; + const bool partiality_model = opt.wedge_deg > 0.0; for (const auto& o : obs) { + double* mosaicity_block = opt.mosaicity_per_image ? &mosaicity_rad[o.img_slot] : &mosaicity_rad_global; + auto* cost = new ceres::AutoDiffCostFunction( - new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, o.s2, opt.refine_b_factor, - partiality_model)); + new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, o.s2, opt.refine_b_factor, partiality_model)); problem.AddResidualBlock(cost, loss.get(), &log_k[o.img_slot], &b[o.img_slot], - &mosaicity_rad, + mosaicity_block, &log_Itrue[o.hkl_slot]); } + // Optional Kabsch-like regularization for k: (k - 1)/sigma + if (opt.regularize_scale_to_one) { + for (int i = 0; i < nimg; ++i) { + auto* rcost = new ceres::AutoDiffCostFunction( + new ScaleRegularizationResidual(opt.scale_regularization_sigma)); + problem.AddResidualBlock(rcost, nullptr, &log_k[i]); + } + } + // Fix gauge freedom: anchor first image scale to 1.0 if (opt.fix_first_image_scale && nimg > 0) { log_k[0] = 0.0; @@ -322,13 +356,27 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } + // Mosaicity refinement + bounds (degrees -> radians) if (!opt.refine_mosaicity) { - problem.SetParameterBlockConstant(&mosaicity_rad); + if (opt.mosaicity_per_image) { + for (int i = 0; i < nimg; ++i) + problem.SetParameterBlockConstant(&mosaicity_rad[i]); + } else { + problem.SetParameterBlockConstant(&mosaicity_rad_global); + } } else { - if (opt.mosaicity_min_rad) - problem.SetParameterLowerBound(&mosaicity_rad, 0, *opt.mosaicity_min_rad); - if (opt.mosaicity_max_rad) - problem.SetParameterUpperBound(&mosaicity_rad, 0, *opt.mosaicity_max_rad); + const std::optional min_rad = opt.mosaicity_min_deg ? std::optional(deg2rad(*opt.mosaicity_min_deg)) : std::nullopt; + const std::optional max_rad = opt.mosaicity_max_deg ? std::optional(deg2rad(*opt.mosaicity_max_deg)) : std::nullopt; + + if (opt.mosaicity_per_image) { + for (int i = 0; i < nimg; ++i) { + if (min_rad) problem.SetParameterLowerBound(&mosaicity_rad[i], 0, *min_rad); + if (max_rad) problem.SetParameterUpperBound(&mosaicity_rad[i], 0, *max_rad); + } + } else { + if (min_rad) problem.SetParameterLowerBound(&mosaicity_rad_global, 0, *min_rad); + if (max_rad) problem.SetParameterUpperBound(&mosaicity_rad_global, 0, *max_rad); + } } ceres::Solver::Options options; @@ -346,6 +394,15 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob out.image_b_factor[i] = opt.refine_b_factor ? b[i] : 0.0; } + // Export mosaicity (degrees) to result + if (opt.mosaicity_per_image) { + out.mosaicity_deg.resize(nimg); + for (int i = 0; i < nimg; ++i) + out.mosaicity_deg[i] = mosaicity_rad[i] * 180.0 / M_PI; + } else { + out.mosaicity_deg = { mosaicity_rad_global * 180.0 / M_PI }; + } + // Reverse maps for merged output std::vector slotToHKL(nhkl); for (const auto& kv : hklToSlot) { @@ -367,7 +424,8 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob const double Itrue = std::exp(log_Itrue[h]); const double zeta = static_cast(o.r->zeta); - const double c1 = std::sqrt(2.0) * (mosaicity_rad / zeta); + const double mosa_i = opt.mosaicity_per_image ? mosaicity_rad[i] : mosaicity_rad_global; + const double c1 = std::sqrt(2.0) * (mosa_i / zeta); const double delta_phi_rad = static_cast(o.r->delta_phi) * M_PI / 180.0; const double partiality = partiality_model ? diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index 93806712..848c7509 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -35,16 +35,23 @@ struct ScaleMergeOptions { // If false, keep them separate by including a sign flag in the HKL key. bool merge_friedel = true; - // --- New: parameters for Kabsch(XDS)-style partiality model --- + // --- Kabsch(XDS)-style partiality model --- // Rotation range (wedge) used in partiality calculation. + // Set to 0 to disable partiality correction. double wedge_deg = 1.0; - // Refine global mosaicity (sigma, in radians). If false, mosaicity is fixed. + // --- Mosaicity (user input in degrees; internally converted to radians) --- + // If true, refine mosaicity. If mosaicity_per_image==true, refine one value per image. bool refine_mosaicity = true; - double mosaicity_init_rad = 0.003; // ~0.17 deg - std::optional mosaicity_min_rad = 1e-5; - std::optional mosaicity_max_rad = 0.2; // generous upper bound + bool mosaicity_per_image = true; + double mosaicity_init_deg = 0.17; // ~0.003 rad + std::optional mosaicity_min_deg = 1e-3; + std::optional mosaicity_max_deg = 20.0; + + // --- Optional: regularize per-image scale k towards 1 (Kabsch-like) --- + bool regularize_scale_to_one = false; + double scale_regularization_sigma = 0.05; }; struct MergedReflection { @@ -60,7 +67,10 @@ struct ScaleMergeResult { std::vector image_scale_k; std::vector image_b_factor; std::vector image_ids; + + // If mosaicity_per_image==true, one value per image (degrees). Otherwise size is 1 (global). + std::vector mosaicity_deg; }; ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& observations, - const ScaleMergeOptions& opt = {}); + const ScaleMergeOptions& opt = {}); \ No newline at end of file -- 2.52.0 From d6265fe5895fb8834ad533e5e580320d631d6f2b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 14:44:26 +0100 Subject: [PATCH 25/81] IndexAndRefine: Save all reflections...to integrate scale and merge --- image_analysis/IndexAndRefine.cpp | 6 ++++++ image_analysis/IndexAndRefine.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index f9a50e16..8c9457ec 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -202,6 +202,12 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg, CalcISigma(msg); CalcWilsonBFactor(msg); + + // Append reflections to the class-wide reflections buffer (thread-safe) + { + std::unique_lock ul(reflections_mutex); + reflections.insert(reflections.end(), msg.reflections.begin(), msg.reflections.end()); + } } void IndexAndRefine::ProcessImage(DataMessage &msg, diff --git a/image_analysis/IndexAndRefine.h b/image_analysis/IndexAndRefine.h index 0c4005b0..c3ff50f8 100644 --- a/image_analysis/IndexAndRefine.h +++ b/image_analysis/IndexAndRefine.h @@ -43,6 +43,9 @@ class IndexAndRefine { : experiment(experiment_ref) {} }; + std::mutex reflections_mutex; + std::vector reflections; + IndexingOutcome DetermineLatticeAndSymmetry(DataMessage &msg); void RefineGeometryIfNeeded(DataMessage &msg, IndexingOutcome &outcome); void QuickPredictAndIntegrate(DataMessage &msg, -- 2.52.0 From 7f1f28f8d3fbf4bf763547614b202e48296746fe Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 17:22:02 +0100 Subject: [PATCH 26/81] ScaleAndMerge: Merge intensities taken from scaling - variances taken directly from least-squares (with some magic from Opus 4.6, which I don't yet understand) --- image_analysis/scale_merge/ScaleAndMerge.cpp | 188 +++++++++---------- image_analysis/scale_merge/ScaleAndMerge.h | 12 +- 2 files changed, 96 insertions(+), 104 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index bc85d816..9b4b92e2 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -4,6 +4,7 @@ #include "ScaleAndMerge.h" #include +#include #include #include @@ -77,9 +78,6 @@ inline double SafeInv(double x, double fallback) { return 1.0 / x; } -// Canonicalize HKL according to Gemmi Reciprocal ASU if space group is provided. -// If merge_friedel==true -> Friedel mates collapse (key.is_positive always true). -// If merge_friedel==false -> keep I+ vs I- separate by key.is_positive. inline HKLKey CanonicalizeHKLKey(const Reflection& r, const ScaleMergeOptions& opt) { HKLKey key{}; key.h = r.h; @@ -87,7 +85,6 @@ inline HKLKey CanonicalizeHKLKey(const Reflection& r, const ScaleMergeOptions& o key.l = r.l; key.is_positive = true; - // If no SG provided, we can still optionally separate Friedel mates deterministically. if (!opt.space_group.has_value()) { if (!opt.merge_friedel) { const HKLKey neg{-r.h, -r.k, -r.l, true}; @@ -122,7 +119,7 @@ struct IntensityResidual { : Iobs_(static_cast(r.I)), inv_sigma_(SafeInv(sigma_obs, 1.0)), delta_phi_rad_(static_cast(r.delta_phi) * M_PI / 180.0), - lp_(SafeInv(static_cast(r.rlp), 1.0)), // rlp stores reciprocal Lorentz in this codebase + lp_(SafeInv(static_cast(r.rlp), 1.0)), half_wedge_rad_(wedge_deg * M_PI / 180.0 / 2.0), c1_(std::sqrt(2.0) * SafeInv(static_cast(r.zeta), 1.0)), s2_(s2), @@ -140,7 +137,6 @@ struct IntensityResidual { T partiality = T(1.0); if (partiality_model_) { - // partiality = 0.5 * [ erf( (Δφ+Δω/2) * (sqrt(2)*η/ζ) ) - erf( (Δφ-Δω/2) * (sqrt(2)*η/ζ) ) ] const T arg_plus = T(delta_phi_rad_ + half_wedge_rad_) * (T(c1_) * mosaicity_rad[0]); const T arg_minus = T(delta_phi_rad_ - half_wedge_rad_) * (T(c1_) * mosaicity_rad[0]); partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); @@ -192,7 +188,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob int img_slot = -1; int hkl_slot = -1; double s2 = 0.0; - double sigma = 0.0; // sanitized sigma for weighting + double sigma = 0.0; }; std::vector obs; @@ -211,7 +207,6 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob if (!std::isfinite(r.I)) continue; - // Need valid zeta/rlp for the model to behave. if (!std::isfinite(r.zeta) || r.zeta <= 0.0f) continue; if (!std::isfinite(r.rlp) || r.rlp == 0.0f) @@ -274,17 +269,10 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob auto deg2rad = [](double deg) { return deg * M_PI / 180.0; }; - // Mosaicity: either global or per-image (always stored in radians internally) - std::vector mosaicity_rad; - double mosaicity_rad_global = deg2rad(opt.mosaicity_init_deg); + // Mosaicity: always per-image + std::vector mosaicity_rad(nimg, deg2rad(opt.mosaicity_init_deg)); - if (opt.mosaicity_per_image) { - mosaicity_rad.assign(nimg, deg2rad(opt.mosaicity_init_deg)); - } else { - mosaicity_rad_global = deg2rad(opt.mosaicity_init_deg); - } - - // Initialize Itrue from per-HKL median of observed intensities (rough; model contains partiality/LP) + // Initialize Itrue from per-HKL median of observed intensities { std::vector> per_hkl_I(nhkl); for (const auto& o : obs) { @@ -306,28 +294,21 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob ceres::Problem problem; - std::unique_ptr loss; - if (opt.use_huber_loss) { - loss = std::make_unique(opt.huber_delta); - } - const bool partiality_model = opt.wedge_deg > 0.0; for (const auto& o : obs) { - double* mosaicity_block = opt.mosaicity_per_image ? &mosaicity_rad[o.img_slot] : &mosaicity_rad_global; - auto* cost = new ceres::AutoDiffCostFunction( new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, o.s2, opt.refine_b_factor, partiality_model)); problem.AddResidualBlock(cost, - loss.get(), + nullptr, // no loss function &log_k[o.img_slot], &b[o.img_slot], - mosaicity_block, + &mosaicity_rad[o.img_slot], &log_Itrue[o.hkl_slot]); } - // Optional Kabsch-like regularization for k: (k - 1)/sigma + // Optional Kabsch-like regularization for k if (opt.regularize_scale_to_one) { for (int i = 0; i < nimg; ++i) { auto* rcost = new ceres::AutoDiffCostFunction( @@ -336,7 +317,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } - // Fix gauge freedom: anchor first image scale to 1.0 + // Fix gauge freedom if (opt.fix_first_image_scale && nimg > 0) { log_k[0] = 0.0; problem.SetParameterBlockConstant(&log_k[0]); @@ -356,26 +337,19 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } - // Mosaicity refinement + bounds (degrees -> radians) + // Mosaicity refinement + bounds if (!opt.refine_mosaicity) { - if (opt.mosaicity_per_image) { - for (int i = 0; i < nimg; ++i) - problem.SetParameterBlockConstant(&mosaicity_rad[i]); - } else { - problem.SetParameterBlockConstant(&mosaicity_rad_global); - } + for (int i = 0; i < nimg; ++i) + problem.SetParameterBlockConstant(&mosaicity_rad[i]); } else { - const std::optional min_rad = opt.mosaicity_min_deg ? std::optional(deg2rad(*opt.mosaicity_min_deg)) : std::nullopt; - const std::optional max_rad = opt.mosaicity_max_deg ? std::optional(deg2rad(*opt.mosaicity_max_deg)) : std::nullopt; + const std::optional min_rad = opt.mosaicity_min_deg + ? std::optional(deg2rad(*opt.mosaicity_min_deg)) : std::nullopt; + const std::optional max_rad = opt.mosaicity_max_deg + ? std::optional(deg2rad(*opt.mosaicity_max_deg)) : std::nullopt; - if (opt.mosaicity_per_image) { - for (int i = 0; i < nimg; ++i) { - if (min_rad) problem.SetParameterLowerBound(&mosaicity_rad[i], 0, *min_rad); - if (max_rad) problem.SetParameterUpperBound(&mosaicity_rad[i], 0, *max_rad); - } - } else { - if (min_rad) problem.SetParameterLowerBound(&mosaicity_rad_global, 0, *min_rad); - if (max_rad) problem.SetParameterUpperBound(&mosaicity_rad_global, 0, *max_rad); + for (int i = 0; i < nimg; ++i) { + if (min_rad) problem.SetParameterLowerBound(&mosaicity_rad[i], 0, *min_rad); + if (max_rad) problem.SetParameterUpperBound(&mosaicity_rad[i], 0, *max_rad); } } @@ -389,74 +363,94 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob ceres::Solver::Summary summary; ceres::Solve(options, &problem, &summary); + // --- Export per-image results --- for (int i = 0; i < nimg; ++i) { out.image_scale_k[i] = std::exp(log_k[i]); out.image_b_factor[i] = opt.refine_b_factor ? b[i] : 0.0; } - // Export mosaicity (degrees) to result - if (opt.mosaicity_per_image) { - out.mosaicity_deg.resize(nimg); - for (int i = 0; i < nimg; ++i) - out.mosaicity_deg[i] = mosaicity_rad[i] * 180.0 / M_PI; - } else { - out.mosaicity_deg = { mosaicity_rad_global * 180.0 / M_PI }; + out.mosaicity_deg.resize(nimg); + for (int i = 0; i < nimg; ++i) + out.mosaicity_deg[i] = mosaicity_rad[i] * 180.0 / M_PI; + + // --- Compute goodness-of-fit (reduced chi-squared) --- + const int n_obs = static_cast(obs.size()); + // Count free parameters: nhkl log_Itrue + per-image (log_k + b + mosaicity) minus fixed ones + int n_params = nhkl; + for (int i = 0; i < nimg; ++i) { + if (!(opt.fix_first_image_scale && i == 0)) + n_params += 1; // log_k + if (opt.refine_b_factor) + n_params += 1; // b + if (opt.refine_mosaicity) + n_params += 1; // mosaicity } - // Reverse maps for merged output + const double half_wedge_rad = opt.wedge_deg * M_PI / 180.0 / 2.0; + + double sum_r2 = 0.0; + for (const auto& o : obs) { + const int i = o.img_slot; + const int h = o.hkl_slot; + + const double ki = std::exp(log_k[i]); + const double atten = opt.refine_b_factor ? std::exp(-b[i] * o.s2) : 1.0; + const double Itrue = std::exp(log_Itrue[h]); + + const double zeta = static_cast(o.r->zeta); + const double mosa_i = mosaicity_rad[i]; + const double c1 = std::sqrt(2.0) * (mosa_i / zeta); + + const double delta_phi_rad = static_cast(o.r->delta_phi) * M_PI / 180.0; + const double partiality = partiality_model + ? (std::erf((delta_phi_rad + half_wedge_rad) * c1) - std::erf((delta_phi_rad - half_wedge_rad) * c1)) / 2.0 + : 1.0; + + const double lp = SafeInv(static_cast(o.r->rlp), 1.0); + + const double Ipred = ki * atten * partiality * lp * Itrue; + const double resid = (Ipred - static_cast(o.r->I)) / o.sigma; + sum_r2 += resid * resid; + } + + const double gof2 = (n_obs > n_params) ? sum_r2 / static_cast(n_obs - n_params) : 1.0; + out.gof2 = gof2; + + // --- Covariance: σ(I_true) from (J^T W J)^{-1} scaled by GoF² --- std::vector slotToHKL(nhkl); for (const auto& kv : hklToSlot) { slotToHKL[kv.second] = kv.first; } - // sigma estimate consistent with the optimized forward model - std::vector n_per_hkl(nhkl, 0); - std::vector ss_per_hkl(nhkl, 0.0); - - const double half_wedge_rad = opt.wedge_deg * M_PI / 180.0 / 2.0; - - for (const auto& o : obs) { - const int i = o.img_slot; - const int h = o.hkl_slot; - - const double k = std::exp(log_k[i]); - const double atten = opt.refine_b_factor ? std::exp(-b[i] * o.s2) : 1.0; - const double Itrue = std::exp(log_Itrue[h]); - - const double zeta = static_cast(o.r->zeta); - const double mosa_i = opt.mosaicity_per_image ? mosaicity_rad[i] : mosaicity_rad_global; - const double c1 = std::sqrt(2.0) * (mosa_i / zeta); - - const double delta_phi_rad = static_cast(o.r->delta_phi) * M_PI / 180.0; - const double partiality = partiality_model ? - (std::erf((delta_phi_rad + half_wedge_rad) * c1) - std::erf((delta_phi_rad - half_wedge_rad) * c1)) / 2.0 - : 1.0; - - const double lp = SafeInv(static_cast(o.r->rlp), 1.0); - - const double Ipred = k * atten * partiality * lp * Itrue; - const double r = (Ipred - static_cast(o.r->I)); - - n_per_hkl[h] += 1; - ss_per_hkl[h] += r * r; + out.merged.resize(nhkl); + for (int h = 0; h < nhkl; ++h) { + out.merged[h].h = slotToHKL[h].h; + out.merged[h].k = slotToHKL[h].k; + out.merged[h].l = slotToHKL[h].l; + out.merged[h].I = std::exp(log_Itrue[h]); + out.merged[h].sigma = std::numeric_limits::quiet_NaN(); } - out.merged.reserve(nhkl); + ceres::Covariance::Options cov_options; + cov_options.algorithm_type = ceres::SPARSE_QR; + + ceres::Covariance covariance(cov_options); + + std::vector> covariance_blocks; + covariance_blocks.reserve(nhkl); for (int h = 0; h < nhkl; ++h) { - MergedReflection m{}; - m.h = slotToHKL[h].h; - m.k = slotToHKL[h].k; - m.l = slotToHKL[h].l; - m.I = static_cast(std::exp(log_Itrue[h])); + covariance_blocks.emplace_back(&log_Itrue[h], &log_Itrue[h]); + } - if (n_per_hkl[h] >= 2) { - const double rms = std::sqrt(ss_per_hkl[h] / static_cast(n_per_hkl[h] - 1)); - m.sigma = static_cast(rms / std::sqrt(static_cast(n_per_hkl[h]))); - } else { - m.sigma = std::numeric_limits::quiet_NaN(); + if (covariance.Compute(covariance_blocks, &problem)) { + for (int h = 0; h < nhkl; ++h) { + double var_log_I = 0.0; + covariance.GetCovarianceBlock(&log_Itrue[h], &log_Itrue[h], &var_log_I); + + // σ(I) = I * sqrt( var(log I) * GoF² ) + const double Itrue = std::exp(log_Itrue[h]); + out.merged[h].sigma = Itrue * std::sqrt(var_log_I * gof2); } - - out.merged.push_back(m); } return out; diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index 848c7509..576b3e4c 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -13,9 +13,6 @@ struct ScaleMergeOptions { bool refine_b_factor = true; - bool use_huber_loss = true; - double huber_delta = 2.0; - int max_num_iterations = 100; double max_solver_time_s = 1.0; @@ -41,13 +38,11 @@ struct ScaleMergeOptions { double wedge_deg = 1.0; // --- Mosaicity (user input in degrees; internally converted to radians) --- - // If true, refine mosaicity. If mosaicity_per_image==true, refine one value per image. bool refine_mosaicity = true; - bool mosaicity_per_image = true; double mosaicity_init_deg = 0.17; // ~0.003 rad std::optional mosaicity_min_deg = 1e-3; - std::optional mosaicity_max_deg = 20.0; + std::optional mosaicity_max_deg = 2.0; // --- Optional: regularize per-image scale k towards 1 (Kabsch-like) --- bool regularize_scale_to_one = false; @@ -68,8 +63,11 @@ struct ScaleMergeResult { std::vector image_b_factor; std::vector image_ids; - // If mosaicity_per_image==true, one value per image (degrees). Otherwise size is 1 (global). + // One mosaicity value per image (degrees). std::vector mosaicity_deg; + + // Goodness-of-fit squared (reduced chi-squared). + double gof2 = 1.0; }; ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& observations, -- 2.52.0 From 6e28ad352356b20ae6f397ff14b66f5e4ea268f7 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 18:45:39 +0100 Subject: [PATCH 27/81] jfjoch_process: Include scaling - to be tested --- image_analysis/CMakeLists.txt | 2 +- image_analysis/IndexAndRefine.cpp | 29 +++++++++++ image_analysis/IndexAndRefine.h | 9 +++- tools/jfjoch_process.cpp | 80 ++++++++++++++++++++++++++++--- 4 files changed, 111 insertions(+), 9 deletions(-) diff --git a/image_analysis/CMakeLists.txt b/image_analysis/CMakeLists.txt index 104967bd..2eaac793 100644 --- a/image_analysis/CMakeLists.txt +++ b/image_analysis/CMakeLists.txt @@ -44,4 +44,4 @@ ADD_SUBDIRECTORY(geom_refinement) ADD_SUBDIRECTORY(lattice_search) ADD_SUBDIRECTORY(scale_merge) -TARGET_LINK_LIBRARIES(JFJochImageAnalysis JFJochBraggPrediction JFJochBraggIntegration JFJochLatticeSearch JFJochIndexing JFJochSpotFinding JFJochCommon JFJochGeomRefinement gemmi) +TARGET_LINK_LIBRARIES(JFJochImageAnalysis JFJochBraggPrediction JFJochBraggIntegration JFJochLatticeSearch JFJochIndexing JFJochSpotFinding JFJochCommon JFJochGeomRefinement JFJochScaleMerge gemmi) diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index 8c9457ec..fa45a846 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -240,3 +240,32 @@ std::optional IndexAndRefine::Finalize() { return rotation_indexer->GetLattice(); return {}; } + +std::optional IndexAndRefine::ScaleRotationData(const ScaleMergeOptions &opts) const { + std::vector snapshot; + { + std::unique_lock ul(reflections_mutex); + snapshot = reflections; // cheap copy under lock + } + + // Need a reasonable number of reflections to make refinement meaningful + constexpr size_t kMinReflections = 20; + if (snapshot.size() < kMinReflections) + return std::nullopt; + + // Build options focused on mosaicity refinement but allow caller override + ScaleMergeOptions options = opts; + + // If the experiment provides a wedge, propagate it + if (experiment.GetGoniometer().has_value()) + options.wedge_deg = experiment.GetGoniometer()->GetWedge_deg(); + + // If caller left space_group unset, try to pick it from the indexed lattice + if (!options.space_group.has_value()) { + auto sg = experiment.GetGemmiSpaceGroup(); + if (sg) + options.space_group = *sg; + } + + return ScaleAndMergeReflectionsCeres(snapshot, options); +} \ No newline at end of file diff --git a/image_analysis/IndexAndRefine.h b/image_analysis/IndexAndRefine.h index c3ff50f8..15fb2b13 100644 --- a/image_analysis/IndexAndRefine.h +++ b/image_analysis/IndexAndRefine.h @@ -12,6 +12,7 @@ #include "bragg_prediction/BraggPrediction.h" #include "indexing/IndexerThreadPool.h" #include "lattice_search/LatticeSearch.h" +#include "scale_merge/ScaleAndMerge.h" #include "RotationIndexer.h" #include "RotationParameters.h" @@ -43,7 +44,7 @@ class IndexAndRefine { : experiment(experiment_ref) {} }; - std::mutex reflections_mutex; + mutable std::mutex reflections_mutex; std::vector reflections; IndexingOutcome DetermineLatticeAndSymmetry(DataMessage &msg); @@ -56,6 +57,12 @@ class IndexAndRefine { public: IndexAndRefine(const DiffractionExperiment &x, IndexerThreadPool *indexer); void ProcessImage(DataMessage &msg, const SpotFindingSettings &settings, const CompressedImage &image, BraggPrediction &prediction); + + /// Run scale-and-merge on accumulated reflections to refine per-image + /// mosaicity (and optionally B-factors / scale factors). + /// Returns std::nullopt if there are too few reflections to be meaningful. + std::optional ScaleRotationData(const ScaleMergeOptions &opts = {}) const; + std::optional Finalize(); }; diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index acc3f91c..bd60ef07 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include "../reader/JFJochHDF5Reader.h" #include "../common/Logger.h" @@ -27,15 +28,16 @@ void print_usage(Logger &logger) { logger.Info("Usage ./jfjoch_analysis {} "); logger.Info("Options:"); - logger.Info(" -o Output file prefix (default: output)"); - logger.Info(" -N Number of threads (default: 1)"); - logger.Info(" -s Start image number (default: 0)"); - logger.Info(" -e End image number (default: all)"); + logger.Info(" -o Output file prefix (default: output)"); + logger.Info(" -N Number of threads (default: 1)"); + logger.Info(" -s Start image number (default: 0)"); + logger.Info(" -e End image number (default: all)"); logger.Info(" -v Verbose output"); - logger.Info(" -R[num] Rotation indexing (optional: min angular range deg)"); + logger.Info(" -R[num] Rotation indexing (optional: min angular range deg)"); logger.Info(" -F Use FFT indexing algorithm (default: Auto)"); logger.Info(" -x No least-square beam center refinement"); - logger.Info(" -d High resolution limit for spot finding (default: 1.5)"); + logger.Info(" -d High resolution limit for spot finding (default: 1.5)"); + logger.Info(" -S Run scaling (refine mosaicity) and write scaled.hkl + image.dat"); } int main(int argc, char **argv) { @@ -55,6 +57,7 @@ int main(int argc, char **argv) { std::optional rotation_indexing_range; bool use_fft = false; bool refine_beam_center = true; + bool run_scaling = false; float d_high = 1.5; @@ -94,6 +97,9 @@ int main(int argc, char **argv) { case 'd': d_high = atof(optarg); break; + case 'S': + run_scaling = true; + break; default: print_usage(logger); exit(EXIT_FAILURE); @@ -354,7 +360,7 @@ int main(int argc, char **argv) { IndexAndRefine global_indexer(experiment, &indexer_pool); const auto rotation_indexer_ret = global_indexer.Finalize(); - if (rotation_indexer_ret.has_value()) { + if (rotation_indexer_ret.has_value()) { end_msg.rotation_lattice = rotation_indexer_ret->lattice; end_msg.rotation_lattice_type = LatticeMessage{ .centering = rotation_indexer_ret->search_result.centering, @@ -364,6 +370,66 @@ int main(int argc, char **argv) { logger.Info("Rotation Indexing found lattice"); } + // --- Optional: run scaling (mosaicity refinement) on accumulated reflections --- + if (run_scaling) { + logger.Info("Running scaling (mosaicity refinement) ..."); + + ScaleMergeOptions scale_opts; + scale_opts.refine_b_factor = false; // B-factor refinement doesn't make sense for rotation + scale_opts.refine_mosaicity = true; + scale_opts.max_num_iterations = 500; + scale_opts.max_solver_time_s = 240.0; // generous cutoff for now + + auto scale_start = std::chrono::steady_clock::now(); + auto scale_result = indexer.ScaleRotationData(scale_opts); + auto scale_end = std::chrono::steady_clock::now(); + double scale_time = std::chrono::duration(scale_end - scale_start).count(); + + if (scale_result) { + logger.Info("Scaling completed in {:.2f} s (GoF² = {:.4f}, {} unique reflections, {} images)", + scale_time, scale_result->gof2, + scale_result->merged.size(), scale_result->image_ids.size()); + + // Write scaled.hkl (h k l I sigma) + { + const std::string hkl_path = output_prefix + "_scaled.hkl"; + std::ofstream hkl_file(hkl_path); + if (!hkl_file) { + logger.Error("Cannot open {} for writing", hkl_path); + } else { + hkl_file << "# h k l I sigma\n"; + for (const auto& r : scale_result->merged) { + hkl_file << r.h << " " << r.k << " " << r.l << " " + << r.I << " " << r.sigma << "\n"; + } + hkl_file.close(); + logger.Info("Wrote {} reflections to {}", scale_result->merged.size(), hkl_path); + } + } + + // Write image.dat (image_id mosaicity_deg K) + { + const std::string img_path = output_prefix + "_image.dat"; + std::ofstream img_file(img_path); + if (!img_file) { + logger.Error("Cannot open {} for writing", img_path); + } else { + img_file << "# image_id mosaicity_deg K\n"; + for (size_t i = 0; i < scale_result->image_ids.size(); ++i) { + img_file << scale_result->image_ids[i] << " " + << scale_result->mosaicity_deg[i] << " " + << scale_result->image_scale_k[i] << "\n"; + } + img_file.close(); + logger.Info("Wrote {} image records to {}", scale_result->image_ids.size(), img_path); + } + } + } else { + logger.Warning("Scaling skipped — too few reflections accumulated (need >= 20)"); + logger.Info("Scaling wall-clock time: {:.2f} s", scale_time); + } + } + // Write End Message writer->WriteHDF5(end_msg); auto stats = writer->Finalize(); -- 2.52.0 From 69ebbed8fb88bf123f5174505d56a4bfad089548 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 19:02:48 +0100 Subject: [PATCH 28/81] jfjoch_process: Add French-Wilson (completely written by Opus 4.6...need to understand it properly first :) ) --- image_analysis/scale_merge/CMakeLists.txt | 2 +- image_analysis/scale_merge/FrenchWilson.cpp | 190 +++++++++++++++++++ image_analysis/scale_merge/FrenchWilson.h | 45 +++++ image_analysis/scale_merge/ScaleAndMerge.cpp | 18 ++ image_analysis/scale_merge/ScaleAndMerge.h | 1 + tools/jfjoch_process.cpp | 30 +++ 6 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 image_analysis/scale_merge/FrenchWilson.cpp create mode 100644 image_analysis/scale_merge/FrenchWilson.h diff --git a/image_analysis/scale_merge/CMakeLists.txt b/image_analysis/scale_merge/CMakeLists.txt index 8b8b99d7..62aefd28 100644 --- a/image_analysis/scale_merge/CMakeLists.txt +++ b/image_analysis/scale_merge/CMakeLists.txt @@ -1,2 +1,2 @@ -ADD_LIBRARY(JFJochScaleMerge ScaleAndMerge.cpp ScaleAndMerge.h) +ADD_LIBRARY(JFJochScaleMerge ScaleAndMerge.cpp ScaleAndMerge.h FrenchWilson.cpp FrenchWilson.h) TARGET_LINK_LIBRARIES(JFJochScaleMerge Ceres::ceres Eigen3::Eigen JFJochCommon) \ No newline at end of file diff --git a/image_analysis/scale_merge/FrenchWilson.cpp b/image_analysis/scale_merge/FrenchWilson.cpp new file mode 100644 index 00000000..ebcf35d9 --- /dev/null +++ b/image_analysis/scale_merge/FrenchWilson.cpp @@ -0,0 +1,190 @@ +// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute +// SPDX-License-Identifier: GPL-3.0-only + + +#include "FrenchWilson.h" +#include "../../common/ResolutionShells.h" + +#include +#include +#include +#include + +namespace { + +struct PosteriorMoments { + double mean_I; // + double mean_F; // <|F|> +}; + +/// Numerically stable posterior integration via log-shift +PosteriorMoments IntegratePosteriorStable(double I_obs, double sigma_obs, double mean_I_bin, + bool acentric, int npts, double z_max) { + if (mean_I_bin <= 0.0 || !std::isfinite(mean_I_bin)) + mean_I_bin = 1.0; + if (sigma_obs <= 0.0 || !std::isfinite(sigma_obs)) + sigma_obs = std::max(std::abs(I_obs) * 0.1, 1e-6); + + const double inv_2sig2 = 1.0 / (2.0 * sigma_obs * sigma_obs); + const double dz = z_max / static_cast(npts); + + // First pass: compute all log_w and find max + std::vector log_w_arr(npts); + double max_log_w = -std::numeric_limits::infinity(); + + for (int i = 0; i < npts; ++i) { + const double z = (static_cast(i) + 0.5) * dz; + const double I_true = z * mean_I_bin; + const double diff = I_obs - I_true; + + double log_prior; + if (acentric) { + log_prior = -z; + } else { + if (z <= 1e-30) { + log_w_arr[i] = -std::numeric_limits::infinity(); + continue; + } + log_prior = -0.5 * std::log(2.0 * M_PI * z) - z / 2.0; + } + + log_w_arr[i] = log_prior + (-diff * diff * inv_2sig2); + if (log_w_arr[i] > max_log_w) + max_log_w = log_w_arr[i]; + } + + // Second pass: accumulate with shift + double sum_w = 0.0; + double sum_wI = 0.0; + double sum_wF = 0.0; + + for (int i = 0; i < npts; ++i) { + const double z = (static_cast(i) + 0.5) * dz; + const double I_true = z * mean_I_bin; + const double w = std::exp(log_w_arr[i] - max_log_w); + if (!std::isfinite(w)) continue; + + sum_w += w; + sum_wI += w * I_true; + sum_wF += w * std::sqrt(I_true); + } + + PosteriorMoments m{}; + if (sum_w > 0.0) { + m.mean_I = sum_wI / sum_w; + m.mean_F = sum_wF / sum_w; + } else { + const double I_pos = std::max(I_obs, 0.0); + m.mean_I = I_pos; + m.mean_F = std::sqrt(I_pos); + } + + return m; +} + +} // namespace + +std::vector +FrenchWilson(const std::vector& merged, + const FrenchWilsonOptions& opts) { + + const size_t n = merged.size(); + std::vector out(n); + + if (n == 0) + return out; + + // --- Step 1: determine d-range and build ResolutionShells --- + float d_min = std::numeric_limits::max(); + float d_max = 0.0f; + + for (const auto& r : merged) { + const auto d = static_cast(r.d); + if (!std::isfinite(d) || d <= 0.0f) continue; + if (d < d_min) d_min = d; + if (d > d_max) d_max = d; + } + + // Guard: if we couldn't determine a range, fall back to naive sqrt + if (d_min >= d_max || d_min <= 0.0f) { + for (size_t i = 0; i < n; ++i) { + out[i].h = merged[i].h; + out[i].k = merged[i].k; + out[i].l = merged[i].l; + out[i].sigmaI = merged[i].sigma; + const double I_pos = std::max(merged[i].I, 0.0); + out[i].I = I_pos; + out[i].F = std::sqrt(I_pos); + out[i].sigmaF = 0.0; + } + return out; + } + + // Slight padding so that reflections exactly at d_min / d_max are included + const float d_min_padded = d_min * 0.999f; + const float d_max_padded = d_max * 1.001f; + const int nshells = std::max(1, opts.num_shells); + + ResolutionShells shells(d_min_padded, d_max_padded, nshells); + + // --- Step 2: assign each reflection to a shell and compute per-shell --- + std::vector shell_id(n, -1); + std::vector shell_sum_I(nshells, 0.0); + std::vector shell_count(nshells, 0); + + for (size_t i = 0; i < n; ++i) { + const auto d = static_cast(merged[i].d); + if (!std::isfinite(d) || d <= 0.0f) continue; + auto s = shells.GetShell(d); + if (!s.has_value()) continue; + shell_id[i] = s.value(); + + if (std::isfinite(merged[i].I) && std::isfinite(merged[i].sigma)) { + shell_sum_I[s.value()] += merged[i].I; + shell_count[s.value()] += 1; + } + } + + std::vector shell_mean_I(nshells, 1.0); + for (int s = 0; s < nshells; ++s) { + if (shell_count[s] >= opts.min_reflections_per_shell) + shell_mean_I[s] = std::max(shell_sum_I[s] / static_cast(shell_count[s]), 1e-10); + } + + // --- Step 3: apply French-Wilson to each reflection --- + for (size_t i = 0; i < n; ++i) { + out[i].h = merged[i].h; + out[i].k = merged[i].k; + out[i].l = merged[i].l; + out[i].sigmaI = merged[i].sigma; + + const double I_obs = merged[i].I; + const double sigma = merged[i].sigma; + + // If no valid shell or bad data, naive fallback + if (shell_id[i] < 0 || !std::isfinite(I_obs) || !std::isfinite(sigma) || sigma <= 0.0) { + const double I_pos = std::max(I_obs, 0.0); + out[i].I = I_pos; + out[i].F = std::sqrt(std::max(I_pos, 0.0)); + out[i].sigmaF = 0.0; + continue; + } + + const double meanI = shell_mean_I[shell_id[i]]; + + auto moments = IntegratePosteriorStable( + I_obs, sigma, meanI, + opts.acentric, + opts.num_quadrature_points, + opts.z_max); + + out[i].I = moments.mean_I; + out[i].F = moments.mean_F; + + // sigma(F) = sqrt( - ² ) = sqrt( - ² ) + const double var_F = moments.mean_I - moments.mean_F * moments.mean_F; + out[i].sigmaF = (var_F > 0.0) ? std::sqrt(var_F) : 0.0; + } + + return out; +} \ No newline at end of file diff --git a/image_analysis/scale_merge/FrenchWilson.h b/image_analysis/scale_merge/FrenchWilson.h new file mode 100644 index 00000000..b727e9a0 --- /dev/null +++ b/image_analysis/scale_merge/FrenchWilson.h @@ -0,0 +1,45 @@ +// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute +// SPDX-License-Identifier: GPL-3.0-only + +#pragma once + +#include +#include + +#include "ScaleAndMerge.h" + +/// Result of the French-Wilson procedure for a single reflection +struct FrenchWilsonReflection { + int h; + int k; + int l; + double F; // <|F|> posterior mean amplitude + double sigmaF; // sigma(|F|) from posterior variance + double I; // posterior mean intensity (always >= 0) + double sigmaI; // original sigma(I) from merging +}; + +struct FrenchWilsonOptions { + /// Number of resolution shells (bins in 1/d² space) + int num_shells = 20; + + /// Minimum number of reflections per shell to compute + int min_reflections_per_shell = 10; + + /// Whether the crystal is acentric (true) or centric (false). + bool acentric = true; + + /// Number of quadrature points for numerical integration of the posterior + int num_quadrature_points = 200; + + /// Upper integration limit in units of the Wilson scale (z_max = I / ) + double z_max = 20.0; +}; + +/// Apply the French-Wilson procedure to merged reflections. +/// Requires that each MergedReflection has a valid d-spacing in its `d` field. +/// +/// Returns one FrenchWilsonReflection per input reflection (same order). +std::vector +FrenchWilson(const std::vector& merged, + const FrenchWilsonOptions& opts = {}); \ No newline at end of file diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 9b4b92e2..5473d719 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -429,6 +429,24 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob out.merged[h].l = slotToHKL[h].l; out.merged[h].I = std::exp(log_Itrue[h]); out.merged[h].sigma = std::numeric_limits::quiet_NaN(); + out.merged[h].d = 0.0; + } + + // Populate d from median of observations per HKL + { + std::vector> per_hkl_d(nhkl); + for (const auto& o : obs) { + const double d_val = static_cast(o.r->d); + if (std::isfinite(d_val) && d_val > 0.0) + per_hkl_d[o.hkl_slot].push_back(d_val); + } + for (int h = 0; h < nhkl; ++h) { + auto& v = per_hkl_d[h]; + if (!v.empty()) { + std::nth_element(v.begin(), v.begin() + static_cast(v.size() / 2), v.end()); + out.merged[h].d = v[v.size() / 2]; + } + } } ceres::Covariance::Options cov_options; diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index 576b3e4c..1959e1fd 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -55,6 +55,7 @@ struct MergedReflection { int l; double I; double sigma; + double d = 0.0; }; struct ScaleMergeResult { diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index bd60ef07..303aeed7 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -24,6 +24,7 @@ #include "../image_analysis/IndexAndRefine.h" #include "../receiver/JFJochReceiverPlots.h" #include "../compression/JFJochCompressor.h" +#include "../image_analysis/scale_merge/FrenchWilson.h" void print_usage(Logger &logger) { logger.Info("Usage ./jfjoch_analysis {} "); @@ -424,6 +425,35 @@ int main(int argc, char **argv) { logger.Info("Wrote {} image records to {}", scale_result->image_ids.size(), img_path); } } + + // --- French-Wilson: convert I → F --- + { + // Build d-spacings vector parallel to merged + std::vector d_spacings(scale_result->merged.size()); + for (size_t i = 0; i < scale_result->merged.size(); ++i) + d_spacings[i] = scale_result->merged[i].d; + + FrenchWilsonOptions fw_opts; + fw_opts.acentric = true; // typical for MX + fw_opts.num_bins = 20; + + auto fw = FrenchWilson(scale_result->merged, d_spacings, fw_opts); + + const std::string fw_path = output_prefix + "_amplitudes.hkl"; + std::ofstream fw_file(fw_path); + if (!fw_file) { + logger.Error("Cannot open {} for writing", fw_path); + } else { + fw_file << "# h k l F sigmaF I_fw sigmaI\n"; + for (const auto& r : fw) { + fw_file << r.h << " " << r.k << " " << r.l << " " + << r.F << " " << r.sigmaF << " " + << r.I << " " << r.sigmaI << "\n"; + } + fw_file.close(); + logger.Info("French-Wilson: wrote {} amplitudes to {}", fw.size(), fw_path); + } + } } else { logger.Warning("Scaling skipped — too few reflections accumulated (need >= 20)"); logger.Info("Scaling wall-clock time: {:.2f} s", scale_time); -- 2.52.0 From 58f29409e60ec947950df2d86d4502b71be2d218 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 19:29:00 +0100 Subject: [PATCH 29/81] jfjoch_process: Fix --- tools/jfjoch_process.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 303aeed7..1f5fdf78 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -428,16 +428,11 @@ int main(int argc, char **argv) { // --- French-Wilson: convert I → F --- { - // Build d-spacings vector parallel to merged - std::vector d_spacings(scale_result->merged.size()); - for (size_t i = 0; i < scale_result->merged.size(); ++i) - d_spacings[i] = scale_result->merged[i].d; - FrenchWilsonOptions fw_opts; fw_opts.acentric = true; // typical for MX - fw_opts.num_bins = 20; + fw_opts.num_shells = 20; - auto fw = FrenchWilson(scale_result->merged, d_spacings, fw_opts); + auto fw = FrenchWilson(scale_result->merged, fw_opts); const std::string fw_path = output_prefix + "_amplitudes.hkl"; std::ofstream fw_file(fw_path); -- 2.52.0 From d4d1f6cd9c419fa8beeef79b26c1a9db0be1bf0d Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Feb 2026 19:55:48 +0100 Subject: [PATCH 30/81] CCP4: Add library to save MTZs --- CMakeLists.txt | 1 + ccp4c/CMakeLists.txt | 57 + ccp4c/COPYING | 685 + ccp4c/COPYING.LESSER | 165 + ccp4c/ccp4/ccp4_array.c | 155 + ccp4c/ccp4/ccp4_array.h | 251 + ccp4c/ccp4/ccp4_errno.h | 166 + ccp4c/ccp4/ccp4_file_err.h | 38 + ccp4c/ccp4/ccp4_fortran.h | 393 + ccp4c/ccp4/ccp4_general.c | 1436 ++ ccp4c/ccp4/ccp4_general.h | 124 + ccp4c/ccp4/ccp4_parser.c | 1738 +++ ccp4c/ccp4/ccp4_parser.h | 308 + ccp4c/ccp4/ccp4_program.c | 353 + ccp4c/ccp4/ccp4_program.h | 171 + ccp4c/ccp4/ccp4_spg.h | 96 + ccp4c/ccp4/ccp4_sysdep.h | 273 + ccp4c/ccp4/ccp4_types.h | 74 + ccp4c/ccp4/ccp4_unitcell.c | 328 + ccp4c/ccp4/ccp4_unitcell.h | 119 + ccp4c/ccp4/ccp4_utils.h | 112 + ccp4c/ccp4/ccp4_vars.h | 46 + ccp4c/ccp4/cmap_accessor.c | 261 + ccp4c/ccp4/cmap_close.c | 80 + ccp4c/ccp4/cmap_data.c | 476 + ccp4c/ccp4/cmap_data.h | 32 + ccp4c/ccp4/cmap_errno.h | 52 + ccp4c/ccp4/cmap_header.c | 182 + ccp4c/ccp4/cmap_header.h | 34 + ccp4c/ccp4/cmap_labels.c | 179 + ccp4c/ccp4/cmap_labels.h | 34 + ccp4c/ccp4/cmap_open.c | 117 + ccp4c/ccp4/cmap_skew.c | 104 + ccp4c/ccp4/cmap_skew.h | 32 + ccp4c/ccp4/cmap_stats.c | 53 + ccp4c/ccp4/cmap_stats.h | 33 + ccp4c/ccp4/cmap_symop.c | 141 + ccp4c/ccp4/cmaplib.h | 241 + ccp4c/ccp4/cmaplib_f.h | 34 + ccp4c/ccp4/cmtzlib.c | 3964 ++++++ ccp4c/ccp4/cmtzlib.h | 1054 ++ ccp4c/ccp4/csymlib.c | 2086 +++ ccp4c/ccp4/csymlib.h | 645 + ccp4c/ccp4/cvecmat.c | 162 + ccp4c/ccp4/cvecmat.h | 39 + ccp4c/ccp4/library_err.c | 324 + ccp4c/ccp4/library_file.c | 2375 ++++ ccp4c/ccp4/library_file.h | 167 + ccp4c/ccp4/library_utils.c | 674 + ccp4c/ccp4/mtzdata.h | 199 + ccp4c/ccp4/overview.h | 88 + ccp4c/ccp4/pack_c.c | 1521 ++ ccp4c/ccp4/pack_c.h | 129 + ccp4c/ccp4/vmslibrary.c | 99 + ccp4c/ccp4/w32mvs.c | 265 + ccp4c/ccp4/w32mvs.h | 200 + ccp4c/data/README | 39 + ccp4c/data/atomsf.lib | 1121 ++ ccp4c/data/atomsf_electron.lib | 514 + ccp4c/data/atomsf_neutron.lib | 1002 ++ ccp4c/data/font84.ascii | 5160 +++++++ ccp4c/data/fontpack.f | 16 + ccp4c/data/fontunpack.for | 23 + ccp4c/data/syminfo.lib | 14552 ++++++++++++++++++++ ccp4c/data/symop.lib | 4920 +++++++ docs/SOFTWARE.md | 3 +- image_analysis/scale_merge/CMakeLists.txt | 4 +- image_analysis/scale_merge/MtzWriter.cpp | 234 + image_analysis/scale_merge/MtzWriter.h | 57 + tools/jfjoch_process.cpp | 28 +- 70 files changed, 50833 insertions(+), 5 deletions(-) create mode 100644 ccp4c/CMakeLists.txt create mode 100644 ccp4c/COPYING create mode 100644 ccp4c/COPYING.LESSER create mode 100644 ccp4c/ccp4/ccp4_array.c create mode 100644 ccp4c/ccp4/ccp4_array.h create mode 100644 ccp4c/ccp4/ccp4_errno.h create mode 100644 ccp4c/ccp4/ccp4_file_err.h create mode 100644 ccp4c/ccp4/ccp4_fortran.h create mode 100644 ccp4c/ccp4/ccp4_general.c create mode 100644 ccp4c/ccp4/ccp4_general.h create mode 100644 ccp4c/ccp4/ccp4_parser.c create mode 100644 ccp4c/ccp4/ccp4_parser.h create mode 100644 ccp4c/ccp4/ccp4_program.c create mode 100644 ccp4c/ccp4/ccp4_program.h create mode 100644 ccp4c/ccp4/ccp4_spg.h create mode 100644 ccp4c/ccp4/ccp4_sysdep.h create mode 100644 ccp4c/ccp4/ccp4_types.h create mode 100644 ccp4c/ccp4/ccp4_unitcell.c create mode 100644 ccp4c/ccp4/ccp4_unitcell.h create mode 100644 ccp4c/ccp4/ccp4_utils.h create mode 100644 ccp4c/ccp4/ccp4_vars.h create mode 100644 ccp4c/ccp4/cmap_accessor.c create mode 100644 ccp4c/ccp4/cmap_close.c create mode 100644 ccp4c/ccp4/cmap_data.c create mode 100644 ccp4c/ccp4/cmap_data.h create mode 100644 ccp4c/ccp4/cmap_errno.h create mode 100644 ccp4c/ccp4/cmap_header.c create mode 100644 ccp4c/ccp4/cmap_header.h create mode 100644 ccp4c/ccp4/cmap_labels.c create mode 100644 ccp4c/ccp4/cmap_labels.h create mode 100644 ccp4c/ccp4/cmap_open.c create mode 100644 ccp4c/ccp4/cmap_skew.c create mode 100644 ccp4c/ccp4/cmap_skew.h create mode 100644 ccp4c/ccp4/cmap_stats.c create mode 100644 ccp4c/ccp4/cmap_stats.h create mode 100644 ccp4c/ccp4/cmap_symop.c create mode 100644 ccp4c/ccp4/cmaplib.h create mode 100644 ccp4c/ccp4/cmaplib_f.h create mode 100644 ccp4c/ccp4/cmtzlib.c create mode 100644 ccp4c/ccp4/cmtzlib.h create mode 100644 ccp4c/ccp4/csymlib.c create mode 100644 ccp4c/ccp4/csymlib.h create mode 100644 ccp4c/ccp4/cvecmat.c create mode 100644 ccp4c/ccp4/cvecmat.h create mode 100644 ccp4c/ccp4/library_err.c create mode 100644 ccp4c/ccp4/library_file.c create mode 100644 ccp4c/ccp4/library_file.h create mode 100644 ccp4c/ccp4/library_utils.c create mode 100644 ccp4c/ccp4/mtzdata.h create mode 100644 ccp4c/ccp4/overview.h create mode 100644 ccp4c/ccp4/pack_c.c create mode 100644 ccp4c/ccp4/pack_c.h create mode 100644 ccp4c/ccp4/vmslibrary.c create mode 100644 ccp4c/ccp4/w32mvs.c create mode 100644 ccp4c/ccp4/w32mvs.h create mode 100644 ccp4c/data/README create mode 100644 ccp4c/data/atomsf.lib create mode 100644 ccp4c/data/atomsf_electron.lib create mode 100644 ccp4c/data/atomsf_neutron.lib create mode 100644 ccp4c/data/font84.ascii create mode 100644 ccp4c/data/fontpack.f create mode 100644 ccp4c/data/fontunpack.for create mode 100644 ccp4c/data/syminfo.lib create mode 100644 ccp4c/data/symop.lib create mode 100644 image_analysis/scale_merge/MtzWriter.cpp create mode 100644 image_analysis/scale_merge/MtzWriter.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fb4eeb75..ddd8b33d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,6 +138,7 @@ ADD_SUBDIRECTORY(detector_control) ADD_SUBDIRECTORY(image_puller) ADD_SUBDIRECTORY(preview) ADD_SUBDIRECTORY(symmetry) +ADD_SUBDIRECTORY(ccp4c) IF (JFJOCH_WRITER_ONLY) MESSAGE(STATUS "Compiling HDF5 writer only") diff --git a/ccp4c/CMakeLists.txt b/ccp4c/CMakeLists.txt new file mode 100644 index 00000000..917ae9df --- /dev/null +++ b/ccp4c/CMakeLists.txt @@ -0,0 +1,57 @@ +set(ccp4c_SOURCES + ccp4/ccp4_array.c + ccp4/cmap_data.c + ccp4/cmtzlib.c + ccp4/ccp4_general.c + ccp4/cmap_header.c + ccp4/csymlib.c + ccp4/ccp4_parser.c + ccp4/cmap_labels.c + ccp4/cvecmat.c + ccp4/ccp4_program.c + ccp4/cmap_open.c + ccp4/library_err.c + ccp4/ccp4_unitcell.c + ccp4/cmap_skew.c + ccp4/library_file.c + ccp4/cmap_accessor.c + ccp4/cmap_stats.c + ccp4/library_utils.c + ccp4/cmap_close.c + ccp4/cmap_symop.c + ccp4/pack_c.c +) + +set(ccp4c_HEADERS + ccp4/ccp4_file_err.h + ccp4/ccp4_program.h + ccp4/ccp4_unitcell.h + ccp4/cmap_errno.h + ccp4/cmap_stats.h + ccp4/csymlib.h + ccp4/library_file.h + ccp4/w32mvs.h + ccp4/ccp4_fortran.h + ccp4/ccp4_spg.h + ccp4/ccp4_utils.h + ccp4/cmap_header.h + ccp4/cmaplib.h + ccp4/cvecmat.h + ccp4/mtzdata.h + ccp4/ccp4_array.h + ccp4/ccp4_general.h + ccp4/ccp4_vars.h + ccp4/cmap_labels.h + ccp4/cmaplib_f.h + ccp4/overview.h + ccp4/ccp4_errno.h + ccp4/ccp4_parser.h + ccp4/ccp4_types.h + ccp4/cmap_data.h + ccp4/cmap_skew.h + ccp4/cmtzlib.h + ccp4/pack_c.h + ccp4/ccp4_sysdep.h +) + +ADD_LIBRARY(ccp4c STATIC ${ccp4c_SOURCES} ${ccp4c_HEADERS}) \ No newline at end of file diff --git a/ccp4c/COPYING b/ccp4c/COPYING new file mode 100644 index 00000000..14c5b73a --- /dev/null +++ b/ccp4c/COPYING @@ -0,0 +1,685 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + +Section 15 has been amended in accordance with Section 7a) above to +address the requirements of UK law. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + +Section 16 has been replaced in accordance with Section 7a) above to +address the requirements of UK law. + + THE LICENSOR OR ANY THIRD PARTIES FROM WHOM IT HAS LICENSED ANY CODE +WILL NOT BE LIABLE FOR: ANY LOSS OF PROFITS, LOSS OF REVENUE, LOSS OR +CORRUPTION OF DATA, LOSS OF CONTRACTS OR OPPORTUNITY, LOSS OF SAVINGS +OR THIRD PARTY CLAIMS (IN EACH CASE WHETHER DIRECT OR INDIRECT), ANY +DIRECT OR INDIRECT LOSS OR DAMAGE ARISING OUT OF OR IN CONNECTION WITH +THE PROGRAM, IN EACH CASE, WHETHER THAT LOSS ARISES AS A RESULT OF +LICENSOR"S NEGLIGENCE, OR IN ANY OTHER WAY, EVEN IF LICENSOR HAS BEEN +ADVISED OF THE POSSIBILITY OF THAT LOSS ARISING, OR IF IT WAS WITHIN +LICENSOR'S CONTEMPLATION. + +NONE OF THESE PROVISION LIMITS OR EXCLUDES THE LICENSOR"S LIABILITY +FOR DEATH OR PERSONAL INJURY CAUSED BY ITS NEGLIGENCE OR FOR ANY +FRAUD, OR FOR ANY SORT OF LIABILITY THAT, BY LAW, CANNOT BE LIMITED OR +EXCLUDED + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/ccp4c/COPYING.LESSER b/ccp4c/COPYING.LESSER new file mode 100644 index 00000000..fc8a5de7 --- /dev/null +++ b/ccp4c/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/ccp4c/ccp4/ccp4_array.c b/ccp4c/ccp4/ccp4_array.c new file mode 100644 index 00000000..d088c0ce --- /dev/null +++ b/ccp4c/ccp4/ccp4_array.c @@ -0,0 +1,155 @@ +/* + ccp4_array.c: implementation file for resizable array implementation. + Copyright (C) 2002 Kevin Cowtan + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_array.c + * implementation file for resizable array implementation. + * Kevin Cowtan + */ + +#include "ccp4_array.h" +/* rcsid[] = "$Id$" */ + +ccp4_ptr ccp4array_new_(ccp4_ptr *p) +{ + ccp4array_base *v; + v = (ccp4array_base *)malloc(sizeof(ccp4array_base)); + v->size = v->capacity = 0; + *p = (ccp4_ptr *)((ccp4_byteptr)(v)+sizeof(ccp4array_base)); + return *p; +} + +ccp4_ptr ccp4array_new_size_(ccp4_ptr *p, const int size, const size_t reclen) +{ + ccp4array_base *v; + int capacity = (size * 12) / 10 + 2; + v = (ccp4array_base *)malloc(sizeof(ccp4array_base) + capacity * reclen); + v->size = size; + v->capacity = capacity; + *p = (ccp4_ptr *)((ccp4_byteptr)(v)+sizeof(ccp4array_base)); + return *p; +} + +void ccp4array_resize_(ccp4_ptr *p, const int size, const size_t reclen) +{ + ccp4array_base *v; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + if (size > v->capacity) { + v->capacity = (size * 12) / 10 + 2; + v = (ccp4array_base *)realloc(v, sizeof(ccp4array_base) + v->capacity * reclen); + *p = (ccp4_ptr *)((ccp4_byteptr)(v)+sizeof(ccp4array_base)); + } + v->size = size; +} + +void ccp4array_reserve_(ccp4_ptr *p, const int size, const size_t reclen) +{ + ccp4array_base *v; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + v->capacity = size; + if ( v->size > size ) v->size = size; + v = (ccp4array_base *)realloc(v, sizeof(ccp4array_base) + v->capacity * reclen); + *p = (ccp4_ptr *)((ccp4_byteptr)(v)+sizeof(ccp4array_base)); +} + +void ccp4array_append_(ccp4_ptr *p, ccp4_constptr data, const size_t reclen) +{ + ccp4array_base *v; + int osize; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + osize = v->size; + ccp4array_resize_(p, osize+1, reclen); + memcpy((ccp4_byteptr)(*p)+osize*reclen, data, reclen); +} + +void ccp4array_append_n_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen) +{ + ccp4array_base *v; + ccp4_byteptr newdata; + int osize, i; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + osize = v->size; + ccp4array_resize_(p, osize+n, reclen); + newdata = (ccp4_byteptr)(*p)+osize*reclen; + for ( i = 0; i < n; i++ ) { + memcpy(newdata, data, reclen); + newdata += reclen; + } +} + +void ccp4array_append_list_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen) +{ + ccp4array_base *v; + int osize; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + osize = v->size; + ccp4array_resize_(p, osize+n, reclen); + memcpy((ccp4_byteptr)(*p)+osize*reclen, data, n * reclen); +} + +void ccp4array_insert_(ccp4_ptr *p, const int i, ccp4_constptr data, const size_t reclen) +{ + ccp4array_base *v; + int osize; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + osize = v->size; + ccp4array_resize_(p, osize+1, reclen); + memmove((ccp4_byteptr)(*p)+(i+1)*reclen, (ccp4_byteptr)(*p)+i*reclen, (osize-i)*reclen); + memcpy((ccp4_byteptr)(*p)+i*reclen, data, reclen); +} + +void ccp4array_delete_ordered_(ccp4_ptr *p, const int i, const size_t reclen) +{ + ccp4array_base *v; + int nsize; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + nsize = v->size - 1; + memmove((ccp4_byteptr)(*p)+i*reclen, (ccp4_byteptr)(*p)+(i+1)*reclen, (nsize-i)*reclen); + v->size--; /* ccp4array_resize_(p, nsize, reclen); */ +} + +void ccp4array_delete_(ccp4_ptr *p, const int i, const size_t reclen) +{ + ccp4array_base *v; + int nsize; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + nsize = v->size - 1; + memcpy((ccp4_byteptr)(*p)+i*reclen, (ccp4_byteptr)(*p)+nsize*reclen, reclen); + v->size--; /* ccp4array_resize_(p, size, reclen); */ +} + +void ccp4array_delete_last_(ccp4_ptr *p, const size_t reclen) +{ + ccp4array_base *v; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + v->size--; /* ccp4array_resize_(p, v->size-1, reclen); */ +} + +int ccp4array_size_(ccp4_constptr *p) +{ + ccp4array_base *v; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + return v->size; +} + +void ccp4array_free_(ccp4_ptr *p) +{ + ccp4array_base *v; + v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); + free(v); +} diff --git a/ccp4c/ccp4/ccp4_array.h b/ccp4c/ccp4/ccp4_array.h new file mode 100644 index 00000000..64147b63 --- /dev/null +++ b/ccp4c/ccp4/ccp4_array.h @@ -0,0 +1,251 @@ +/* + ccp4_array.h: header file for resizable array implementation. + Copyright (C) 2002 Kevin Cowtan + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_array.h + * header file for resizable array implementation. + * Kevin Cowtan + */ + +/* +CCP4 resizable array implementation. + +This defines an object and methods which looks just like a simple C +array, but can be resized at will without incurring excessive +overheads. + +A pointer to the desired type is created. Array elements are accessed +from this pointer as normal. Other operations depend on macros which +extract the stored type from the type of the pointer. + +The array is managed with a header, which is positioned before the +beginning of the array. The malloc'ed memory area starts at the +beginning of this header. However the pointer to the header is not +stored, but rather derived from the array pointer whenever it is +required. + +Arrays have a size and a capacity. The size is the number of elements +in use, and the capacity is the number of elements available before a +new memory allocation is required. When new memory is required, an +excess is reqested to allow the array to grow further before +performing another malloc. + +If the precise amount of memory is known, the capacity can be +controlled directly using the 'reserve' macro. + +Example: to handle an array of type mytype: + +\code + int i; + mytype x,y; + mytype *array; + + ccp4array_new(array); + + ccp4array_append_n(array, x, 3); + + for ( i = 0; i < 3; i++ ) y = array[i]; + + ccp4array_free(array); +\endcode +*/ + +#ifndef __CCP4_ARRAY_INC +#define __CCP4_ARRAY_INC + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +/* rcsidha[] = "$Id$" */ + +/*! constant pointer type */ +typedef const void *ccp4_constptr; +/*! byte pointer type */ +typedef char *ccp4_byteptr; +/*! pointer type */ +typedef void *ccp4_ptr; + +/*! struct definition for the array pre-header */ +typedef struct ccp4array_base_ { + int size, capacity; +} ccp4array_base; + +/*! Macro to allocate a new array. + The array is allocated with a size and capacity of 0 + \param v The array pointer + \return The new array pointer (redundent) +*/ +#define ccp4array_new(v) ccp4array_new_((ccp4_ptr*)(&v)) + +/*! Macro to allocate a new array with non-zero size. + The array is allocated with a size of s and capacity of at least s + \param v The array pointer + \param s The new size + \return The new array pointer (redundent) +*/ +#define ccp4array_new_size(v,s) ccp4array_new_size_((ccp4_ptr*)(&v),s,sizeof(*v)) + +/*! Macro to resize an array. + This changes the size. Memory allocation only takes place if the new + size is greater than the capacity. If that occurs, the new capacity + will be slightly greater than the requested size, to allow room for + expansion. + \param v The array pointer + \param s The new size +*/ +#define ccp4array_resize(v,s) ccp4array_resize_((ccp4_ptr*)(&v),s,sizeof(*v)) + +/*! Macro to reserve space for an array. + This forces a memory reallocation. The size of the array is + unchanged, unless the new capacity is less than the current size, in + which case the size is set to the new capacity. Unlike resize, the + new allocation will be exactly the size of the array. + \param v The array pointer + \param s The new capacity +*/ +#define ccp4array_reserve(v,s) ccp4array_reserve_((ccp4_ptr*)(&v),s,sizeof(*v)) + +/*! Macro to append an element to an array. + This increments the size. Memory allocation only takes place if the new + size is greater than the capacity. + \param v The array pointer + \param d The new element (may not be a literal) +*/ +#define ccp4array_append(v,d) ccp4array_append_((ccp4_ptr*)(&v),(ccp4_constptr)(&d),sizeof(*v)) + +/*! Macro to append n copies of an element to an array. + This increments the size by n. Memory allocation only takes place if the new + size is greater than the capacity. + \param v The array pointer + \param d The new element (may not be a literal) + \param n The number of copies to append +*/ +#define ccp4array_append_n(v,d,n) ccp4array_append_n_((ccp4_ptr*)(&v),(ccp4_constptr)(&d),n,sizeof(*v)) + +/*! Macro to append n elements from another list to an array. + This increment the size by n. Memory allocation only takes place if the new + size is greater than the capacity. + \param v The array pointer + \param l Pointer to the list + \param n The number of copies to append +*/ +#define ccp4array_append_list(v,l,n) ccp4array_append_list_((ccp4_ptr*)(&v),(ccp4_constptr)l,n,sizeof(*v)) + +/*! Macro to insert an element before the element[i] of an array. + This increments the size. All subsequent elements are moved up. As a + result this method is slow. + \param v The array pointer + \param d The new element (may not be a literal) + \param i The element before which the insertion is to be made. +*/ +#define ccp4array_insert(v,i,d) ccp4array_insert_((ccp4_ptr*)(&v),i,(ccp4_constptr)(&d),sizeof(*v)) + +/*! Macro to delete element[i] of an array, preserving order. + This decrements the size. All subsequent elements are moved down. As a + result this method is slow. + \param v The array pointer + \param i The element to be deleted +*/ +#define ccp4array_delete_ordered(v,i) ccp4array_delete_ordered_((ccp4_ptr*)(&v),i,sizeof(*v)) + +/*! Macro to delete element[i] of an array without preserving order. The + last element is moved into the gap, and the size is decremented. + \param v The array pointer + \param i The element to be deleted +*/ +#define ccp4array_delete(v,i) ccp4array_delete_((ccp4_ptr*)(&v),i,sizeof(*v)) + +/*! Macro to delete the last element of an array. + This decrements the size. + \param v The array pointer +*/ +#define ccp4array_delete_last(v) ccp4array_delete_last_((ccp4_ptr*)(&v),sizeof(*v)) + +/*! Macro to return the size of the array. + \param v The array pointer + \return The size (int) +*/ +#define ccp4array_size(v) ccp4array_size_((ccp4_constptr*)(&v)) + +/*! Macro free the array. + All memory, including the header, is freed. + \param v The array pointer +*/ +#define ccp4array_free(v) ccp4array_free_((ccp4_ptr*)(&v)) + +/** + * See macro ccp4array_new +*/ +ccp4_ptr ccp4array_new_(ccp4_ptr *p); +/** + * See macro ccp4array_new_size +*/ +ccp4_ptr ccp4array_new_size_(ccp4_ptr *p, const int size, const size_t reclen); +/** + * See macro ccp4array_resize +*/ +void ccp4array_resize_(ccp4_ptr *p, const int size, const size_t reclen); +/** + * See macro ccp4array_reserve +*/ +void ccp4array_reserve_(ccp4_ptr *p, const int size, const size_t reclen); +/** + * See macro ccp4array_append +*/ +void ccp4array_append_(ccp4_ptr *p, ccp4_constptr data, const size_t reclen); +/** + * See macro ccp4array_append_n +*/ +void ccp4array_append_n_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen); +/** + * See macro ccp4array_append_list +*/ +void ccp4array_append_list_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen); +/** + * See macro ccp4array_insert +*/ +void ccp4array_insert_(ccp4_ptr *p, const int i, ccp4_constptr data, const size_t reclen); +/** + * See macro ccp4array_delete_ordered +*/ +void ccp4array_delete_ordered_(ccp4_ptr *p, const int i, const size_t reclen); +/** + * See macro ccp4array_delete +*/ +void ccp4array_delete_(ccp4_ptr *p, const int i, const size_t reclen); +/** + * See macro ccp4array_delete_last +*/ +void ccp4array_delete_last_(ccp4_ptr *p, const size_t reclen); +/** + * See macro ccp4array_size +*/ +int ccp4array_size_(ccp4_constptr *p); +/** + * See macro ccp4array_free +*/ +void ccp4array_free_(ccp4_ptr *p); + +#ifdef __cplusplus +} +#endif + +#endif /* __CCP4_ARRAY_INC */ diff --git a/ccp4c/ccp4/ccp4_errno.h b/ccp4c/ccp4/ccp4_errno.h new file mode 100644 index 00000000..3e9bc659 --- /dev/null +++ b/ccp4c/ccp4/ccp4_errno.h @@ -0,0 +1,166 @@ +/* + ccp4_errno.h: Header file for error handling routines + Copyright (C) 2001 CCLRC, Charles Ballard and Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +/** @file ccp4_errno.h + * Header file for error handling routines + * base error codes on system errors. + */ + +#ifndef __CCP4_ERROR_GUARD +#define __CCP4_ERROR_GUARD + +#include +#include "ccp4_sysdep.h" + +/* rcsidhe[] = "$Id$" */ + +#ifndef CCP4_ERRSYSTEM +#define CCP4_ERRSYSTEM(x) (((x)&0xfff)<<24) +#endif +#ifndef CCP4_ERRLEVEL +#define CCP4_ERRLEVEL(x) (((x)&0xf)<<16) +#endif +#ifndef CCP4_ERRSETLEVEL +#define CCP4_ERRSETLEVEL(y,x) ((y) & (~CCP4_ERRLEVEL(0xf)) | CCP4_ERRLEVEL(x))) +#endif +#ifndef CCP4_ERRGETSYS +#define CCP4_ERRGETSYS(x) (((x)>>24)&0xfff) +#endif +#ifndef CCP4_ERRGETLEVEL +#define CCP4_ERRGETLEVEL(x) (((x)>>16)&0xf) +#endif +#ifndef CCP4_ERRGETCODE +#define CCP4_ERRGETCODE(x) ((x)&0xffff) +#endif + +#define CCP4_ERR_SYS CCP4_ERRSYSTEM(0x0) +#define CCP4_ERR_FILE CCP4_ERRSYSTEM(0x1) +#define CCP4_ERR_COORD CCP4_ERRSYSTEM(0x2) +#define CCP4_ERR_MTZ CCP4_ERRSYSTEM(0x3) +#define CCP4_ERR_MAP CCP4_ERRSYSTEM(0x4) +#define CCP4_ERR_UTILS CCP4_ERRSYSTEM(0x5) +#define CCP4_ERR_PARS CCP4_ERRSYSTEM(0x6) +#define CCP4_ERR_SYM CCP4_ERRSYSTEM(0x7) +#define CCP4_ERR_GEN CCP4_ERRSYSTEM(0x8) + +#define CCP4_COUNT(x) sizeof(x)/sizeof(x[0]) + +/** @global ccp4_errno: global variable that stores the error last error + * code from the ccp4 libraries + * | 12 bits - library | 4 bits - level | 16 bits - code | + * + * associated macros + * CCP4_ERR_SYS 0 OS error + * CCP4_ERR_FILE 1 io library + * CCP4_ERR_COORD 2 mmdb + * CCP4_ERR_MTZ 3 cmtz + * CCP4_ERR_MAP 4 map io + * CCP4_ERR_UTILS 5 utility routines + * CCP4_ERR_PARS 6 parser routines + * CCP4_ERR_SYM 7 csymlib + * + * and bit manipulation + * CCP4_ERRSYSTEM system mask for setting + * CCP4_ERRLEVEL error level mask + * CCP4_ERRSETLEVEL error level mask for setting error level + * CCP4_ERRGETSYS mask for returning system + * CCP4_ERRGETLEVEL mask for returning level + * CCP4_ERRGETCODE mask for returning the code + * + * error levels + * 0 Success + * 1 Informational + * 2 Warning + * 3 Error + * 4 Fatal + */ +#ifdef __cplusplus +extern "C" { +#endif +extern CCP4_DL_IMPORT(int) ccp4_errno; +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +namespace CCP4 { +extern "C" { +#endif + +/** Print out passed message and internal message based upon + * ccp4_errno + * "message : error message " + * @param message (const char *) + * @return void + */ +void ccp4_error( const char *); + +/** Obtain character string based upon error code. + * Typical use ccp4_strerror(ccp4_errno) + * The returned string is statically allocated in the + * library_err.c file and should not be freed. + * @param error code (int) + * @return const pointer to error message (const char *) + */ +const char *ccp4_strerror( int); + +/** Wrapper for ccp4_error which also calls exit(1) + * @param message (const char *) + * @return void + */ +void ccp4_fatal(const char *); + +/** Function to set verbosity level for messages from + * ccp4_signal. Currently just off (0) and on (1). + * It should be generalised to be able to switch + * individual components on and off, i.e. replace 1 by + * a mask. + * cf. ccp4VerbosityLevel which sets the verbosity level + * for ccp4printf These are separate as they may be used + * differently. + * @param iverb If >= 0 then set the verbosity level to the + * value of iverb. If < 0 (by convention -1) then report + * current level. + * @return current verbosity level + */ +int ccp4_liberr_verbosity(int iverb); + +/** Routine to set ccp4_errno and print out message for + * error tracing. This should be the only way in + * which ccp4_errno is set. + * See error codes above for levels and systems. + * A callback with prototype void function(void) + * may also be passed to the routine. + * Note: FATAL calls exit(1). + * If ccp4_liberr_verbosity returns 0, then ccp4_signal sets + * ccp4_errno and returns without doing anything else. + * @param error code (int) + * @param message (const char * const) + * @param callback (point to routine void (*)(void) ) + * @return void + */ +void ccp4_signal(const int, const char *const, void (*)()); + +int cfile_perror(const char *); + +#ifdef __cplusplus +} +} +#endif + +#endif /*!CCP4_ERROR_GUARD */ diff --git a/ccp4c/ccp4/ccp4_file_err.h b/ccp4c/ccp4/ccp4_file_err.h new file mode 100644 index 00000000..6f6ae483 --- /dev/null +++ b/ccp4c/ccp4/ccp4_file_err.h @@ -0,0 +1,38 @@ +/* + ccp4_file_err.h: header file with file handling error codes + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef _GUARD_FILE_ERR +#define _GUARD_FILE_ERR + +#define CCP4_ERRNO(y) (CCP4_ERR_FILE | (y)) +#define CIO_Ok 0 +#define CIO_BadMode 1 +#define CIO_CantOpenFile 2 +#define CIO_MaxFile 3 +#define CIO_ReadFail 4 +#define CIO_WriteFail 5 +#define CIO_CloseFail 6 +#define CIO_SeekFail 7 +#define CIO_NullPtr 8 +#define CIO_EOF 9 +#define CIO_NoFile 10 +#define CIO_NotOpen 11 +#define CIO_UnlinkFail 12 + +#endif + diff --git a/ccp4c/ccp4/ccp4_fortran.h b/ccp4c/ccp4/ccp4_fortran.h new file mode 100644 index 00000000..ea79b65c --- /dev/null +++ b/ccp4c/ccp4/ccp4_fortran.h @@ -0,0 +1,393 @@ +/* + ccp4_fortran.h: header file for Fortran APIs + Copyright (C) 2001 Eugene Krissinel + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_fortran.h + * header file for Fortran APIs + * Eugene Krissinel + */ + +#ifndef __CCP4_FORTRAN +#define __CCP4_FORTRAN + +#include "ccp4_types.h" +/* rcsidhh[] = "$Id$" */ + +/* stardent is now obsolete, but we retain this category in case it is useful later */ +#ifdef CALL_LIKE_STARDENT + /* SStrParam is used in Ardent-like machines' fortran calls */ + /* for passing a string parameter */ + DefineStructure(SStrPar) + struct SStrPar { + pstr S; + int len; + int id; + }; +#endif + +#define _LVTOB(l) ((long) ((l) == 0 ? 0 : 1)) +#define _BTOLV(l) ((int) ((l) == 0 ? 0 : 1)) +#if defined (__OSF1__) || defined (__osf__) +#undef _BTOLV +#define _BTOLV(l) ((int) ((l) == 0 ? 0 : -1)) +#endif + +/* + Macro FORTRAN_SUBR(NAME,name,p_send,p_sstruct,p_sflw) + makes function header statements that allow for linking with + programs written in FORTRAN. + + Parameters: + + NAME name of the FORTRAN subroutine in capital letters + name name of the FORTRAN subroutine in small letters + p_send parameter list (in brackets) with string lengths + attached to the end of it (see below) + p_sstruct parameter list (in brackets) with strings passed + as complex parameters, or structures + p_sflw parameter list (in brackets) with string lengths + following immediately the string parameters + (see below) + + All non-string parameters must be passed as pointers, in + the same order as they enter the FORTRAN call. Rules for + the string parameters are as follows. + + 1. All strings should be specified as of 'fpstr' type. + The 'fpstr' type is defined below and depends on the + platform: + + a) whenever length of string is passed as a separate + parameter ( CALL_LIKE_SUN, CALL_LIKE_HPUX, + CALL_LIKE_MVS ) 'fpstr' is identical to 'pstr'. + You may choose arbitrary name for the string, + but you MUST use the same name, appended with + suffix '_len', for its length (see example below). + + b) whenever string and its length are passed as + complex parameter, 'fpstr' is identical to the + pointer on the corresponding structure: + CALL_LIKE_STARDENT : + 'fpstr' is identical to 'PSStrPar' + CALL_LIKE_VMS : + 'fpstr' is identical to 'dsc$descriptor_s *' + + With 'fpstr' type, two important macro definition come: + + i) FTN_STR(s) - returns pointer to fortran-passed + string s. This pointer is always + of 'pstr' type + ii) FTN_LEN(s) - returns integer length of fortran- + passed string s. For this macro to + work properly with SUN- and MVS-like + machines, always use suffix '_len' + for the string length parameters as + described in a) above. + + 2. Three parameter lists, each enclosed in brackets, should + be given. These lists retain the general order of + parameters in the corresponding fortran call. Non-string + parameters are passed as pointers. String parameters + and their lengths are passed differently in different + lists: + + p_send strings enter their place in the list as in + the corresponding FORTRAN call, having 'fpstr' + parameter type. Their lengths are appended as + 'int' to the end of the list. They should + retain the order in which the strings appear + in the list. + + p_sstruct strings enter their place in the list as in + the corresponding FORTRAN call, having 'fpstr' + parameter type. + + p_sflw strings enter their place in the list as in + the corresponding FORTRAN call, having 'fpstr' + type and being immediately followed by their + lengths as 'int' parameters. + + + + Example: + + FORTRAN statement + + subroutine SomeSub ( k,s1,a,s2,m ) + integer k,m + real a + character*(*) s1,s2 + + is translated to + + FORTRAN_SUBR ( SOMESUB, somesub, + ( int * k, fpstr s1, float * a, fpstr s2, int * m, + int s1_len, int s2_len ), + ( int * k, fpstr s1, float * a, fpstr s2, int * m ), + ( int * k, fpstr s1, int s1_len, float * a, + fpstr s2, int s2_len, int * m ) ) + + + The macro should replace ordinary function header + statements to assure compatibility with FORTRAN links. + In header files, do not forget to add semicolumn: + + FORTRAN_SUBR ( .... ); + + while in source files use simply + + FORTRAN_SUBR ( .... ) { + + } + + + + Macro FORTRAN_CALL(NAME,name,p_send,p_sstruct,p_sflw) + calls function defined with macro FORTRAN_SUBR(...), from + a C/C++ application. Its parameters and their meaning are + exactly identical to those of FORTRAN_SUBR(...). + FORTRAN_CALL(...) should be followed by semicolon. */ + + +#if defined(CALL_LIKE_SUN) + + typedef pstr fpstr; +#if __GNUC__ > 7 || __clang_major__ > 10 + typedef size_t fpstr_size_t; +#else + typedef int fpstr_size_t; +#endif + +#define FTN_STR(s) s +#define FTN_LEN(s) s##_len + +#define char_struct(s) \ + pstr s; \ + int s##_len; +#define fill_char_struct(s,str) \ + s = str; \ + s##_len = strlen(str); +#define init_char_struct(s,str,size) \ + s = str; \ + s##_len = size; + +#define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ + void name##_ p_sun +#define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ + name##_ p_sun +#define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ + val name##_ p_sun +#elif defined(CALL_LIKE_HPUX) + + typedef pstr fpstr; + typedef int fpstr_size_t; + +# define FTN_STR(s) s +# define FTN_LEN(s) s##_len + +# define char_struct(s) \ + pstr s; \ + int s##_len; +# define fill_char_struct(s,str) \ + s = str; \ + s##_len = strlen(str); +# define init_char_struct(s,str,size) \ + s = str; \ + s##_len = size; + +# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ + void name p_sun +# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ + name p_sun +# define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ + val name p_sun +#elif defined(CALL_LIKE_STARDENT) + + typedef PStrPar fpstr; + typedef int fpstr_size_t; + +# define FTN_STR(s) s->Str_pointer +# define FTN_LEN(s) s->Str_length + +# define char_struct(s) \ + SStrPar s; +# define fill_char_struct(s,str) \ + s.S = str; \ + s.len = strlen(FName); \ + s.id = 0; +# define init_char_struct(s,str,size) \ + s.S = str; \ + s.len = size; \ + s.id = 0; + +# define FORTRAN_SUBR(NAME,name,p_send,p_sstruct,p_sflw) \ + void NAME p_stardent +# define FORTRAN_CALL(NAME,name,p_send,p_sstruct,p_sflw) \ + NAME p_stardent +# define FORTRAN_FUN(val,NAME,name,p_send,p_sstruct,p_sflw) \ + val NAME p_stardent + +#elif defined(CALL_LIKE_VMS) + + typedef dsc$descriptor_s * fpstr; + +# define FTN_STR(s) s->dsc$a_pointer; +# define FTN_LEN(s) s->dsc$w_length; + +# define char_struct(s) \ + dsc$descriptor_s s; +# define fill_char_struct(s,str) \ + s.dsc$a_pointer = str; \ + s.dsc$w_length = strlen(str); \ + s.dsc$b_dtype = DSC$K_DTYPE_T; \ + s.dsc$b_class = DSC$K_CLASS_S; +# define init_char_struct(s,str,size) \ + s.dsc$a_pointer = str; \ + s.dsc$w_length = size; \ + s.dsc$b_dtype = DSC$K_DTYPE_T; \ + s.dsc$b_class = DSC$K_CLASS_S; + +# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ + void NAME p_stardent +# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ + NAME p_stardent +# define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ + val NAME p_stardent + +#elif defined(CALL_LIKE_MVS) + +#if (CALL_LIKE_MVS == 2) + + typedef pstr fpstr; + typedef int fpstr_size_t; + +#define FTN_STR(s) s +#define FTN_LEN(s) s##_len + +#define char_struct(s) \ + pstr s; \ + int s##_len; +#define fill_char_struct(s,str) \ + s = str; \ + s##_len = strlen(str); +#define init_char_struct(s,str,size) \ + s = str; \ + s##_len = size; + +#define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ + void NAME p_sun +#define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ + NAME p_sun +#define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ + val NAME p_sun + +#else + + typedef pstr fpstr; + typedef int fpstr_size_t; + +# define FTN_STR(s) s +# define FTN_LEN(s) s##_len + +# define char_struct(s) \ + pstr s; \ + int s##_len; +# define fill_char_struct(s,str) \ + s = str; \ + s##_len = strlen(str); +# define init_char_struct(s,str,size) \ + s = str; \ + s##_len = size; + +# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ + void __stdcall NAME p_mvs +# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ + NAME p_mvs +# define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ + val __stdcall NAME p_mvs + +# endif + +#else + +# error Unknown machine!!! + + typedef pstr fpstr; + typedef int fpstr_size_t; + +# define FTN_STR(s) s +# define FTN_LEN(s) s##_len + +# define char_struct(s) \ + pstr s; \ + int s##_len; +# define fill_char_struct(s,str) \ + s = str; \ + s##_len = strlen(str); +# define init_char_struct(s,str,size) \ + s = str; \ + s##_len = size; + +/** Macro to define a function such that it is callable as + * a Fortran subroutine. + * @param NAME Subroutine name in upper case + * @param name Subroutine name in lower case + * @param p_sun Argument list in Sun style + * @param p_stardent Argument list in Stardent style + * @param p_mvs Argument list in MVS style +*/ +# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ + void name##_ p_sun + +/** Macro to call a Fortran subroutine from a C function. + * @param NAME Subroutine name in upper case + * @param name Subroutine name in lower case + * @param p_sun Argument list in Sun style + * @param p_stardent Argument list in Stardent style + * @param p_mvs Argument list in MVS style +*/ +# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ + name##_ p_sun + +/** Macro to define a function such that it is callable as + * a Fortran function. + * @param val Data type of return value. + * @param NAME Function name in upper case + * @param name Function name in lower case + * @param p_sun Argument list in Sun style + * @param p_stardent Argument list in Stardent style + * @param p_mvs Argument list in MVS style +*/ +# define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ + val name##_ p_sun + +#endif + +/* Define Fortran logical */ +typedef unsigned int ftn_logical; +#define FORTRAN_LOGICAL_TRUE 1 +#define FORTRAN_LOGICAL_FALSE 0 +#if defined (__OSF1__) || defined (__osf__) +# undef FORTRAN_LOGICAL_TRUE +# define FORTRAN_LOGICAL_TRUE -1 +#endif + +char *ccp4_FtoCString(fpstr str1, int str1_len); +void ccp4_CtoFString(fpstr str1, int str1_len, const char *cstring); + +#endif /* __CCP4_FORTRAN */ diff --git a/ccp4c/ccp4/ccp4_general.c b/ccp4c/ccp4/ccp4_general.c new file mode 100644 index 00000000..4c0d38fa --- /dev/null +++ b/ccp4c/ccp4/ccp4_general.c @@ -0,0 +1,1436 @@ +/* + ccp4_general.c: General library functions and utilities. + Copyright (C) 2001 CCLRC, Peter Briggs et al + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_general.c + * General library functions and utilities. + * Peter Briggs et al + */ + +/* ccp4_general.c + Peter Briggs CCP4 May 2001/Feb 2003 + + General library functions and utilities + + ccperror(level,message) + Error reporting and program termination + + ccp4printf(level,format,printargs) + A wrapper for vprintf - acts like printf with an additional + argument which is checked against the reference verbosity + level. + + ccp4fyp(argc,argv) + Initialise environment for CCP4 programs and parse the + command line arguments + + ccp4setenv(logical_name,value,envname,envtype,envext,ienv, + no_overwrt) + Set up file names and associate with logical_name in + environment + + ccpexists(filename) + Check if file exists and can be opened for reading + + ccpputenv(logical_name,file_name) + Set environment variable logical_name to have value file_name +*/ + +/*------------------------------------------------------------------*/ + +/* CCP4 library clones */ + +#include +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include /* PACKAGE_ROOT */ +#endif +/* Library header files */ +#include "ccp4_fortran.h" +#include "ccp4_utils.h" +#include "ccp4_parser.h" +#include "ccp4_general.h" +#include "ccp4_program.h" +#include "cmtzlib.h" +#include "csymlib.h" +#include "ccp4_errno.h" +/* rcsid[] = "$Id$" */ + +/*------------------------------------------------------------------*/ + +/* ccperror + + Error reporting and program termination + + ccperror is called with a message level ierr and a message string + The exact behaviour is determined by the value of ierr: + + 0 : normal termination and stop + 1 : fatal error and stop + 2 : report severe warning + 3 : report information + 4 : report from library + + ierr=-1 also reports last system error and terminates. + + The text in message is sent to standard output, and to standard + error for ierr=1 (or -1). + +*/ +int ccperror(int ierr, const char *message) +{ + /* Execute user-defined function callback */ + ccp4InvokeCallback(ierr,message); + /* Do messaging */ + ccperror_noexit(ierr, message); + /* Exit if necessary */ + if (ierr==0) { + exit(0); + } else if (ierr==1 || ierr==-1) { + exit(1); + } + return 0; +} + +/* ccperror_noexit + + As above, but doesn't call exit() + +*/ + +int ccperror_noexit(int ierr, const char *message) +{ + char *prog_name=NULL; + + /* Get the program name */ + prog_name = ccp4ProgramName(NULL); + if (!prog_name) prog_name = strdup("CCP4"); + + if (ierr==0) { + /* Level 0 : normal termination */ + ccp4printf(0," %s: %s\n",prog_name,message); + /* Get the amount of time elapsed since start of + program. Initialised by ccp4fyp */ + ccp4ProgramTime(0); + + /* closing tags - these are simplified w.r.t. Fortranic + versions for this special case */ + if (html_log_output(-1)) { + printf("\n"); + printf("\n"); + } + if (summary_output(-1)) { + if (html_log_output(-1)) { + printf("\n"); + } else { + printf("\n"); + } + } + + } else if (ierr==1 || ierr==-1) { + /* Level 1 (-1) : fatal error */ + /* If ierr=-1 then print last system error + N.B. Use of perror in this context is untested by me */ + if (ierr < 0) perror("Last system error message"); + /* Send the message to the standard error */ + fprintf(stderr," %s: %s\n",prog_name,message); + /* Also to the standard out */ + ccp4printf(0," %s: %s\n",prog_name,message); + /* Get the amount of time elapsed since start of + program. Initialised by ccp4fyp */ + ccp4ProgramTime(0); + + /* closing tags - these are simplified w.r.t. Fortranic + versions for this special case */ + if (html_log_output(-1)) { + printf("\n"); + printf("\n"); + } + if (summary_output(-1)) { + if (html_log_output(-1)) { + printf("\n"); + } else { + printf("\n"); + } + } + + } else if (ierr==2) { + /* Level 2 : severe warning */ + ccp4printf(0," \n $TEXT:Warning: $$ comment $$ \n WARNING: %s\n $$\n", + message); + + } else if (ierr>2) { + /* Levels higher than 2 : report information */ + ccp4printf(0,"%s\n",message); + } + return 0; +} + +/*------------------------------------------------------------------*/ + +/* ccp4printf + + This is a wrapper for vprintf + + If the supplied message is less than or equal to the reference + verbosity level then the format string and remaining arguments + are passed to vprintf to be printed on stdout. + Otherwise nothing is printed. + + The format string has the same format as the format strings + passed to printf, with the remaining arguments being the values + (if any) to be inserted into placeholders in the format string. + + Returns the number of bytes printed, or zero if no printing was + performed, or a negative number for an error from vprintf. +*/ +int ccp4printf(int level, char *format, ...) +{ + int nbytes=0; + va_list args; + + /* Check the level against the refence verbosity level */ + if (level <= ccp4VerbosityLevel(-1)) { + /* Use the vprint function to print */ + va_start(args,format); + nbytes = vprintf(format,args); + va_end(args); + } + /* Return to calling function */ + return nbytes; +} + +/*------------------------------------------------------------------*/ + +/* return parent of directory that contains arg, e.g. + * /foo/bin/prog -> /foo (actually /foo/bin/..) + * C:\CCP4\bin\prog.exe -> C:\CCP4 (actually C:\CCP4\bin\..) + * foo/prog -> . (actually foo/..) + * prog -> .. + * ../prog -> ../.. + */ +static const char* get_parent_directory(const char* arg) +{ + const char *last_sep = strrchr(arg, PATH_SEPARATOR); + const char *basename = last_sep != NULL ? last_sep + 1 : arg; + int dir_len = basename - arg; + char* parent_dir = (char*) ccp4_utils_malloc(dir_len + 3); + strncpy(parent_dir, arg, dir_len); + strcpy(parent_dir+dir_len, ".."); + return parent_dir; +} + +/*------------------------------------------------------------------*/ + +/* ccp4fyp + + Initialise environment for CCP4 programs and parse the + command line arguments + + Background: + This function processes the command line arguments supplied via + the argv array, and performs initialisations of the CCP4 + environment within the program based on these arguments. + + CCP4 programs which use ccp4fyp should be called with the following + syntax: + + [switches] ... + + The command switches all start with a hyphen (-) and immediately + follow the program name. The remainer of the arguments are logical + name-value pairs. + + On successful completion ccp4fyp returns 0 (zero). + On encountering an error, ccp4fyp registers the error condition via + ccp4_signal and returns a non-zero value. +*/ +int ccp4fyp(int argc, char **argv) +{ + /* Diagnostics/debug output */ + int diag=0; + + int i,iarg=1,arg_end=0,ienv=0; + char *envname[CCP4_MAXNAMES],*envtype[CCP4_MAXNAMES],*envext[CCP4_MAXNAMES]; + + /* Flags for processing command line switches */ + int info=0,ihelp=1,idefault=0,ienviron=0,nohtml=0,nosummary=0; + char *testarg=NULL; + + /* Filenames, directories etc */ +#ifdef PACKAGE_ROOT + const char *pkgroot=PACKAGE_ROOT; +#else + const char *pkgroot=get_parent_directory(argv[0]); +#endif + char *basename=NULL,*cinclude=NULL,*home=NULL; + char *dir=NULL,*std_dir=NULL,*tmpstr=NULL; + + /* Decoding environ/defaults files */ + char line[CCP4_MAXLINE]; + char *logical_name=NULL,*file_name=NULL,*file_type=NULL,*file_ext=NULL; + CCP4PARSERARRAY *parser=NULL; + + /* Environ.def file */ + int env_init=1; + char *env_file=NULL; + char *env_logical_name=NULL,*env_file_type=NULL,*env_file_ext=NULL; + FILE *envfp; + + /* Default.def file */ + int def_init=1; + char *def_file=NULL; + char *def_logical_name=NULL,*def_file_name=NULL; + FILE *deffp; + + /* Used for error messages from ccp4setenv */ + int ierr; + + /* Begin */ + if (diag) printf("CCP4FYP: starting\n"); + + if (diag) + for (i = 0; i < argc; ++i) + printf("ccp4fyp: comand line argument %d %s\n",i,argv[i]); + + /* ------------------------------------------------------ */ + /* Initialise program name and timing information */ + /* ------------------------------------------------------ */ + ccp4ProgramTime(1); + + /*ccp4ProgramName(ccp4_utils_basename(argv[0])); */ + basename = ccp4_utils_basename(argv[0]); + ccp4ProgramName(basename); + free(basename); + basename = NULL; + + /* ------------------------------------------------------ */ + /* Process command line option switches */ + /* ------------------------------------------------------ */ + /* Nb ignore the first argument (iarg=0), + because this is just the executable name */ + while (iarg < argc && !arg_end) { + if (diag) printf("CCP4FYP: command line argument %d = \"%s\"\n",iarg,argv[iarg]); + + if (argv[iarg][0] == '-') { + /* An argument of the form -option */ + if (diag) printf("--> This is an option switch\n"); + + /* Remove the leading hyphen */ + testarg = (char *) ccp4_utils_realloc(testarg,(strlen(argv[iarg])+1)*sizeof(char)); + strtoupper(testarg,&(argv[iarg][1])); + if (diag) printf("--> Truncated and uppercased it is now \"%s\"\n",testarg); + + /* Test for each possible option: + -v(erbose) 0-9 verbose output level + -h(elp) 0-9 (alias for -v) + -n don't read environ.def and default.def + -d use instead of default.def + -e use instead of environ.def + -i print CCP4 library version, program name and + program version to standard output, and exit. + -nohtml suppress printing of html tags + -nosummary suppress printing of summary tags + */ + if (testarg[0] == 'V' || testarg[0] == 'H') { + /* -v|h <0-9>: Verbose option */ + if (diag) printf("--> Identified -v option:"); + /* Set ihelp to point to the argument which should + hold the verbosity level, and process later */ + ihelp = ++iarg; + + } else if (testarg[0] == 'N') { + /* -n, -nohtml, -nosummary */ + if (strlen(testarg) == 1) { + /* -n: Don't read environ.def and default.def */ + if (diag) printf("--> Identified -n option\n"); + def_init = 0; + env_init = 0; + } else if (strncmp("NOHTML",testarg,3)==0) { + /* -nohtml: Don't write html tags into logfile */ + nohtml = -1; + } else if (strncmp("NOSUMMARY",testarg,3)==0) { + /* -nosummary: Don't write summary tags into logfile */ + nosummary = -1; + } + } else if (testarg[0] == 'D') { + /* -d : Use non-default default.def file */ + if (diag) printf("--> Identified -d option:"); + /* Set idefault to point to the argument which should + hold the default.def file, and process later */ + idefault = ++iarg; + } else if (testarg[0] == 'E') { + /* -e : Use non-default environ.def file */ + if (diag) printf("--> Identified -e option:"); + /* Set ienviron to point to the argument which should + hold the environ.def file, and process later */ + ienviron = ++iarg; + } else if (testarg[0] == 'I') { + /* -i(nfo): Info option */ + if (diag) printf("--> Identified -i(nfo) option\n"); + info = 1; + + /* Unrecognised switch */ + } else { + ccp4printf(1,"Ignoring unrecognised switch \"%s\"\n",argv[iarg]); + } + + /* Next argument */ + iarg++; + + } else { + /* Found an argument which doesn't start with a "-" + This is the end of the command line switches */ + if (diag) printf("CCP4FYP: end of command line switches\n"); + arg_end = 1; + } + } + /* Release the memory associated with the temporary argument pointer */ + if (testarg) { + free(testarg); + testarg = NULL; + } + + /* ------------------------------------------------------ */ + /* Finished processing command line options */ + /* ------------------------------------------------------ */ + + /* At this point we may need to perform some actions based + on the switches supplied by the user */ + + /* Program information requested by -i(nfo) option */ + if (info) { + /* Print program information and stop */ + ccp4_prog_info(); + exit(0); + } + + /* Initialise debug (verbosity) level + Level 0 switches off all output (silent mode) + Level 9 prints everything + Level 1 is normal I guess + It is not clear from documentation precisely what is/is not + output for the levels between 0 and 9 */ + if (ihelp > 0) { + /* Extract the level from the argument list - ihelp + points to which argument should hold it */ + if (ihelp < argc) { + if (strlen(argv[ihelp]) == 1 && isdigit(argv[ihelp][0])) { + ihelp = atoi(argv[ihelp]); + } else { + ihelp = 1; + } + if (diag) printf("Verbose level %d\n",ihelp); + } else { + ihelp = 1; + if (diag) puts("No verbose level - defaulting to 1."); + } + } + ccp4VerbosityLevel(ihelp); + + /* ------------------------------------------------------ */ + /* Initialise HTML and SUMMARY tags */ + /* ------------------------------------------------------ */ + + /* Initialise html, summary tags by setting environment variables + for Fortran html library to pick up. No direct call, as + C programs may not link to Fortran library. */ + if (nohtml) ccpputenv("CCP_SUPPRESS_HTML","1"); + if (nosummary) ccpputenv("CCP_SUPPRESS_SUMMARY","1"); + + /* ------------------------------------------------------ */ + /* Get useful directories (CINCL and HOME) */ + /* ------------------------------------------------------ */ + + /* Get value of CINCL variable - + Note that (1) getenv returns a null pointer if no name is + found, (2) we should not free the resulting address */ + cinclude = (char *) getenv("CINCL"); + if (!cinclude) { + if (diag) printf("--> CINCL env var has no value assigned\n"); + } else { + if (diag) printf("--> CINCL is \"%s\"\n",cinclude); + } + + /* Get value of HOME variable (same notes apply as for CINCL) */ + home = (char *) getenv("HOME"); + if (!home) { + if (diag) printf("--> HOME env var has no value assigned\n"); + } else { + if (diag) printf("--> HOME is \"%s\"\n",home); + } + + /* ------------------------------------------------------ */ + /* Environ.def file */ + /* ------------------------------------------------------ */ + + /* ------------------------------------------------------ */ + /* Use non-standard environ.def file */ + /* ------------------------------------------------------ */ + /* The search logic is: + 1. If a directory is specified as part of the filename, then + use the filename as is, otherwise + 2. if the HOME variable is defined, then use $HOME/filename, + otherwise + 3. use the filename as is (in current directory). + */ + if (ienviron > 0) { + /* Non-standard environ.def was specified */ + if (ienviron < argc) { + if (env_file) free(env_file); + env_file = (char *) ccp4_utils_malloc(sizeof(char)*(strlen(argv[ienviron])+1)); + if (!env_file) { + /* Couldn't allocate memory to store filename + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_AllocFail),"ccp4fyp",NULL); + return 1; + } + strcpy(env_file,argv[ienviron]); + if (diag) printf("CCP4FYP: env file is \"%s\"\n",env_file); + env_init = 1; + /* Check whether this includes the path */ + if (dir) free(dir); + dir = ccp4_utils_pathname(env_file); + if (dir && dir[0] == '\0') { + /* No path name - try and use $HOME/file_name */ + if (diag) puts("CCP4FYP: env file has no path."); + if (home) { + tmpstr = ccp4_utils_joinfilenames(home,env_file); + if (diag) printf("CCP4FYP: HOME exists, joined filename \"%s\"\n",tmpstr); + if (tmpstr) { + if (env_file) free(env_file); + env_file = tmpstr; + } else { + /* Failed to make complete filename + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_EnvPathFail),"ccp4fyp",NULL); + return 1; + } + } + } + if (diag) printf(" environ.def file is \"%s\"\n",env_file); + } else { + /* Not enough arguments in the arg list + Do clean up and exit */ + if (diag) printf(" no filename found\n"); + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_EOptionUseError),"ccp4fyp",NULL); + return 1; + } + } + + /* ------------------------------------------------------ */ + /* Use standard environ.def file */ + /* ------------------------------------------------------ */ + /* The search logic is: + 1. If the CINCL variable is defined, then use $CINCL/filename, + otherwise + 2. if the HOME variable is defined, then use $HOME/filename, + otherwise + 3. use the filename as is (in current directory). + */ + if (!env_file) { + /* Use the standard environ.def file in CINCL */ + if (diag) printf("--> use standard environ.def file\n"); + std_dir = NULL; + if (cinclude) { + std_dir = cinclude; + } else if (home) { + std_dir = home; + } + /* Set the full path for the environ.def file */ + if (env_file) free(env_file); + if (std_dir) { + if (diag) printf("--> leading directory is \"%s\"\n",std_dir); + env_file = ccp4_utils_joinfilenames(std_dir,"environ.def"); + } else { + env_file = ccp4_utils_joinfilenames(".","environ.def"); + } + if (!env_file) { + /* Failed to make full path name for environ.def + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_EnvPathFail),"ccp4fyp",NULL); + return 1; + } + if (diag) printf("--> Full path for environ.def is \"%s\"\n",env_file); + } + + /* ------------------------------------------------------ */ + /* Read in environ.def */ + /* ------------------------------------------------------ */ + /* environ.def contains lines of the form + LOGICALNAME=type.ext # comments + where type is "in", "out" or "inout" + and ext is the default extension, e.g. "mtz" or "scr" + */ + if (env_init && env_file) { + if (diag) printf("CCP4FYP: reading environ.def file\n"); + if (diag) printf("--> Full path for environ.def is \"%s\"\n",env_file); + /* Open the environ.def file as read-only*/ + ccp4printf(2,"Opening file \"%s\"\n",env_file); + envfp = fopen(env_file,"r"); + /* did not find the environ.def file in std_dir + so try "PACKAGE_ROOT" */ + if (!envfp) { + free(env_file); + env_file = ccp4_utils_joinfilenames(ccp4_utils_joinfilenames( + ccp4_utils_joinfilenames(pkgroot,"share"),"ccp4"),"environ.def"); + if (diag) printf("CCP4FYP: reading environ.def file\n"); + if (diag) printf("--> Full path for environ.def is \"%s\"\n",env_file); + /* Open the environ.def file as read-only*/ + ccp4printf(2,"Opening file \"%s\"\n",env_file); + + envfp = fopen(env_file,"r"); + } + /* multiple failures */ + if (!envfp) { + /* Failed to open the file + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantOpenEnvFile),"ccp4fyp",NULL); + return 1; + } else { + /* Set up a ccp4_parser array to deal with the contents of + environ.def */ + parser = (CCP4PARSERARRAY *) ccp4_parse_start(CCP4_MAXTOKS); + /* Set the delimiters to whitespace, = and . + This should split lines into the three components */ + ccp4_parse_delimiters(parser," \t=.",NULL); + + /* Read from the file until EOF*/ + while (fgets(line,CCP4_MAXLINE,envfp)) { + /* Remove the trailing newline from fgets */ + line[strlen(line)-1] = '\0'; + /* Use ccp4_parse to get the tokens on each line */ + ccp4_parse_reset(parser); + if (ccp4_parse(line,parser) == 3) { + env_logical_name = parser->token[0].fullstring; + env_file_type = parser->token[1].fullstring; + env_file_ext = parser->token[2].fullstring; + /* Check that we have values for all three components */ + if (!env_logical_name || !env_file_type || !env_file_ext) { + /* Error parsing the line + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + if (envfp) fclose(envfp); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_ParseEnvFail),"ccp4fyp",NULL); + return -1; + } else { + /* Store in arrays for use when decoding default.def + and logical names on command line */ + if (ienv+1 == CCP4_MAXNAMES) { + /* Exceeded the allowed number of logical names + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + if (envfp) fclose(envfp); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_MaxNamesExceeded),"ccp4fyp",NULL); + return 1; + } else { + /* Store logical name in envname */ + envname[ienv] = (char *) + ccp4_utils_malloc(sizeof(char)*(strlen(env_logical_name)+1)); + strcpy(envname[ienv],env_logical_name); + /* Store file type in envtype */ + envtype[ienv] = (char *) + ccp4_utils_malloc(sizeof(char)*(strlen(env_file_type)+1)); + strcpy(envtype[ienv],env_file_type); + /* File extension in envext */ + envext[ienv] = (char *) + ccp4_utils_malloc(sizeof(char)*(strlen(env_file_ext)+1)); + strcpy(envext[ienv],env_file_ext); + + if (diag) printf("Decoded line: %s = %s.%s\n",envname[ienv], + envtype[ienv],envext[ienv]); + + /* Increment ienv counter for number of name-pairs + read in */ + ienv++; + } + } + /* Reset number of tokens before reading next line */ + ccp4_parse_reset(parser); + } + /* End of loop over lines in file */ + } + /* Close the environ.def file and free memory storing + the filename*/ + fclose(envfp); + if (env_file) { + free(env_file); + env_file = NULL; + } + + /* Finished with the parser array */ + ccp4_parse_end(parser); + parser = NULL; + } + } + + /* ------------------------------------------------------ */ + /* Default.def file */ + /* ------------------------------------------------------ */ + + /* ------------------------------------------------------ */ + /* Non-standard default.def file */ + /* ------------------------------------------------------ */ + /* The search logic is: + 1. If a directory is specified as part of the filename, then + use the filename as is, otherwise + 2. if the HOME variable is defined, then use $HOME/filename, + otherwise + 3. use the filename as is (in current directory). + */ + if (idefault > 0) { + /* Extract the filename from the argument list - idefault + points to which argument should hold it */ + if (idefault < argc) { + if (def_file) free(def_file); + def_file = (char *) ccp4_utils_malloc(sizeof(char)*(strlen(argv[idefault])+1)); + if (!def_file) { + /* Couldn't allocate memory to store filename + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_AllocFail),"ccp4fyp",NULL); + return 1; + } + strcpy(def_file,argv[idefault]); + def_init = 1; + if (diag) printf("CCP4FYP: def file is \"%s\"\n",def_file); + /* Check whether this includes the path */ + if (dir) free(dir); + dir = ccp4_utils_pathname(def_file); + if (dir && dir[0] == '\0') { + /* No path name - try and use $HOME/file_name */ + if (diag) puts("CCP4FYP: def file has no path."); + if (home) { + tmpstr = ccp4_utils_joinfilenames(home,def_file); + if (diag) printf("CCP4FYP: HOME exists, joined filename \"%s\"\n",tmpstr); + if (tmpstr) { + if (def_file) free(def_file); + def_file = tmpstr; + } else { + /* Failed to make complete filename + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_DefPathFail),"ccp4fyp",NULL); + return 1; + } + } + } + if (diag) printf(" default.def file is \"%s\"\n",def_file); + } else { + /* Not enough arguments in the arg list + Do clean up and exit */ + if (diag) printf(" no filename found\n"); + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_DOptionUseError),"ccp4fyp",NULL); + return 1; + } + } + + /* ------------------------------------------------------ */ + /* Standard default.def file */ + /* ------------------------------------------------------ */ + /* The search logic is: + 1. If the CINCL variable is defined, then use $CINCL/filename, + otherwise + 2. if the HOME variable is defined, then use $HOME/filename, + otherwise + 3. use the filename as is (in current directory). + */ + if (!def_file) { + /* Use the standard default.def */ + if (diag) printf("--> use standard default.def file\n"); + std_dir = NULL; + if (cinclude) { + std_dir = cinclude; + } else if (home) { + std_dir = home; + } + /* Set the full path for the default.def file */ + if (def_file) free(def_file); + if (std_dir) { + if (diag) printf("--> leading directory is \"%s\"\n",std_dir); + def_file = ccp4_utils_joinfilenames(std_dir,"default.def"); + } else { + def_file = ccp4_utils_joinfilenames(".","default.def"); + } + if (!def_file) { + /* Unable to set the filename + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_DefPathFail),"ccp4fyp",NULL); + return 1; + } + if (diag) printf("--> Full path for default.def is \"%s\"\n",def_file); + } + + /* ------------------------------------------------------ */ + /* Read in default.def */ + /* ------------------------------------------------------ */ + /* default.def contains lines of the form + LOGICALNAME=FILENAME # comments + */ + if (def_init && def_file) { + if (diag) printf("CCP4FYP: reading default.def file\n"); + if (diag) printf("--> Full path for default.def is \"%s\"\n",def_file); + /* Open the default.def file as read-only*/ + ccp4printf(2,"Opening file \"%s\"\n",def_file); + deffp = fopen(def_file,"r"); + /* did not find the default.def file in std_dir + so try "PACKAGE_ROOT" */ + if (!deffp) { + free(def_file); + def_file = ccp4_utils_joinfilenames(ccp4_utils_joinfilenames( + ccp4_utils_joinfilenames(pkgroot,"share"),"ccp4"),"default.def"); + if (diag) printf("CCP4FYP: reading default.def file\n"); + if (diag) printf("--> Full path for default.def is \"%s\"\n",def_file); + /* Open the default.def file as read-only*/ + ccp4printf(2,"Opening file \"%s\"\n",def_file); + + deffp = fopen(def_file,"r"); + } + /* multiple failures */ + if (!deffp) { + /* Failed to open the file + Do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantOpenDefFile),"ccp4fyp",NULL); + return 1; + } + /* Set a ccp4_parser array to deal with the contents of default.def */ + parser = (CCP4PARSERARRAY *) ccp4_parse_start(CCP4_MAXTOKS); + /* Set the delimiters to whitespace and = + This should split lines into the two components */ + ccp4_parse_delimiters(parser," \t=",NULL); + + /* Read from the file until EOF*/ + while (fgets(line,CCP4_MAXLINE,deffp)) { + + /* Remove the trailing newline from fgets */ + line[strlen(line)-1] = '\0'; + + /* Use ccp4_parse to get the tokens on each line */ + ccp4_parse_reset(parser); + if (ccp4_parse(line,parser) == 2) { + def_logical_name = parser->token[0].fullstring; + def_file_name = parser->token[1].fullstring; + if (!def_logical_name || !def_file_name) { + /* Failed to parse the line - + do clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + if (deffp) fclose(deffp); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_ParseDefFail),"ccp4fyp",NULL); + return -1; + } + if (diag) printf("Decoded line: %s = %s\n",def_logical_name,def_file_name); + + /* Set up the environment for this pair + Don't overwrite any existing logical name */ + ierr = ccp4setenv(def_logical_name,def_file_name, + envname,envtype,envext,&ienv,1); + if (ierr) { + /* An error from ccp4setenv + Clean up and exit */ + if (deffp) fclose(deffp); + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + return ierr; + } + /* Reset number of tokens before reading next line */ + ccp4_parse_reset(parser); + } + } + /* Close the default.def file */ + fclose(deffp); + if (def_file) { + free(def_file); + def_file = NULL; + } + + /* Finished with the parser array */ + ccp4_parse_end(parser); + parser = NULL; + } + + /* ------------------------------------------------------ */ + /* Process remaining command line arguments */ + /* ------------------------------------------------------ */ + + /* Read in the rest of the command line arguments + These should consist of pairs of arguments i.e. + + */ + + ccp4printf(2,"Processing Command Line Arguments\n"); + while (iarg < argc) { + /* Get logical name and uppercase it */ + if (logical_name) free(logical_name); + logical_name = (char *) ccp4_utils_malloc((strlen(argv[iarg])+1)*sizeof(char)); + if (diag) printf("--> Raw logical name: \"%s\"\n",argv[iarg]); + strtoupper(logical_name,argv[iarg]); + logical_name[strlen(argv[iarg])] = '\0'; + if (diag) printf("--> Logical name: \"%s\"",logical_name); + iarg++; + /* Get associated filename */ + if (iarg < argc) { + if (file_name) free(file_name); + file_name = (char *) ccp4_utils_malloc((strlen(argv[iarg])+1)*sizeof(char)); + strcpy(file_name,argv[iarg]); + if (diag) printf(" file name: \"%s\"\n",file_name); + /* Set up the environment for this pair + Do overwrite any existing logical name */ + ierr = ccp4setenv(logical_name,file_name,envname,envtype,envext,&ienv,0); + if (diag) printf("CCP4FYP: returned from ccp4setenv, ierr = %d\n",ierr); + if (ierr) { + /* An error from ccp4setenv + Clean up and exit */ + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + return ierr; + } + iarg++; + } else { + /* No associated filename + Do clean up and exit with error */ + if (diag) printf(" no associated file name\n"); + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_LogicalNameUseError),"ccp4fyp",NULL); + return 1; + } + /* Next pair of arguments */ + } + ccp4printf(2,"End of pre-processing stage\n"); + + /* ------------------------------------------------------ */ + /* Finished processing - do local clean up */ + /* ------------------------------------------------------ */ + + ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, + file_type,file_ext,env_file,def_file,dir,parser); + if (diag) printf("CCP4FYP: ending\n"); + return 0; +} + +/*------------------------------------------------------------------*/ + +/* ccp4fyp_cleanup + + Internal function. + Called on exit from ccp4fyp - free memory associated with + pointers used inside ccp4fyp. +*/ +int ccp4fyp_cleanup(int ienv, char **envname, char **envtype, char **envext, + char *logical_name, char *file_name, char *file_type, + char *file_ext, char *env_file, char *def_file, + char *dir, CCP4PARSERARRAY *parser) +{ + int i; + /* Parser */ + if (parser) ccp4_parse_end(parser); + /* Free single valued pointers, if set */ + if (file_type) free(file_type); + if (file_ext) free(file_ext); + if (env_file) free(env_file); + if (def_file) free(def_file); + if (logical_name) free(logical_name); + if (file_name) free(file_name); + if (dir) free(dir); + /* Free arrays of pointers */ + if (ienv > 0) { + for (i=0; i/_. + */ + /* Fetch CCP4_SCR */ + cscr = (char *) getenv("CCP4_SCR"); + if (cscr) { + if (diag) printf("CCP4SETENV: CCP4_SCR = \"%s\"\n",cscr); + /* Store in file_path */ + lpath = strlen(cscr); + if (file_path) free(file_path); + file_path = (char *) ccp4_utils_malloc(sizeof(char)*(lpath+1)); + strncpy(file_path,cscr,(lpath+1)); + if (diag) printf("CCP4SETENV: set file path to CCP4_SCR = \"%s\"\n",file_path); + } else { + /* Couldn't get CCP4_SCR + Clean up, set message and return an error */ + ccp4setenv_cleanup(file_ext,file_root,file_path,file_name); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantGetCcp4Scr),"ccp4setenv",NULL); + return 1; + } + /* Replace with _ */ + lprognam = strlen(ccp4ProgramName(NULL)); + tmpstr1 = ccp4_utils_malloc(sizeof(char)*(lprognam + lroot + 2)); + strncpy(tmpstr1,ccp4ProgramName(NULL),lprognam); + tmpstr1[lprognam] = '\0'; + strncat(tmpstr1,"_",1); + strncat(tmpstr1,file_root,lroot); + if (file_root) free(file_root); + file_root = tmpstr1; + lroot = strlen(file_root); + if (diag) printf("CCP4SETENV: updated file_root = \"%s\"\n",file_root); + /* Replace scr extension with the process id + In fact to guarantee that it is always 5 characters, + take the id number modulo 100,000 */ + procid = (int) getpid(); + if (diag) printf("CCP4SETENV: initial procid = %d\n",procid); + procid = procid % CCP4_MODULO; + if (diag) printf("CCP4SETENV: procid = %d",procid); + if (file_ext) free(file_ext); + file_ext = (char*) ccp4_utils_malloc(sizeof(char)*6); + sprintf(file_ext,"%05d",procid); + lext = 5; + if (diag) printf(" giving file extension \"%s\"\n",file_ext); + } + /* No special path for this particular extension */ + } + } else { + if (diag) printf("CCP4SETENV: detected dev-null\n"); + } + + /* Build the filename */ + lname = lpath + 1; + file_name = (char *) ccp4_utils_realloc(file_name,sizeof(char)*(lname + 1)); + if (lpath < 0) { + file_name[0] = '\0'; + } else if (lpath == 0) { + file_name[0] = PATH_SEPARATOR; + file_name[1] = '\0'; + } else { + strncpy(file_name,file_path,lname); + file_name[lpath] = PATH_SEPARATOR; + file_name[lpath+1] = '\0'; + } + if (diag) printf("CCP4SETENV: building filename = \"%s\"\n",file_name); + lname = lname + lroot; + file_name = (char *) ccp4_utils_realloc(file_name,sizeof(char)*(lname + 1)); + if (lroot) { + strcat(file_name,file_root); + } + if (diag) printf("CCP4SETENV: building filename = \"%s\"\n",file_name); + if (lext > 0) { + lname = lname + lext + 1; + file_name = (char *) ccp4_utils_realloc(file_name,sizeof(char)*(lname + 1)); + strcat(file_name,"."); + if (lext) { + strcat(file_name,file_ext); + } + file_name[lname] = '\0'; + } + if (diag) printf("CCP4SETENV: building filename = \"%s\"\n",file_name); + + /* Test that (non-default) input files exist */ + if (icount < *ienv) { + if (strmatch(envtype[icount],"in") && !no_overwrt) { + /* Does the file exist? */ + if (diag) printf("CCP4SETENV: checking for existence of input file\n"); + if (ccpexists(file_name)) { + if (diag) printf("CCP4SETENV: \"%s\" can be opened for reading\n",file_name); + } else { + /* File doesn't exist/cannot be opened for reading + Clean up, set message and return an error */ + if (diag) printf("CCP4SETENV: \"%s\" cannot be opened for reading\n",file_name); + printf("File: \"%s\"\nCannot be opened for reading\n",file_name); + ccp4setenv_cleanup(file_ext,file_root,file_path,file_name); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantFindInFile),"ccp4setenv",NULL); + return -1; + } + } + } else { + if (diag) printf("CCP4SETENV: cannot determine file type (input or output)\n"); + } + + /* Set the environment variable */ + if (ccpputenv(logical_name,file_name)) { + if (diag) printf("CCP4SETENV: ccpputenv returned okay\n"); + } else { + /* Unable to set environment variable + Clean up and exit the program */ + ccp4setenv_cleanup(file_ext,file_root,file_path,file_name); + ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantSetEnvironment),"ccp4setenv",NULL); + printf("Cannot create environment variable: \"%s\"\n",logical_name); + return -1; + } + + if (diag) { + tmpstr1 = (char *) getenv(logical_name); + if (tmpstr1) { + printf("CCP4SETENV: logical name %s has value \"%s\"\n",logical_name,tmpstr1); + } else { + printf("CCP4SETENV: failed to fetch value for logical_name \"%s\"\n",logical_name); + } + } + + /* Free dynamically allocated memory before returning */ + ccp4setenv_cleanup(file_ext,file_root,file_path,file_name); + return 0; +} + +/*------------------------------------------------------------------*/ + +/* ccp4setenv_cleanup + + Internal function. + Called on exit from ccp4setenv - free memory associated with + pointers used inside ccp4setenv. +*/ +int ccp4setenv_cleanup(char *file_ext, char *file_root, char *file_path, + char *file_name) +{ + if (file_ext) free(file_ext); + if (file_root) free(file_root); + if (file_path) free(file_path); + if (file_name) free(file_name); + return 1; +} + +/*------------------------------------------------------------------*/ + +/* ccpexists + + Check if named file exists + The check is performed by attempting to fopen the file for + read only, then immediately closing the file. If this method + proves to be unsatisfactory then it may be necessary to investigate + using access or stat instead. + + Returns 1 if the file can be opened for read (=exists), 0 otherwise. +*/ +int ccpexists(char *filename) +{ + FILE *fp; + + if (filename) { + fp = fopen(filename,"r"); + if (fp) { + fclose(fp); + return 1; + } + } + return 0; +} + +/*------------------------------------------------------------------*/ + +/* ccpputenv + + This is a wrapper for the ccp4_utils_setenv command. + + It must be supplied with a logical name (the name of a variable + which will be set in the environment) and a file name (the value which + will be assigned to that variable). + + Returns 1 if successful and 0 otherwise. + + Notes: + 1. Platform-dependency is encoded in ccp4_utils_setenv. + 2. Dynamically allocated strings passed to ccpputenv should be + freed by the calling subprogram to avoid memory leaks. +*/ +int ccpputenv(char *logical_name, char *file_name) +{ + int ltmpstr,diag=0; + char *tmpstr; + + if (logical_name && file_name) { + /* Allocate memory for temporary string */ + ltmpstr = strlen(logical_name) + strlen(file_name) + 1; + tmpstr = (char *) ccp4_utils_malloc(sizeof(char)*(ltmpstr+1)); + /* putenv requires a string of the form "logical_name=file_name" */ + if (tmpstr) { + strcpy(tmpstr,logical_name); + strcat(tmpstr,"="); + strcat(tmpstr,file_name); + tmpstr[ltmpstr] = '\0'; + if (diag) printf("CCPPUTENV: string going into ccp4_utils_setenv is \"%s\"\n",tmpstr); + /* ccp4_utils_setenv returns 0 on success */ + if (ccp4_utils_setenv(tmpstr) == 0) { + /* free tmpstr here as ccp4_utils_setenv does separate malloc */ + free (tmpstr); + return 1; + } + } + } + return 0; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_banner + + Write CCP4 banner to standard output. +*/ +void ccp4_banner(void) { + + int diag=0,i,npad; + char date[11],time[9],prog_vers_str[19],infoline[100]; + char prog_vers_full[MAXLEN_PROGVERSION]; + + if (diag) printf("Entering ccp4_banner \n"); + + /* Program version number */ + strcpy(prog_vers_full,ccp4_prog_vers(NULL)); + if (strlen(prog_vers_full)) { + strcpy(prog_vers_str,"version "); + strncpy(prog_vers_str+8,prog_vers_full,10); + prog_vers_str[18] = '\0'; + } else { + /* If no program version available then use the major library + version number */ + sprintf(prog_vers_str,"version %-10s",ccp4_vers_no()); + } + /* Trim back the spaces in this string */ + i = strlen(prog_vers_str); + while (prog_vers_str[--i] == ' ') { + prog_vers_str[i] = '\0'; + } + + printf(" \n"); + printf(" ###############################################################\n"); + printf(" ###############################################################\n"); + printf(" ###############################################################\n"); + /* Information line + This has information on the version numbers, names and RCS date + Originally it was printed using the line: + + printf(" ### CCP4 %3s: %-17s %-18s: %-8s##\n", + ccp4_vers_no(),ccp4ProgramName(NULL),prog_vers_str,ccp4RCSDate(NULL)); + + If the CCP4 version number exceeded three characters this would lead + to the tail of the line being misaligned. + + This version tries to account for components of the line being + longer than expected (nb it is still possible to run out of space). + */ + sprintf(infoline," ### CCP4 %3s: %-17s",ccp4_vers_no(),ccp4ProgramName(NULL)); + /* Trim back spaces in this string */ + i = strlen(infoline); + while ( i != 0 && infoline[--i] == ' ') { + infoline[i] = '\0'; + } + /* Determine how much padding we need based on length of the + program version number plus what's already been printed*/ + npad = 51 - strlen(infoline) - strlen(prog_vers_str); + i = strlen(infoline); + while (npad > 0) { + infoline[i++] = ' '; + infoline[i] = '\0'; + --npad; + } + sprintf(infoline+i,"%s : %-8s##",prog_vers_str,ccp4RCSDate(NULL)); + printf("%s\n",infoline); + /* Rest of the banner */ + printf(" ###############################################################\n"); + printf(" User: %s Run date: %s Run time: %s \n\n\n", + ccp4_utils_username(),ccp4_utils_date(date),ccp4_utils_time(time)); + printf(" Please reference: Collaborative Computational Project, Number 4. 2011.\n"); + printf(" \"Overview of the CCP4 suite and current developments\". Acta Cryst. D67, 235-242.\n"); + printf(" as well as any specific reference in the program write-up.\n\n"); + + if (diag) printf("Leaving ccp4_banner \n"); + +} diff --git a/ccp4c/ccp4/ccp4_general.h b/ccp4c/ccp4/ccp4_general.h new file mode 100644 index 00000000..bb441050 --- /dev/null +++ b/ccp4c/ccp4/ccp4_general.h @@ -0,0 +1,124 @@ +/* + ccp4_general.h: header for general library functions and utilities. + Copyright (C) 2001 CCLRC, Peter Briggs et al + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/* ccp4_general.c + + Header file for CCP4 library clones + Peter Briggs et al CCP4 April 2001 +*/ + +/*------------------------------------------------------------------*/ + +/* Macro definitions */ + +/*------------------------------------------------------------------*/ + +#ifndef __CCPGeneral__ +#define __CCPGeneral__ + +/* rcsidhl[] = "$Id$" */ + +/* note order: this must be outside CCP4 namespace */ +#include "ccp4_parser.h" + +#ifdef __cplusplus +namespace CCP4 { +extern "C" { +#endif + +/* MAXLINE = maximum number of characters in lines read + from environ.def and default.def files (ccp4fyp) + MAXTOKS = maximum number of tokens in lines read from + environ.def and default.def files (ccp4fyp) + MAXNAMES = maximum number of logical names that can be + read and stored from environ.def (ccp4fyp) +*/ +#define CCP4_MAXLINE 200 +#define CCP4_MAXTOKS 3 +#define CCP4_MAXNAMES 150 +#define CCP4_MODULO 100000 + +/* stuff for error reporting */ +#define CGEN_ERRNO(n) (CCP4_ERR_GEN | (n)) + +/* error defs */ +#define CGENERR_Ok 0 +#define CGENERR_AllocFail 1 +#define CGENERR_CantSetEnvironment 2 +#define CGENERR_MaxNamesExceeded 3 +#define CGENERR_EOptionUseError 4 +#define CGENERR_DOptionUseError 5 +#define CGENERR_LogicalNameUseError 6 +#define CGENERR_CantOpenEnvFile 7 +#define CGENERR_CantOpenDefFile 8 +#define CGENERR_ParseEnvFail 9 +#define CGENERR_ParseDefFail 10 +#define CGENERR_CantFindInFile 11 +#define CGENERR_EnvPathFail 12 +#define CGENERR_DefPathFail 13 +#define CGENERR_CantGetClibd 14 +#define CGENERR_CantGetCcp4Scr 15 + +/*------------------------------------------------------------------*/ + +/* Structures and typedefs */ + +/*------------------------------------------------------------------*/ + +/* */ + +/*------------------------------------------------------------------*/ + +/* Function Prototypes */ + +/*------------------------------------------------------------------*/ + +void ccp4f_mem_tidy(void); + +int ccperror(int ierr, const char *message); + +int ccperror_noexit(int ierr, const char *message); + +int ccp4printf(int level, char *format, ...); + +int ccp4fyp(int argc, char **argv); + +int ccp4fyp_cleanup(int ienv, char **envname, char **envtype, char **envext, + char *logical_name, char *file_name, char *file_type, + char *file_ext, char *env_file, char *def_file, + char *dir, CCP4PARSERARRAY *parser); + +int ccp4setenv(char *logical_name, char* value, char **envname, + char **envtype, char **envext, int *ienv, int no_overwrt); + +int ccp4setenv_cleanup(char *file_ext, char *file_root, char *file_path, + char *file_name); + +int ccpexists(char *filename); + +int ccpputenv(char *logical_name, char *file_name); + +void ccp4_banner(void); + +#ifdef __cplusplus +} +} +#endif + +#endif /* __CCPGeneral__ */ diff --git a/ccp4c/ccp4/ccp4_parser.c b/ccp4c/ccp4/ccp4_parser.c new file mode 100644 index 00000000..7974318b --- /dev/null +++ b/ccp4c/ccp4/ccp4_parser.c @@ -0,0 +1,1738 @@ +/* + ccp4_parser.c: Functions to read in and "parse" CCP4 keyworded input. + Copyright (C) 2001 CCLRC, Peter Briggs + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + + +/** @file ccp4_parser.c + * + * @brief Functions to read in and "parse" CCP4-style keyworded input. + * + * @author Peter Briggs + * @date April 2001 + */ + +/* ccp4_parser.c + Peter Briggs CCP4 April 2001 + + Functions to read in and "parse" (scan, in reality) CCP4-style + "keyworded" input, plus utility routines. + + ccp4_parse_start(maxtokens) + initialise a CCP4PARSERARRAY to be used in subsequent calls to + ccp4_parser routines. + + ccp4_parse_end(parser) + clean up CCP4PARSERARRAY parser after use + + ccp4_parse_init_token(parser,itok) + initialise a single token in CCP4PARSERARRAY before use + + ccp4_parse_reset(parser) + initialise CCP4PARSERARRAY before use (includes calls to + ccp4_parse_init_token to initialise all tokens) + + ccp4_parse_delimiters(parser,delimiters,nulldelimiters) + set up or restore non-default delimiters + + int ccp4_parse_comments(parser,comment_chars) + set up or restore non-default comment characters + + ccp4_parse_maxmin(parser,max_exp,min_exp) + set non-default maximum and minimum values for numerical tokens + + ccp4_parse(line,parser) + given a string "line", break up into tokens and store in + CCP4PARSERARRAY "parser" + + ccp4_parser(line,parser,print) + read input from stdin or external file, break up into tokens + and store in CCP4PARSERARRAY "parser" + + ccp4_keymatch(keyin1,keyin2) + compare input strings to see if they match as CCP4-style keywords + + strtoupper(str1,str2) + convert string to uppercase + + strmatch(str1,str2) + check if strings are identical + + charmatch(character,charlist) + check if character appears in a list of possibilities + + doublefromstr(str,....) + convert a string representation of a number into the number, also + checks for exponent over/underflow, returns numbers of digits and + values of "components" (integer and fractional parts, and base-10 + exponent) + +*/ + +/* Header files */ + +#include +#include +#include +#ifndef __FLOAT_H__ +# include +#endif +#include +#include "ccp4_parser.h" +#include "ccp4_errno.h" +#include "ccp4_sysdep.h" +/* rcsid[] = "$Id$" */ + +/* stuff for error reporting */ +#define CPARSER_ERRNO(n) (CCP4_ERR_PARS | (n)) + +/* error defs */ +#define CPARSERR_Ok 0 +#define CPARSERR_MaxTokExceeded 1 +#define CPARSERR_AllocFail 2 +#define CPARSERR_NullPointer 3 +#define CPARSERR_LongLine 4 +#define CPARSERR_CantOpenFile 5 +#define CPARSERR_NoName 6 +#define CPARSERR_ExpOverflow 7 +#define CPARSERR_ExpUnderflow 8 +#define CPARSERR_MatToSymop 9 +#define CPARSERR_SymopToMat 10 + +/*------------------------------------------------------------------*/ + +/* Parser Functions */ + +/*------------------------------------------------------------------*/ + +/* ccp4_parse_start + + This initialises a CCP4PARSERARRAY to be used with the ccp4_parse/ + ccp4_parser functions. + The calling function must supply the maximum number of tokens. +*/ +CCP4PARSERARRAY* ccp4_parse_start(const int maxtokens) +{ + int itok,diag=0; + CCP4PARSERARRAY *parsePtr; + + if (diag) printf("CCP4_PARSE_START: ccp4_parse_start starting\n"); + + /* Initial check for sensible values */ + if (maxtokens < 1) return NULL; + + /* Return a pointer to a CCP4PARSERARRAY */ + parsePtr = (CCP4PARSERARRAY *) ccp4_utils_malloc(sizeof(CCP4PARSERARRAY)); + if (parsePtr) { + if (diag) printf("CCP4_PARSE_START: allocated parsePtr\n"); + parsePtr->token = (CCP4PARSERTOKEN *) ccp4_utils_malloc(sizeof(CCP4PARSERTOKEN)*maxtokens); + if (!parsePtr->token) { + free(parsePtr); + parsePtr = NULL; + } else { + if (diag) printf("CCP4_PARSE_START: allocated parsePtr->token\n"); + parsePtr->maxtokens = maxtokens; + parsePtr->fp = NULL; + + /* Explicitly ensure that each token's fullstring member is + set to NULL before calling ccp4_parse_reset (which tries to + free memory associated with non-NULL fullstrings) since + we can't rely on them being created with a NULL value */ + for (itok = 0; itok < maxtokens; itok++) + parsePtr->token[itok].fullstring = NULL; + ccp4_parse_reset(parsePtr); + if (diag) printf("CCP4_PARSE_START: fullstring set to NULL\n"); + + /* Initialise the default maximum and minimum allowed + exponents for numerical tokens */ + ccp4_parse_maxmin(parsePtr,DBL_MAX_10_EXP,DBL_MIN_10_EXP); + if (diag) printf("CCP4_PARSE_START: max and min set\n"); + + /* Initialise the default delimiter and null delimiter characters + with a call to ccp4_parse_delimiters */ + parsePtr->delim=NULL; + parsePtr->nulldelim=NULL; + if (!ccp4_parse_delimiters(parsePtr,NULL,NULL)) { + ccp4_parse_end(parsePtr); + parsePtr = NULL; + } + if (diag) printf("CCP4_PARSE_START: delimiters set\n"); + + /* Initialise the default comment characters with a call + to ccp4_parse_comments */ + parsePtr->comment=NULL; + if (!ccp4_parse_comments(parsePtr,NULL)) { + ccp4_parse_end(parsePtr); + parsePtr = NULL; + } + if (diag) printf("CCP4_PARSE_START: comments set\n"); + } + } + + if (diag) printf("CCP4_PARSE_START: Returning from ccp4_parse_start\n"); + return parsePtr; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_parse_end + + This cleans up a CCP4PARSEARRAY after being used by ccp4_parse/ + ccp4_parser functions. +*/ +int ccp4_parse_end(CCP4PARSERARRAY *parsePtr) +{ + int i,maxtokens; + + /* Anything to do? */ + if (parsePtr) { + /* Free memory for each token */ + maxtokens = parsePtr->maxtokens; + if (parsePtr->token && parsePtr->maxtokens > 0) { + for (i=0; itoken[i].fullstring) free(parsePtr->token[i].fullstring); + free(parsePtr->token); + } + /* Free memory for lists of comments and delimiters */ + if (parsePtr->comment) free(parsePtr->comment); + if (parsePtr->delim) free(parsePtr->delim); + if (parsePtr->nulldelim) free(parsePtr->nulldelim); + /* Free memory for rest of parserarray structure */ + free(parsePtr); + } + /* All done */ + return 0; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_parse_init_token + + Initialise a token in a parser array + This sets all string members of the specified token to NULL and + all numerical values (including flags) to zero +*/ + +int ccp4_parse_init_token(const CCP4PARSERARRAY *parsePtr, const int itok) +{ + if (parsePtr) { + if (itok < parsePtr->maxtokens) { + /* Full string is dynamically allocated - free the + associated memory, if assigned */ + if (parsePtr->token[itok].fullstring) { + free(parsePtr->token[itok].fullstring); + parsePtr->token[itok].fullstring = NULL; + } + /* Set fixed string tokens to empty string */ + strcpy(parsePtr->token[itok].word,""); + /* Set numerical value to zero */ + parsePtr->token[itok].value = 0.0; + /* Set flags to zero */ + parsePtr->token[itok].isstring = 0; + parsePtr->token[itok].isnumber = 0; + parsePtr->token[itok].isquoted = 0; + parsePtr->token[itok].isnull = 0; + /* Set start and end positions to zero */ + parsePtr->token[itok].ibeg = 0; + parsePtr->token[itok].iend = 0; + } + } + return 0; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_parse_reset + + Reinitialise a parser array before calling ccp4_parse + + An application using ccp4_parse (rather than ccp4_parser, which + also calls this function) can call this function to reset the + parser array, rather than reinitialising the structure members + explicitly +*/ +int ccp4_parse_reset(CCP4PARSERARRAY *parsePtr) +{ + int itok; + + if (parsePtr) { + /* Initialise the tokens to have null values */ + for (itok=0; itokmaxtokens; itok++) + ccp4_parse_init_token(parsePtr,itok); + /* Initialise number of tokens to zero */ + parsePtr->ntokens = 0; + } + return 0; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_parse_delimiters + + This allows the application to set its own delimiter characters + to be used in the ccp4_parser routines. + + If a NULL pointer is supplied for either of the two lists then + then the default delimiters are (re)set. + + Returns 1 on success, 0 if there was an error. In the event of + an error the delimiter lists will be unchanged. +*/ + +int ccp4_parse_delimiters(CCP4PARSERARRAY *parsePtr, + const char *delim, const char *nulldelim) +{ + const char defdelim[]=" \t,=\r",defnulldelim[]=",="; + char *delimPtr=NULL,*nulldelimPtr=NULL; + int ldelim,lnulldelim,istatus=1; + + if (parsePtr) { + + /* If supplied delim is NULL then set to the default */ + if (!delim) { + ldelim = strlen(defdelim) + 1; + } else { + ldelim = strlen(delim) + 1; + } + delimPtr = (char *) ccp4_utils_malloc(sizeof(char)*ldelim); + if (delimPtr) { + ldelim--; + if (!delim) { + strncpy(delimPtr,defdelim,ldelim+1); + } else { + strncpy(delimPtr,delim,ldelim+1); + } + delimPtr[ldelim] = '\0'; + } + + /* If supplied nulldelim is NULL then set to the default */ + if (!nulldelim) { + lnulldelim = strlen(defnulldelim) + 1; + } else { + lnulldelim = strlen(nulldelim) + 1; + } + nulldelimPtr = (char *) ccp4_utils_malloc(sizeof(char)*lnulldelim); + if (nulldelimPtr) { + lnulldelim--; + if (!nulldelim) { + strncpy(nulldelimPtr,defnulldelim,lnulldelim+1); + } else { + strncpy(nulldelimPtr,nulldelim,lnulldelim+1); + } + nulldelimPtr[lnulldelim] = '\0'; + } + + /* Assign new delimiters in parser array */ + if (delimPtr && nulldelimPtr) { + if (parsePtr->delim) free(parsePtr->delim); + parsePtr->delim = delimPtr; + if (parsePtr->nulldelim) free(parsePtr->nulldelim); + parsePtr->nulldelim = nulldelimPtr; + } else { + /* There is an error - don't reset the parser array */ + if (delimPtr) free(delimPtr); + if (nulldelimPtr) free(nulldelimPtr); + istatus = 0; + } + } else { + istatus = 0; + } + return istatus; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_parse_comments + + This allows the application to set its own comment characters + to be used in the ccp4_parser routines. + + If a NULL pointer is supplied for the list of comment characters + then the default comment characters are (re)set. + + Returns 1 on success, 0 if there was an error. In the event of + an error the comment lists will be unchanged. +*/ + +int ccp4_parse_comments(CCP4PARSERARRAY *parsePtr, const char *comment_chars) +{ + const char def_comment_chars[]="#!"; + char *commentPtr=NULL; + int lcomment,istatus=1; + + if (parsePtr) { + + /* If the supplied comment list is NULL then set to the default */ + if (!comment_chars) { + lcomment = strlen(def_comment_chars) + 1; + } else { + lcomment = strlen(comment_chars) + 1; + } + commentPtr = (char *) ccp4_utils_malloc(sizeof(char)*lcomment); + if (commentPtr) { + if (!comment_chars) { + strncpy(commentPtr,def_comment_chars,lcomment); + } else { + strncpy(commentPtr,comment_chars,lcomment); + } + lcomment--; + commentPtr[lcomment] = '\0'; + } + + /* Assign the new comments in the parser array */ + if (commentPtr) { + if (parsePtr->comment) free(parsePtr->comment); + parsePtr->comment = commentPtr; + } else { + /* There was an error - don't reset the parser array */ + istatus = 0; + } + } else { + /* The parser was unset on entry - also an error */ + istatus = 0; + } + return istatus; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_parse_maxmin + + This allows the application to set its own maximum and minimum + exponent values, which are used as limits when evaluating the values + of numerical tokens in order to avoid over/underflow. +*/ + +int ccp4_parse_maxmin(CCP4PARSERARRAY *parsePtr, const double max_exponent, + const double min_exponent) +{ + if (parsePtr) { + parsePtr->max_exponent = (double) max_exponent; + parsePtr->min_exponent = (double) min_exponent; + } + return 1; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_parse + + This is a scanner based on the old CCP4 Fortranic PARSE routine. + + It takes an input string ("line") and returns the number of + tokens ("ntokens") which are delimited by certain characters + (defaulted to space, tab, comma, equals - these can be changed by + the application using a call to ccp4_parse_delimiters). + Information about the tokens themselves is returned as members of + elements in an array ("tokens") of type CCP4PARSERTOKEN (see header + file for definition and members). + + Substrings can be delimited by single- or double-quotes but must + be surrounded by delimiters to be recognised. + + An unquoted comment character (defaulted to ! or #) in the input line + introduces a trailing comment which is ignored. The comment + characters can be changed using a call to ccp4_parse_comments. + + Null fields are denoted by two adjacent null delimiters (defaulted + to comma and equals - these can be changed by the application + using a call to ccp4_parse_delimiters). + + ccp4_parse returns the number of tokens found in the line. The + tokens are returned via the CCP4PARSERARRAY parser. + + Arguments: + + line = pointer to a null-terminated string of characters, + forming the input to be processed. Unaltered on + output. + parser = pointer to a CCP4PARSERARRAY structure which will + be used to hold the results of processing the input + line. +*/ + +int ccp4_parse(const char *line, CCP4PARSERARRAY *parser) +{ + int quotedstring,starttoken,endtoken; + char this_char,next_char,matchquote; + + int llen,ich,lword,diag=0; + int token,nulltoken,isquote,iscommt=0,isdelim; + double value; + char *delim,*nulldelim,*comm; + char quot[]="\"\'"; + int ibeg,iend,start; + + double intvalue,frcvalue,expvalue; + int intdigits,frcdigits,expdigits; + + /* Local parser variables */ + int ntok,maxtok; + CCP4PARSERTOKEN *tokenarray; + + /* Begin */ + + /* Set diag = 1 and recompile to switch on diagnostic output */ + if (diag) printf("CCP4_PARSE: ccp4_parse starting\n"); + + maxtok = parser->maxtokens; + ntok = parser->ntokens; + if (ntok < 0) ntok = 0; + + /* Initialise pointer for local version of the token array */ + tokenarray = parser->token; + + /* Initialise pointers for lists of comments and delimiters */ + comm = parser->comment; + delim = parser->delim; + nulldelim = parser->nulldelim; + + /* Don't process any tokens already dealt with */ + if (ntok > 0) { + start = tokenarray[ntok-1].iend + 1; + /* Special case: if the last token was quoted + then in fact the character at this position will be + a quote - if so then step on another character */ + if (charmatch(line[start],quot)) { + if (diag) printf("CCP4_PARSE: start character is a quote, stepping on\n"); + start++; + } + } else { + start = 0; + } + + /* Don't process empty lines */ + llen = strlen(line); + if (diag) printf("CCP4_PARSE: Line is: \"%s\"\nLength of line is %d\n",line,llen); + if (llen > 0) { + + /* Initialise flags and counters */ + quotedstring = 0; + token = 0; + nulltoken = 0; + + /* Process the line two characters at a time */ + + if (diag) printf("CCP4_PARSE: Start position for parsing line is %d\n",start); + for (ich=start-1; ichntokens = ntok; + return ntok; + } + if (diag) printf("CCP4_PARSE: This is the start of token %d\n",ntok); + } + /* End of new token */ + + /* End of current token */ + if (endtoken) { + token = 0; + /* Exclude trailing quote from the token? */ + if (tokenarray[ntok].isquoted) { + iend = ich - 1; + } else { + iend = ich; + } + if (diag) printf("CCP4_PARSE: End of a token... iend = %d\n",iend); + /* Store the full token in the array */ + lword = iend - ibeg + 1; + if (diag) printf("CCP4_PARSE: lword = %d - start char = %c, end char = %c\n", + lword,line[ibeg],line[iend]); + tokenarray[ntok].fullstring = (char *) ccp4_utils_malloc(sizeof(char)*(lword+1)); + if (tokenarray[ntok].fullstring) { + strncpy(tokenarray[ntok].fullstring,&line[ibeg],lword); + tokenarray[ntok].fullstring[lword] = '\0'; + if (diag) printf("CCP4_PARSE: Token is \"%s\"\n",tokenarray[ntok].fullstring); + } else { + ccp4_signal(CPARSER_ERRNO(CPARSERR_AllocFail),"ccp4_parse",NULL); + } + tokenarray[ntok].ibeg = ibeg; + tokenarray[ntok].iend = iend; + /* Store the 4 character token in the array */ + if (lword > 4) lword = 4; + strncpy(tokenarray[ntok].word,&line[ibeg],lword); + tokenarray[ntok].word[lword] = '\0'; + /* Determine numerical value (if any) */ + if (doublefromstr(tokenarray[ntok].fullstring,parser->max_exponent, + parser->min_exponent,&value,&intvalue,&intdigits, + &frcvalue,&frcdigits,&expvalue,&expdigits)) { + if (diag) printf("CCP4_PARSE: This has a numerical value of %lf\n",value); + tokenarray[ntok].value = value; + tokenarray[ntok].isnumber = 1; + tokenarray[ntok].intdigits = intdigits; + tokenarray[ntok].frcdigits = frcdigits; + } else { + if (diag) printf("CCP4_PARSE: There is no numerical value for this token\n"); + tokenarray[ntok].isstring = 1; + tokenarray[ntok].strlength = strlen(tokenarray[ntok].fullstring); + } + /* Reset flags etc ready for next token*/ + token = 0; + value = 0.0; + /* Increment number of tokens */ + ntok++; + if (diag) printf("CCP4_PARSE: This is the end of a token\n"); + } + + /* Don't do any more processing after a comment */ + + if (iscommt) { + parser->ntokens = ntok; + if (diag) printf("CCP4_PARSE: returning after a comment\n"); + return ntok; + } + /* Check the next pair of characters */ + } + /* Reset the number of tokens in the parser array */ + parser->ntokens = ntok; + if (diag) printf("CCP4_PARSE: ntokens = %d, and ntok = %d\n",parser->ntokens,ntok); + } + if (diag) printf("CCP4_PARSE: returning at function end\n"); + return ntok; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_parser + + This is based on the old CCP4 Fortranic PARSER routine. + + The normal behaviour is to read "keyworded" data from the input + stream, and interpret it. Stdin is the default, but a line + starting with @ starts reading from file until eof. + + Each input line may be continued on the next line by the continuation + characters `&', `-' or `\' at the end of the input line. This + character is dropped from the list returned to the calling application. + + Pass in a zero length line to force reading from the command line. + nchars is the maximum number of characters which will be read into the line. + (If line is not blank then it will be processed and more input + read in if it ends in a continuation character, or forces reading from + an external file.) + + The "print" argument should be supplied as 0 to suppress echoing of the + input lines to standard output. + + ccp4_parser returns the number of tokens parsed in the input line. The + results of the parsing are stored as members of the CCP4PARSEARRAY + structure "parser" and can be accessed by the application program. + + The function returns the number of tokens, or 0 on reaching end of file. + On encountering an unrecoverable error ccp4_parser returns -1. + + Arguments: + + line = pointer to a null-terminated string of characters, + forming the input to be processed. + On input can either be an empty string ("") or + contain characters to be processed (see above for + description). + On output "line" will be overwritten with the actual + input line, up to nchar characters. + nchars = maximum number of characters that can be read into + "line" i.e. the size of "line" in memory. + parser = pointer to a CCP4PARSERARRAY structure which will + be used to hold the results of processing the input + line. + print = flag controlling echoing of input lines to stdout. + print=0: suppress echoing of lines to stdout + Otherwise echoing is turned on. +*/ + +int ccp4_parser(char *line, const int nchars, CCP4PARSERARRAY *parser, + const int print) +{ + int fromstdin=0,fromfile=0,fromapp=0,diag=0; + int nch,nold,continuation,first,trunc,llen,buflen; + char *linein=NULL,filename[200]; + + /* Local parser variables */ + int ntok; + FILE *filein; + CCP4PARSERTOKEN *tokenarray; + + /* Undocumented feature - if print < 0 then also print out + diagnostic info */ + if (print < 0) { + /*print = 1;*/ + diag = 1; + } + + /* Begin */ + if (diag) printf("CCP4_PARSER: ccp4_parser starting\n"); + + /* Abort if parser is a NULL pointer */ + if (!parser) { + ccp4_signal(CPARSER_ERRNO(CPARSERR_NullPointer),"ccp4_parser",NULL); + return -1; + } + + /* Abort if line is NULL pointer */ + if (!line) { + ccp4_signal(CPARSER_ERRNO(CPARSERR_NullPointer),"ccp4_parser",NULL); + return -1; + } + + /* Reset the parser array for this sweep + This will prevent phantom values from an earlier call + to ccp4_parser persisting in the parser array */ + ccp4_parse_reset(parser); + + /* Blank the keyword */ + strcpy(parser->keyword,""); + + /* Initialise local variables and pointers */ + tokenarray = parser->token; + ntok = parser->ntokens; + filein = parser->fp; + if (diag) printf("CCP4_PARSER: parser->ntokens = %d, ntok = %d\n", + parser->ntokens,ntok); + + /* Set up an internal buffer for input + The buffer is over-allocated (twice as long as the max string + length allocated for line by the calling application) + */ + buflen = (nchars*2)+1; + linein = (char *) ccp4_utils_malloc(buflen*sizeof(char)); + + if (!linein) { + ccp4_signal(CPARSER_ERRNO(CPARSERR_AllocFail),"ccp4_parser",NULL); + return 0; + } + + /* Use nch as a count of the number of remaining characters + in line */ + nch = nchars; + + /* If line is empty then read from the standard input + Otherwise process the line from the application first */ + if (strlen(line)==0) { + if (!filein) { + if (diag) printf("CCP4_PARSER: Reading from stdin\n"); + fromstdin = 1; + } else { + if (diag) printf("CCP4_PARSER: Reading from file\n"); + fromfile = 1; + } + } else { + if (diag) printf("CCP4_PARSER: Reading line supplied by the application program\n"); + fromapp = 1; + } + + /* Set flag for first line of input */ + first = 1; + + /* Set flag for line continuation */ + continuation = 1; + + /* Start the input loop */ + while (continuation) { + + if (diag) printf("CCP4_PARSER: starting loop\n"); + /* Read input from stdin a line at a time */ + if (fromstdin) { + if (diag) printf("CCP4_PARSER: reading from stdin...\n"); + if (!fgets(linein,buflen,stdin)) { + /* Jump out at this point if eof is reached from + stdin */ + return 0; + } + } else if (fromfile) { + if (diag) printf("CCP4_PARSER: reading from external file...\n"); + if (!fgets(linein,buflen,filein)) { + /* Return to input from stdin if eof is read from + the external file */ + if (diag) printf("CCP4_PARSER: End of external file reached\n"); + fclose(filein); + filein = NULL; + fromfile = 0; + fromstdin = 1; + /* Blank the line and reset the first flag to + force reading from standard input immediately */ + linein[0] = '\0'; + ntok = 0; + parser->ntokens = ntok; + first = 1; + } + } else if (fromapp) { + if (diag) printf("CCP4_PARSER: reading from application...\n"); + /* If this line contains a continuation mark then + read from stdin next time around */ + strncpy(linein,line,nchars); + linein[nchars]='\0'; + } + + /* Strip any trailing newline e.g. from fgets */ + llen = strlen(linein); + if (llen > 0) + if (linein[llen-1] == '\n') { + linein[llen-1] = '\0'; + llen--; + } + + /* If previous line ended with a continuation character + then append this one to it + Check that we don't overflow the number of characters + specified by the application */ + + if (llen > nch) { + ccp4_signal(CPARSER_ERRNO(CPARSERR_LongLine),"ccp4_parser",NULL); + } + if (first) { + strncpy(line,linein,nch); + first = 0; + } else { + strncat(line,linein,nch); + } + nch = nchars - llen; + if (diag) { + printf("CCP4_PARSER: line = \"%s\"\n",line); + printf("CCP4_PARSER: remaining available characters = %d\n",nch); + } + + /* Use ccp4_parse to break the input line up into tokens + Only parse the latest chunk - ccp4_parse will append + new tokens onto the tokenarray */ + nold = ntok; + ntok = ccp4_parse(line,parser); + + if (diag) printf("CCP4_PARSER: ntok = %d, nold = %d\n",ntok,nold); + + /* Have we found more tokens since last time? */ + if (ntok != nold) { + /* Check first token to see if it is an instruction + to read from an external file */ + if (!fromfile && tokenarray[0].word[0] == '@') { + if (diag) printf("CCP4_PARSER: Instruction to read from external file\n"); + /* Get filename and attempt to open file */ + if (tokenarray[0].fullstring) { + llen = strlen(tokenarray[0].fullstring); + strncpy(filename,&tokenarray[0].fullstring[1],llen); + if (diag) printf("CCP4_PARSER: External file name is \"%s\"\n",filename); + /* Open the external file as read-only */ + filein = fopen(filename,"r"); + if (!filein) { + ccp4_signal(CPARSER_ERRNO(CPARSERR_CantOpenFile),"ccp4_parser",NULL); + } else { + fromstdin = 0; + fromfile = 1; + } + } else { + /* Token with file name is null */ + ccp4_signal(CPARSER_ERRNO(CPARSERR_NoName),"ccp4_parser",NULL); + } + /* Blank the line and reset the number of tokens + to force reading from the external file immediately */ + line[0] = '\0'; + ntok = 0; + parser->ntokens = ntok; + + /* Check last token to see if it is continuation + character */ + } else if (ntok > 0 && + (strmatch("&",tokenarray[ntok-1].word) || + strmatch("\\",tokenarray[ntok-1].word) || + strmatch("-",tokenarray[ntok-1].word))) { + if (diag) printf("CCP4_PARSER: Detected continuation character\n"); + /* It's a continuation mark + Set flag to indicate this fact in later rounds */ + continuation = 1; + /* Truncate the line to remove the continuation + character */ + if (ntok > 1) + trunc = tokenarray[ntok-1].ibeg; + else + trunc = 0; + if (diag) printf("CCP4_PARSER: Continuation character should be at position %d\n\"%c\" is the character at this position\n",trunc,line[trunc]); + line[trunc] = '\0'; + /* Lose the last token */ + ntok--; + parser->ntokens = ntok; + } else { + /* Not a continuation character */ + continuation = 0; + } + + } else { + /* Didn't get any more tokens from the last pass + Check if it is a blank line or comment line */ + if (ntok == 0) { + /* Echo comment line to stdout and blank + the line */ + if (strlen(line) > 0) { + if (print) printf(" Comment line--- %s\n",line); + line[0] = '\0'; + nch = nchars; + } + if (fromapp) continuation = 0; + } + } + if (diag) printf("CCP4_PARSER: Continuation = %d\n",continuation); + + /* If the line was supplied by the application but is now being continued + then make sure we read from stdin next time */ + if (continuation && fromapp) { + if (diag) printf("CCP4_PARSER: switching to stdin\n"); + fromapp = 0; + fromstdin = 1; + } + } + + /* Fetch and uppercase keyword */ + if (ntok > 0) { + strtoupper(parser->keyword,tokenarray[0].word); + parser->keyword[strlen(tokenarray[0].word)] = '\0'; + if (diag) printf("CCP4_PARSER: Keyword is %s\n",parser->keyword); + /*Echo the line to standard output */ + if (print) printf(" Data line--- %s\n",line); + } else { + parser->keyword[0] = '\0'; + } + + free(linein); + /* Update the returned variables */ + parser->fp = filein; + + if (diag) printf("CCP4_PARSER: Returning from ccp4_parser\n"); + return ntok; +} + +/*------------------------------------------------------------------*/ + +/* ccp4_keymatch + + Returns 1 if keywords keyin1 and keyin2 are "identical", 0 otherwise. + + Keywords are identical if they are the same up to the first four + characters, independent of case. +*/ +int ccp4_keymatch(const char *keyin1, const char *keyin2) +{ + int len1,len2; + char key1[5],key2[5],keyup1[5],keyup2[5]; + + /* Initial check */ + if (!keyin1 || !keyin2) return 0; + + /* Compare truncated lengths */ + len1 = strlen(keyin1); + if (len1 > 4) len1 = 4; + + len2 = strlen(keyin2); + if (len2 > 4) len2 = 4; + + /* If lengths don't match then keywords can't be identical */ + if (len1 != len2) return 0; + + /* If supplied words are longer than four characters then + truncate them after the fourth character */ + strncpy(key1,keyin1,len1); + key1[len1] = '\0'; + + strncpy(key2,keyin2,4); + key2[len2] = '\0'; + + /* Convert strings to uppercase */ + strtoupper(keyup1,key1); + keyup1[len1] = '\0'; + strtoupper(keyup2,key2); + keyup2[len2] = '\0'; + + /* Compare using strmatch */ + return strmatch(keyup1,keyup2); +} + +char *strtoupper (char *str1, const char *str2) +{ + int len2,i; + + if (!str2) return NULL; + + len2 = strlen(str2); + if (len2 > 0) for (i=0; i 0) for (i=0; i -1) return 0; + point = ichar; + is_int = 0; + is_frc = 1; + + } else if (toupper(this_char) == 'E') { + char next_char = (ichar+1 < lstr ) ? str[ichar+1] : '\0'; + if ( next_char == '+' || next_char == '-') + next_char = (ichar+2 < lstr ) ? str[ichar+2] : '\0'; + /* require the next active character after E to be a digit */ + if ( !isdigit(next_char) ) return 0; + /* Exponent? i.e. e or E + There can only be one exponent */ + if (exponent > -1) return 0; + exponent = ichar; + is_int = 0; + is_frc = 0; + is_exp = 1; + } else { + /* Not a permissible character + This is not a number so get out now */ + if (diag) printf("DOUBLEFROMSTR: Not a permitted character - exiting\n"); + return 0; + } + } else { + /* It is a digit + Build up the value of each component */ + + if (diag) printf(" is a digit ...\n"); + + this_str[0] = this_char; + this_str[1] = '\0'; + char_value = atoi(this_str); + + if (is_int) { + /* Integer part of the number */ + n_int_digits++; + int_value = int_value * 10.0 + (double) char_value; + if (diag) printf("DOUBLEFROMSTR: Processing integer component: value = %lf, #digits = %d\n",int_value,n_int_digits); + } else if (is_frc) { + /* Decimal part of the number */ + n_frc_digits++; + frc_value = frc_value + ((double) char_value)/pow(10.0,(double) n_frc_digits); + if (diag) printf("DOUBLEFROMSTR: Processing decimal component: value = %lf, #digits = %d\n",frc_value,n_frc_digits); + } else if (is_exp) { + /* Exponent */ + n_exp_digits++; + exp_value = exp_value * 10.0 + (double) char_value; + if (diag) printf("DOUBLEFROMSTR: Processing exponential component: value = %lf, #digits = %d\n",exp_value,n_exp_digits); + } + + } + /* Next character */ + ichar++; + } + /* + Done loop over characters - if we have got this far then it + must be a number + */ + + /* Set component values */ + int_value = int_value * (double) sign; + frc_value = frc_value * (double) sign; + exp_value = exp_value * (double) expsign; + + /* Export component values */ + *intvaluePtr = int_value; + *frcvaluePtr = frc_value; + *expvaluePtr = exp_value; + + /* Export numbers of 'digits' */ + *intdigitsPtr = n_int_digits; + *frcdigitsPtr = n_frc_digits; + *expdigitsPtr = n_exp_digits; + + /* Is the exponent out-of-range? */ + + /* There are two considerations: + (i) can pow(10.0,exp_value) actually be evaluated? + (ii) can int_part * pow(10.0,exp_value) be evaluated? + This second is an issue for numbers with int_part > 0. + */ + if ( (exp_value + (double) (n_int_digits - 1) > max_exp) && + (n_int_digits || n_frc_digits) ) { + ccp4_signal(CPARSER_ERRNO(CPARSERR_ExpOverflow),"doublefromstr",NULL); + printf("DOUBLEFROMSTR: Token is \"%s\"\n",str); + *valuePtr = 0.0; + } else if ( (exp_value < min_exp) && + (n_int_digits || n_frc_digits) ) { + ccp4_signal(CPARSER_ERRNO(CPARSERR_ExpUnderflow),"doublefromstr",NULL); + printf("DOUBLEFROMSTR: Token is \"%s\"\n",str); + *valuePtr = 0.0; + } else { + /* Evaluate the number to get a value */ + *valuePtr = int_value + frc_value; + if (is_exp) *valuePtr = (*valuePtr)*pow(10.0,exp_value); + } + + if (diag) printf("DOUBLEFROMSTR: Integer component = %lf, (%d digits)\n", + *intvaluePtr,*intdigitsPtr); + if (diag) printf("DOUBLEFROMSTR: Decimal component = %lf, (%d digits)\n", + *frcvaluePtr,*frcdigitsPtr); + if (diag) printf("DOUBLEFROMSTR: Exponent component = %lf, (%d digits)\n", + *expvaluePtr,*expdigitsPtr); + if (diag) printf("DOUBLEFROMSTR: Finished - value is determined to be %lf\n",*valuePtr); + + return 1; +} + +ccp4_symop symop_to_rotandtrn(const char *symchs_begin, const char *symchs_end) { + + float rsm[4][4]; + + symop_to_mat4(symchs_begin, symchs_end, rsm[0]); + return (mat4_to_rotandtrn((const float (*)[4])rsm)); + +} + +/*------------------------------------------------------------------*/ + +/* symop_to_mat4 + + Translates a single symmetry operator string into a 4x4 quine + matrix representation + NB Uses a utility function (symop_to_mat4_err) when reporting + failures. + + Syntax of possible symop strings: + + real space symmetry operations, e.g. X+1/2,Y-X,Z + reciprocal space operations, e.g. h,l-h,-k + reciprocal axis vectors, e.g. a*+c*,c*,-b* + real space axis vectors, e.g. a,c-a,-b + + The strings can contain spaces, and the coordinate and translation + parts may be in either order. + + The function returns 1 on success, 0 if there was a failure to + generate a matrix representation. +*/ +const char *symop_to_mat4(const char *symchs_begin, const char *symchs_end, float *rot) +{ + int no_real =0, no_recip = 0, no_axis = 0; /* counters */ + int col = 3, nops = 0; + int nsym = 0, init_array = 1; + float sign = 1.0f, value = 0.0f, value2; + char *cp, ch; + const char *ptr_symchs = symchs_begin; + int j,k; /* loop variables */ + int Isep = 0; /* parsed seperator? */ + + while (ptr_symchs < symchs_end) { + ch = *ptr_symchs; + + /* Parse symop */ + if (isspace(ch)) { + /* Have to allow symop strings to contain spaces for + compatibility with older MTZ files + Ignore and step on to next character */ + ++ptr_symchs; + continue; + } else if (ch == ',' || ch == '*') { + ++ptr_symchs; + if (value == 0.0f && col == 3) { + /* nothing set, this is a problem */ + ccp4_signal(CPARSER_ERRNO(CPARSERR_SymopToMat),"symop_to_mat4",NULL); + return NULL ; + } else { + Isep = 1; /* drop through to evaluation*/ + } + } else if (ch == 'X' || ch == 'x') { + no_real++, col = 0; + if (value == 0.0f) value = sign * 1.0f; + ++ptr_symchs; + continue; + } else if (ch == 'Y' || ch == 'y') { + no_real++, col = 1; + if (value == 0.0f) value = sign * 1.0f; + ++ptr_symchs; + continue; + } else if (ch == 'Z' || ch == 'z') { + no_real++, col = 2; + if (value == 0.0f) value = sign * 1.0f; + ++ptr_symchs; + continue; + } else if (ch == 'H' || ch == 'h') { + no_recip++, col = 0; + if (value == 0.0f) value = sign * 1.0f; + ++ptr_symchs; + continue; + } else if (ch == 'K' || ch == 'k') { + no_recip++, col = 1; + if (value == 0.0f) value = sign * 1.0f; + ++ptr_symchs; + continue; + } else if (ch == 'L' || ch == 'l') { + no_recip++, col = 2; + if (value == 0.0f) value = sign * 1.0f; + ++ptr_symchs; + continue; + } else if (ch == 'A' || ch == 'a') { + no_axis++, col = 0; + if (value == 0.0f) value = sign * 1.0f; + if (*++ptr_symchs == '*' && ( no_axis != 3 || no_recip )) ++ptr_symchs; + continue; + } else if (ch == 'B' || ch == 'b') { + no_axis++, col = 1; + if (value == 0.0f) value = sign * 1.0f; + if (*++ptr_symchs == '*' && ( no_axis != 3 || no_recip )) ++ptr_symchs; + continue; + } else if (ch == 'C' || ch == 'c') { + no_axis++, col = 2; + if (value == 0.0f) value = sign * 1.0f; + if (*++ptr_symchs == '*' && ( no_axis != 3 || no_recip )) ++ptr_symchs; + continue; + } else if (ch == '+' || ch == '-') { + sign = ((ch == '+')? 1.0f : -1.0f) ; + ++ptr_symchs; + if ( value == 0.0f && col == 3) + continue; + /* drop through to evaluation */ + } else if ( ch == '/') { + ++ptr_symchs; + if (value == 0.0f) { + /* error */ + symop_to_mat4_err(symchs_begin); + return NULL; + } + value2 = strtod(ptr_symchs, &cp); + if (!value2) { + /* error */ + symop_to_mat4_err(symchs_begin); + return NULL; + } + /* Nb don't apply the sign to value here + It will already have been applied in the previous round */ + value = (float) value/value2; + ptr_symchs = cp; + continue; + } else if ( isdigit(ch) || ch == '.') { + value = sign*strtod(ptr_symchs, &cp); + ptr_symchs = cp; + continue; + } else { + ++ptr_symchs; + continue; + } + + /* initialise and clear the relevant array (init_array == 1)*/ + /* use knowledge that we are using a [4][4] for rot */ + if (init_array) { + init_array = 0; + for (j = 0 ; j !=4 ; ++j) + for (k = 0; k !=4 ; ++k) + rot[(((nsym << 2) + k ) << 2) +j] = 0.0f; + rot[(((nsym << 2 ) + 3 ) << 2) +3] = 1.0f; + } + + /* value to be entered in rot */ + rot[(((nsym << 2) + nops) << 2) + col] = value; + + /* have we passed a operator seperator */ + if (Isep) { + Isep = 0; + ++nops; + sign = 1.0f; + if (nops == 3 ) { ++nsym; nops=0 ; init_array = 1; } + } + + /* reset for next cycle */ + col = 3; + value = 0.0f; + no_recip = 0, no_axis = 0, no_real = 0; + } + + /* Tidy up last value */ + if (value) rot[(((nsym << 2) + nops) << 2) + col] = value; + + if (nops<2) { + /* Processed fewer than 3 operators, raise an error */ + symop_to_mat4_err(symchs_begin); + return NULL; + } + + /* Return with success */ + return ptr_symchs; +} + +/* Internal function: report error from symop_to_mat4_err */ +int symop_to_mat4_err(const char *symop) +{ + printf("\n **SYMMETRY OPERATOR ERROR**\n\n Error in interpreting symop \"%s\"\n\n", + symop); + ccp4_signal(CPARSER_ERRNO(CPARSERR_SymopToMat),"symop_to_mat4",NULL); + return 1; +} + +ccp4_symop mat4_to_rotandtrn(const float rsm[4][4]) { + + int i,j; + ccp4_symop symop; + + for (i = 0; i < 3; ++i) { + for (j = 0; j < 3; ++j) + symop.rot[i][j]=rsm[i][j]; + symop.trn[i]=rsm[i][3]; + } + + return (symop); +} + +char *rotandtrn_to_symop(char *symchs_begin, char *symchs_end, const ccp4_symop symop) +{ + float rsm[4][4]; + + rotandtrn_to_mat4(rsm,symop); + return(mat4_to_symop(symchs_begin,symchs_end,(const float (*)[4])rsm)); +} + +void rotandtrn_to_mat4(float rsm[4][4], const ccp4_symop symop) { + + int i,j; + + for (i = 0; i < 3; ++i) { + for (j = 0; j < 3; ++j) + rsm[i][j]=symop.rot[i][j]; + rsm[i][3]=symop.trn[i]; + rsm[3][i]=0.0; + } + rsm[3][3]=1.0; +} + +char *mat4_to_symop(char *symchs_begin, char *symchs_end, const float rsm[4][4]) +{ + static char axiscr[] = {'X','Y','Z'}; + static char numb[] = {'0','1','2','3','4','5','6','7','8','9'}; + static int npntr1[12] = { 0,1,1,1,0,1,0,2,3,5,0,0 }; + static int npntr2[12] = { 0,6,4,3,0,2,0,3,4,6,0,0 }; + + int jdo10, jdo20, irsm, itr, ist; + register char *ich; + int debug=0; + + if (debug) + for (jdo20 = 0; jdo20 != 4; ++jdo20) + printf("Input matrix: %f %f %f %f \n",rsm[jdo20][0],rsm[jdo20][1], + rsm[jdo20][2],rsm[jdo20][3]); + + /* blank output string */ + for (ich = symchs_begin; ich < symchs_end; ++ich) + *ich = ' '; + ich = symchs_begin; + + for (jdo20 = 0; jdo20 != 3; ++jdo20) { + *ich = '0'; + ist = 0; /* ---- Ist is flag for first character of operator */ + for (jdo10 = 0; jdo10 != 4; ++jdo10) { + + if (rsm[jdo20][jdo10] != 0.f) { + irsm = (int) rint(fabs(rsm[jdo20][jdo10])); + + if ( rsm[jdo20][jdo10] > 0. && ist) { + if (ich >= symchs_end) { + ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), + "mat4_to_symop 1", NULL); + return NULL; } + *ich++ = '+'; + } else if ( rsm[jdo20][jdo10] < 0.f ) { + if (ich >= symchs_end) { + ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), + "mat4_to_symop 2", NULL); + return NULL; } + if (jdo10 != 3) { + *ich++ = '-'; + } else { + /* translation part is forced to be positive, see below */ + *ich++ = '+'; + } + ist = 1; + } + + if (jdo10 != 3) { + /* rotation part */ + if (ich+1 >= symchs_end) { + ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), + "mat4_to_symop 3", NULL); + return NULL; } + if (irsm != 1) { + *ich++ = numb[irsm]; + *ich++ = axiscr[jdo10]; + } else { + *ich++ = axiscr[jdo10]; + } + ist = 1; + } else { + /* translation part */ + itr = (int) rint(rsm[jdo20][3]*12.0); + while (itr < 0) itr += 12; + itr = (itr - 1) % 12; + if (npntr1[itr] > 0) { + if (ich+2 >= symchs_end) { + ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), + "mat4_to_symop 4", NULL); + return NULL; } + *ich++ = numb[npntr1[itr]]; + *ich++ = '/'; + *ich++ = numb[npntr2[itr]]; + } else { + *--ich = ' '; + } + } + } + } + if (jdo20 != 2) { + if (*ich == '0') + ++ich; + if (ich+2 >= symchs_end) { + ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), + "mat4_to_symop 5", NULL); + return NULL; } + *ich++ = ','; + *ich++ = ' '; + *ich++ = ' '; + } + } + return symchs_begin; +} + +char *mat4_to_recip_symop(char *symchs_begin, char *symchs_end, const float rsm[4][4]) +{ + char *symop; + size_t lsymop; + register char *ich, *ich_out; + + lsymop = symchs_end-symchs_begin; + symop = (char *) ccp4_utils_malloc(lsymop*sizeof(char)); + + mat4_to_symop(symop, symop+lsymop, rsm); + ich_out = symchs_begin; + for (ich = symop; ich < symop+lsymop; ++ich) { + if (*ich == 'X') { + if (ich_out == symchs_begin || (ich_out > symchs_begin && + *(ich_out-1) != '-' && *(ich_out-1) != '+')) *ich_out++ = '+'; + *ich_out++ = 'h'; + } else if (*ich == 'Y') { + if (ich_out == symchs_begin || (ich_out > symchs_begin && + *(ich_out-1) != '-' && *(ich_out-1) != '+')) *ich_out++ = '+'; + *ich_out++ = 'k'; + } else if (*ich == 'Z') { + if (ich_out == symchs_begin || (ich_out > symchs_begin && + *(ich_out-1) != '-' && *(ich_out-1) != '+')) *ich_out++ = '+'; + *ich_out++ = 'l'; + } else if (*ich == ' ') { + /* skip */ + } else { + *ich_out++ = *ich; + } + } + while (ich_out < symchs_end) *ich_out++ = ' '; + + free (symop); + return symchs_begin; +} diff --git a/ccp4c/ccp4/ccp4_parser.h b/ccp4c/ccp4/ccp4_parser.h new file mode 100644 index 00000000..bb768e8b --- /dev/null +++ b/ccp4c/ccp4/ccp4_parser.h @@ -0,0 +1,308 @@ +/* + ccp4_parser.h: Headers for functions to read in and "parse" CCP4 keyworded input. + Copyright (C) 2001 CCLRC, Peter Briggs + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @page cparser_page CParser library + * + * @verbatim + + + + @endverbatim + * + * @section cparser_file_list File list + +
    +
  • ccp4_parser.h - contains details of the C/C++ API +
+ + * @section cparser_overview Overview + +These functions do CCP4-style parsing, as used for processing keywords +of CCP4 programs, MTZ header records, etc. + + * @section cparser_usage Usage + +The following code snippets illustrate how the functions might be used +to read from stdin: +
+
+int           ntok=0;
+char          line[201],*key;
+CCP4PARSERTOKEN * token=NULL;
+CCP4PARSERARRAY * parser;
+
+  parser = (CCP4PARSERARRAY *) ccp4_parse_start(20);
+  key   = parser->keyword;
+  token = parser->token;
+
+  RC   = 0;
+  while (!RC) {
+
+    line[0] = '\0';
+    ntok = ccp4_parser(line,200,parser,1);
+
+    if (ntok < 1) {
+
+      RC = 111;
+
+    } else {      
+
+      if (ccp4_keymatch("MINDIST",key))  {
+	if (ntok != 2) {
+	  ccperror ( 1,"MINDIST requires a single numerical argument" );
+	  RC = -100;
+	} else {
+	  minDist = token[1].value;
+        }
+      }	else  {
+	printf ( "Unrecognised keyword \"%s\"\n",token[0].fullstring );
+	RC = -118;
+      }
+    }
+  }
+
+  ccp4_parse_end ( parser );
+
+
+ + * @section cparser_examples Examples + +See the distributed programs NCONT and +PDBCUR. + + */ + +/** @file ccp4_parser.h + * + * @brief Functions to read in and "parse" CCP4-style keyworded input. + * + * @author Peter Briggs + * @date April 2001 + */ + +/*------------------------------------------------------------------*/ + +/* Macro definitions */ + +/*------------------------------------------------------------------*/ + +#ifndef __CCP4_Parser__ +#define __CCP4_Parser__ + +/* rcsidhhh[] = "$Id$" */ + +/* note order: these must be outside CCP4 namespace */ +#include +#include"ccp4_utils.h" +#include"ccp4_spg.h" + +/* Macro to make C functions callable from C++ */ +#ifdef __cplusplus +namespace CCP4 { +extern "C" { +typedef CSym::ccp4_symop ccp4_symop; +#endif + +/*------------------------------------------------------------------*/ + +/* Structures and typedefs */ + +/*------------------------------------------------------------------*/ + +/* CCP4 Parser token + Construct to hold the information about a single token */ + +typedef struct { + char *fullstring; /* Full string containing all of token */ + char word[5]; /* First four characters of token */ + double value; /* Equivalent numerical value */ + int isstring; /* Flag: true if token is character string */ + int strlength; /* Number of characters in whole token (strings only) */ + int isnumber; /* Flag: true if token is number */ + int intdigits; /* Number of 'digits' preceeding the decimal point + (numbers only) */ + int frcdigits; /* Number of 'digits' after the decimal point (numbers + only) */ + int isquoted; /* Flag: true if token is contained in quotes */ + int isnull; /* Flag: true if token is null field */ + int ibeg,iend; /* Begin and end character positions of token + in input line */ +} CCP4PARSERTOKEN; + +/* CCP4 Parser array + Construct to hold the information about a parsed line */ + +typedef struct { + /* "Public" members */ + char keyword[5]; /* Keyword (=token[1].token, uppercased) */ + int ntokens; /* Number of tokens */ + CCP4PARSERTOKEN *token; /* Array of tokens */ + /* "Private" members */ + FILE *fp; /* Pointer to an external command file */ + int maxtokens; /* Maximum number of tokens allowed */ + char *delim; /* List of delimiter characters */ + char *nulldelim; /* List of null delimiter characters */ + char *comment; /* List of comment characters */ + double max_exponent; /* Largest allowed exponent for numerical tokens */ + double min_exponent; /* Smallest allowed exponent for numerical tokens */ +} CCP4PARSERARRAY; + +/*------------------------------------------------------------------*/ + +/* Function Prototypes */ + +/*------------------------------------------------------------------*/ + +/* Core cparser functions */ + +/** Initialise a CCP4PARSERARRAY to be used in subsequent calls to + * ccp4_parser routines. The calling function must supply the maximum + * number of tokens on a line (including continuation lines). + * @param maxtokens maximum number of tokens on a line + * @return pointer to a new CCP4PARSERARRAY structure + */ +CCP4PARSERARRAY* ccp4_parse_start(const int maxtokens); + +/** Cleans up a CCP4PARSEARRAY after being used by ccp4_parse/ + ccp4_parser functions. + * @param parsePtr pointer to a CCP4PARSERARRAY structure + * @return 0 on completion + */ +int ccp4_parse_end(CCP4PARSERARRAY *parsePtr); + +int ccp4_parse_init_token(const CCP4PARSERARRAY *parsePtr, const int itok); + +int ccp4_parse_delimiters(CCP4PARSERARRAY *parsePtr, const char *delim, + const char *nulldelim); + +int ccp4_parse_comments(CCP4PARSERARRAY *parsePtr, const char *comment_chars); + +int ccp4_parse_maxmin(CCP4PARSERARRAY *parsePtr, const double max_exponent, + const double min_exponent); + +int ccp4_parse_reset(CCP4PARSERARRAY *parsePtr); + +int ccp4_parse(const char *line, CCP4PARSERARRAY *parser); + +/** The main function for parsing lines, either supplied or read + * from stdin. + * @param line pointer to a null-terminated string of characters, + * forming the input to be processed. On input can either be an empty + * string ("") which forces reading from stdin, or contain characters + * to be processed. On output "line" will be overwritten with the actual + * input line. + * @param n maximum number of characters that can be read into + * "line" i.e. the size of "line" in memory. + * @param parser pointer to a CCP4PARSERARRAY structure which will + * be used to hold the results of processing the input line. + * @param print flag controlling echoing of input lines to stdout. + * print=0: suppress echoing of lines to stdout. Otherwise echoing is + * turned on. + * @return Number of tokens found. + */ +int ccp4_parser(char *line, const int n, CCP4PARSERARRAY *parser, + const int print); + +/* External utility functions */ + +/** Test whether two keywords are identical. Keywords are identical if + * they are the same up to the first four characters, independent of case. + * @param keyin1 keyword 1. + * @param keyin2 keyword 2. + * @return 1 if keywords keyin1 and keyin2 are "identical", 0 otherwise. + */ +int ccp4_keymatch(const char *keyin1, const char *keyin2); + +/* Internal utility functions */ + +/** Convert string to uppercase. + * @param str1 On exit str1 will contain uppercased copy of str2 + * @param str2 Input string + * @return str1 + */ +char *strtoupper (char *str1, const char *str2); + +/** Convert string to lowercase. + * @param str1 On exit str1 will contain lowercased copy of str2 + * @param str2 Input string + * @return str1 + */ +char *strtolower (char *str1, const char *str2); + +int strmatch (const char *str1, const char *str2); + +int charmatch(const char character, const char *charlist); + +int doublefromstr(const char *str, const double max_exp, const double min_exp, + double *valuePtr, double *intvaluePtr, int *intdigitsPtr, + double *frcvaluePtr, int *frcdigitsPtr, + double *expvaluePtr, int *expdigitsPtr); + +/** Convert symmetry operator as string to ccp4_symop struct. + * @param symchs_begin pointer to beginning of string + * @param symchs_end pointer to end of string (i.e. last character + * is *(symchs_end-1) ) + * @return pointer to ccp4_symop struct + */ +ccp4_symop symop_to_rotandtrn(const char *symchs_begin, const char *symchs_end); + +/** Convert symmetry operator as string to matrix. + * This is Charles' version of symfr. Note that translations + * are held in elements [*][3] and [3][3] is set to 1.0 + * @param symchs_begin pointer to beginning of string + * @param symchs_end pointer to end of string (i.e. last character + * is *(symchs_end-1) ) + * @param rot 4 x 4 matrix operator + * @return NULL on error, final position pointer on success + */ +const char * symop_to_mat4(const char *symchs_begin, const char *symchs_end, float *rot); +int symop_to_mat4_err(const char *symop); +ccp4_symop mat4_to_rotandtrn(const float rsm[4][4]); +/* This is Charles' version of symtr */ +char *rotandtrn_to_symop(char *symchs_begin, char *symchs_end, const ccp4_symop symop); +void rotandtrn_to_mat4(float rsm[4][4], const ccp4_symop symop); + +/** Convert symmetry operator as matrix to string. + * This is Charles' version of symtr. Note that translations + * are held in elements [*][3] and [3][3] is set to 1.0 + * @param symchs_begin pointer to beginning of string + * @param symchs_end pointer to end of string (i.e. last character + * is *(symchs_end-1) ) + * @param rsm 4 x 4 matrix operator + * @return pointer to beginning of string + */ +char *mat4_to_symop(char *symchs_begin, char *symchs_end, const float rsm[4][4]); + +/** Convert symmetry operator as matrix to string in reciprocal space notation. + * This is Charles' version of symtr. Note that translations + * are held in elements [*][3] and [3][3] is set to 1.0 + * @param symchs_begin pointer to beginning of string + * @param symchs_end pointer to end of string (i.e. last character + * is *(symchs_end-1) ) + * @param rsm 4 x 4 matrix operator + * @return pointer to beginning of string + */ +char *mat4_to_recip_symop(char *symchs_begin, char *symchs_end, const float rsm[4][4]); + +#ifdef __cplusplus +} +} +#endif + +#endif /* __CCP4_Parser__ */ diff --git a/ccp4c/ccp4/ccp4_program.c b/ccp4c/ccp4/ccp4_program.c new file mode 100644 index 00000000..a7671be9 --- /dev/null +++ b/ccp4c/ccp4/ccp4_program.c @@ -0,0 +1,353 @@ +/* + ccp4_program.c: Utilies to set and fetch program information. + Copyright (C) 2001 CCLRC, Peter Briggs + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_program.c + * Utilies to set and fetch program information. + * Peter Briggs CCP4 May 2001 + */ + +#include +#include +#include +#include +#include "ccp4_program.h" +#include "ccp4_parser.h" +#include "ccp4_utils.h" +#include "ccp4_general.h" +/* rcsid[] = "$Id$" */ + +static char ccp4version[MAXLEN_PROGVERSION]; + +char *ccp4_prog_vers(const char *progvers) +{ + static char programversion[MAXLEN_PROGVERSION]=""; + + if (progvers) { + strncpy(programversion, progvers, MAXLEN_PROGVERSION); + programversion[MAXLEN_PROGVERSION-1] = '\0'; + } + return programversion; +} + +char *ccp4_vers_no(void) +{ + static int init=0; + + char *filepath=NULL, *filename=NULL; + char *vfile="/lib/ccp4/MAJOR_MINOR"; + FILE *cfile; + int i; + + if (!init) { + strcpy(ccp4version,CCP4_VERSION_NO); + + filepath = (char *) getenv("CCP4"); + if (filepath) { + filename = (char *) ccp4_utils_malloc(sizeof(char)*(strlen(filepath)+strlen(vfile))+1); + strcpy(filename,filepath); + strcat(filename,vfile); + if (ccpexists(filename)) { + cfile=fopen(filename,"r"); + if (cfile) { + fgets(ccp4version,MAXLEN_PROGVERSION,cfile); + i = strlen(ccp4version)-1; + while (isspace(ccp4version[i]) ) { + ccp4version[i--]='\0'; + } + } + } + /* Make sure that we clean up */ + if (filename) free(filename); + } + init=1; + } + return ccp4version; +} +/*------------------------------------------------------------------*/ + +/* ccp4ProgramName + + Set or return program name + + Always returns a pointer to the program name + If progname is not NULL then set the program name to + progname. + + NB Default program name will be returned as "CCP4", + until reset by the calling subprogram. +*/ +char *ccp4ProgramName(const char *progname) +{ + static char programname[MAXLEN_PROGNAME]="CCP4"; + int i; + + if (progname) { + i = 0; + while (progname[i] != '\0' && i < MAXLEN_PROGNAME) { + programname[i] = progname[i]; + ++i; + } + if (i == MAXLEN_PROGNAME) { + programname[MAXLEN_PROGNAME-1] = '\0'; + } else { + programname[i] = '\0'; + } + } + return programname; +} + +/* ccp4_prog_info + + Print program info for -i option. + */ +void ccp4_prog_info(void) +{ + printf("CCP4 software suite: library version %s\n",ccp4_vers_no()); + printf("CCP4 software suite: patch level %s\n",ccp4_vers_no()); + printf("Program: %s",ccp4ProgramName(NULL)); + if (ccp4_prog_vers(NULL) && strlen(ccp4_prog_vers(NULL))) + printf("; version %s",ccp4_prog_vers(NULL)); + printf("\n"); +} + +/* ccp4RCSDate + + Set or return program RCS date + + If the input string is not a NULL pointer then + it is assumed to be an RCS string + This is processed to extract a date string in + the form "DD/MM/YY" (day/month/year), which is + then stored. + + ccp4RCSDate always returns the currently + stored date string. +*/ +char *ccp4RCSDate(const char *rcs_string) +{ + static char RCSDate[MAXLEN_RCSDATE]=""; + char tmpstr1[8],tmpstr2[3]; + + /* Deconstruct the RCS string passed to this + function */ + if (rcs_string) { + /* Extract useful data from RCS string for examination */ + strncpy(tmpstr1,rcs_string,7); + tmpstr1[7] = '\0'; + strncpy(tmpstr2,rcs_string,2); + tmpstr2[2] = '\0'; + if (strncmp(tmpstr1,"$Date: ",7) == 0) { + /* Raw form of RCS string (not exported) i.e.: + "$Date$" + */ + /* Build the date string in the form DD/MM/YY */ + strncpy(RCSDate,rcs_string+15,2); + strncat(RCSDate,"/",1); + strncat(RCSDate,rcs_string+12,2); + strncat(RCSDate,"/",1); + strncat(RCSDate,rcs_string+9,2); + } else if (strlen(rcs_string) > 10 && + (strncmp(tmpstr2,"19",2) == 0 || strncmp(tmpstr2,"20",2)) ) { + /* RCS string after export i.e.: + "2003/05/14 11:45:13 ..." */ + /* Build the date string in the form DD/MM/YY */ + strncpy(RCSDate,rcs_string+8,2); + strncat(RCSDate,"/",1); + strncat(RCSDate,rcs_string+5,2); + strncat(RCSDate,"/",1); + strncat(RCSDate,rcs_string+2,2); + } else { + /* Fallback */ + strncpy(RCSDate,"",1); + } + } + /* Always return the stored date */ + return RCSDate; +} + +/* ccp4ProgramTime + + Set or print program time information +*/ +void ccp4ProgramTime(int init) +{ + static int elaps0=0; + static float tarray0[2]; + int elaps; + float tarray[2]; + + if (init || !elaps0 ) { + elaps0 = time(NULL); + ccp4_utils_etime(tarray0); + } else { + elaps = time(NULL) - elaps0; + ccp4_utils_etime(tarray); + + printf("Times: User: %9.1fs System: %6.1fs Elapsed: %5d:%2.2d \n", + tarray[0]-tarray0[0],tarray[1]-tarray0[1],elaps/60,elaps%60); + } + +} + +/* ccp4VerbosityLevel + + Set or return the reference verbosity level + + Always return the verbosity level - if verboselevel is + between 0 and 9 then reset the verbosity level to + verboselevel +*/ +int ccp4VerbosityLevel(int level) +{ + /* The default level is 1 */ + static int verbositylevel=1; + + if (level > -1 && level < 10) + verbositylevel = level; + return verbositylevel; +} + +/*------------------------------------------------------------------*/ + +/* + Callback functionality + */ + +/* ccp4Callback + + Set or invoke a user-defined callback function. + + Internal function: applications should use the API functions + ccp4SetCallback and ccp4InvokeCallback + */ +int ccp4Callback(CCP4INTFUNCPTR mycallback, char *mode, int ierr, + const char *message) +{ + static CCP4INTFUNCPTR callback=ccp4NullCallback; + + if (strncmp(mode,"set",3) == 0) { + /* Set callback + Store the pointer to the callback function */ + callback=mycallback; + return 1; + } else if (strncmp(mode,"invoke",3) == 0) { + /* Invoke callback + Execute the callback function */ + return callback(ierr,message); + } + /* Unrecognised mode */ + return 0; +} + +/* ccp4SetCallback + + Store a pointer to a user-defined callback function of + the form "int func(int, char *)" + + This is a wrapper to ccp4Callback in "set" mode. + */ +int ccp4SetCallback(CCP4INTFUNCPTR mycallback) +{ + return ccp4Callback(mycallback,"set",-1,"No message"); +} + +/* ccp4InvokeCallback + + Execute the user-defined callback function (previously + set up using ccp4SetCallback) with the supplied + arguments. + + This is a wrapper to ccp4Callback in "invoke" mode. + */ +int ccp4InvokeCallback(int ierr, const char *message) +{ + return ccp4Callback(ccp4NullCallback,"invoke",ierr,message); +} + +/* Default null callback function + + Internal function: this is the default callback function + used by ccp4Callback if no user-defined function has been + specified. + */ +int ccp4NullCallback(int level, const char *message) +{ + /* This is the default callback function which takes no + action */ + return 1; +} + +/*------------------------------------------------------------------*/ + +/* check existence of licence agreement */ + +int ccp4_licence_exists(const char *name) +{ + int sue=1,lpath; + char *filepath=NULL,*filename=NULL,tmp_string[20]; + + strtoupper(tmp_string,name); + if (strmatch(tmp_string,"CCP4")) { + filepath = (char *) getenv("CCP4"); + if (filepath) { + lpath = strlen(filepath); + filename = (char *) ccp4_utils_malloc(sizeof(char)*(lpath+12)); + strcpy(filename,filepath); + strcpy(filename+lpath,"/.agree2ccp4"); + if (ccpexists(filename)) sue = 0; + /* Make sure that we clean up */ + if (filename) free(filename); + } + if (sue == 1) { + filepath = (char *) getenv("HOME"); + if (filepath) { + lpath = strlen(filepath); + filename = (char *) ccp4_utils_malloc(sizeof(char)*(lpath+12)); + strcpy(filename,filepath); + strcpy(filename+lpath,"/.agree2ccp4"); + if (ccpexists(filename)) sue = 0; + /* Make sure that we clean up */ + if (filename) free(filename); + } + } + if (sue == 1) { + ccperror(1,"Cannot find required license agreements!"); + return 0; + } + } + return 1; +} + +/* html_log_output and summary_output currently only used by ccperror to + tidy up Fortran program output. Defaults are 0 for C programs. */ +int html_log_output(int ihtml_in) { + static int ihtml=0; + + if (ihtml_in >= 0) + ihtml = ihtml_in; + return ihtml; +} + +int summary_output(int isumm_in) { + static int isumm=0; + + if (isumm_in >= 0) + isumm = isumm_in; + return isumm; +} diff --git a/ccp4c/ccp4/ccp4_program.h b/ccp4c/ccp4/ccp4_program.h new file mode 100644 index 00000000..a5fb5bc1 --- /dev/null +++ b/ccp4c/ccp4/ccp4_program.h @@ -0,0 +1,171 @@ +/* + ccp4_program.h: Headers to utilies to set and fetch program information. + Copyright (C) 2001 CCLRC, Peter Briggs + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + + +/** @file ccp4_program.h + * Utilies to set and fetch program information. + * Peter Briggs CCP4 May 2001 + */ + +/*------------------------------------------------------------------*/ + +/* Macro definitions */ + +/*------------------------------------------------------------------*/ + +#ifndef __CCP4Program__ +#define __CCP4Program__ + +/* rcsidhp[] = "$Id$" */ + +#ifdef __cplusplus +namespace CCP4 { +extern "C" { +#endif + +#define CCP4_VERSION_NO "8.0" +#define CCP4_PATCH_LEVEL "8.0.0" + +/* Maximum lengths of strings holding program names and versions */ +#define MAXLEN_PROGNAME 80 +#define MAXLEN_PROGVERSION 80 +#define MAXLEN_RCSDATE 80 + +/*------------------------------------------------------------------*/ + +/* Type Definitions */ + +/*------------------------------------------------------------------*/ + +/* Define a type which is a pointer to a function taking an integer + and a pointer to character, and returning an integer */ +typedef int (*CCP4INTFUNCPTR)(int, const char *); + +/*------------------------------------------------------------------*/ + +/* Function Prototypes */ + +/*------------------------------------------------------------------*/ + +/** Register or query program version. + * @param progvers Program version string, or NULL to query existing value. + * @return Program version string. + */ +char *ccp4_prog_vers(const char *progvers); + +/** Query ccp4 version. + * @return CCP4 version string. + */ +char *ccp4_vers_no(void); + +/** Set or return program name. + * @param progname Program name, or NULL to query existing value. + * @return Program name + */ +char *ccp4ProgramName(const char *progname); + +/** Print program info for -i option. + */ +void ccp4_prog_info(void); + +/** Set or return program RCS date + * @param rcs_string Date string, or NULL to query existing value. + * @return Date string + */ +char *ccp4RCSDate(const char *rcs_string); + +/** Set or print program time information + * @param init + */ +void ccp4ProgramTime(int init); + +/** Set or return the reference verbosity level + * Always return the verbosity level - if verboselevel is + * between 0 and 9 then reset the verbosity level to + * verboselevel + * @param level Verbosity level, or -1 to query existing value. + * @return Verbosity level + */ +int ccp4VerbosityLevel(int level); + +/** Set or invoke a user-defined callback function + * The callback must be of the form "function(const int, const char *)" + * This is essentially an internal function which operates in one of two + * modes - in "set" mode the named function is stored and the remaining + * arguments are discarded; in "invoke" mode the stored function is + * executed with the supplied values (the supplied name is discarded). + * @param mycallback Callback function (discarded in "invoke" mode) + * @param mode Either "set" or "invoke" + * @param ierr An error level equivalent to that used in ccperror + * @param message A message string equivalent to that used in ccperror + * @return Result of the executed function (invoke mode) + */ +int ccp4Callback(CCP4INTFUNCPTR mycallback, char *mode, int ierr, + const char *message); + +/** Set a user-defined callback function + * This is a wrapper to ccp4Callback - it stores a user-defined + * callback function which must be of the form + * "function(const int, const char *)" + * @param mycallback Callback function + * @return 1 (if the function is stored), 0 (if it is not) + */ +int ccp4SetCallback(CCP4INTFUNCPTR mycallback); + +/** Invoke the user-defined callback function + * This is a wrapper to ccp4Callback - it executes the user-defined + * callback function previously stored. + * @param ierr An error level equivalent to that used in ccperror + * @param message A message string equivalent to that used in ccperror + * @return Result of the executed function + */ +int ccp4InvokeCallback(int ierr, const char *message); + +/** A dummy callback function used by default in ccp4CallOnExit + * Internal function. This function does nothing. + * @param level Severity level supplied from ccperror + * @param message Message text supplied from ccperror + * @return Always returns 1 +*/ +int ccp4NullCallback(int level, const char *message); + +/** Check existence of licence agreement + * @param name Name of licence, e.g. "CCP4". + * @return 1 for licence exists, else 0. + */ +int ccp4_licence_exists(const char *name); + +/** Register or query html output level. + * @param ihtml_in 0 = turn off html output, 1 = turn on html output, -1 = query existing value + * @return 0 = no html output, 1 = html output + */ +int html_log_output(int ihtml_in); + +/** Register or query summary output level. + * @param isumm_in 0 = turn off summary output, 1 = turn on summary output, -1 = query existing value + * @return 0 = no summary output, 1 = summary output + */ +int summary_output(int isumm_in); + +#ifdef __cplusplus +} +} +#endif + +#endif /* __CCP4Program__ */ diff --git a/ccp4c/ccp4/ccp4_spg.h b/ccp4c/ccp4/ccp4_spg.h new file mode 100644 index 00000000..ac303b99 --- /dev/null +++ b/ccp4c/ccp4/ccp4_spg.h @@ -0,0 +1,96 @@ +/* + ccp4_spg.h: Data structure for symmetry information + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_spg.h + * + * @brief Data structure for symmetry information. + * + * A data structure for spacegroup information and related + * quantities. Some items are loaded from syminfo.lib while + * others are calculated on the fly. + * + * There is also a struct for symop rotation matrices and translation + * vectors. This can be converted to other representations using + * functions in ccp4_parser. + * + * @author Martyn Winn + */ + +#ifndef __CCP4_SPG__ +#define __CCP4_SPG__ +/* rcsidhsp[] = "$Id$" */ + +#ifdef __cplusplus +namespace CSym { +extern "C" { +#endif + +/* Kevin's symmetry operator */ + +typedef struct ccp4_symop_ +{ + float rot[3][3]; + float trn[3]; +} ccp4_symop; + +typedef struct ccp4_spacegroup_ +{ + int spg_num; /* true spacegroup number */ + int spg_ccp4_num; /* CCP4 spacegroup number */ + char symbol_Hall[40]; /* Hall symbol */ + char symbol_xHM[20]; /* Extended Hermann Mauguin symbol */ + char symbol_old[20]; /* old spacegroup name */ + + char point_group[20]; /* point group name */ + char crystal[20]; /* crystal system e.g. MONOCLINIC */ + + int nlaue; /* CCP4 Laue class number, inferred from asu_descr */ + char laue_name[20]; /* Laue class name */ + int laue_sampling[3]; /* sampling factors for FFT */ + + int npatt; /* Patterson spacegroup number, inferred from asu_descr */ + char patt_name[40]; /* Patterson spacegroup name */ + + int nsymop; /* total number of symmetry operations */ + int nsymop_prim; /* number of primitive symmetry operations */ + ccp4_symop *symop; /* symmetry matrices */ + ccp4_symop *invsymop; /* inverse symmetry matrices */ + + float chb[3][3]; /* change of basis matrix from file */ + + char asu_descr[80]; /* asu description from file */ + int (*asufn)(const int, const int, const int); /* pointer to ASU function */ + + int centrics[12]; /* symop which generates centric zone, 0 if none */ + int epsilon[13]; /* flag which epsilon zones are applicable */ + + char mapasu_zero_descr[80]; /* origin-based map asu: description from file */ + float mapasu_zero[3]; /* origin-based map asu: upper limits */ + + char mapasu_ccp4_descr[80]; /* CCP4 map asu: defaults to mapasu_zero */ + float mapasu_ccp4[3]; /* CCP4 map asu: upper limits */ + +} CCP4SPG; + +#ifdef __cplusplus +} } +#endif + +#endif /*!__CCP4_SPG__ */ + diff --git a/ccp4c/ccp4/ccp4_sysdep.h b/ccp4c/ccp4/ccp4_sysdep.h new file mode 100644 index 00000000..17700025 --- /dev/null +++ b/ccp4c/ccp4/ccp4_sysdep.h @@ -0,0 +1,273 @@ +/* + ccp4_sysdep.h: System-dependent definitions + Copyright (C) 2001 CCLRC + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_sysdep.h + * + * @brief System-dependent definitions. + * + * @author Charles Ballard, based in part on earlier versions + */ + +#ifndef __CCP4_BITS +#define __CCP4_BITS + +#ifdef __sgi /* in ANSI mode */ +# ifndef sgi +# define sgi +# endif +#endif + +#ifndef VMS +# if defined (vms) || defined (__vms) || defined (__VMS) +# define VMS +# endif +#endif + +#if defined (sun) || defined (__sun) +# if !defined(__STDC__) || defined(__GNUC__) +# if !defined(G77) + extern char *sys_errlist []; +# define strerror(i) sys_errlist[i] /* k&r compiler doesn't have it */ +# endif +# endif +#endif + +#if defined (_AIX) || defined(___AIX) || defined (__hpux) +# define CALL_LIKE_HPUX 1 +#elif defined (VMS) +# define CALL_LIKE_VMS 1 +#elif defined (_MSC_VER) && (_MSC_VER >= 800) +# define CALL_LIKE_MVS 2 +#elif defined (_MSC_VER) || (defined (_WIN32) && !defined(__MINGW32__)) +# define CALL_LIKE_MVS 1 +#else +# define CALL_LIKE_SUN 1 +#endif + +#ifndef _POSIX_SOURCE +#define _POSIX_SOURCE +#endif + +#include + +#if defined (VMS) +# include /* non-POSIX */ +# define NOUNISTD +#else +# include +# include +# if !defined (_WIN32) && !defined (_MSC_VER) +# include +# endif +# ifdef _MSC_VER +# define NOUNISTD +# endif +#endif + +#include +#include + +#ifndef NOUNISTD +# include +#else +# ifndef VMS +# ifndef _MSC_VER +# include /* ESV, old Concentrix */ /* non-POSIX */ +# endif +# endif +#endif +#ifndef NOSTDLIB /* for TitanOS 4.2, at least? */ +# include +#endif + +#include +#include + +#if defined(_AIX) || defined (__hpux) || defined(F2C) ||\ + defined(G77) || defined(_WIN32) || defined (sun) /* would do no harm on others, though */ +# include +#endif + +#include +#include + +#if defined (F2C) +# define Skip_f2c_Undefs +# include "f2c.h" +#endif +#if defined (G77) +# define Skip_f2c_Undefs /* g2c.h infelicity... */ +# if defined (HAVE_G2C_H) +# include "g2c.h" +# endif +#endif + +/* Using MSVC need __declspec */ +#if defined(__WIN32__) || defined(_WIN32) +# if defined(_MSC_VER) && defined(DLL_EXPORT) +# define CCP4_DL_IMPORT(type) __declspec(dllexport) type +# define CCP4_DL_EXPORT __declspec(dllexport) +# elif defined(_MSC_VER) +# define CCP4_DL_IMPORT(type) __declspec(dllimport) type +# define CCP4_DL_EXPORT +# else +# define CCP4_DL_IMPORT(type) type +# define CCP4_DL_EXPORT +# endif +#else +# define CCP4_DL_IMPORT(type) type +# define CCP4_DL_EXPORT +#endif + +/* defined in library_utils.c */ +#if defined (_MSC_VER) && _MSC_VER < 1800 + double rint(double x); +#endif + +#ifdef _MSC_VER +#define M_PI 3.14159265358979323846 +#endif + +#ifdef _WIN32 +# define PATH_SEPARATOR '\\' +# define EXT_SEPARATOR '.' +#else +# define PATH_SEPARATOR '/' +# define EXT_SEPARATOR '.' +#endif + +#define MAXFLEN 512 /**< the maximum length of a filename in CCP4 */ +#define MAXFILES 16 /**< maximum number of files open symultaneously */ +#define DEFMODE 2 /**< default mode access for random access files */ + +#define IRRELEVANT_OP 0 +#define READ_OP 1 +#define WRITE_OP 2 + +#include +#ifndef SEEK_SET +# define SEEK_SET 0 +# define SEEK_CUR 1 +# define SEEK_END 2 +#endif /* ! SEEK_SET */ +#ifndef O_WRONLY +#define O_RDONLY 0x0000 /**< i/o mode: read-only */ +#define O_WRONLY 0x0001 /**< i/o mode: write-only */ +#define O_RDWR 0x0002 /**< i/o mode: read and write */ +#define O_APPEND 0x0008 /**< i/o mode: append to existing file */ +#define O_CREAT 0x0200 /**< i/o mode: create file */ +#define O_TRUNC 0x0400 /**< i/o mode: truncate existing file */ +#endif +#define O_TMP 0x0010 /**< i/o mode: scratch file */ + +/* Before version 6.3 we defined BYTE, INT16 and INT32 (without the CCP4_ + * prefix). The prefix has been added to avoid name conflicts. + */ +#define CCP4_BYTE 0 +#define CCP4_INT16 1 +#define CCP4_INT32 6 +#define CCP4_INT64 5 +#define FLOAT32 2 +#define COMP32 3 +#define COMP64 4 + +#define DFNTI_MBO 1 /**< Motorola byte order 2's compl */ +#define DFNTI_IBO 4 /**< Intel byte order 2's compl */ + +#define DFNTF_BEIEEE 1 /**< big endian IEEE (canonical) */ +#define DFNTF_VAX 2 /**< Vax format */ +#define DFNTF_CONVEXNATIVE 5 /**< Convex native floats */ +#define DFNTF_LEIEEE 4 /**< little-endian IEEE format */ + +#if defined (VAX) || defined (vax) /* gcc seems to use vax */ +# define NATIVEFT DFNTF_VAX +# define NATIVEIT DFNTI_IBO +#endif + +#if defined(MIPSEL) || defined(i386) || defined(i860) || defined(__ia64__) || defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +# define NATIVEIT DFNTI_IBO +# define NATIVEFT DFNTF_LEIEEE +#endif + +#if defined (powerpc) || defined (__powerpc__) || defined (__ppc__) || \ + defined __PPC || defined (__s390__) || defined (__s390x__) || \ + defined (__hppa__) +# define NATIVEIT DFNTI_MBO +# define NATIVEFT DFNTF_BEIEEE +#endif + +#ifdef __alpha +# ifdef VMS +# if __IEEE_FLOAT == 1 +# define NATIVEFT DFNTF_LEIEEE +# else +# define NATIVEFT DFNTF_VAX +# endif +# else /* assume OSF/1 */ +# define NATIVEFT DFNTF_LEIEEE +# endif +# define NATIVEIT DFNTI_IBO +#endif + +#if defined(MIPSEB) || defined(__hpux) || defined(_AIX) || defined(m68k) || defined(mc68000) || defined(sparc) || defined (__sparc__) +# define NATIVEIT DFNTI_MBO +# define NATIVEFT DFNTF_BEIEEE +#endif + +#if defined(__ARM__) || defined(__arm__) || defined(__aarch64__) +# if defined(__ARMEB__) || defined (__AARCH64EB__) +# define NATIVEIT DFNTI_MBO +# define NATIVEFT DFNTF_BEIEEE +# elif defined(__ARMEL__) || defined (__AARCH64EL__) +# define NATIVEIT DFNTI_IBO +# define NATIVEFT DFNTF_LEIEEE +# endif +#endif + +/* From time to time new architectures are added here, often because Linux + * packagers want to build it on all platforms supported by their distro. + * Here we try to catch machines not listed explicitely above, under + * assumption that endianness is the same for floating point numbers + * as for integers. Which is safe assumption on modern standard computers + * (not embedded systems), according to + * http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness + */ +#if !defined(NATIVEIT) && !defined(NATIVEFT) && defined(__BYTE_ORDER) +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define NATIVEIT DFNTI_IBO +# define NATIVEFT DFNTF_LEIEEE +# elif __BYTE_ORDER == __BIG_ENDIAN +# define NATIVEIT DFNTI_MBO +# define NATIVEFT DFNTF_BEIEEE +# endif +#endif + +#ifndef NATIVEFT +# error "Can't determine machine number format" +#endif + +#define DFNT_UINT 0 /**< unsigned int */ +#define DFNT_SINT 1 /**< short int */ +#define DFNT_INT 2 /**< int */ +#define DFNT_UCHAR 3 /**< unsigned char */ +#define DFNT_CHAR 4 /**< char */ +#define DFNT_FLOAT 5 /**< float */ +#define DFNT_DOUBLE 6 /**< double */ + +#endif /* __CCP4_BITS */ diff --git a/ccp4c/ccp4/ccp4_types.h b/ccp4c/ccp4/ccp4_types.h new file mode 100644 index 00000000..4ec074af --- /dev/null +++ b/ccp4c/ccp4/ccp4_types.h @@ -0,0 +1,74 @@ +/* + ccp4_types.h: CCP4 library.c macro definitions etc + Copyright (C) 2001 CCLRC + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __CCP4_TYPES +#define __CCP4_TYPES + +#include "ccp4_sysdep.h" + +typedef unsigned short uint16; +#ifdef SIXTEENBIT +typedef unsigned long uint32; +#else +typedef unsigned int uint32; +#endif +typedef float float32; +typedef unsigned char uint8; +union float_uint_uchar { + float32 f; + uint32 i; + uint8 c[4]; + }; + +typedef char * pstr; + +/* CCP4 library.c macro definitions */ + +#ifndef FALSE +#define FALSE 0 +#define TRUE 1 +#endif + +typedef struct { double r; /* radial and */ + double phi; /* angular component of */ + } POLAR; /* a complex number */ + +/* some simple macros, which may exist anyway */ +#ifndef SQR +#define SQR(x) ((x)*(x)) +#endif +#ifndef DEGREE +#define DEGREE(x) ((((x < 0)?(x)+2*M_PI:(x))*360)/(2*M_PI)) +#endif +#ifndef RADIAN +#define RADIAN(x) ((((x<0)?(x)+360:(x))*2*M_PI)/360) +#endif +#ifndef MAX +#define MAX(x, y) (((x)>(y))?(x):(y)) +#endif +#ifndef MIN +#define MIN(x, y) (((x)<(y))?(x):(y)) +#endif +#ifndef ABS +#define ABS(x) (((x)<0)?-(x):(x)) +#endif +#ifndef SIGN +#define SIGN(x) (((x)<0)?-1:1) +#endif + +#endif /* __CCP4_TYPES */ diff --git a/ccp4c/ccp4/ccp4_unitcell.c b/ccp4c/ccp4/ccp4_unitcell.c new file mode 100644 index 00000000..640dee02 --- /dev/null +++ b/ccp4c/ccp4/ccp4_unitcell.c @@ -0,0 +1,328 @@ +/* + ccp4_unitcell.c: C library for manipulations based on cell parameters. + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_unitcell.c + * C library for manipulations based on cell parameters. + * Martyn Winn + */ + +#include + +#include "ccp4_unitcell.h" +#include "cvecmat.h" +#include "ccp4_errno.h" +/* rcsid[] = "$Id$" */ + +/* from input cell and orthogonalisation code, find orthogonalisation + and fractionalisation matrices. Returns cell volume. */ + +double ccp4uc_frac_orth_mat(const double cell[6], const int ncode, + double ro[3][3], double rf[3][3]) +{ + int i,j; + double conv,alph,bet,gamm,sina,cosa,sinb,cosb,sing,cosg, + sinas,cosas,sinbs,cosbs,sings,cosgs,a,b,c; + + conv = atan(1.0)*4.0/180.0; + alph = cell[3]*conv; + bet = cell[4]*conv; + gamm = cell[5]*conv; + sina = sin(alph); + cosa = cos(alph); + sinb = sin(bet); + cosb = cos(bet); + sing = sin(gamm); + cosg = cos(gamm); + cosas = (cosg*cosb-cosa)/ (sinb*sing); + sinas = sqrt(1.0-cosas*cosas); + cosbs = (cosa*cosg-cosb)/ (sina*sing); + sinbs = sqrt(1.0-cosbs*cosbs); + cosgs = (cosa*cosb-cosg)/ (sina*sinb); + sings = sqrt(1.0-cosgs*cosgs); + a = cell[0]; + b = cell[1]; + c = cell[2]; + + /* calculate ro */ + for ( i = 0; i < 3; i++ ) + for ( j = 0; j < 3; j++ ) + ro[i][j] = 0.0; + + /* ncode 1 - xo along a zo along c* */ + + switch (ncode) { + case 1: + ro[0][0] = a; + ro[0][1] = b*cosg; + ro[0][2] = c*cosb; + ro[1][1] = b*sing; + ro[1][2] = -c*sinb*cosas; + ro[2][2] = c*sinb*sinas; + break; + + /* ncode 2 - xo along b zo along a* */ + + case 2: + ro[0][0] = a*cosg; + ro[0][1] = b; + ro[0][2] = c*cosa; + ro[1][0] = -a*sing*cosbs; + ro[1][2] = c*sina; + ro[2][0] = a*sing*sinbs; + break; + + /* ncode 3 - xo along c zo along b* */ + + case 3: + ro[0][0] = a*cosb; + ro[0][1] = b*cosa; + ro[0][2] = c; + ro[1][0] = a*sinb; + ro[1][1] = -b*sina*cosgs; + ro[2][1] = b*sina*sings; + break; + + /* ncode 4 - trigonal only - xo along a+b yo alon a-b zo along c* */ + + case 4: + ro[0][0] = a/2.0; + ro[0][1] = a/2.0; + ro[1][0] = -a*sing; + ro[1][1] = a*sing; + ro[2][2] = c; + break; + + /* ncode 5 - xo along a* zo along c */ + + case 5: + ro[0][0] = a*sinb*sings; + ro[1][0] = -a*sinb*cosgs; + ro[1][1] = b*sina; + ro[2][0] = a*cosb; + ro[2][1] = b*cosa; + ro[2][2] = c; + break; + + /* ncode 6 - grr*! to gerard bricogne - his setting for p1 in skew. + xo along a yo along b* */ + + case 6: + ro[0][0] = a; + ro[0][1] = b*cosg; + ro[0][2] = c*cosb; + ro[1][1] = b*sing*sinas; + ro[2][1] = -b*sing*cosas; + ro[2][2] = c*sinb; + break; + } + + /* now calculate rf from ro, determinant gives cell volume */ + + return invert3matrix((const double (*)[3]) ro, rf); + +} + +/* from input cell, find dimensions of reciprocal cell. + Returns reciprocal cell volume. */ + +double ccp4uc_calc_rcell(const double cell[6], double rcell[6]) +{ + double conv,alph,bet,gamm,vol,sina,cosa,sinb,cosb,sing,cosg, + sinas,cosas,sinbs,cosbs,sings,cosgs,a,b,c; + + conv = 3.14159/180.0; + alph = cell[3]*conv; + bet = cell[4]*conv; + gamm = cell[5]*conv; + vol = ccp4uc_calc_cell_volume(cell); + sina = sin(alph); + cosa = cos(alph); + sinb = sin(bet); + cosb = cos(bet); + sing = sin(gamm); + cosg = cos(gamm); + cosas = (cosg*cosb-cosa)/ (sinb*sing); + sinas = sqrt(1.0-cosas*cosas); + cosbs = (cosa*cosg-cosb)/ (sina*sing); + sinbs = sqrt(1.0-cosbs*cosbs); + cosgs = (cosa*cosb-cosg)/ (sina*sinb); + sings = sqrt(1.0-cosgs*cosgs); + a = cell[0]; + b = cell[1]; + c = cell[2]; + rcell[0] = b*c*sina/vol; + rcell[1] = c*a*sinb/vol; + rcell[2] = a*b*sing/vol; + rcell[3] = atan2(sinas,cosas)/conv; + rcell[4] = atan2(sinbs,cosbs)/conv; + rcell[5] = atan2(sings,cosgs)/conv; + + return (1.0 / vol); +} + +/* Convert orthogonal to fractional coordinates. Translation only if + deliberate origin shift - does this ever happen? Leave it to the + application. */ + +void ccp4uc_orth_to_frac(const double rf[3][3], const double xo[3], double xf[3]) +{ + xf[0] = rf[0][0]*xo[0] + rf[0][1]*xo[1] + rf[0][2]*xo[2]; + xf[1] = rf[1][0]*xo[0] + rf[1][1]*xo[1] + rf[1][2]*xo[2]; + xf[2] = rf[2][0]*xo[0] + rf[2][1]*xo[1] + rf[2][2]*xo[2]; +} + +/* Convert fractional to orthogonal coordinates. */ + +void ccp4uc_frac_to_orth(const double ro[3][3], const double xf[3], double xo[3]) +{ + xo[0] = ro[0][0]*xf[0] + ro[0][1]*xf[1] + ro[0][2]*xf[2]; + xo[1] = ro[1][0]*xf[0] + ro[1][1]*xf[1] + ro[1][2]*xf[2]; + xo[2] = ro[2][0]*xf[0] + ro[2][1]*xf[1] + ro[2][2]*xf[2]; +} + +/* Convert orthogonal to fractional u matrix. */ + +void ccp4uc_orthu_to_fracu(const double rf[3][3], const double uo[6], double uf[6]) +{ + int i,j; + double uomat[3][3], ufmat[3][3], rft[3][3], temp[3][3]; + + uomat[0][0] = uo[0]; uomat[0][1] = uo[3]; uomat[0][2] = uo[4]; + uomat[1][0] = uo[3]; uomat[1][1] = uo[1]; uomat[1][2] = uo[5]; + uomat[2][0] = uo[4]; uomat[2][1] = uo[5]; uomat[2][2] = uo[2]; + for ( i = 0; i < 3; i++ ) + for ( j = 0; j < 3; j++ ) + rft[i][j] = rf[j][i]; + + ccp4_3matmul(temp,(const double (*)[3]) uomat,(const double (*)[3]) rft); + ccp4_3matmul(ufmat,rf,(const double (*)[3]) temp); + + uf[0] = ufmat[0][0]; uf[1] = ufmat[1][1]; uf[2] = ufmat[2][2]; + uf[3] = ufmat[0][1]; uf[4] = ufmat[0][2]; uf[5] = ufmat[1][2]; +} + +/* Convert fractional to orthogonal u matrix. */ + +void ccp4uc_fracu_to_orthu(const double ro[3][3], const double uf[6], double uo[6]) +{ + int i,j; + double uomat[3][3], ufmat[3][3], rot[3][3], temp[3][3]; + + ufmat[0][0] = uf[0]; ufmat[0][1] = uf[3]; ufmat[0][2] = uf[4]; + ufmat[1][0] = uf[3]; ufmat[1][1] = uf[1]; ufmat[1][2] = uf[5]; + ufmat[2][0] = uf[4]; ufmat[2][1] = uf[5]; ufmat[2][2] = uf[2]; + for ( i = 0; i < 3; i++ ) + for ( j = 0; j < 3; j++ ) + rot[i][j] = ro[j][i]; + + ccp4_3matmul(temp,(const double (*)[3]) ufmat,(const double (*)[3]) rot); + ccp4_3matmul(uomat,ro,(const double (*)[3]) temp); + + uo[0] = uomat[0][0]; uo[1] = uomat[1][1]; uo[2] = uomat[2][2]; + uo[3] = uomat[0][1]; uo[4] = uomat[0][2]; uo[5] = uomat[1][2]; +} + +/* Calculate cell volume from cell parameters */ + +double ccp4uc_calc_cell_volume(const double cell[6]) +{ + double conv,alph,bet,gamm,sum,v; + + conv = 3.14159/180.0; + alph = cell[3]*conv; + bet = cell[4]*conv; + gamm = cell[5]*conv; + sum = (alph+bet+gamm)*0.5; + v = sqrt(sin(sum-alph)*sin(sum-bet)*sin(sum-gamm)*sin(sum)); + return (2.0*cell[0]*cell[1]*cell[2]*v); +} + +/* Check cells agree within tolerance */ + +int ccp4uc_cells_differ(const double cell1[6], const double cell2[6], const double tolerance) +{ + int i; + double vol1, vol2, acheck; + + vol1 = ccp4uc_calc_cell_volume(cell1); + vol2 = ccp4uc_calc_cell_volume(cell2); + + /* check cell volumes */ + acheck = fabs(0.5*(vol1 - vol2))/(vol1 + vol2); + if (acheck > tolerance) { + if (ccp4_liberr_verbosity(-1)) { + printf("Difference in cell volumes detected.\n"); + printf(" vol1 = %lf vol2 = %lf \n",vol1,vol2); + } + return 1; + } + + /* check cell parameters */ + acheck = 0.0; + for ( i = 0; i < 6; i++ ) + acheck += fabs(0.5*(cell2[i]-cell1[i]))/(cell2[i]+cell1[i]); + if (acheck > 3.0*tolerance) { + if (ccp4_liberr_verbosity(-1)) { + printf("Large difference in cell parameters detected.\n"); + printf(" cell1 = %lf %lf %lf %lf %lf %lf \n", + cell1[0],cell1[1],cell1[2],cell1[3],cell1[4],cell1[5]); + printf(" cell2 = %lf %lf %lf %lf %lf %lf \n", + cell2[0],cell2[1],cell2[2],cell2[3],cell2[4],cell2[5]); + } + return 1; + } else if (acheck > tolerance) { + if (ccp4_liberr_verbosity(-1)) { + printf("Small difference in cell parameters detected.\n"); + printf(" cell1 = %lf %lf %lf %lf %lf %lf \n", + cell1[0],cell1[1],cell1[2],cell1[3],cell1[4],cell1[5]); + printf(" cell2 = %lf %lf %lf %lf %lf %lf \n", + cell2[0],cell2[1],cell2[2],cell2[3],cell2[4],cell2[5]); + } + return 1; + } + return 0; +} + +int ccp4uc_is_rhombohedral(const float cell[6], const float tolerance) { + + double acheck; + + acheck = fabs(cell[0]-cell[1]); + acheck += fabs(cell[1]-cell[2]); + acheck += fabs(cell[0]-cell[2]); + acheck += fabs(cell[3]-cell[4]); + acheck += fabs(cell[3]-cell[5]); + acheck += fabs(cell[4]-cell[5]); + if (acheck > (double) tolerance) return 0; + return 1; + +} + +int ccp4uc_is_hexagonal(const float cell[6], const float tolerance) { + + double acheck; + + acheck = fabs(cell[0]-cell[1]); + acheck += fabs(cell[3]-90.0); + acheck += fabs(cell[4]-90.0); + acheck += fabs(cell[5]-120.0); + if (acheck > (double) tolerance) return 0; + return 1; + +} diff --git a/ccp4c/ccp4/ccp4_unitcell.h b/ccp4c/ccp4/ccp4_unitcell.h new file mode 100644 index 00000000..07dd29c4 --- /dev/null +++ b/ccp4c/ccp4/ccp4_unitcell.h @@ -0,0 +1,119 @@ +/* + ccp4_unitcell.h: headers for C library for ccp4_unitcell.c + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_unitcell.h + * C library for manipulations based on cell parameters. + * Martyn Winn + */ + +#ifndef __CCP4_UNITCELL +#define __CCP4_UNITCELL + +#ifdef __cplusplus +namespace CCP4uc { +extern "C" { +#endif + +#include + +/** From input cell and orthogonalisation code, find orthogonalisation + and fractionalisation matrices. + * @param cell + * @param ncode + * @param ro + * @param rf + * @return Cell volume + */ +double ccp4uc_frac_orth_mat(const double cell[6], const int ncode, + double ro[3][3], double rf[3][3]); + +/** From input cell, find dimensions of reciprocal cell. + * @param cell + * @param rcell + * @return Reciprocal cell volume + */ +double ccp4uc_calc_rcell(const double cell[6], double rcell[6]); + +/** Convert orthogonal to fractional coordinates. Translation only if + deliberate origin shift - does this ever happen? Leave it to the + application. + * @param rf + * @param xo + * @param xf + * @return void + */ +void ccp4uc_orth_to_frac(const double rf[3][3], const double xo[3], double xf[3]); + +/** Convert fractional to orthogonal coordinates. + * @param ro + * @param xf + * @param xo + * @return void + */ +void ccp4uc_frac_to_orth(const double ro[3][3], const double xf[3], double xo[3]); + +/** Convert orthogonal to fractional u matrix. + * @param rf + * @param uo + * @param uf + * @return void + */ +void ccp4uc_orthu_to_fracu(const double rf[3][3], const double uo[6], double uf[6]); + +/** Convert fractional to orthogonal u matrix. + * @param ro + * @param uf + * @param uo + * @return void + */ +void ccp4uc_fracu_to_orthu(const double ro[3][3], const double uf[6], double uo[6]); + +/** Calculate cell volume from cell parameters. + * @param cell + * @return Cell volume. + */ +double ccp4uc_calc_cell_volume(const double cell[6]); + +/** Check cells agree within tolerance. + * @param cell1 First cell. + * @param cell2 Second cell. + * @param tolerance A tolerance for agreement. + * @return 1 if cells differ by more than tolerance, 0 otherwise. + */ +int ccp4uc_cells_differ(const double cell1[6], const double cell2[6], const double tolerance); + +/** Check if cell parameters conform to a rhombohedral setting. + * @param cell Cell parameters. Angles are assumed to be in degrees. + * @param tolerance A tolerance for agreement. + * @return 1 if cell parameters conform, 0 otherwise. + */ +int ccp4uc_is_rhombohedral(const float cell[6], const float tolerance); + +/** Check if cell parameters conform to a hexagonal setting. + * @param cell Cell parameters. Angles are assumed to be in degrees. + * @param tolerance A tolerance for agreement. + * @return 1 if cell parameters conform, 0 otherwise. + */ +int ccp4uc_is_hexagonal(const float cell[6], const float tolerance); + +#ifdef __cplusplus +} } +#endif + +#endif /*!CCP4_UNITCELL */ diff --git a/ccp4c/ccp4/ccp4_utils.h b/ccp4c/ccp4/ccp4_utils.h new file mode 100644 index 00000000..ba579eb9 --- /dev/null +++ b/ccp4c/ccp4/ccp4_utils.h @@ -0,0 +1,112 @@ +/* + ccp4_utils.h: headers for utility functions. + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file ccp4_utils.h + * @brief Utility functions. + * @author Charles Ballard + */ + +#ifndef __CCP4_UTILS +#define __CCP4_UTILS + +#include +#include "ccp4_types.h" +#include "library_file.h" +/* rcsidh[] = "$Id$" */ + +#ifdef __cplusplus +namespace CCP4 { +extern "C" { +#endif + +/**************************************************************************** + * Function prototypes * + ****************************************************************************/ + +size_t ccp4_utils_flength (char *, int); + +int ccp4_utils_translate_mode_float(float *, const void *, int, int); + +void ccp4_utils_fatal (const char *); + +void ccp4_utils_print (const char *message); + +int ccp4_utils_setenv (char *); + +/* turn on line buffering for stdout */ +int ccp4_utils_outbuf (void); + +/* turn off any buffering on stdin */ +int ccp4_utils_noinpbuf (void); + +union float_uint_uchar ccp4_nan (); + +int ccp4_utils_isnan (const union float_uint_uchar *); + +void ccp4_utils_bml (int, union float_uint_uchar *); + +void ccp4_utils_wrg (int, union float_uint_uchar *, float *); + +void ccp4_utils_hgetlimits (int *, float *); + +int ccp4_utils_mkdir (const char *, const char *); + +int ccp4_utils_chmod (const char *, const char *); + +void *ccp4_utils_malloc(size_t); + +void *ccp4_utils_realloc(void *, size_t); + +void *ccp4_utils_calloc(size_t, size_t); + +int ccp4_file_size(const char *); + +char *ccp4_utils_username(void); + +char *ccp4_utils_basename(const char *filename); + +char *ccp4_utils_pathname(const char *filename); + +char *ccp4_utils_extension(const char *filename); + +char *ccp4_utils_joinfilenames(const char *dir, const char *file); + +void ccp4_utils_idate (int *); + +char *ccp4_utils_date(char *); + +void ccp4_utils_itime (int *); + +char *ccp4_utils_time(char *); + +float ccp4_utils_etime (float *); + +#if defined (_MSC_VER) +double ccp4_erfc( double x ); +#endif + +/**************************************************************************** +* End of prototypes * +*****************************************************************************/ +#ifdef __cplusplus +} +} +#endif + +#endif /* __CCP4_UTILS */ diff --git a/ccp4c/ccp4/ccp4_vars.h b/ccp4c/ccp4/ccp4_vars.h new file mode 100644 index 00000000..d2a463fb --- /dev/null +++ b/ccp4c/ccp4/ccp4_vars.h @@ -0,0 +1,46 @@ +/* + ccp4_vars.h: Standard strings for certain quantites + Copyright (C) 2002 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +/* +*/ + +/* Author: Martyn Winn */ + +/* Standard strings for certain quantites - for future use */ + +#ifndef __CCP4_VARS__ +#define __CCP4_VARS__ + +#define MTZFILENAME "data::mtzfile::filename" +#define MTZTITLE "data::mtzfile::title" +#define MTZSPACEGROUP "data::mtzfile::spacegroup_num" +#define MTZNUMREFLS "data::mtzfile::num_reflections" +#define MTZMNF "data::mtzfile::missing_number_flag" +#define MTZSORTORDER "data::mtzfile::sort_order" + +#define CRYSTALXTALNAME "data::crystal::crystal_name" +#define CRYSTALPNAME "data::crystal::project_name" +#define CRYSTALCELL "data::crystal::cell" + +#define DATASETDNAME "data::crystal::dataset::dataset_name" +#define DATASETWAVELENGTH "data::crystal::dataset::wavelength" + +#define COLUMNLABEL "data::crystal_i::dataset_i::column_i::label" +#define COLUMNTYPE "data::crystal_i::dataset_i::column_i::type" + +#endif /*!__CCP4_VARS__ */ diff --git a/ccp4c/ccp4/cmap_accessor.c b/ccp4c/ccp4/cmap_accessor.c new file mode 100644 index 00000000..8ef24ee9 --- /dev/null +++ b/ccp4c/ccp4/cmap_accessor.c @@ -0,0 +1,261 @@ +/* + cmap_accessor.c: get and set map header information + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include "cmaplib.h" +#include "cmap_errno.h" + +/* accessors */ + +/*! Get the cell parameters + \param mfile (const CMMFile *) + \param cell (float *) contains the cell parameter on exit (dim 6) */ +void ccp4_cmap_get_cell(const CMMFile *mfile, float *cell) +{ + cell[0] = mfile->cell[0]; + cell[1] = mfile->cell[1]; + cell[2] = mfile->cell[2]; + cell[3] = mfile->cell[3]; + cell[4] = mfile->cell[4]; + cell[5] = mfile->cell[5]; +} + +/*! Set the cell parameters. + Only allowed when file is opened in write mode. + \param mfile (CMMFile *) + \param cell (const float *) the cell parameters */ +void ccp4_cmap_set_cell(CMMFile *mfile, const float *cell) +{ + if (ccp4_file_is_write(mfile->stream)) { + mfile->cell[0] = cell[0]; + mfile->cell[1] = cell[1]; + mfile->cell[2] = cell[2]; + mfile->cell[3] = cell[3]; + mfile->cell[4] = cell[4]; + mfile->cell[5] = cell[5]; + } +} + +/*! Get the grid for the complete cell (X,Y,Z) ordering + \param mfile (const CMMFile *) + \param grid (int *) contains the grid dimension on exit (dim 3) */ +void ccp4_cmap_get_grid(const CMMFile *mfile, int *grid) +{ + grid[0] = mfile->cell_grid[0]; + grid[1] = mfile->cell_grid[1]; + grid[2] = mfile->cell_grid[2]; +} + +/*! Set the cell grid dimension. + Only allowed when file is opened in write mode. + \param mfile (CMMFile *) + \param grid (const int *) the cell grid dimension (X,Y,Z) */ +void ccp4_cmap_set_grid(CMMFile *mfile, const int *grid) +{ + if (ccp4_file_is_write(mfile->stream)) { + mfile->cell_grid[0] = grid[0]; + mfile->cell_grid[1] = grid[1]; + mfile->cell_grid[2] = grid[2]; + } +} + +/*! Get the stored map origin (rows,sections,columns) + \param mfile (const CMMFile *) + \param origin (int *) contains the origin on exit (dim 3) */ +void ccp4_cmap_get_origin(const CMMFile *mfile, int *origin) +{ + origin[0] = mfile->origin[0]; + origin[1] = mfile->origin[1]; + origin[2] = mfile->origin[2]; +} + +/*! Set the stored map origin (rows,sections,columns) + Only allowed when file is opened in write mode. + \param mfile (CMMFile *) + \param origin (const int *) the origin */ +void ccp4_cmap_set_origin(CMMFile *mfile, const int *origin) +{ + if (ccp4_file_is_write(mfile->stream)) { + mfile->origin[0] = origin[0]; + mfile->origin[1] = origin[1]; + mfile->origin[2] = origin[2]; + } +} + +/*! Get the stored map axes order (rows,sections,columns) + where 1=X, 2=Y, 3=Z + \param mfile (const CMMFile *) + \param axes_order (float *) contains the ordering on exit (dim 3) */ +void ccp4_cmap_get_order(const CMMFile *mfile, int *axes_order) +{ + axes_order[0] = mfile->axes_order[0]; + axes_order[1] = mfile->axes_order[1]; + axes_order[2] = mfile->axes_order[2]; +} + +/*! Set the stored map axes order (rows,sections,columns) + where 1=X, 2=Y, 3=Z. + Only allowed when file is opened in write mode. + \param mfile (CMMFile *) + \param axes_order (const float *) the axes ordering */ +void ccp4_cmap_set_order(CMMFile *mfile, const int *axes_order) +{ + if (ccp4_file_is_write(mfile->stream)) { + mfile->axes_order[0] = axes_order[0]; + mfile->axes_order[1] = axes_order[1]; + mfile->axes_order[2] = axes_order[2]; + } +} + +/*! Get the stored map dimension (rows,sections,columns) + \param mfile (const CMMFile *) + \param map_dim (int *) contains the map dimension on exit (dim 3) */ +void ccp4_cmap_get_dim(const CMMFile *mfile, int *map_dim) +{ + map_dim[0] = mfile->map_dim[0]; + map_dim[1] = mfile->map_dim[1]; + map_dim[2] = mfile->map_dim[2]; +} + +/*! Set the stored map dimension (rows,sections,columns) + Only allowed when file is opened in write mode before any data + is written. + Note: the row dimension will be overridden during writing + \param mfile (CMMFile *) + \param map_dim (const int *) the map dimension */ +void ccp4_cmap_set_dim(CMMFile *mfile, const int *map_dim) +{ + if (ccp4_file_is_write(mfile->stream) && !mfile->data.number) { + mfile->map_dim[0] = map_dim[0]; + mfile->map_dim[1] = map_dim[1]; + mfile->map_dim[2] = map_dim[2]; + mfile->data.section_size = map_dim[0]*map_dim[1]* + ccp4_file_itemsize(mfile->stream); + mfile->data.block_size = mfile->data.section_size + + mfile->data.header_size; + } +} +/*! Return the spacegroup listed in the map header. + This is overriden by the symops. + \param mfile (CMMFile *) + \return spacegroup number */ +int ccp4_cmap_get_spacegroup(const CMMFile *mfile) +{ + return mfile->spacegroup; +} + +/*! Set the spacegroup listed in the map header. + Only allowed when file is opened in write mode. + \param mfile (CMMFile *) + \param spacegroup (int) spacegroup number */ +void ccp4_cmap_set_spacegroup(CMMFile *mfile, int spacegroup) +{ + if (ccp4_file_is_write(mfile->stream)) + mfile->spacegroup = spacegroup; +} + +/*! Return the datamode + \param mfile (const CMMFile *) + \return datamode */ +unsigned int ccp4_cmap_get_datamode(const CMMFile *mfile) +{ + return mfile->data_mode; +} + +/*! Set the datamode. + This is only allowed if the file is opened in write mode, and + no data has been written. + \param mfile (CMMFile *) + \param datamode (unsigned int) major mode of map */ +void ccp4_cmap_set_datamode(CMMFile *mfile, unsigned int datamode) +{ + if (ccp4_file_is_write(mfile->stream) && !mfile->data.number && + datamode <= 6 && datamode != 5) { + mfile->data_mode = datamode; + ccp4_file_setmode(mfile->stream, datamode); + mfile->data.section_size = mfile->map_dim[0]*mfile->map_dim[1]* + ccp4_file_itemsize(mfile->stream); + mfile->data.block_size = mfile->data.section_size + + mfile->data.header_size; + } +} + +/*! Get the map statistics, including maximum, minimum, mean and standard + deviation. This is only meaningful for datamode FLOAT32. + \param mfile (const CMMFile *) + \param min (float *) + \param max (float *) + \param mean (double *) + \param rms (double *) */ +void ccp4_cmap_get_mapstats(const CMMFile *mfile, float *min, float* max, + double *mean, double *rms) +{ + double f1,f2,f3; + *min = mfile->stats.min; + *max = mfile->stats.max; + if (ccp4_file_is_write(mfile->stream) && mfile->close_mode == 0) { + f1 = (mfile->stats.total != 0) ? mfile->stats.mean / mfile->stats.total : 0; + f2 = (mfile->stats.total != 0) ? mfile->stats.rms / mfile->stats.total : 0; + f3 = f2 - f1*f1; + *rms = (f3 > 0) ? sqrt(f3) : 0; + *mean = f1 - (double) mfile->stats.offset; + } else { + *mean = mfile->stats.mean; + *rms = mfile->stats.rms; + } +} + +/*! Set the map statistics, including maximum, minimum, mean and standard + deviation. This is only meaningful for datamode FLOAT32 and the file + open in write mode. + \param mfile (CMMFile *) + \param min (float) + \param max (float) + \param mean (double) + \param rms (double) */ +void ccp4_cmap_set_mapstats(CMMFile *mfile, const float min, const float max, + const double mean, const double rms) +{ + if (ccp4_file_is_write(mfile->stream)) { + mfile->stats.min = min; + mfile->stats.max = max; + mfile->stats.mean = mean; + mfile->stats.rms = rms; + } +} + +/*! Set the local header size (in bytes) + \param mfile (CMMFile *) + \param size (size_t) header size associated with each section (in bytes) */ +void ccp4_cmap_set_local_header(CMMFile *mfile, size_t size) +{ + if (ccp4_file_is_write(mfile->stream) && mfile->data.number == 0) { + mfile->data.header_size = size; + mfile->data.block_size = mfile->data.section_size + mfile->data.header_size; + } + return; +} + +/*! Return the local header size + \param mfile (CMMFile *) + \return header size associated with each section (in bytes) */ +size_t ccp4_cmap_get_local_header(CMMFile *mfile) +{ + return mfile->data.header_size; +} + diff --git a/ccp4c/ccp4/cmap_close.c b/ccp4c/ccp4/cmap_close.c new file mode 100644 index 00000000..150af451 --- /dev/null +++ b/ccp4c/ccp4/cmap_close.c @@ -0,0 +1,80 @@ +/* + cmap_close.c: close map file + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include +#include +#include "cmaplib.h" +#include "cmap_header.h" +#include "cmap_labels.h" +#include "cmap_errno.h" + +/*! Close the file. + In write mode the header is output, along with the machine + stamp. In read mode the file is just closed. + Write mode supports ways of updating the map statistics ( + only active for FLOAT32). + /param mfile (CMMFile *) + /return void */ +void ccp4_cmap_close(CMMFile *mfile) +{ + int i; + + if ( mfile == NULL) + return; + + if (ccp4_file_is_write(mfile->stream) ) { + if ( mfile->data_mode == FLOAT32) { + switch (mfile->close_mode) { + case 1: + break; + case 2: + mfile->stats.offset = 0.0f; + case 0: + default: + if (mfile->stats.total != 0) { + mfile->stats.mean /= mfile->stats.total; + mfile->stats.rms /= mfile->stats.total; + mfile->stats.rms -= mfile->stats.mean*mfile->stats.mean; + mfile->stats.rms = (mfile->stats.rms > 0) ? sqrt(mfile->stats.rms) : 0; + mfile->stats.mean += (double) mfile->stats.offset; + } + break; + } + } + write_mapheader(mfile); + write_maplabels(mfile); + ccp4_file_warch(mfile->stream); + } + ccp4_file_close(mfile->stream); + for (i=0 ; i != mfile->labels.number ; i++) + if (mfile->labels.labels[i] != NULL) + free(mfile->labels.labels[i]); + free(mfile); +} + +/*! Set the close mode: + 0: calculate based on stored values (default) + 1: just dump the current values + /param mfile (CMMFile *) + /param mask (unsigned int) close mode + /return void */ +void ccp4_cmap_closemode(CMMFile *mfile, unsigned int mask) +{ + mfile->close_mode = mask; +} diff --git a/ccp4c/ccp4/cmap_data.c b/ccp4c/ccp4/cmap_data.c new file mode 100644 index 00000000..0046d73e --- /dev/null +++ b/ccp4c/ccp4/cmap_data.c @@ -0,0 +1,476 @@ +/* + cmap_data.c: read and write map sections. + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include +#include +#include "cmaplib.h" +#include "cmap_data.h" +#include "cmap_stats.h" +#include "cmap_errno.h" + +/*! Internal: return the an estimate of the number of sections in the map + file based upon the length. + Update mfile->data.number as a side effect. + \param mfile (CMMFile *) + \return number of sections according to length-data/section_size */ +int number_sections(CMMFile *mfile) +{ + div_t sections; + + sections = div(ccp4_file_length(mfile->stream)-mfile->data.offset, + mfile->data.block_size); + + return mfile->data.number = sections.quot; +} + +/*! seek among the map sections. The units are of size block_size. + \param mfile (CMMFile *) + \param sec (int) section number + \param whence (unsigned int) SEEK_SET, SEEK_CUR or SEEK_END + \return offset in file, or EOF */ +int ccp4_cmap_seek_section(CMMFile *mfile, int sec, unsigned int whence) +{ + size_t curr_posn; + div_t secs; + int result = EOF; + + if ( mfile == NULL ) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_seekdata",NULL); + return EOF; } + + switch (whence) { + case SEEK_SET: + if ( ccp4_file_is_read(mfile->stream) && + ( sec < 0 || sec > mfile->data.number) ) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_section",NULL); + else + result = ccp4_file_raw_seek(mfile->stream, mfile->data.offset + + sec * mfile->data.block_size, SEEK_SET); + break; + case SEEK_END: + if ( ccp4_file_is_read(mfile->stream) && + ( sec > 0 || abs(sec) > mfile->data.number) ) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_section",NULL); + else + result = ccp4_file_raw_seek(mfile->stream, sec * mfile->data.block_size, + SEEK_END); + break; + case SEEK_CUR: + curr_posn = ccp4_file_tell(mfile->stream); + secs = div(curr_posn - mfile->data.offset,mfile->data.block_size); + if ( ccp4_file_is_read(mfile->stream) && + ( (secs.quot + sec) < 0 || (secs.quot + sec) >= mfile->data.number) ) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_section",NULL); + else + result = ccp4_file_raw_seek(mfile->stream, + (sec > 0) ? (mfile->data.block_size - secs.rem + + (sec - 1)*mfile->data.block_size) : + (sec*mfile->data.block_size - secs.rem), + SEEK_CUR); + } + return (result == EOF) ? EOF : + ((result - mfile->data.offset)/mfile->data.block_size); +} + +/*! write map section to file. + Note: this wraps a raw write, with no location checking. It is + therefore the responsibility of the calling program to ensure that + everything is correct. Effectively assume appending to file. + \param mfile (CMMFile *) + \param section (const void *) + \return 1 on success, 0 on failure */ +int ccp4_cmap_write_section(CMMFile *mfile, const void *section) +{ + int result=0; + size_t write_dim; + + if (mfile == NULL || section == NULL) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_write_section",NULL); + return 0; } + + if (!ccp4_file_is_write(mfile->stream)) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), + "ccp4_cmap_write_section",NULL); + return 0; } + + write_dim = mfile->map_dim[0] * mfile->map_dim[1]; + result = ccp4_file_write(mfile->stream, section, write_dim); + +/* note that we have started writing */ + mfile->data.number++; + + if (result != write_dim) + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), + "ccp4_cmap_write_section",NULL); + else + if (mfile->data_mode == FLOAT32) + stats_update(&mfile->stats, (float *)section, + (float *)section+write_dim); + + return (result == write_dim) ? 1 : 0; +} + +/*! read current map section from file to section. + Some checking is performed to ensure we are at the start of a + legitimate map section. + \param mfile (CMMFile *) + \param section (void *) array large enough to hold the map section + \return 1 on success, 0 on failure */ +int ccp4_cmap_read_section(CMMFile *mfile, void *section) +{ + int result = 0; + div_t secs; + off_t curr_posn; + const off_t data_offset = 0; + size_t read_dim; + + if (mfile == NULL ) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_read_section",NULL); + return 0; } + + if (!ccp4_file_is_read(mfile->stream)) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ReadFail), + "ccp4_cmap_read_section",NULL); + return 0; } + + curr_posn = ccp4_file_tell(mfile->stream); + + secs = div(curr_posn - mfile->data.offset, + mfile->data.block_size); + +/* ensure legit section (although rely upon EOF ) */ + if (secs.quot < 0 || secs.rem < 0) { + ccp4_file_raw_seek(mfile->stream, mfile->data.offset, SEEK_SET); + secs.quot = 0; + } else if( secs.rem > data_offset && secs.rem < mfile->data.section_size ) + ccp4_file_raw_seek(mfile->stream, - secs.rem, SEEK_CUR); + else if ( secs.rem >= mfile->data.section_size ) { + ccp4_file_raw_seek(mfile->stream, (mfile->data.block_size-secs.rem), SEEK_CUR); + secs.quot++; } + + read_dim = mfile->map_dim[0] * mfile->map_dim[1]; +/* do not read if at end */ + if (secs.quot < 0 || secs.quot < mfile->data.number) + result = ccp4_file_read(mfile->stream, section, read_dim); + + if (result != read_dim) + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), + "ccp4_cmap_read_section",NULL); + + return (result == read_dim) ? 1 : 0; +} + +/*! read current section header (character array) + After reading we are at the end of the local header + \param mfile (CMMFile *) + \param header (char *) character array large enough to hold + the local header (raw read so not string) + \return 1 on success, 0 on failure */ +int ccp4_cmap_read_section_header(const CMMFile *mfile, char *header) +{ + int result; + div_t secs; + + if (mfile == NULL || header == NULL) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_read_section_header",NULL); + return EOF; } + + if (!ccp4_file_is_read(mfile->stream)) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), + "ccp4_cmap_read_section header",NULL); + return EOF; } + + if ( mfile->data.header_size == 0) return (0); + + result = ccp4_file_tell(mfile->stream); + secs = div(result - mfile->data.offset, mfile->data.block_size); + + if ( secs.quot < 0 || secs.quot >= mfile->data.number ) return (0); + +/* navigate to nearest header */ + if ( secs.rem != mfile->data.section_size) + ccp4_file_raw_seek(mfile->stream,(mfile->data.section_size + - secs.rem), SEEK_CUR); + + if ( (result = ccp4_file_readchar( mfile->stream, (uint8 *) header, + mfile->data.header_size)) != mfile->data.header_size) + ccp4_signal(ccp4_errno, + "ccp4_cmap_read_section_header", + NULL); + + return (result == mfile->data.header_size) ? 1 : 0; +} + +/*! write the local section header to the file. This must be of + size mfile->data.header.size. + Note: no checking is done so it is up to the calling program + to ensure that the file is in the correct location. As seeking + is turned off, this assumes we are appending to the file. + \param mfile (CMMFile *) + \param header (const char *) the local header character array + (not necessarily a string) + \return number of bytes written or EOF */ +int ccp4_cmap_write_section_header(CMMFile *mfile, const char *header) +{ + char *output; + int result; + + if (mfile == NULL ) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_write_section_header",NULL); + return EOF; } + + if (!ccp4_file_is_write(mfile->stream)) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_write_section_header",NULL); + return EOF; } + + if ( mfile->data.header_size == 0) return (0); + + output = (char *) malloc(mfile->data.header_size); + memset(output,' ', mfile->data.header_size); + if (header) memcpy(output, header,mfile->data.header_size); + + if ( (result = ccp4_file_writechar( mfile->stream, (uint8 *) output, + mfile->data.header_size)) + != mfile->data.header_size) + ccp4_signal(ccp4_errno, + "ccp4_cmap_write_section_header", + NULL); + + return (result == mfile->data.header_size) ? 1 : 0; +} + +/*! seek a row within a map section + \param mfile (CMMFile *) + \param row (int) + \param whence (unsigned int) SEEK_SET, SEEK_END, SEEK_CUR + \return offset in file or EOF */ +int ccp4_cmap_seek_row(CMMFile *mfile, int row, unsigned int whence) +{ + size_t curr_posn; + div_t secs, rows; + int result = EOF; + size_t item_size; + + if ( mfile == NULL ) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_seek_row",NULL); + return EOF; } + + item_size = ccp4_file_itemsize(mfile->stream); + curr_posn = ccp4_file_tell(mfile->stream); + secs = div(curr_posn - mfile->data.offset,mfile->data.block_size); + + switch (whence) { + case SEEK_SET: + if ( row < 0 || row >= mfile->map_dim[1]) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_row",NULL); + else + result = ccp4_file_raw_seek(mfile->stream, mfile->data.offset + + (secs.quot * mfile->data.block_size + + row * mfile->map_dim[0]*item_size), + SEEK_SET); + break; + case SEEK_END: + if ( row >= 0 || abs(row) > mfile->map_dim[1]) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_row",NULL); + else + result = ccp4_file_raw_seek(mfile->stream, mfile->data.offset + + (secs.quot * mfile->data.block_size + + mfile->data.section_size + + row * mfile->map_dim[0]*item_size), + SEEK_SET); + break; + case SEEK_CUR: + rows = div(secs.rem,mfile->map_dim[0]*item_size); + if ( (rows.quot + row) < 0 || (rows.quot + row) >= mfile->data.number) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_row",NULL); + else + result = ccp4_file_raw_seek(mfile->stream, + ( row > 0) ? (mfile->map_dim[0]*item_size - rows.rem + + (row-1)*mfile->map_dim[0]*item_size) : + ( row*mfile->map_dim[0]*item_size - rows.rem), + SEEK_CUR); + } + return (result); +} + +/*! write map row to file. + Note: this wraps a raw write, with no location checking. It is + therefore the responsibility of the calling program to ensure that + everything is correct. Effectively assume appending to file. + \param mfile (CMMFile *) + \param row (const void *) data to be written + \return 1 on success, 0 on failure */ +int ccp4_cmap_write_row(CMMFile *mfile, const void *row) +{ + int result=0; + + if (mfile == NULL || row == NULL) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_write_row",NULL); + return EOF; } + + if (!ccp4_file_is_write(mfile->stream)) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), + "ccp4_cmap_write_row",NULL); + return EOF; } + + result = ccp4_file_write(mfile->stream, row, mfile->map_dim[0]); + +/* note that we have started writing */ + mfile->data.number++; + + if (result != mfile->map_dim[0]) + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), + "ccp4_cmap_write_row",NULL); + else + if (mfile->data_mode == FLOAT32) + stats_update(&mfile->stats, (float *)row, (float *)row+mfile->map_dim[0]); + + return (result == mfile->map_dim[0]) ? 1 : 0; +} + +/*! read current map section from file to section. + Some checking is performed to ensure we are at the start of a + legitimate map row. + \param mfile (CMMFile *) + \param row (void *) array large enough to hold the map row + \return 1 on success, 0 on failure */ +int ccp4_cmap_read_row(CMMFile *mfile, void *row) +{ + int result = 0, item_size; + div_t secs, rows; + off_t curr_posn; + + if (mfile == NULL) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_read_row",NULL); + return EOF; } + + if (!ccp4_file_is_read(mfile->stream) || row == NULL) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ReadFail), + "ccp4_cmap_read_row",NULL); + return EOF; } + + item_size = ccp4_file_itemsize(mfile->stream); + curr_posn = ccp4_file_tell(mfile->stream); + + secs = div(curr_posn - mfile->data.offset, + mfile->data.block_size); + rows = div(secs.rem, mfile->map_dim[0]*item_size); + + if (secs.quot < 0 || secs.rem < 0) + ccp4_file_raw_seek(mfile->stream, mfile->data.offset, SEEK_SET); + else if(rows.quot >= mfile->map_dim[1] ) + ccp4_file_raw_seek(mfile->stream, (mfile->data.block_size + - secs.rem), SEEK_CUR); + else if( rows.rem != 0) + ccp4_file_raw_seek(mfile->stream, ( - secs.rem), SEEK_CUR); + + result = ccp4_file_read(mfile->stream, row, mfile->map_dim[0]); + + if (result != mfile->map_dim[0]) + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), + "ccp4_cmap_read_row",NULL); + + return (result == mfile->map_dim[0]) ? 1 : 0; +} + +/*! raw seek in items + \param mfile (CMMFile *) + \param offset (int) number of items + \param whence (unsigned int) SEEK_SET, SEEK_CUR, SEEK_END; + \return 0 on success, EOF on failure */ +int ccp4_cmap_seek_data(CMMFile *mfile, int offset, unsigned int whence) +{ + int result = EOF; + + if ( mfile == NULL ) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_seekdata",NULL); + return (result); } + + if ((result = ccp4_file_seek( mfile->stream, offset, whence)) == -1) + ccp4_signal(ccp4_errno, "ccp4_cmap_seek_data",NULL); + + return (result); +} + +/*! raw write of nelements items to file, according to the datamode, + at current location + \param mfile (const CMMFile *) + \param section (void *) values written, should contain at least + nelements items + \param n_items (int) number of items to be written + \return number of items written or EOF */ +int ccp4_cmap_write_data(CMMFile *mfile, const void *items, int n_items) +{ + int result=0; + + if (mfile == NULL || items == NULL) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_write_data",NULL); + return EOF; } + + if (ccp4_file_is_write(mfile->stream)) { + result = ccp4_file_write(mfile->stream, (uint8 *) items, n_items); + if (result != n_items) + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), + "ccp4_cmap_write_data",NULL); + else if (mfile->data_mode == FLOAT32) + stats_update(&mfile->stats, (float *)items, (float *)items+result); + } + + return (result); +} + +/*! raw read of nelements items from file according to the datamode + at current location + \param mfile (const CMMFile *) + \param items (void *) values read to here, so should have enough space + for nelements items + \param n_items (int) number of items to be read + \return number of items read or EOF */ +int ccp4_cmap_read_data(const CMMFile *mfile, void *items, int n_items) +{ + int result=0; + + if (mfile == NULL || items == NULL) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_read_data",NULL); + return EOF; } + + if (ccp4_file_is_read(mfile->stream)) + result = ccp4_file_read(mfile->stream, (uint8 *) items, n_items); + + return (result); +} + diff --git a/ccp4c/ccp4/cmap_data.h b/ccp4c/ccp4/cmap_data.h new file mode 100644 index 00000000..56b70e7d --- /dev/null +++ b/ccp4c/ccp4/cmap_data.h @@ -0,0 +1,32 @@ +/* + cmap_data.h: header for cmap_data.c + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __GUARD_MAPLIB_DATA +#define __GUARD_MAPLIB_DATA + +#ifdef __cplusplus +extern "C" { +#endif + +int number_sections(CMMFile *mfile); + +#ifdef __cplusplus +} +#endif + +#endif /* __GUARD_MAPLIB_DATA */ diff --git a/ccp4c/ccp4/cmap_errno.h b/ccp4c/ccp4/cmap_errno.h new file mode 100644 index 00000000..2584567a --- /dev/null +++ b/ccp4c/ccp4/cmap_errno.h @@ -0,0 +1,52 @@ +/* + cmap_errno.h: error codes for map handling functions + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __GUARD_MAPLIB_ERR +#define __GUARD_MAPLIB_ERR + +#include "ccp4_errno.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define CMAP_ERRNO(n) (CCP4_ERR_MAP | (n)) + +/* error defs */ +#define CMERR_Ok 0 +#define CMERR_NoChannel 1 +#define CMERR_NoFile 2 +#define CMERR_NoLogicalName 3 +#define CMERR_CantOpenFile 4 +#define CMERR_NoHeader 5 +#define CMERR_ReadFail 6 +#define CMERR_WriteFail 7 +#define CMERR_ParamError 8 +#define CMERR_UnrecognK 9 +#define CMERR_FileStamp 10 +#define CMERR_SymErr 11 +#define CMERR_AllocFail 12 +#define CMERR_MaxFile 13 +#define CMERR_SeekFail 14 + +#ifdef __cplusplus +} +#endif + +#endif /* __GUARD_MAPLIB_ERR */ + diff --git a/ccp4c/ccp4/cmap_header.c b/ccp4c/ccp4/cmap_header.c new file mode 100644 index 00000000..c8823fd5 --- /dev/null +++ b/ccp4c/ccp4/cmap_header.c @@ -0,0 +1,182 @@ +/* + cmap_header.c: read and write map file headers + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include +#include +#include "cmaplib.h" +#include "cmap_errno.h" +#include "cmap_skew.h" + +/*! Internal: read header from file and fill CMMFile struct. + Called after file is opened for read. + \param mfile (CMMFile *) + \return 1 on success, EOF on failure*/ +int parse_mapheader(CMMFile *mfile) +{ + const int read_total = 77; + const size_t header_size = 1024U, n_byt_symop = 80U; + unsigned char buffer[224]; + int result; + float fmean,frms; + + ccp4_file_rewind(mfile->stream); + + memset(buffer,'\0',224); + result = ccp4_file_readint(mfile->stream, &buffer[0], 10) ; + result += ccp4_file_readfloat(mfile->stream, &buffer[40], 6); + result += ccp4_file_readint(mfile->stream, &buffer[64], 3); + result += ccp4_file_readfloat(mfile->stream, &buffer[76], 3); + result += ccp4_file_readint(mfile->stream, &buffer[88], 3); + /* skew matrix and translation */ + result += ccp4_file_readfloat(mfile->stream, &buffer[100], 12); + /* reserved */ + result += ccp4_file_readint(mfile->stream, &buffer[148], 8); + /* user access */ + result += ccp4_file_readchar(mfile->stream, &buffer[180], 28); + /* map and machine stamp */ + result += ccp4_file_readint(mfile->stream, &buffer[208], 2); + /* ARMS */ + result += ccp4_file_readfloat(mfile->stream, &buffer[216], 1); + result += ccp4_file_readint(mfile->stream, &buffer[220], 1); + + if (result != read_total) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), + "parse_header", + NULL); + return EOF; } + + memcpy(&mfile->map_dim[0],&buffer[0],sizeof(mfile->map_dim)); + memcpy(&mfile->data_mode,&buffer[12],sizeof(int)); + memcpy(&mfile->origin[0],&buffer[16],sizeof(mfile->origin)); + memcpy(&mfile->cell_grid[0],&buffer[28],sizeof(mfile->cell_grid)); + memcpy(&mfile->cell[0],&buffer[40],sizeof(mfile->cell)); + memcpy(&mfile->axes_order[0],&buffer[64],sizeof(mfile->axes_order)); + memcpy(&mfile->stats.min,&buffer[76],sizeof(float)); + memcpy(&mfile->stats.max,&buffer[80],sizeof(float)); + memcpy(&fmean,&buffer[84],sizeof(float)); + mfile->stats.mean = (double) fmean; + memcpy(&mfile->spacegroup,&buffer[88],sizeof(int)); + + /* Additions for EM support. + Define contents as image, image stack, volume or volume stack. + In latter case, allows for 400+ispg convention. */ + mfile->EM_spacegroup = mfile->spacegroup; + strncpy(mfile->EM_contents,"VOLU",4); + if (mfile->spacegroup > 400 && mfile->spacegroup < 631) { + mfile->spacegroup = mfile->spacegroup - 400; + strncpy(mfile->EM_contents,"VLST",4); + } + if (mfile->spacegroup == 0) { + if (mfile->map_dim[2] == 1) strncpy(mfile->EM_contents,"IMAG",4); + if (mfile->map_dim[2] > 1) strncpy(mfile->EM_contents,"IMST",4); + } + + memcpy(&mfile->symop.size,&buffer[92],sizeof(int)); + memcpy(&mfile->user_access,&buffer[180],sizeof(mfile->user_access)); + /* memcpy(&mfile->data.header_size,&buffer[204],sizeof(int)); */ + memcpy(&frms,&buffer[216],sizeof(float)); + mfile->stats.rms = (double) frms; + memcpy(&mfile->labels.number,&buffer[220],sizeof(int)); + + memcpy(&result,&buffer[96],sizeof(int)); + if (result !=0) { + memcpy(&mfile->skew.rotation[0][0],&buffer[100],sizeof(mfile->skew.rotation)); + memcpy(&mfile->skew.translation[0],&buffer[136],sizeof(mfile->skew.translation)); + } + + ccp4_file_setmode(mfile->stream, mfile->data_mode); + /* may go to seperate function */ + mfile->symop.offset = header_size; + mfile->data.offset = mfile->symop.offset + mfile->symop.size; + mfile->data.section_size = mfile->map_dim[0]*mfile->map_dim[1] + *ccp4_file_itemsize(mfile->stream); + mfile->data.block_size = mfile->data.section_size + mfile->data.header_size; + mfile->data.number = mfile->map_dim[2]; + mfile->symop.number = mfile->symop.size / n_byt_symop; + + return 1; +} + +/*! Internal: write summary of current CMMFile struct to file. + Called when file is opened write, and closed write. + \param mfile (CMMFile *) + \return 1 on success, EOF on failure */ +int write_mapheader(CMMFile *mfile) +{ + const int write_total = 77; + unsigned char buffer[224]; + int result; + float fmean,frms; + + memset(buffer,'\0',224); + memcpy(&buffer[0],&mfile->map_dim[0],sizeof(mfile->map_dim)); + memcpy(&buffer[12],&mfile->data_mode,sizeof(int)); + memcpy(&buffer[16],&mfile->origin[0],sizeof(mfile->origin)); + memcpy(&buffer[28],&mfile->cell_grid[0],sizeof(mfile->cell_grid)); + memcpy(&buffer[40],&mfile->cell[0],sizeof(mfile->cell)); + memcpy(&buffer[64],&mfile->axes_order[0],sizeof(mfile->axes_order)); + memcpy(&buffer[76],&mfile->stats.min,sizeof(float)); + memcpy(&buffer[80],&mfile->stats.max,sizeof(float)); + fmean = (float) mfile->stats.mean; + memcpy(&buffer[84],&fmean,sizeof(float)); + + /* additions for EM support */ + if (!strncmp(mfile->EM_contents,"VLST",4)) { + memcpy(&buffer[88],&mfile->EM_spacegroup,sizeof(int)); + } else { + memcpy(&buffer[88],&mfile->spacegroup,sizeof(int)); + } + + memcpy(&buffer[92],&mfile->symop.size,sizeof(int)); + memcpy(&buffer[180],&mfile->user_access,sizeof(mfile->user_access)); + /* memcpy(&buffer[204],&mfile->data.header_size,sizeof(int)); */ + memcpy(&buffer[208],"MAP ",4U); + frms = (float) mfile->stats.rms; + memcpy(&buffer[216],&frms,sizeof(float)); + memcpy(&buffer[220],&mfile->labels.number,sizeof(int)); + + if (skew_set(&mfile->skew) == TRUE) { + result = 1; + memcpy(&buffer[96],&result, sizeof(int)); + memcpy(&buffer[100],&mfile->skew.rotation[0][0],sizeof(mfile->skew.rotation)); + memcpy(&buffer[148],&mfile->skew.translation[0],sizeof(mfile->skew.translation)); + } + + ccp4_file_seek(mfile->stream, 0L, SEEK_SET); + + result = ccp4_file_writeint(mfile->stream, &buffer[0], 10); + result += ccp4_file_writefloat(mfile->stream, &buffer[40], 6); + result += ccp4_file_writeint(mfile->stream, &buffer[64], 3); + result += ccp4_file_writefloat(mfile->stream, &buffer[76], 3); + result += ccp4_file_writeint(mfile->stream, &buffer[88], 3); + result += ccp4_file_writefloat(mfile->stream, &buffer[100], 12); + result += ccp4_file_writeint(mfile->stream, &buffer[148], 8); + result += ccp4_file_writechar(mfile->stream, &buffer[180], 28); + result += ccp4_file_writeint(mfile->stream, &buffer[208], 2); + result += ccp4_file_writefloat(mfile->stream, &buffer[216], 1); + result += ccp4_file_writeint(mfile->stream, &buffer[220], 1); + + if (result != write_total) + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), + "write_header", + NULL); + + return ( (result == write_total) ? 1 : EOF); +} + diff --git a/ccp4c/ccp4/cmap_header.h b/ccp4c/ccp4/cmap_header.h new file mode 100644 index 00000000..763fd22d --- /dev/null +++ b/ccp4c/ccp4/cmap_header.h @@ -0,0 +1,34 @@ +/* + cmap_header.h: header file for cmap_header.c + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __GUARD_MAPLIB_HEADER +#define __GUARD_MAPLIB_HEADER + +#ifdef __cplusplus +extern "C" { +#endif + +int parse_mapheader(CMMFile *mfile); + +int write_mapheader(CMMFile *mfile); + +#ifdef __cplusplus +} +#endif + +#endif /* __GUARD_MAPLIB_HEADER */ diff --git a/ccp4c/ccp4/cmap_labels.c b/ccp4c/ccp4/cmap_labels.c new file mode 100644 index 00000000..a2a23a54 --- /dev/null +++ b/ccp4c/ccp4/cmap_labels.c @@ -0,0 +1,179 @@ +/* + cmap_labels.c: read and write map header labels + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include "cmaplib.h" +#include "cmap_labels.h" +#include "cmap_errno.h" + +/*! Internal: read the labels from file header and copy into char * array + Called when the file is opened in read mode. + \param mfile (CMMFile *) + \return 1 on succes */ +int parse_maplabels(CMMFile *mfile) +{ + char buffer[81], *cptr; + const unsigned int n_byt_label = 80U, max_label = 10U; +/* const unsigned int labels_offset = 224U; */ + int i; + +/* ccp4_file_seek(mfile->stream,labels_offset,SEEK_SET); */ + for (i=0 ; i!=mfile->labels.number ; i++) { + ccp4_file_readchar(mfile->stream,(uint8 *) buffer,n_byt_label); + cptr = buffer+n_byt_label; + while (cptr> buffer && *--cptr == ' '); + *(++cptr) = '\0'; + mfile->labels.labels[i] = strdup(buffer); + } + ccp4_file_raw_seek(mfile->stream,(max_label-mfile->labels.number) + *n_byt_label, + SEEK_CUR); + return 1; +} + +/*! Internal: dump the labels char * array to file, offset at 224 bytes. + Called when the file is opened or closed in write mode, immediately after the + header is written. + \param mfile (const CMMFile *) + \return 1 on success, 0 on failure */ +int write_maplabels(const CMMFile *mfile) +{ + char buffer[80]; +/* const unsigned int labels_offset = 224U; */ + int i, result = 0; + size_t slen; + +/* ccp4_file_seek(mfile->stream,labels_offset,SEEK_SET); */ + for (i=0 ; i != mfile->labels.number ; i++) { + memset(buffer,' ',80U); + slen = strlen(mfile->labels.labels[i]); + if (slen > 80U) slen = 80U; + strncpy(buffer,mfile->labels.labels[i],slen); + result += ccp4_file_writechar(mfile->stream,(uint8 *) buffer,80U); + } + memset(buffer,' ',80U); + while(i != 10) { + result += ccp4_file_writechar(mfile->stream,(uint8 *) buffer,80U); + i++; + } + return (result == 800) ? 1 : 0 ; +} + +/*! Set the label in the map header. Headers are 80 characters long. + The labels are written to the file when it is closed. Therefore, + the file must be in write mode. + If label == NULL the element corresponding to posn is removed. + The number of labels is recalculated on each call. + \param mfile (CMMFile *) + \param label (const char *) the C-style character array + \param posn (int) the label number (C-style, 0 -> 9) + \return number of label effected, or EOF */ +int ccp4_cmap_set_label(CMMFile *mfile, const char *label, int posn) +{ + int i,j; + + if (mfile == NULL) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_set_label",NULL); + return (EOF);} + + if (ccp4_file_is_write(mfile->stream) == 0) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), + "ccp4_cmap_label_set",NULL); + return (EOF);} + +/*posn must be between 0 and 9 */ + if (posn < 0) { + posn = 0; + } else if (posn > mfile->labels.number) { + posn = mfile->labels.number; + } + + if (mfile->labels.labels[posn] != NULL) + free(mfile->labels.labels[posn]); + +/* if label == NULL reset the value and compress set */ + if (label == NULL) { + mfile->labels.labels[posn] = NULL; + for ( i=posn ; i!=10 ; i++) + if (mfile->labels.labels[i] == NULL) + for ( j=i+1 ; j!=10; j++) + if (mfile->labels.labels[j] != NULL) { + mfile->labels.labels[i] = mfile->labels.labels[j]; + mfile->labels.labels[j] = NULL; + break; + } + } + else + mfile->labels.labels[posn] = strdup(label); + +/* recalculate number */ + for ( i=0 ; i!=10 ; i++) + if (mfile->labels.labels[i] == NULL) + break; + mfile->labels.number = i; + + return posn; +} + +/*! Get the label corresponding to position posn + \param mfile (const CMMFile *) + \param posn (int) desired label number + \return pointer to label posn */ +char *ccp4_cmap_get_label(const CMMFile *mfile, int posn) +{ + char *label; + if (mfile == NULL) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_get_label",NULL); + return (NULL);} + + if (posn < 0 || posn >= mfile->labels.number) + label = NULL; + else + label = mfile->labels.labels[posn]; + + return label; +} + +/*! Return the number of labels. + \param mfile (CMMFile *) + \return the number of labels */ +int ccp4_cmap_number_label(const CMMFile *mfile) +{ + return mfile->labels.number; +} + +/*! Get the label corresponding to the title + wrapping ccp4_cmap_get_label. + \param mfile (const CMMFile *) + \return pointer to label 0, or NULL */ +char *ccp4_cmap_get_title(const CMMFile *mfile) +{ + return ccp4_cmap_get_label(mfile, 0); +} + +/*! Set the label corresponding to the title, + wrapping ccp4_cmap_set_label + \param mfile (CMMFile *) + \param label + \return 0 or EOF on failure */ +int ccp4_cmap_set_title(CMMFile *mfile, const char *title) +{ + return ccp4_cmap_set_label(mfile, title, 0); +} diff --git a/ccp4c/ccp4/cmap_labels.h b/ccp4c/ccp4/cmap_labels.h new file mode 100644 index 00000000..086b0624 --- /dev/null +++ b/ccp4c/ccp4/cmap_labels.h @@ -0,0 +1,34 @@ +/* + cmap_labels.h: header for cmap_labels.c + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __GUARD_MAPLIB_LABEL +#define __GUARD_MAPLIB_LABEL + +#ifdef __cplusplus +extern "C" { +#endif + +int parse_maplabels(CMMFile *mfile); +int write_maplabels(const CMMFile *mfile); + + +#ifdef __cplusplus +} +#endif + +#endif /* __GUARD_MAPLIB_LABEL */ diff --git a/ccp4c/ccp4/cmap_open.c b/ccp4c/ccp4/cmap_open.c new file mode 100644 index 00000000..310fc2e6 --- /dev/null +++ b/ccp4c/ccp4/cmap_open.c @@ -0,0 +1,117 @@ +/* + cmap_open.c: Opening CCP4-format map files. + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file cmap_open.c + * + * @brief Opening CCP4-format map files. + * + * @author Charles Ballard + */ + +#include +#include +#include +#include +#include "cmaplib.h" +#include "cmap_header.h" +#include "cmap_labels.h" +#include "cmap_errno.h" + +/*! Internal: malloc CMMFile struct for reading into + \return CMMFile */ +CMMFile *init_cmap_read(void) +{ + CMMFile *mfile = (CMMFile *) malloc(sizeof(CMMFile)); + if (mfile) + memset(mfile,'\0',sizeof(CMMFile)); + return mfile; +} + +/*! Internal: malloc CMMFile struct for writing + \return CMMFile */ +CMMFile *init_cmap_write(void) +{ + CMMFile *mfile = (CMMFile *) malloc(sizeof(CMMFile)); + if (mfile) { + memset(mfile,'\0',sizeof(CMMFile)); + mfile->data_mode = DEFMODE; + mfile->symop.offset = 1024U; + mfile->data.offset = 1024U; } + return mfile; +} + +/*! Internal: Identify file as a ccp4 format map + \param file The (CCP4File *) struct representing the file. + \return non-zero on true, 0 on false */ +int is_cmap(CCP4File *file) +{ + char buffer[4]; + const unsigned int map_offset = 208U; + if (file == NULL) + return 0; + if ( ccp4_file_raw_seek(file,map_offset,SEEK_SET) == EOF) + return 0; + if (ccp4_file_readchar(file,(uint8 *) buffer,4U) != 4U) + return 0; + ccp4_file_rewind(file); + return !strncmp(buffer,"MAP ",4); +} + +/*! The file is opened. + \param filename (char *) the filename + \param mode (int) the i/o mode , possible values are O_RDONLY, O_WRONLY, + O_RDWR, O_APPEND, O_TMP, O_CREAT, O_TRUNC - see ccp4_sysdep.h + \return (void *) CMMFile structure */ +void *ccp4_cmap_open(const char *filename, int mode) +{ + CMMFile *mfile; + CCP4File *cfile; + const size_t stamp_offset = 212U; + + if ((cfile = ccp4_file_open(filename, mode)) == NULL) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_CantOpenFile), + "ccp4_cmap_open",NULL); + return (NULL); } + ccp4_file_raw_setstamp(cfile, stamp_offset); + /* read or write only */ + if (cfile->read) { + if (!is_cmap(cfile) || cfile->length < 1025) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoHeader), + "ccp4_cmap_open",NULL); + ccp4_file_close(cfile); + return NULL; } + ccp4_file_rarch(cfile); + mfile = init_cmap_read(); + mfile->stream = cfile; + mfile->file_name = cfile->name; + parse_mapheader(mfile); + parse_maplabels(mfile); + } else if (cfile->write) { + mfile = init_cmap_write(); + mfile->stream = cfile; + mfile->file_name = cfile->name; + write_mapheader(mfile); + write_maplabels(mfile); + } else { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_CantOpenFile), + "ccp4_cmap_open",NULL); + return (NULL); } + return (mfile); +} + diff --git a/ccp4c/ccp4/cmap_skew.c b/ccp4c/ccp4/cmap_skew.c new file mode 100644 index 00000000..df9e9ed1 --- /dev/null +++ b/ccp4c/ccp4/cmap_skew.c @@ -0,0 +1,104 @@ +/* + cmap_skew.c: set and fetch the skew matrix + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License version 3, + modified in accordance with the provisions of the license to address + the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be downloaded + from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + +*/ + +#include +#include "cmaplib.h" +#include "cmap_skew.h" +#include "cmap_errno.h" + +/*! Set the values of the translation and rotation elements of the skew matrix. + Note: the stored file is in FORTRAN order mat[fastest][slowest] + \param mfile (CMMFile *) + \param skew_mat (const float *) the skew translation vestor + \param skew_trans (const float *) the skew rotation matrix (C ordering) + \return 1 if either skew_trans or skew_mat is non-NULL */ +int ccp4_cmap_set_mask(CMMFile *mfile, const float *skew_mat, const float *skew_trans) +{ + int ictr, jctr; + + if (!mfile) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_set_mask",NULL); + return (EOF);} + + if (skew_trans) + for(ictr = 0; ictr < 3 ; ++ictr) + mfile->skew.translation[ictr] = *(skew_trans + ictr); + else + for(ictr = 0; ictr < 3 ; ++ictr) + mfile->skew.translation[ictr] = 0.0F; + + if (skew_mat) + for(ictr = 0; ictr < 3 ; ++ictr) + for (jctr = 0 ; jctr < 3 ; ++jctr) + mfile->skew.rotation[jctr][ictr] = *(skew_mat + (3*ictr) + jctr); + else + for(ictr = 0; ictr < 3 ; ++ictr) + for (jctr = 0 ; jctr < 3 ; ++jctr) + mfile->skew.rotation[jctr][ictr] = 0.0F; + + return (skew_trans != NULL || skew_mat != NULL ); +} + +/*! Get the values of the translation and rotation elements of the skew matrix. + Note: the stored file is in FORTRAN order mat[fastest][slowest], the returned + values are in C mat[slowest][fastest] ordering + \param mfile (CMMFile *) + \param skew_mat (const float *) the skew translation vestor + \param skew_trans (const float *) the skew rotation matrix (C ordering) + \return 1 if mask is set */ +int ccp4_cmap_get_mask(const CMMFile *mfile, float *skew_mat, float *skew_trans) +{ + int ictr, jctr; + + if (!mfile || !skew_mat || !skew_trans) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), + "ccp4_cmap_get_mask",NULL); + return (EOF);} + + for(ictr = 0; ictr < 3 ; ++ictr) + *(skew_trans + ictr) = mfile->skew.translation[ictr]; + + for(ictr = 0; ictr < 3 ; ++ictr) + for (jctr = 0 ; jctr < 3 ; ++jctr) + *(skew_mat + (3*ictr) + jctr) = mfile->skew.rotation[jctr][ictr]; + + return skew_set(&mfile->skew); +} + +/*! Internal: test whether values are set in the skew matrices + \param skew (CMMFile_Skew *) + \return TRUE or FALSE */ +int skew_set(const CMMFile_Skew *skew) +{ + return + skew->translation[0] != 0.0F || + skew->translation[1] != 0.0F || + skew->translation[2] != 0.0F || + skew->rotation[0][0] != 0.0F || + skew->rotation[0][1] != 0.0F || + skew->rotation[0][2] != 0.0F || + skew->rotation[1][0] != 0.0F || + skew->rotation[1][1] != 0.0F || + skew->rotation[1][2] != 0.0F || + skew->rotation[2][0] != 0.0F || + skew->rotation[2][1] != 0.0F || + skew->rotation[2][2] != 0.0F; +} diff --git a/ccp4c/ccp4/cmap_skew.h b/ccp4c/ccp4/cmap_skew.h new file mode 100644 index 00000000..4c9cc08a --- /dev/null +++ b/ccp4c/ccp4/cmap_skew.h @@ -0,0 +1,32 @@ +/* + cmap_skew.h: header file for cmap_skew.c + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __GUARD_MAPLIB_SKEW +#define __GUARD_MAPLIB_SKEW + +#ifdef __cplusplus +extern "C" { +#endif + +int skew_set(const CMMFile_Skew *skew); + +#ifdef __cplusplus +} +#endif + +#endif /* __GUARD_MAPLIB_SKEW */ diff --git a/ccp4c/ccp4/cmap_stats.c b/ccp4c/ccp4/cmap_stats.c new file mode 100644 index 00000000..4c86d16d --- /dev/null +++ b/ccp4c/ccp4/cmap_stats.c @@ -0,0 +1,53 @@ +/* + cmap_stats.c: deal with map statistics. + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include "cmaplib.h" +#include "cmap_stats.h" +#include "cmap_errno.h" + +/*! Internal: use floats in range section_begin to section_end + to update the map statistics. + \param stats (CMMFile_Stats *) + \param section_begin (void *) start of section + \param section_end (void *) one past end-of-section + \return total of map elements so far */ +int stats_update(CMMFile_Stats *stats, void *section_begin, + void *section_end) +{ + float *ufp = (float *) section_begin; + double val; + + if (stats->total == 0 && *ufp < -1.0e10 ) { + stats->offset = *ufp; + } + while (ufp < (float *) section_end) { + val = (double) (*ufp - stats->offset); + stats->mean += val; + stats->rms += val * val; + stats->min = MIN( stats->min, *ufp); + stats->max = MAX( stats->max, *ufp); + + ufp++; + } + + stats->total += (float *)section_end - (float *)section_begin; + + return (stats->total); +} + diff --git a/ccp4c/ccp4/cmap_stats.h b/ccp4c/ccp4/cmap_stats.h new file mode 100644 index 00000000..0f25bb6c --- /dev/null +++ b/ccp4c/ccp4/cmap_stats.h @@ -0,0 +1,33 @@ +/* + cmap_stats.h: header file for cmap_stats.c + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __GUARD_MAPLIB_STATS +#define __GUARD_MAPLIB_STATS + +#ifdef __cplusplus +extern "C" { +#endif + +int stats_update(CMMFile_Stats *stats, void *section_begin, + void *section_end); + +#ifdef __cplusplus +} +#endif + +#endif /* __GUARD_MAPLIB_STATS */ diff --git a/ccp4c/ccp4/cmap_symop.c b/ccp4c/ccp4/cmap_symop.c new file mode 100644 index 00000000..e1d3a188 --- /dev/null +++ b/ccp4c/ccp4/cmap_symop.c @@ -0,0 +1,141 @@ +/* + cmap_symop.c: set and fetch symmetry operations in map header + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include "cmaplib.h" +#include "cmap_errno.h" + +/*! Return the number of symops (estimated as the size/80) + \param mfile (const CMMFile *) + \return number of symops */ +int ccp4_cmap_num_symop(const CMMFile *mfile) +{ + if (mfile == NULL) + return 0; + return (mfile->symop.number); +} + +/*! navigate around the symops, seeking in 80 byte units + The result must lie within the symop strings in the file. + \param mfile (CMMFile *) + \param isymop (int) the number of the symop "string" of interest + \param whence (unsigned int) mode of seek + \return symop string number or EOF */ +int ccp4_cmap_seek_symop(CMMFile *mfile, int isymop, unsigned int whence) +{ + const int n_byt_symop = 80; + div_t symops; + int result = EOF; + + if (ccp4_file_is_read(mfile->stream) == 0) + return EOF; + + switch (whence) { + case SEEK_SET: + if (isymop < 0 || isymop > mfile->symop.number) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_symop", + NULL); + else + result = ccp4_file_raw_seek(mfile->stream, mfile->symop.offset + + isymop*n_byt_symop, whence); + break; + case SEEK_END: + if (isymop > 0 || abs(isymop) > mfile->symop.number ) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_symop", + NULL); + else + result = ccp4_file_raw_seek(mfile->stream, mfile->symop.offset + + mfile->symop.size + isymop*n_byt_symop, + SEEK_SET); + break; + case SEEK_CUR: + symops = div(ccp4_file_tell(mfile->stream) - mfile->symop.offset,n_byt_symop); + if (symops.quot < 0 || symops.quot >= mfile->symop.number || + symops.quot + isymop < 0 || symops.quot + isymop >= mfile->symop.number) + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), + "ccp4_cmap_seek_symop", + NULL); + else + result = ccp4_file_raw_seek(mfile->stream,(isymop > 0) ? + (n_byt_symop - symops.rem + n_byt_symop * (isymop-1)) : + (n_byt_symop * isymop -symops.rem), SEEK_CUR); + } + return (result == EOF) ? EOF : (result - mfile->symop.offset)/n_byt_symop; +} + +/*! get a symop string of 80 characters + \param mfile (CMMFile *) + \param buffer (char *) array of bytes which will contain the symop string. + This must be at least 81 characters long (including space for null terminator). + \return 1 on success, 0 if no symops, EOF on failure */ +int ccp4_cmap_get_symop(CMMFile *mfile, char *buffer) +{ + const int n_byt_symop = 80; + off_t file_posn; + + if ( mfile->symop.size == 0) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_SymErr), + "cmap_get_symop",NULL); + return (0);} + + file_posn = ccp4_file_tell(mfile->stream); + if (file_posn < mfile->symop.offset || + file_posn > mfile->symop.offset + mfile->symop.size) { + ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_SymErr), + "cmap_get_symop",NULL); + return (EOF);} + + if (ccp4_file_readchar(mfile->stream, (uint8 *) buffer, n_byt_symop) != n_byt_symop) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), + "cmap_get_symop",NULL); + return (EOF); + } + buffer[n_byt_symop] = '\0'; + return (1); +} + +/*! write symops to file. + This wraps a raw write. It is up to the calling program to + ensure the positioning (effectively assume appends). Writing + is blocked if data has alread been written to the file. 80 + bytes of continuous memory is written to the file. + \param mfile (CMMFile *) + \param symop (const char *) character array containing the + symop string (at least 80 characters in length + \return 1 on success, EOF on failure */ +int ccp4_cmap_set_symop(CMMFile *mfile, const char *symop) +{ + const int n_byt_symop = 80; + char buffer[80]; + memset(buffer,' ',80U); + memcpy(buffer, symop, (strlen(symop) > n_byt_symop) ? + n_byt_symop : strlen(symop) ); + if (ccp4_file_is_write(mfile->stream) && mfile->data.number == 0) { + if (ccp4_file_writechar(mfile->stream, (uint8 *) buffer, n_byt_symop) != n_byt_symop) { + ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), + "cmap_set_symop",NULL); + return (EOF); + } + mfile->symop.number++; + mfile->symop.size += n_byt_symop; + mfile->data.offset = mfile->symop.offset + mfile->symop.size; +} + return (1); +} diff --git a/ccp4c/ccp4/cmaplib.h b/ccp4c/ccp4/cmaplib.h new file mode 100644 index 00000000..422be4be --- /dev/null +++ b/ccp4c/ccp4/cmaplib.h @@ -0,0 +1,241 @@ +/* + cmaplib.h: C/C++ level API for accessing CCP4 map files + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @page cmap_page CMAP library + * + * @verbatim + + + + @endverbatim + * + * @section cmap_file_list File list + +
    +
  • cmaplib.h - contains details of the C/C++ API +
  • cmap_data.h +
  • cmap_header.h +
  • cmap_skew.h +
  • cmap_errno.h +
  • cmap_labels.h +
  • cmap_stats.h +
+ + * @section cmap_overview Overview + + Functions defining the C-level API for accessing CCP4 map files. + + */ + +/** @file cmaplib.h + * + * @brief ccp4 map i/o user-level library header file + * + * Functions defining the C-level API for accessing CCP4 map files. + * + * @author Charles Ballard + */ + +#ifndef __GUARD_MAPLIB +#define __GUARD_MAPLIB + +#include "ccp4_utils.h" + +#ifdef __cplusplus +namespace CMap_io { +typedef CCP4::CCP4File CCP4File; +extern "C" { +#endif + +typedef struct _CMMFile_Skew CMMFile_Skew; +typedef struct _CMMFile_Labels CMMFile_Labels; +typedef struct _CMMFile_Symop CMMFile_Symop; +typedef struct _CMMFile_Data CMMFile_Data; +typedef struct _CMMFile_Stats CMMFile_Stats; +typedef struct _CMMFile CMMFile; + +struct _CMMFile_Labels { + unsigned int number; + char *labels[10]; +}; + +struct _CMMFile_Skew { + float rotation[3][3]; + float translation[3]; +}; + +struct _CMMFile_Symop { +unsigned int offset; +unsigned int size; +unsigned int number; +}; + +struct _CMMFile_Data { + size_t offset; + size_t section_size; + size_t header_size; + size_t block_size; + unsigned int number; +}; + +struct _CMMFile_Stats { + float offset; /* pseudo zero value */ + float min; /* minimum density value */ + float max; /* maximum density value */ + double mean; /* sum of densities (less offset) */ + double rms; /* sum of square of densities (less offset) */ + int total; /* number of summed densities */ +}; + +struct _CMMFile { +CCP4File *stream; +char *file_name; +unsigned int data_mode; +unsigned int close_mode; +float cell[6]; +int spacegroup; +int EM_spacegroup; +char EM_exthead_type[5]; +char EM_contents[5]; +int map_dim[3]; +int origin[3]; +int cell_grid[3]; +int axes_order[3]; +CMMFile_Symop symop; +CMMFile_Data data; +CMMFile_Stats stats; +CMMFile_Labels labels; +CMMFile_Skew skew; +int reserved[8]; +char user_access[28]; +}; + +/* open a file for read/write */ +void *ccp4_cmap_open(const char *filename, int mode); + +/* close a file for read/write (dumping the header if write) */ +void ccp4_cmap_close(CMMFile *mfile); + +/* set the close mode (calculation of map statistics) */ +void ccp4_cmap_closemode(CMMFile *mfile, unsigned int closemode); + +/* seek to a section in the map (read mode only)*/ +int ccp4_cmap_seek_section(CMMFile *mfile, int offset, unsigned int seek_mode); + +/* seek to a row in a section (read mode only)*/ +int ccp4_cmap_seek_row(CMMFile *, int offset, unsigned int seek_mode); + +/* raw seek (read mode only)*/ +int ccp4_cmap_seek_data(CMMFile *, int offset, unsigned int seek_mode); + +/* read a map section from file to memory */ +int ccp4_cmap_read_section(CMMFile *mfile, void *section); + +/* read a row from file to memory */ +int ccp4_cmap_read_row(CMMFile *mfile, void *row); + +/* read n_items from file to memory (item determined by data mode) */ +int ccp4_cmap_read_data(const CMMFile *mfile, void *items, int n_items); + +/* write a map section from memory to file */ +int ccp4_cmap_write_section(CMMFile *mfile, const void *section); + +/* write a map row from memory to file */ +int ccp4_cmap_write_row(CMMFile *mfile, const void *row); + +/* write n_items from memory to file (item determined by data mode) */ +int ccp4_cmap_write_data(CMMFile *mfile, const void *items, int n_items); + +/* read the section header corresponding to the current section */ +int ccp4_cmap_read_section_header(const CMMFile *mfile, char *header); + +/* write the section header corresponding to the current section */ +int ccp4_cmap_write_section_header(CMMFile *mfile, const char *header); + +/* get the header parameters */ +void ccp4_cmap_get_cell(const CMMFile *mfile, float *cell); +void ccp4_cmap_get_grid(const CMMFile *mfile, int *grid); +void ccp4_cmap_get_origin(const CMMFile *mfile, int *origin); +void ccp4_cmap_get_order(const CMMFile *mfile, int *axes_order); +void ccp4_cmap_get_dim(const CMMFile *mfile, int *map_dim); +int ccp4_cmap_get_spacegroup(const CMMFile *mfile); +void ccp4_cmap_get_mapstats(const CMMFile *mfile, float *min, float* max, + double *mean, double *rms); + +/* set the header parameters */ +void ccp4_cmap_set_cell(CMMFile *mfile, const float *cell); +void ccp4_cmap_set_grid(CMMFile *mfile, const int *grid); +void ccp4_cmap_set_origin(CMMFile *mfile, const int *origin); +void ccp4_cmap_set_order(CMMFile *mfile, const int *axes_order); +void ccp4_cmap_set_dim(CMMFile *mfile, const int *map_dim); +void ccp4_cmap_set_spacegroup(CMMFile *mfile, int spacegroup); +void ccp4_cmap_set_mapstats(CMMFile *mfile, const float min, const float max, + const double mean, const double rms); + +/* get map file datamode */ +unsigned int ccp4_cmap_get_datamode(const CMMFile *mfile); + +/* set map file datamode */ +void ccp4_cmap_set_datamode(CMMFile *mfile, unsigned int datamode); + +/* get the local header size */ +size_t ccp4_cmap_get_local_header(CMMFile *mfile); + +/* set the local header size (before data writing begins) */ +void ccp4_cmap_set_local_header(CMMFile *mfile, size_t size); + +/* get the number of symops in the file */ +int ccp4_cmap_num_symop(const CMMFile *mfile); + +/* seek among the symops strings */ +int ccp4_cmap_seek_symop(CMMFile *mfile, int isymop, unsigned int whence); + +/* read a symop string of 80 characters */ +int ccp4_cmap_get_symop(CMMFile *mfile, char *buffer); + +/* write a symop string of 80 characters */ +int ccp4_cmap_set_symop(CMMFile *mfile, const char *buffer); + +/* get the mask */ +int ccp4_cmap_get_mask(const CMMFile *mfile, float *skew_mat, float *skew_trans); + +/* set the mask */ +int ccp4_cmap_set_mask(CMMFile *mfile, const float *skew_mat, const float *skew_trans); + +/* the number of labels used */ +int ccp4_cmap_number_label(const CMMFile *mfile); + +/* set label at posn from C-string */ +int ccp4_cmap_set_label(CMMFile *mfile, const char *label, int posn); + +/* return label at posn as C-string */ +char *ccp4_cmap_get_label(const CMMFile *mfile, int posn); + +/* set title (label=0) */ +int ccp4_cmap_set_title(CMMFile *mfile, const char *label); + +/* get title (label=0) */ +char *ccp4_cmap_get_title(const CMMFile *mfile); + +#ifdef __cplusplus +} +} +#endif + +#endif /* __GUARD_MAPLIB */ diff --git a/ccp4c/ccp4/cmaplib_f.h b/ccp4c/ccp4/cmaplib_f.h new file mode 100644 index 00000000..e687cdc3 --- /dev/null +++ b/ccp4c/ccp4/cmaplib_f.h @@ -0,0 +1,34 @@ +/* + cmaplib_f.h: header files for cmaplib_f.c + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __GUARD_MAPLIB_FORTRAN +#define __GUARD_MAPLIB_FORTRAN + +#include "cmaplib.h" + +#define MAXMAP MAXFILES + +typedef struct _IOConvMap IOConvMap; + +struct _IOConvMap { + int ipc; + char *logname; + CMMFile *mapfile; +}; + +#endif /* __GUARD_MAPLIB_FORTRAN */ diff --git a/ccp4c/ccp4/cmtzlib.c b/ccp4c/ccp4/cmtzlib.c new file mode 100644 index 00000000..3d53dff1 --- /dev/null +++ b/ccp4c/ccp4/cmtzlib.c @@ -0,0 +1,3964 @@ +/* + cmtzlib.c: functions for handling MTZ files + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/* DO NOT put Doxygen comments here - put in cmtzlib.h */ +/* See cmtzlib.h for descriptions of functions */ + +#include +#include +#include +#ifdef _MSC_VER +#include +#endif +#include +#include "cmtzlib.h" +#include "ccp4_types.h" +#include "ccp4_array.h" +#include "ccp4_parser.h" +#include "ccp4_vars.h" +#include "ccp4_errno.h" +#include "ccp4_unitcell.h" +/* "$Id$" */ + +/* stuff for error reporting */ +#define CMTZ_ERRNO(n) (CCP4_ERR_MTZ | (n)) + +/* error defs */ +#define CMTZERR_Ok 0 +#define CMTZERR_NoChannel 1 +#define CMTZERR_NoFile 2 +#define CMTZERR_NoLogicalName 3 +#define CMTZERR_CantOpenFile 4 +#define CMTZERR_NoHeader 5 +#define CMTZERR_ReadFail 6 +#define CMTZERR_WriteFail 7 +#define CMTZERR_ParamError 8 +#define CMTZERR_Cellerr 9 +#define CMTZERR_FileStamp 10 +#define CMTZERR_SymErr 11 +#define CMTZERR_AllocFail 12 +#define CMTZERR_MaxFile 13 +#define CMTZERR_ParserFail 14 +#define CMTZERR_NotMTZ 15 +#define CMTZERR_DatasetIncomplete 16 +#define CMTZERR_NoArch 17 +#define CMTZERR_NullDataset 18 +#define CMTZERR_BadVersion 19 +#define CMTZERR_SYMINFIncomplete 20 +#define CMTZERR_COLUMNIncomplete 21 +#define CMTZERR_BadBatchHeader 22 +#define CMTZERR_DifferentVersion 23 +#define CMTZERR_ColTypeMismatch 24 +#define CMTZERR_ColGroupError 25 +#define CMTZERR_ColSourceError 26 + + +MTZ *MtzGet(const char *logname, int read_refs) + +{ return MtzGetUserCellTolerance(logname, read_refs, 0.002); +} + +MTZ *MtzGetUserCellTolerance(const char *logname, int read_refs, const double cell_tolerance) + +{ MTZ *mtz; + CCP4File *filein; + int istat, newproj, cset_warn=0, length; + MTZCOL *colin[MCOLUMNS], *newcol; + char *filename; + char crysin[MXTALS][65],projin[MXTALS][65],crystal[65],project[65]; + double cellin[MXTALS][6],cell[6]; + int jxtalin[MSETS]; + char mkey[4], keyarg[76], hdrrec[MTZRECORDLENGTH+1], label[31], type[3]; + int i, j, ntotcol, nref, ntotset=0, nbat, nhist=0, icolin; + int ixtal, jxtal, iset, iiset, icset, nxtal=0, nset[MXTALS]={0}, isym=0; + int indhigh[3],indlow[3],isort[5],ind_xtal,ind_set,ind_col[3],debug=0; + float min,max,totcell[6],minres,maxres; + float *refldata; + double coefhkl[6]; + int k; long xmllen; + int32_t tmp_hdrst; + int64_t hdrst; + + /* For cparser */ + CCP4PARSERARRAY *parser; + CCP4PARSERTOKEN *token=NULL; + char *key; + int ntok,iprint=0; + + /* For batches */ + int ibat,nintegers,nreals; + float buf[NBATCHWORDS]; + int *intbuf = (int *) buf; + float *fltbuf = buf + NBATCHINTEGERS; + MTZBAT *batch; + + /* known headers */ + char known_headers[][5] = + { "PROJ","DATA","DCEL","DRES","DWAV","VERS","TITL","CELL", + "SORT","SYMI","SYMM","COLU","VALM","RESO","COLS","COLG", + "NCOL","NDIF","CRYS","MTZH","MTZB","BH" }; + int n_known_headers = sizeof(known_headers)/sizeof(known_headers[0]); + + if (debug) + printf(" Entering MtzGet \n"); + + /* check input */ + if (!logname) return NULL; + + /* Open the mtz file: */ + if (getenv(logname) != NULL) { + filename = strdup(getenv(logname)); + } else { + filename = strdup(logname); + } + + if (debug) + printf(" Opening file %s \n",filename); + + filein = ccp4_file_open(filename,O_RDONLY); + if (! filein ) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_CantOpenFile),"MtzGet",NULL); + free(filename); + return NULL; + } + + if (debug) + printf(" File opened successfully \n"); + + /* specify location of stamp as 2*sizeof(float), where float is default mode */ + ccp4_file_setstamp(filein, 2); + /* Read architecture */ + istat = ccp4_file_rarch (filein); + if (!istat) { + ccp4_signal(CCP4_ERRLEVEL(2) | CMTZ_ERRNO(CMTZERR_NoArch), + "MtzGet", NULL); + } + + parser = ccp4_parse_start(20); + if (parser == NULL) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ParserFail),"MtzGet",NULL); + free(filename); + ccp4_file_close(filein); + return NULL; + } + /* Set some convenient pointers to members of the parser array */ + key = parser->keyword; + token = parser->token; + + /* return to beginning of the file */ + ccp4_file_seek (filein, 0, SEEK_SET); + /* set reading characters */ + ccp4_file_setmode(filein,0); + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, 4); + /* We don't test all reads, but this one should trap for e.g. truncated files */ + if (istat == EOF || hdrrec[0] == '\0') { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + hdrrec[4] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + + if (!ccp4_keymatch(key,"MTZ")) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_NotMTZ),"MtzGet",NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return(NULL); + } + + if (debug) + printf(" MTZ file confirmed \n"); + + /* set reading integers */ + ccp4_file_setmode(filein,6); + istat = ccp4_file_read(filein, (uint8 *) &tmp_hdrst, 1); + if (debug) printf(" tmp_hdrst read as %d \n", tmp_hdrst); + if (tmp_hdrst == -1) { + // read the real header offset in bytes 13-20 i.e. a double-word after the third word + if ( ccp4_file_seek(filein, 3, SEEK_SET) ) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + /* set reading double integers*/ + ccp4_file_setmode(filein,5); + istat = ccp4_file_read(filein, (uint8 *) &hdrst, 1); + if (debug) printf(" hdrst read as %ld \n", hdrst); + /* switch back to reading integers */ + ccp4_file_setmode(filein,6); + } else { + hdrst = (int64_t) tmp_hdrst; + } + + /* 1st Pass: Read ntotcol, nref, nbat and dataset info. + nxtal and nset are used to assign memory for MTZ structure. + Position at top of header */ + /* We don't test all seeks, but this one might trap duff files */ + if ( ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET) ) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + + /* set up base dataset in case it is in not in file */ + iiset = 0; + nxtal = 1; + jxtalin[0]=0; + strcpy(projin[0],"HKL_base"); + strcpy(crysin[0],"HKL_base"); + nset[0] = 1; + + if (debug) + printf(" Start first pass \n"); + + strcpy(project,"dummy"); + strcpy(crystal,"dummy"); + ccp4_file_setmode(filein,0); + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + if (debug) + printf(" Read first header record with istat = %d \n",istat); + /* We don't test all reads, but this one should trap for e.g. truncated files */ + if (istat == EOF || hdrrec[0] == '\0') { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + while (!ccp4_keymatch(key,"END")) { + + /* read total number of columns, reflections and batches */ + if (ccp4_keymatch(key, "NCOL")) { + ntotcol = (int) token[1].value; + nref = (int) token[2].value; + nbat = (int) token[3].value; + } + + /* read total number of datasets over all projects/crystals */ + else if (ccp4_keymatch(key, "NDIF")) { + ntotset = (int) token[1].value; + if (debug) printf(" MtzGet: NDIF is %d\n",ntotset); + } + + /* PROJECT line. Projects are not part of data structure, but + may imply new crystal in hierarchy. */ + else if (ccp4_keymatch(key, "PROJ")) { + ++iiset; + if (iiset >= MSETS) { + if (ccp4_liberr_verbosity(-1)) + printf("MtzGet: Maximum number of datasets exceeded! \n"); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + strcpy(project,"dummy"); + if (ntok > 2) strcpy(project,token[2].fullstring); + strcpy(crystal,project); + jxtal = -1; + for (ixtal = 0; ixtal < nxtal; ++ixtal) { + if (strcmp(projin[ixtal],project) == 0) { + jxtal = ixtal; + jxtalin[iiset] = jxtal; + } + } + /* New project implies new crystal */ + newproj=0; + if (jxtal == -1) { + ++nxtal; + if (nxtal > MXTALS) { + if (ccp4_liberr_verbosity(-1)) + printf("MtzGet: Maximum number of crystals exceeded! \n"); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + jxtalin[iiset]=nxtal-1; + strcpy(projin[nxtal-1],project); + strcpy(crysin[nxtal-1],crystal); + newproj=1; + } + } + + /* CRYSTAL line. This will be missing in old files! + If the line is present but incomplete we treat it as missing. */ + else if (ccp4_keymatch(key, "CRYS")) { + if (ntok >= 3) { + strcpy(crystal,token[2].fullstring); + if (newproj == 1) { + strcpy(crysin[nxtal-1],crystal); + } else { + jxtal = -1; + for (ixtal = 0; ixtal < nxtal; ++ixtal) { + if (strcmp(crysin[ixtal],crystal) == 0) { + jxtal = ixtal; + jxtalin[iiset] = jxtal; + } + } + if (jxtal == -1) { + ++nxtal; + if (nxtal > MXTALS) { + if (ccp4_liberr_verbosity(-1)) + printf("MtzGet: Maximum number of crystals exceeded! \n"); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + jxtalin[iiset]=nxtal-1; + strcpy(projin[nxtal-1],project); + strcpy(crysin[nxtal-1],crystal); + } + } + } + } + + /* DATASET line. This should present for every dataset so use to + increment dataset count. However, if this is the base dataset, + don't increment as we already have it. */ + else if (ccp4_keymatch(key, "DATA")) { + if ( ntok <= 2 || (ntok > 2 && strcmp(token[2].fullstring,"HKL_base")) ) + ++nset[jxtalin[iiset]]; + } + + /* DCELL line. */ + else if (ccp4_keymatch(key, "DCEL")) { + for (i = 0; i < 6; ++i) + cell[i] = token[i+2].value; + /* If old crystal but cell dimensions differ, make new crystal. + This is primarily for old files with no CRYSTAL cards. + This test doesn't apply to base dataset. + Chosen tolerance is arbitrary - there is no single correct value! */ + if (jxtal > 0 && iiset > 0 && + ccp4uc_cells_differ(cellin[jxtal], cell, cell_tolerance)) { + if (debug) { + printf(" MtzGet: Old crystal %d but new cell dimensions. \n",jxtal); + for (i = 0; i < 6; ++i) + printf(" %lf %lf \n",cellin[jxtal][i],cell[i]); + } + ++nxtal; + if (nxtal > MXTALS) { + if (ccp4_liberr_verbosity(-1)) + printf("MtzGet: Maximum number of crystals exceeded! \n"); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + strcpy(projin[nxtal-1],project); + strcpy(crysin[nxtal-1],crystal); + /* Try to make crystal name unique */ + sprintf(crysin[nxtal-1]+strlen(crystal),"%d",nxtal); + /* correct DATASET increment */ + --nset[jxtalin[iiset]]; + jxtalin[iiset]=nxtal-1; + ++nset[jxtalin[iiset]]; + } + for (i = 0; i < 6; ++i) + cellin[jxtalin[iiset]][i] = cell[i]; + } + + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + } + + if (debug) { + printf(" MtzGet: Found %d crystals \n",nxtal); + for (i = 0; i < nxtal; ++i) + printf(" MtzGet: Crystal %d has %d datasets \n",i+1,nset[i]); + } + + if (debug) + printf(" MtzGet: end of 1st pass \n"); + + /* Allocate memory for input MTZ file */ + if (! (mtz = MtzMalloc(nxtal, nset))) { + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + if (debug) + printf(" MtzGet: created mtz \n"); + mtz->filein = filein; + mtz->nref_filein = nref; + mtz->nref = nref; + mtz->ncol_read = ntotcol; + mtz->n_orig_bat = nbat; + mtz->batch = NULL; + mtz->refs_in_memory = read_refs; + + /* set up base dataset in case it is in not in file */ + nset[0] = 0; + for (i = 1; i < nxtal; ++i) + nset[i] = -1; + iiset = 0; + strcpy(mtz->xtal[0]->pname,"HKL_base"); + strcpy(mtz->xtal[0]->xname,"HKL_base"); + mtz->xtal[0]->xtalid = 0; + mtz->xtal[0]->cell[0] = 0.0; + mtz->xtal[0]->set[0]->setid = 0; + strcpy(mtz->xtal[0]->set[0]->dname,"HKL_base"); + mtz->xtal[0]->set[0]->wavelength = 0.0; + + if (debug) + printf(" MtzGet: starting 2nd pass \n"); + + /* 2nd Pass: Copy dataset information to MTZ structure. + Position at top of header */ + ccp4_file_setmode(filein,6); + ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET); + + /* Read dataset information */ + ccp4_file_setmode(filein,0); + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + while (strncmp((strncpy(mkey,hdrrec,4)),"END",3) != 0) { + + if (strncmp (mkey, "PROJ",4) == 0) { + ++iiset; + strcpy(mtz->xtal[jxtalin[iiset]]->pname,projin[jxtalin[iiset]]); + strcpy(mtz->xtal[jxtalin[iiset]]->xname,crysin[jxtalin[iiset]]); + mtz->xtal[jxtalin[iiset]]->xtalid = jxtalin[iiset] + 1; + } + + else if (strncmp (mkey, "DATA",4) == 0) { + if ( ntok <= 2 || (ntok > 2 && strcmp(token[2].fullstring,"HKL_base")) ) { + iset = (int) token[1].value; + ++nset[jxtalin[iiset]]; + /* Test that dataset exists (i.e. pointer is non-NULL) */ + if (!mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]) { + ccp4_signal(CCP4_ERRLEVEL(3) | + CMTZ_ERRNO(CMTZERR_NullDataset),"MtzGet",NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]->setid = iset; + strcpy(mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]->dname,"dummy"); + if (ntok > 2) strcpy(mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]->dname, + token[2].fullstring); + } + } + + else if (strncmp (mkey, "DCEL",4) == 0) { + for (i = 0; i < 6; ++i) + mtz->xtal[jxtalin[iiset]]->cell[i] = (float) token[i+2].value; + } + + /* this keyword not in use yet */ + else if (strncmp (mkey, "DRES",4) == 0) { + for (i = 0; i < 3; ++i) { + indhigh[i] = (int) token[i+2].value; + indlow[i] = (int) token[i+5].value; + } + MtzHklcoeffs(mtz->xtal[jxtalin[iiset]]->cell, coefhkl); + mtz->xtal[jxtalin[iiset]]->resmax = MtzInd2reso(indhigh, coefhkl); + mtz->xtal[jxtalin[iiset]]->resmin = MtzInd2reso(indlow, coefhkl); + } + + else if (strncmp (mkey, "DWAV",4) == 0) { + mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]->wavelength = (float) token[2].value; + } + + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + if (istat == EOF) { + /* Unexpected end-of-file */ + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + } + + if (debug) + printf(" MtzGet: end of 2nd pass \n"); + + /* 3rd Pass: Position at top of header */ + ccp4_file_setmode(filein,6); + ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET); + + icolin = -1; + ccp4_file_setmode(filein,0); + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + while (strncmp((strncpy(mkey,hdrrec,4)),"END",3) != 0) { + + if (debug) + printf(" MtzGet: header line %s \n",hdrrec); + + if (strncmp (mkey, "VERS",4) == 0) { + if (atoi(hdrrec+10) != MTZ_MAJOR_VERSN) { + if (ccp4_liberr_verbosity(-1)) + printf("Input MTZ file has major version %d and minor version %d \n", + atoi(hdrrec+10),atoi(hdrrec+12)); + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_BadVersion),"MtzGet",NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return(NULL); + } + if (atoi(hdrrec+12) != MTZ_MINOR_VERSN) { + if (ccp4_liberr_verbosity(-1)) + printf("Input MTZ file has major version %d and minor version %d \n", + atoi(hdrrec+10),atoi(hdrrec+12)); + ccp4_signal(CCP4_ERRLEVEL(2) | CMTZ_ERRNO(CMTZERR_DifferentVersion),"MtzGet",NULL); + } + } + else if (strncmp (mkey, "TITL",4) == 0) { + strncpy(mtz->title,hdrrec+6,70); + length = 70; + while ((--length >= 0) && (mtz->title[length] == ' ')); + mtz->title[length+1] = '\0'; + } + + else if (strncmp (mkey, "CELL",4) == 0) { + for (i = 0; i < 6; ++i) + totcell[i] = (float) token[i+1].value; + for (i = 0; i < mtz->nxtal; ++i) { + if (mtz->xtal[i]->cell[0] < 0.01) { + mtz->xtal[i]->cell[0] = totcell[0]; + mtz->xtal[i]->cell[1] = totcell[1]; + mtz->xtal[i]->cell[2] = totcell[2]; + mtz->xtal[i]->cell[3] = totcell[3]; + mtz->xtal[i]->cell[4] = totcell[4]; + mtz->xtal[i]->cell[5] = totcell[5]; + } + } + } + else if (strncmp (mkey, "SORT",4) == 0) { + for (i = 0; i < 5; ++i) + isort[i] = (int) token[i+1].value; + } + else if (strncmp (mkey, "SYMI",4) == 0) { + /* Check that there are enough tokens in the header record */ + if (ntok < 7) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_SYMINFIncomplete), + "MtzGet", NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return(NULL); + } + mtz->mtzsymm.nsym = (int) token[1].value; + mtz->mtzsymm.nsymp = (int) token[2].value; + mtz->mtzsymm.symtyp = token[3].fullstring[0]; + mtz->mtzsymm.spcgrp = (int) token[4].value; + strcpy(mtz->mtzsymm.spcgrpname,token[5].fullstring); + strcpy(mtz->mtzsymm.pgname,token[6].fullstring); + if (ntok > 7) { + mtz->mtzsymm.spg_confidence = token[7].fullstring[0]; + } else { + mtz->mtzsymm.spg_confidence = 'X'; + } + } + else if (strncmp (mkey, "SYMM",4) == 0) { + symop_to_mat4(hdrrec+4,hdrrec+MTZRECORDLENGTH,mtz->mtzsymm.sym[isym++][0]); + } + + else if (strncmp (mkey, "COLU",4) == 0) { + /* Check that there are enough tokens in the header record */ + if (ntok < 5) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_COLUMNIncomplete), + "MtzGet", NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return(NULL); + } + ++icolin; + if (icolin >= MCOLUMNS) { + if (ccp4_liberr_verbosity(-1)) + printf("MtzGet: Maximum number of columns exceeded! \n"); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return NULL; + } + strcpy(label,token[1].fullstring); + strcpy(type,token[2].fullstring); + min = (float) token[3].value; + max = (float) token[4].value; + /* Dataset id for this column + Very old MTZ files may not have this value */ + if (ntok < 6) { + if (!cset_warn) { + if (ccp4_liberr_verbosity(-1)) { + printf("\nWARNING: Dataset id missing from COLUMN records in MTZ header. \n"); + printf("WARNING: Making default dataset assignments. \n"); + } + ccp4_signal(CCP4_ERRLEVEL(2) | CMTZ_ERRNO(CMTZERR_DatasetIncomplete), + "MtzGet", NULL); + cset_warn = 1; + } + icset = 0; + } else { + icset = (int) token[5].value; + } + /* Special trap for M/ISYM */ + if (type[0] == 'Y' && strncmp (label,"M/ISYM",6) == 0) + strcpy(label,"M_ISYM"); + /* Find dataset corresponding to this column */ + ixtal = 0; iset = 0; + for (i = 0; i < mtz->nxtal; ++i) { + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + if (mtz->xtal[i]->set[j]->setid == icset) { + ixtal = i; + iset = j; + break; + } + } + } + + /* Create column. */ + newcol = MtzAddColumn(mtz, mtz->xtal[ixtal]->set[iset], label, type); + newcol->source = icolin + 1; + newcol->min = min; + newcol->max = max; + colin[icolin] = newcol; + } + + else if (strncmp (mkey, "VALM",4) == 0) { + strcpy(keyarg,token[1].fullstring); + if (strncmp (keyarg, "NAN",3) == 0) { + sprintf(mtz->mnf.amnf,"NAN"); + } else { + mtz->mnf.fmnf = (float) token[1].value; + } + } + + else if (strncmp (mkey, "RESO",4) == 0) { + minres = (float) token[1].value; + maxres = (float) token[2].value; + for (i = 0; i < mtz->nxtal; ++i) { + if (mtz->xtal[i]->resmax == 0.0) + mtz->xtal[i]->resmax = maxres; + if (mtz->xtal[i]->resmin == 100.0) + mtz->xtal[i]->resmin = minres; + } + } + + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + } + + /* 4th Pass: Column group and source extensions and unknown keywords */ + /* 4th Pass: Position at top of header */ + ccp4_file_setmode(filein,6); + ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET); + ccp4_file_setmode(filein,0); + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + while (strncmp((strncpy(mkey,hdrrec,4)),"END",3) != 0) { + if (strncmp (mkey, "COLS",4) == 0 ) { + strcpy(label,token[1].fullstring); + /* Special trap for M/ISYM */ + if (strncmp (label,"M/ISYM",6) == 0) + strcpy(label,"M_ISYM"); + icset = (int) token[3].value; + newcol = NULL; + for (i = 0; i < mtz->nxtal; ++i) { + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + if (mtz->xtal[i]->set[j]->setid == icset) { + for ( k = 0; k < mtz->xtal[i]->set[j]->ncol; k++ ) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,label) == 0) { + newcol = mtz->xtal[i]->set[j]->col[k]; + break; + } + } + } + } + } + if ( newcol == NULL ) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ColSourceError), + "MtzGet", NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return(NULL); + } + strncpy( newcol->colsource, token[2].fullstring, 36 ); + newcol->colsource[36] = '\0'; + } else if (strncmp (mkey, "COLG",4) == 0 ) { + strcpy(label,token[1].fullstring); + /* Special trap for M/ISYM */ + if (strncmp (label,"M/ISYM",6) == 0) + strcpy(label,"M_ISYM"); + icset = (int) token[5].value; + newcol = NULL; + for (i = 0; i < mtz->nxtal; ++i) { + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + if (mtz->xtal[i]->set[j]->setid == icset) { + for ( k = 0; k < mtz->xtal[i]->set[j]->ncol; k++ ) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,label) == 0) { + newcol = mtz->xtal[i]->set[j]->col[k]; + break; + } + } + } + } + } + if ( newcol == NULL ) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ColGroupError), + "MtzGet", NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return(NULL); + } + strncpy( newcol->grpname, token[2].fullstring, 30 ); + newcol->grpname[30] = '\0'; + strncpy( newcol->grptype, token[3].fullstring, 4 ); + newcol->grptype[4] = '\0'; + newcol->grpposn = (int) token[4].value; + } + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + } + + /* 5th Pass: Deal with unknown headers */ + /* 5th Pass: Position at top of header */ + ccp4_file_setmode(filein,6); + ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET); + ccp4_file_setmode(filein,0); + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + while (strncmp((strncpy(mkey,hdrrec,4)),"END",3) != 0) { + for ( i = 0; i < n_known_headers; ++i ) + if (strncmp (mkey,known_headers[i],4) == 0 ) + break; + if ( i == n_known_headers ) { + mtz->unknown_headers = ccp4_utils_realloc( mtz->unknown_headers, mtz->n_unknown_headers*MTZRECORDLENGTH+MTZRECORDLENGTH ); // if null, malloc + memcpy( mtz->unknown_headers+mtz->n_unknown_headers*MTZRECORDLENGTH, hdrrec, MTZRECORDLENGTH ); + mtz->n_unknown_headers++; + } + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + } + + /* copy sort order */ + for (i = 0; i < 5; ++i) { + if (isort[i] > 0) + mtz->order[i] = colin[isort[i]-1]; + } + + if (debug) + printf(" MtzGet: end of 3rd pass \n"); + + /* Now read history if any */ + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + while (!ccp4_keymatch(key,"MTZE")) { + + if (ccp4_keymatch(key, "MTZH")) { + nhist = (int) token[1].value; + /* allocate memory for nhist lines */ + mtz->hist = MtzCallocHist(nhist); + mtz->histlines = nhist; + + for (i = 0; i < nhist; ++i) { + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + strncpy(mtz->hist + MTZRECORDLENGTH*i,hdrrec,MTZRECORDLENGTH); + } + + } else if (ccp4_keymatch(key, "MTZB")) { + for (ibat = 0; ibat < nbat; ++ibat) { + + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + if (!ccp4_keymatch(key, "BH")) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_BadBatchHeader), + "MtzGet", NULL); + ccp4_parse_end(parser); + ccp4_file_close(filein); + free(filename); + return(NULL); + } + + /* allocate memory for this batch */ + if (ibat == 0) { + mtz->batch = MtzMallocBatch(); + batch = mtz->batch; + } else { + batch->next = MtzMallocBatch(); + batch = batch->next; + } + batch->next = NULL; + batch->num = (int) token[1].value; + /* nwords = (int) token[2].value; */ + nintegers = (int) token[3].value; + nreals = (int) token[4].value; + /* read batch title */ + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + strncpy(batch->title,hdrrec+6,70); + batch->title[70]='\0'; + + ccp4_file_setmode(filein,6); + istat = ccp4_file_read(filein, (uint8 *) intbuf, nintegers); + ccp4_file_setmode(filein,2); + istat = ccp4_file_read(filein, (uint8 *) fltbuf, nreals); + + MtzArrayToBatch(intbuf, fltbuf, batch); + + ccp4_file_setmode(filein,0); + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + if (ntok == 4) { + strcpy(batch->gonlab[0],token[1].fullstring); + strcpy(batch->gonlab[1],token[2].fullstring); + strcpy(batch->gonlab[2],token[3].fullstring); + batch->gonlab[0][8] = batch->gonlab[1][8] = batch->gonlab[2][8] = '\0'; + } else if (ntok == 2) { + strcpy(batch->gonlab[0],token[1].fullstring); + batch->gonlab[0][8] = '\0'; + batch->gonlab[1][0] = batch->gonlab[2][0] = '\0'; + } else { + batch->gonlab[0][0] = batch->gonlab[1][0] = batch->gonlab[2][0] = '\0'; + } + } + } + + istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); + hdrrec[MTZRECORDLENGTH] = '\0'; + ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); + } + + /* Finished with the parser array */ + ccp4_parse_end(parser); + + if (debug) + printf(" MtzGet: end of batch pass \n"); + + /* Read XML datablock */ + xmllen = ccp4_file_length(filein) - ccp4_file_tell(filein); + if ( xmllen > 0 ) { + mtz->xml = (char *)ccp4_utils_malloc( xmllen+1 ); + if ( mtz->xml != NULL ) { + istat = ccp4_file_readchar(filein, (uint8 *) mtz->xml, xmllen); + mtz->xml[xmllen] = '\0'; + } + } + + /* Position at start of reflections */ + ccp4_file_setmode(filein,6); + ccp4_file_seek(filein, SIZE1, SEEK_SET); + + if (read_refs) { + + refldata = (float *) ccp4_utils_malloc(ntotcol*sizeof(float)); + /* Read all reflections into memory - make this optional? */ + for (i = 0; i < mtz->nref_filein; ++i) { + MtzRrefl(filein, ntotcol, refldata); + for (j = 0; j < ntotcol; ++j) + colin[j]->ref[i] = refldata[j]; + } + free(refldata); + + /* Recalculate resolution limits */ + + /* Find dataset of indices */ + MtzFindInd(mtz,&ind_xtal,&ind_set,ind_col); + + for (i = 0; i < mtz->nxtal; ++i) { + MtzHklcoeffs(mtz->xtal[i]->cell, coefhkl); + for (j = 0; j < mtz->nref; ++j) { + indhigh[0] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[0]]->ref[j]; + indhigh[1] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[1]]->ref[j]; + indhigh[2] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[2]]->ref[j]; + maxres = MtzInd2reso(indhigh, coefhkl); + if (maxres > mtz->xtal[i]->resmax) mtz->xtal[i]->resmax = maxres; + if (maxres < mtz->xtal[i]->resmin) mtz->xtal[i]->resmin = maxres; + } + } + + /* And close the mtz file: */ + ccp4_file_close(filein); + mtz->filein = NULL; + } + + free(filename); + + return(mtz);} + +int MtzArrayToBatch(const int *intbuf, const float *fltbuf, MTZBAT *batch) + +{ int i; + + batch->iortyp = intbuf[3]; + for (i = 0; i < 6; ++i) + batch->lbcell[i] = intbuf[4 + i]; + batch->misflg = intbuf[10]; + batch->jumpax = intbuf[11]; + batch->ncryst = intbuf[12]; + batch->lcrflg = intbuf[13]; + batch->ldtype = intbuf[14]; + batch->jsaxs = intbuf[15]; + batch->nbscal = intbuf[16]; + batch->ngonax = intbuf[17]; + batch->lbmflg = intbuf[18]; + batch->ndet = intbuf[19]; + batch->nbsetid = intbuf[20]; + + for (i = 0; i < 6; ++i) + batch->cell[i] = fltbuf[i]; + for (i = 0; i < 9; ++i) + batch->umat[i] = fltbuf[6 + i]; + for (i = 0; i < 3; ++i) + batch->phixyz[0][i] = fltbuf[15 + i]; + for (i = 0; i < 3; ++i) + batch->phixyz[1][i] = fltbuf[18 + i]; + for (i = 0; i < 12; ++i) + batch->crydat[i] = fltbuf[21 + i]; + for (i = 0; i < 3; ++i) + batch->datum[i] = fltbuf[33 + i]; + batch->phistt = fltbuf[36]; + batch->phiend = fltbuf[37]; + for (i = 0; i < 3; ++i) + batch->scanax[i] = fltbuf[38 + i]; + batch->time1 = fltbuf[41]; + batch->time2 = fltbuf[42]; + batch->bscale = fltbuf[43]; + batch->bbfac = fltbuf[44]; + batch->sdbscale = fltbuf[45]; + batch->sdbfac = fltbuf[46]; + batch->phirange = fltbuf[47]; + for (i = 0; i < 3; ++i) + batch->e1[i] = fltbuf[59 + i]; + for (i = 0; i < 3; ++i) + batch->e2[i] = fltbuf[62 + i]; + for (i = 0; i < 3; ++i) + batch->e3[i] = fltbuf[65 + i]; + for (i = 0; i < 3; ++i) + batch->source[i] = fltbuf[80 + i]; + for (i = 0; i < 3; ++i) + batch->so[i] = fltbuf[83 + i]; + batch->alambd = fltbuf[86]; + batch->delamb = fltbuf[87]; + batch->delcor = fltbuf[88]; + batch->divhd = fltbuf[89]; + batch->divvd = fltbuf[90]; + for (i = 0; i < 2; ++i) + { batch->dx[i] = fltbuf[111 + (i * 6)]; + batch->theta[i] = fltbuf[112 + (i * 6)]; + batch->detlm[i][0][0] = fltbuf[113 + (i * 6)]; + batch->detlm[i][0][1] = fltbuf[114 + (i * 6)]; + batch->detlm[i][1][0] = fltbuf[115 + (i * 6)]; + batch->detlm[i][1][1] = fltbuf[116 + (i * 6)];} + + return 1; +} + +int MtzRrefl(CCP4File *filein, int ncol, float *refldata) { + + int istat; + + ccp4_file_setmode(filein,2); + istat = ccp4_file_read(filein, (uint8 *) refldata, ncol); + + /* This will return EOF if end-of-file is reached. But by then + you will have read the MTZ file header, so not so useful. */ + return istat; +} + +int MtzFindInd(const MTZ *mtz, int *ind_xtal, int *ind_set, int ind_col[3]) { + + int i,j,k; + + /* default to first 3 columns of 1st datset */ + *ind_xtal = 0; + *ind_set = 0; + ind_col[0] = 0; + ind_col[1] = 1; + ind_col[2] = 2; + + for (i = 0; i < mtz->nxtal; ++i) + for (j = 0; j < mtz->xtal[i]->nset; ++j) + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if (mtz->xtal[i]->set[j]->col[k]->label[0] == 'H' && + mtz->xtal[i]->set[j]->col[k]->type[0] == 'H') { + *ind_xtal = i; + *ind_set = j; + ind_col[0] = k; + } + if (mtz->xtal[i]->set[j]->col[k]->label[0] == 'K' && + mtz->xtal[i]->set[j]->col[k]->type[0] == 'H') + ind_col[1] = k; + if (mtz->xtal[i]->set[j]->col[k]->label[0] == 'L' && + mtz->xtal[i]->set[j]->col[k]->type[0] == 'H') + ind_col[2] = k; + } + + return 1; +} + +float MtzInd2reso(const int in[3], const double coefhkl[6]) { + + int ih,ik,il; + float reso; + + ih = in[0]; + ik = in[1]; + il = in[2]; + + reso = (float) 4.0 * (ih*ih*coefhkl[0] + ih*ik*coefhkl[1] + + ih*il*coefhkl[2] + ik*ik*coefhkl[3] + + ik*il*coefhkl[4] + il*il*coefhkl[5]); + + return reso; + +} + +int MtzHklcoeffs(const float cell[6], double coefhkl[6]) { + + /* generate coefhkl coefficients from given cell parameters */ + + int i; + double alpha,beta,gamma,degtorad,denom; + double ax,bx,by,cx,cy,cz; + double axst,ayst,azst,byst,bzst,czst; + + /* sanity clause (but there ain't no sanity clause!) */ + for (i = 0; i < 6; ++i) + coefhkl[i] = 0.0; + for (i = 0; i < 6; ++i) + if (cell[i] < 0.001) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_Cellerr),"MtzHklcoeffs",NULL); + return 0; + } + + degtorad = atan(1.0)/45.0; + + alpha = degtorad*cell[3]; + beta = degtorad*cell[4]; + gamma = degtorad*cell[5]; + + /* orthogonal frame for calculation + a along x, b in x-y plane */ + + ax = cell[0]; + bx = cell[1] * cos(gamma); + by = cell[1] * sin(gamma); + cx = cell[2] * cos(beta); + cy = (cell[1]*cell[2]*cos(alpha) - bx*cx)/by; + cz = sqrt(cell[2]*cell[2] - cx*cx - cy*cy); + + /* find reciprocal vectors in orthogonal frame */ + + denom = ax*by*cz; + axst = 1.0/ax; + ayst = -bx*cz/denom; + azst = (bx*cy - by*cx)/denom; + byst = 1.0/by; + bzst = -ax*cy/denom; + czst = 1.0/cz; + + coefhkl[0] = 0.25*(axst*axst + ayst*ayst + azst*azst); + coefhkl[1] = 0.5*(ayst*byst + azst*bzst); + coefhkl[2] = 0.5*(azst*czst); + coefhkl[3] = 0.25*(byst*byst + bzst*bzst); + coefhkl[4] = 0.5*(bzst*czst); + coefhkl[5] = 0.25*(czst*czst); + + return 1; +} + +int ccp4_lrtitl(const MTZ *mtz, char *title) { + + int length; + + length = (int) strlen(strcpy(title, mtz->title)); + if (length > 0) { + while ((--length >= 0) && (title[length] == ' ')); + ++length; + } + return(length); +} + +int ccp4_lrhist(const MTZ *mtz, char history[][MTZRECORDLENGTH], int nlines) { + + int i,nhist; + + if (nlines < mtz->histlines) + nhist = nlines; + else + nhist = mtz->histlines; + + for (i = 0; i < nhist; ++i) { + strncpy(history[i],mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); + } + + return nhist; +} + +int ccp4_lrsort(const MTZ *mtz, int isort[5]) { + + int i,j,k,l,icol; + + icol = 0; + for (i = 0; i < 5; ++i) + isort[i] = 0; + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + ++icol; + for (l = 0; l < 5; ++l) { + if (mtz->order[l] == mtz->xtal[i]->set[j]->col[k]) + isort[l] = icol; + } + } + } + } + + return 1; +} + +int ccp4_lrbats(const MTZ *mtz, int *nbatx, int batchx[]) { + + int i=0; + MTZBAT *batch; + + *nbatx = mtz->n_orig_bat; + batch = mtz->batch; + while (batch != NULL) { + batchx[i++] = batch->num; + batch = batch->next; + } + + return i; +} + +void MtzDebugHierarchy(const MTZ *mtz) { + + int i,j,k; + + if (mtz->filein) + printf("MtzDebugHierarchy: input file = %s \n",mtz->filein->name); + if (mtz->fileout) + printf("MtzDebugHierarchy: output file = %s \n",mtz->fileout->name); + + printf("MtzDebugHierarchy: nxtal = %d \n",mtz->nxtal); + for (i = 0; i < mtz->nxtal; ++i) { + printf("MtzDebugHierarchy: xtal = %s, cell = %f %f %f %f %f %f \n", + mtz->xtal[i]->xname, + mtz->xtal[i]->cell[0],mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], + mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); + printf("MtzDebugHierarchy: xtal = %s, nset = %d \n",mtz->xtal[i]->xname, + mtz->xtal[i]->nset); + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + printf("MtzDebugHierarchy: xtal = %s, set = %s, setid = %d, ncol = %d \n", + mtz->xtal[i]->xname,mtz->xtal[i]->set[j]->dname, + mtz->xtal[i]->set[j]->setid,mtz->xtal[i]->set[j]->ncol); + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + printf("MtzDebugHierarchy: col = %s (in: %d) (out: %d) \n", + mtz->xtal[i]->set[j]->col[k]->label, + mtz->xtal[i]->set[j]->col[k]->source, + mtz->xtal[i]->set[j]->col[k]->active); + } + } + } + +} + +/* List of column information: label, type, dataset. + Returns number of columns in current structure. */ +int MtzListColumn(const MTZ *mtz, char clabs[][31], char ctyps[][3], int csetid[]) { + + int i,j,k,icol=0; + + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && + strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { + strcpy(clabs[icol],"M/ISYM"); + } else { + strcpy(clabs[icol],mtz->xtal[i]->set[j]->col[k]->label); + } + strcpy(ctyps[icol],mtz->xtal[i]->set[j]->col[k]->type); + csetid[icol] = mtz->xtal[i]->set[j]->setid; + ++icol; + } + } + } + return icol; +} + +/* List of column information from input file: label, type, dataset. + Returns number of columns in input file. */ +int MtzListInputColumn(const MTZ *mtz, char clabs[][31], char ctyps[][3], int csetid[]) { + + int i,j,k,colin,icol=0; + + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if ((colin = mtz->xtal[i]->set[j]->col[k]->source) != 0) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && + strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { + strcpy(clabs[colin - 1],"M/ISYM"); + } else { + strcpy(clabs[colin - 1],mtz->xtal[i]->set[j]->col[k]->label); + } + strcpy(ctyps[colin - 1],mtz->xtal[i]->set[j]->col[k]->type); + csetid[colin - 1] = mtz->xtal[i]->set[j]->setid; + ++icol; + } + } + } + } + return icol; +} + +int ccp4_lrcell(const MTZXTAL *xtl, float cell[]) { + + int i; + + for (i = 0; i < 6; ++i) { + cell[i] = xtl->cell[i]; + } + + return 1; +} + +int MtzResLimits(const MTZ *mtz, float *minres, float *maxres) { + + int i; + + *maxres = 0.0; + *minres = 100.0; + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + if (mtz->xtal[i]->resmax > *maxres) *maxres = mtz->xtal[i]->resmax; + if (mtz->xtal[i]->resmin < *minres) *minres = mtz->xtal[i]->resmin; + } + + return 1; +} + +int ccp4_lrsymi(const MTZ *mtz, int *nsympx, char *ltypex, int *nspgrx, + char *spgrnx, char *pgnamx) { + char spgconf_temp[2]; + + return ccp4_lrsymi_c(mtz,nsympx,ltypex,nspgrx,spgrnx,pgnamx,spgconf_temp); +} + +int ccp4_lrsymi_c(const MTZ *mtz, int *nsympx, char *ltypex, int *nspgrx, + char *spgrnx, char *pgnamx, char *spgconf) { + + *nsympx = mtz->mtzsymm.nsymp; + *nspgrx = mtz->mtzsymm.spcgrp; + ltypex[0] = mtz->mtzsymm.symtyp; + ltypex[1] = '\0'; + strcpy(spgrnx,mtz->mtzsymm.spcgrpname); + strcpy(pgnamx,mtz->mtzsymm.pgname); + spgconf[0] = mtz->mtzsymm.spg_confidence; + spgconf[1] = '\0'; + + return *nspgrx; +} + +int MtzSpacegroupNumber(const MTZ *mtz) +/* get the spacegroup number (likely CCP4 convention) */ +{ + if (!mtz) return 0; + return mtz->mtzsymm.spcgrp; +} + +int ccp4_lrsymm(const MTZ *mtz, int *nsymx, float rsymx[192][4][4]) { + + int i,j,k; + + *nsymx = mtz->mtzsymm.nsym; + for (i = 0; i < *nsymx; ++i) { + for (j = 0; j < 4; ++j) { + for (k = 0; k < 4; ++k) { + rsymx[i][j][k] = mtz->mtzsymm.sym[i][j][k]; + } + } + } + + return *nsymx; +} + +int MtzParseLabin(char *labin_line, const char prog_labels[][31], + const int nlprgi, char user_labels[][2][31]) + +{ int i,j,imatch,nlabels=0,err=0; + char label1[31],label2[31]; + + /* For cparser */ + CCP4PARSERARRAY *parser=NULL; + CCP4PARSERTOKEN *token=NULL; + char *key; + int ntok,iprint=0; + + parser = ccp4_parse_start(strlen(labin_line)); + if (parser == NULL) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ParserFail),"MtzParseLabin",NULL); + return -1; + } + /* Set some convenient pointers to members of the parser array */ + key = parser->keyword; + token = parser->token; + + ntok = ccp4_parser(labin_line, strlen(labin_line), parser, iprint); + + if (ccp4_keymatch(key,"LABI")) { + if (iprint) printf("Interpreting LABIN line.\n"); + } else if (ccp4_keymatch(key,"LABO")) { + if (iprint) printf("Interpreting LABOUT line.\n"); + } else if (ccp4_keymatch(key,"COMP")) { + if (iprint) printf("Interpreting COMPLETE line (freerflag).\n"); + } else { + printf("Warning in MtzParseLabin: Input is not LABIN or LABOUT line !!\n"); + } + + /* initialise user labels */ + for (j = 0; j < nlprgi; ++j) { + strcpy(user_labels[j][0],""); + strcpy(user_labels[j][1],""); + } + + for (i = 1; i < ntok; i += 2) { + strcpy(label1,token[i].fullstring); + + if (strlen(label1)>30) { + printf("MtzParseLabin: labels cannot be longer than 30 characters: \"%s\"\n",label1); + err++; + break; + } + + /* Trap against trying to access tokens that don't exist */ + if (i+1 < ntok) { + strcpy(label2,token[i+1].fullstring); + + if (strlen(label2)>30) { + printf("MtzParseLabin: labels cannot be longer than 30 characters: \"%s\"\n",label2); + err++; + break; + } + + /* check first label against program labels */ + imatch = 0; + for (j = 0; j < nlprgi; ++j) { + if (strcmp(label1,prog_labels[j]) == 0) { + strcpy(user_labels[j][0],label1); + strcpy(user_labels[j][1],label2); + imatch = 1; + ++nlabels; + break; + } + } + + if (imatch == 0) { + /* check second label against program labels */ + for (j = 0; j < nlprgi; ++j) { + if (strcmp(label2,prog_labels[j]) == 0) { + strcpy(user_labels[j][0],label2); + strcpy(user_labels[j][1],label1); + imatch = 1; + ++nlabels; + break; + } + } + } + } else { + printf("MtzParseLabin: run out of labels trying to match \"%s\"\n",label1); + /* Stop here - there are no more labels to process */ + err++; + break; + } + + if (imatch == 0) { + /* no match */ + printf("MtzParseLabin: neither label recognised: %s %s \n",label1,label2); + err++; + } + } + + /* Finished with the parser array */ + ccp4_parse_end(parser); + + return err ? -1 : nlabels; +} + +MTZCOL **ccp4_lrassn(const MTZ *mtz, const char labels[][31], const int nlabels, + char types[][3]) +{ + int ilab; + char label[31]; + MTZCOL *col, **lookup; + + lookup = (MTZCOL **) ccp4_utils_malloc(nlabels*sizeof(MTZCOL *)); + + /* Loop over labels */ + for (ilab = 0; ilab < nlabels; ++ilab) { + + strcpy(label,labels[ilab]); + /* column not assigned */ + if (label[0] == '\0') { + lookup[ilab] = NULL; + } else { + /* Special trap for M/ISYM */ + if (strcmp(types[ilab],"Y") == 0 && strcmp(label,"M/ISYM") == 0) + strcpy(label,"M_ISYM"); + col = MtzColLookup(mtz,label); + if (col != NULL) { + + /* if requested type is blank, return actual type */ + if (!strcmp(types[ilab],"")) { + if (strcmp(col->type,"")) { + strcpy(types[ilab],col->type); + } else { + strcpy(types[ilab],"R"); + } + + /* check requested column type against file type. */ + } else if (strncmp(col->type,types[ilab],1)) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ColTypeMismatch),"ccp4_lrassn",NULL); + printf(" From ccp4_lrassn: expected type %s does not match file type %s for column %s\n", + types[ilab],col->type,col->label); + if (!strcmp(types[ilab],"R") || !strcmp(types[ilab],"I")) + printf(" (This may be intended for generic types R/I.) \n"); + } + } + + lookup[ilab] = col; + } + } + + return lookup; +} + +int ccp4_lridx(const MTZ *mtz, const MTZSET *set, char crystal_name[64], + char dataset_name[64], char project_name[64], int *isets, + float datcell[6], float *datwave) +{ + int i; + MTZXTAL *xtl; + + /* find which crystal this dataset belongs to */ + xtl = MtzSetXtal(mtz, set); + + /* copy crystal and dataset information */ + strncpy(crystal_name,xtl->xname,63); + crystal_name[63] = '\0'; + strncpy(dataset_name,set->dname,63); + dataset_name[63] = '\0'; + strncpy(project_name,xtl->pname,63); + project_name[63] = '\0'; + *isets = set->setid; + for (i = 0; i < 6; ++i) + datcell[i] = xtl->cell[i]; + *datwave = set->wavelength; + + return 1; +} + +/* Return MTZ record in file order */ +int ccp4_lrrefl(const MTZ *mtz, float *resol, float adata[], int logmss[], int iref) { + + int i,j,k; + int ind[3],ixtal; + unsigned int colin; + float *refldata; + double coefhkl[6]; + + /* If we are past the last reflection, indicate this with return value. */ + if (iref > mtz->nref_filein) + return 1; + + /* If reflections not in memory, read next record from file. */ + if (!mtz->refs_in_memory) { + refldata = (float *) ccp4_utils_malloc(mtz->ncol_read*sizeof(float)); + if (MtzRrefl( mtz->filein, mtz->ncol_read, refldata) == EOF) { + free(refldata); + return 1; + } + } + + /* Loop over all columns in the MTZ struct, and select those which + derive from the input file. */ + for (i = 0; i < mtz->nxtal; ++i) { + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if ((colin = mtz->xtal[i]->set[j]->col[k]->source) != 0) { + if (mtz->refs_in_memory) { + adata[colin - 1] = mtz->xtal[i]->set[j]->col[k]->ref[iref-1]; + } else { + adata[colin - 1] = refldata[colin - 1]; + } + logmss[colin - 1] = ccp4_ismnf(mtz, adata[colin - 1]); + if (mtz->xtal[i]->set[j]->col[k]->type[0] == 'H') { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,"H") == 0) + ind[0] = (int) adata[colin - 1]; + if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,"K") == 0) + ind[1] = (int) adata[colin - 1]; + if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,"L") == 0) + ind[2] = (int) adata[colin - 1]; + } + } + } + } + } + + /* calculate resolution of this reflection, based on cell of + first crystal with non-zero cell dimensions */ + for (ixtal = 0; ixtal < mtz->nxtal; ++ixtal) + if (mtz->xtal[ixtal]->cell[0] > 0.001) { + MtzHklcoeffs(mtz->xtal[ixtal]->cell, coefhkl); + break; + } + *resol = MtzInd2reso(ind, coefhkl); + /* kludge taken from mtzlib.f */ + if (*resol > mtz->xtal[ixtal]->resmax) *resol = mtz->xtal[ixtal]->resmax; + if (*resol < mtz->xtal[ixtal]->resmin) *resol = mtz->xtal[ixtal]->resmin; + + free(refldata); + return 0; +} + +/* Return MTZ record in lookup order */ +int ccp4_lrreff(const MTZ *mtz, float *resol, float adata[], int logmss[], + const MTZCOL *lookup[], const int ncols, const int iref) { + + int icol,l; + int ind[3],ixtal,ind_xtal,ind_set,ind_col[3]; + unsigned int colin; + float *refldata; + double coefhkl[6]; + union float_uint_uchar uf; + + /* If we are past the last reflection, indicate this with return value. */ + if (iref > mtz->nref_filein) + return 1; + + /* If reflections not in memory, read next record from file. */ + if (!mtz->refs_in_memory) { + refldata = (float *) ccp4_utils_malloc(mtz->ncol_read*sizeof(float)); + if (MtzRrefl( mtz->filein, mtz->ncol_read, refldata) == EOF) { + free(refldata); + return 1; + } + } + + if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { + uf = ccp4_nan(); + } else { + uf.f = mtz->mnf.fmnf; + } + + /* loop over columns requested in lookup array. */ + for (icol=0; icol < ncols; icol++) { + logmss[icol] = 1; + if (lookup[icol]) { + if (mtz->refs_in_memory) { + adata[icol] = lookup[icol]->ref[iref-1]; + logmss[icol] = ccp4_ismnf(mtz, adata[icol]); + } else { + if ((colin = lookup[icol]->source) != 0) { + adata[icol] = refldata[colin - 1]; + logmss[icol] = ccp4_ismnf(mtz, adata[icol]); + } else { + adata[icol] = uf.f; + logmss[icol] = 1; + } + } + } + } + + /* Check if HKL are first 3 columns */ + if (lookup[0]->type[0] == 'H' && lookup[1]->type[0] == 'H' && + lookup[2]->type[0] == 'H') { + ind[0] = (int) adata[0]; + ind[1] = (int) adata[1]; + ind[2] = (int) adata[2]; + } else { + MtzFindInd(mtz,&ind_xtal,&ind_set,ind_col); + for (l = 0; l < ncols; ++l) { + if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[0]]) + ind[0] = (int) adata[l]; + if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[1]]) + ind[1] = (int) adata[l]; + if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[2]]) + ind[2] = (int) adata[l]; + } + } + + /* calculate resolution of this reflection, based on cell of + first crystal with non-zero cell dimensions */ + for (ixtal = 0; ixtal < mtz->nxtal; ++ixtal) + if (mtz->xtal[ixtal]->cell[0] > 0.001) { + MtzHklcoeffs(mtz->xtal[ixtal]->cell, coefhkl); + break; + } + *resol = MtzInd2reso(ind, coefhkl); + /* kludge taken from mtzlib.f */ + if (*resol > mtz->xtal[ixtal]->resmax) *resol = mtz->xtal[ixtal]->resmax; + if (*resol < mtz->xtal[ixtal]->resmin) *resol = mtz->xtal[ixtal]->resmin; + + free(refldata); + return 0; +} + +void MtzRewdInput(MTZ *mtz) { + if (mtz->filein) { + ccp4_file_seek(mtz->filein, SIZE1, SEEK_SET); + } else { + printf("MtzRewdInput: No associated file. Was MtzGet called with read_refs option?\n"); + } +} + +int ccp4_ismnf(const MTZ *mtz, const float datum) { + + if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { + return ccp4_utils_isnan((union float_uint_uchar *) &datum); + } else { + if (datum == mtz->mnf.fmnf) + return 1; + } + return 0; +} + +int ccp4_lhprt(const MTZ *mtz, int iprint) { + + int i,j,k,numbat,isort[5],base_set_exists=0; + float maxres=0.0,minres=100.0; + char buffer[MTZRECORDLENGTH+1],symline[81]; + MTZSET *baseset=NULL; + + if (iprint <= 0) return 2; + + printf(" * Title:\n\n"); + printf(" %s\n\n",mtz->title); + + if ((baseset = MtzSetLookup(mtz,"HKL_base/HKL_base")) != NULL) { + if ( MtzNumActiveColsInSet(baseset) || + MtzNbatchesInSet(mtz,baseset) ) { + printf(" * Base dataset:\n\n"); + printf(" %8d %s\n",baseset->setid,"HKL_base"); + printf(" %s\n","HKL_base"); + printf(" %s\n","HKL_base"); + base_set_exists=1; + } + } + + printf("\n * Number of Datasets = %d\n\n",MtzNumActiveSet(mtz)-base_set_exists); + printf(" * Dataset ID, project/crystal/dataset names, cell dimensions, wavelength:\n\n"); + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* is this the base dataset? */ + if (mtz->xtal[i]->set[j] == baseset) continue; + /* check if dataset contains any active columns */ + if ( (MtzNumActiveColsInSet(mtz->xtal[i]->set[j]) == 0) && + (MtzNbatchesInSet(mtz,mtz->xtal[i]->set[j]) == 0) ) continue; + printf(" %8d %s\n",mtz->xtal[i]->set[j]->setid,mtz->xtal[i]->pname); + printf(" %s\n",mtz->xtal[i]->xname); + printf(" %s\n",mtz->xtal[i]->set[j]->dname); + printf(" %10.4f%10.4f%10.4f%10.4f%10.4f%10.4f\n", + mtz->xtal[i]->cell[0],mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], + mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); + printf(" %10.5f\n",mtz->xtal[i]->set[j]->wavelength); + } + } + printf("\n * Number of Columns = %d\n\n",MtzNumActiveCol(mtz)); + printf(" * Number of Reflections = %d\n\n",mtz->nref); + if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { + printf(" * Missing value set to NaN in input mtz file\n\n"); + } else { + printf(" * Missing value set to %f in input mtz file\n\n",mtz->mnf.fmnf); + } + + /* if new batch headers have been written, lose the old ones */ + if (MtzNbat(mtz) > mtz->n_orig_bat) { + numbat = MtzNbat(mtz) - mtz->n_orig_bat; + } else { + numbat = mtz->n_orig_bat; + } + if (numbat > 0) + printf(" * Number of Batches = %d\n\n",numbat); + + if (iprint == 2 || iprint == 3) { + printf(" * HISTORY for current MTZ file :\n\n"); + for (i = 0; i < mtz->histlines; ++i) { + strncpy(buffer,mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); + buffer[MTZRECORDLENGTH] = '\0'; + printf(" %s\n",buffer); + } + printf("\n"); + } + + if (iprint == 1 || iprint == 2 || iprint >=4 ) { + + printf(" * Column Labels :\n\n"); + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if (mtz->xtal[i]->set[j]->col[k]->active) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && + strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { + printf(" M/ISYM"); + } else { + printf(" %s",mtz->xtal[i]->set[j]->col[k]->label); + } + } + } + } + } + printf("\n\n * Column Types :\n\n"); + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if (mtz->xtal[i]->set[j]->col[k]->active) + printf(" %s",mtz->xtal[i]->set[j]->col[k]->type); + } + } + } + printf("\n\n * Associated datasets :\n\n"); + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if (mtz->xtal[i]->set[j]->col[k]->active) + printf(" %d",mtz->xtal[i]->set[j]->setid); + } + } + } + + } else if ( iprint == 3 ) { + + printf(" * Column Labels, Types, Ranges [and Dataset IDs] :\n\n"); + + /* Loop over crystals/datasets/columns */ + for (i = 0; i < mtz->nxtal; ++i) { + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if (mtz->xtal[i]->set[j]->col[k]->active) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && + strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { + printf(" M/ISYM %2s %19.4f %19.4f %8d \n", + mtz->xtal[i]->set[j]->col[k]->type, + mtz->xtal[i]->set[j]->col[k]->min,mtz->xtal[i]->set[j]->col[k]->max, + mtz->xtal[i]->set[j]->setid); + } else { + printf(" %-30s %2s %19.4f %19.4f %8d \n", + mtz->xtal[i]->set[j]->col[k]->label,mtz->xtal[i]->set[j]->col[k]->type, + mtz->xtal[i]->set[j]->col[k]->min,mtz->xtal[i]->set[j]->col[k]->max, + mtz->xtal[i]->set[j]->setid); + } + } + } + } + } + + } + + /* write overall cell - just for scripts which grep for this */ + printf("\n\n * Cell Dimensions : (obsolete - refer to dataset cell dimensions above)\n\n"); + for (i = 0; i < mtz->nxtal; ++i) + if (mtz->xtal[i]->cell[0] > 0.001) { + printf(" %9.4f %9.4f %9.4f %9.4f %9.4f %9.4f \n\n", + mtz->xtal[i]->cell[0],mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], + mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); + break; + } + + /* Calculate overall resolution limits. Two cases: If we have written some reflections + to file, we probably want to know the resolution limits for these. In this case, + mtz->resmax_out and mtz->resmin_out have been set and we use those. Otherwise, + we use the resolution limits of the crystals in memory. */ + if (mtz->resmax_out > 0.0001) { + maxres = mtz->resmax_out; + minres = mtz->resmin_out; + } else { + for (i = 0; i < mtz->nxtal; ++i) { + if (mtz->xtal[i]->resmax > maxres) maxres = mtz->xtal[i]->resmax; + if (mtz->xtal[i]->resmin < minres) minres = mtz->xtal[i]->resmin; + } + } + printf(" * Resolution Range :\n\n"); + if (maxres > 0.0 && minres > 0.0) { + printf(" %10.5f %10.5f ( %10.3f - %10.3f A )\n\n", + minres,maxres,1.0/sqrt(minres),1.0/sqrt(maxres)); + } else if (maxres > 0.0) { + printf(" %10.5f %10.5f ( inf - %10.3f A )\n\n", + minres,maxres,1.0/sqrt(maxres)); + } else { + printf(" Not set - no crystals or reflections? \n\n"); + } + ccp4_lrsort(mtz, isort); + printf(" * Sort Order :\n\n %5d %5d %5d %5d %5d\n\n",isort[0],isort[1],isort[2], + isort[3],isort[4]); + + if (iprint == 3 || iprint == 4 ) { + + printf(" * Number of Symmetry Operations = %d \n",mtz->mtzsymm.nsym); + printf(" * Number of Primitive Operations = %d \n",mtz->mtzsymm.nsymp); + printf(" * Space Group = %d \'%s\' \n",mtz->mtzsymm.spcgrp,mtz->mtzsymm.spcgrpname); + printf(" * Lattice Type = %c \n",mtz->mtzsymm.symtyp); + printf(" * Point Group Name = %s \n",mtz->mtzsymm.pgname); + + printf("\n * Symmetry Operations : \n\n"); + for (i = 0; i < mtz->mtzsymm.nsym; ++i) { + mat4_to_symop(symline,symline+80,(const float (*)[4])mtz->mtzsymm.sym[i]); + symline[60] = '\0'; + printf(" Symmetry %d %s\n",i+1,symline); + for (j = 0; j < 4; ++j) + printf(" %5.2f %5.2f %5.2f %5.2f \n",mtz->mtzsymm.sym[i][j][0], + mtz->mtzsymm.sym[i][j][1],mtz->mtzsymm.sym[i][j][2], + mtz->mtzsymm.sym[i][j][3]); + } + printf("\n"); + + } else { + printf(" * Space group = \'%s\' (number %d)\n\n",mtz->mtzsymm.spcgrpname, + mtz->mtzsymm.spcgrp); + } + + if (mtz->mtzsymm.spg_confidence == 'L') { + printf(" (only Bravais lattice is fixed so far)\n\n"); + } else if (mtz->mtzsymm.spg_confidence == 'P') { + printf(" (only pointgroup is fixed so far)\n\n"); + } else if (mtz->mtzsymm.spg_confidence == 'E') { + printf(" (one of pair of enantiomorphic spacegroups)\n\n"); + } else if (mtz->mtzsymm.spg_confidence == 'S') { + printf(" (spacegroup is known)\n\n"); + } + + return 1; +} + +int ccp4_lhprt_adv(const MTZ *mtz, int iprint) { + + int i,j,k; + char buffer[MTZRECORDLENGTH+1]; + + printf(" HEADER INFORMATION FROM MTZ FILE \n\n"); + + printf(" * File information :\n\n"); + + printf("%s %s\n",MTZTITLE,mtz->title); + printf("%s %d\n",MTZSPACEGROUP,mtz->mtzsymm.spcgrp); + printf("%s %d\n",MTZNUMREFLS,mtz->nref); + if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { + printf("%s %s\n",MTZMNF,"NaN"); + } else { + printf("%s %f\n",MTZMNF,mtz->mnf.fmnf); + } + printf("%s %s\n",MTZSORTORDER,"(not implemented)"); + + printf("\n * Crystals, datasets :\n"); + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + + printf("\n%s %s\n",CRYSTALXTALNAME,mtz->xtal[i]->xname); + printf("%s %s\n",CRYSTALPNAME,mtz->xtal[i]->pname); + printf("%s %10.4f%10.4f%10.4f%10.4f%10.4f%10.4f\n",CRYSTALCELL, + mtz->xtal[i]->cell[0],mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], + mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); + + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + printf("\n %s %s\n",DATASETDNAME,mtz->xtal[i]->set[j]->dname); + printf(" %s %10.5f\n",DATASETWAVELENGTH,mtz->xtal[i]->set[j]->wavelength); + if (mtz->xtal[i]->set[j]->ncol > 0) { + printf("\n %s %s\n",COLUMNLABEL,COLUMNTYPE); + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + printf(" %-31s %-3s\n",mtz->xtal[i]->set[j]->col[k]->label, + mtz->xtal[i]->set[j]->col[k]->type); + } + } + } + } + + printf("\n * HISTORY for current MTZ file :\n\n"); + for (i = 0; i < mtz->histlines; ++i) { + strncpy(buffer,mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); + buffer[MTZRECORDLENGTH] = '\0'; + printf(" %s\n",buffer); + } + + return 1; +} + +int ccp4_lrbat(MTZBAT *batch, float *buf, char *charbuf, int iprint) + +{ int nwords=NBATCHWORDS,nintegers=NBATCHINTEGERS,nreals=NBATCHREALS; + int *intbuf = (int *) buf; + float *fltbuf = buf + NBATCHINTEGERS; + + if (!batch) return 0; + + MtzBatchToArray(batch,intbuf,fltbuf); + intbuf[0] = nwords; + intbuf[1] = nintegers; + intbuf[2] = nreals; + + strncpy(charbuf,batch->title,70); + strncpy(charbuf+70,batch->gonlab[0],8); + strncpy(charbuf+78,batch->gonlab[1],8); + strncpy(charbuf+86,batch->gonlab[2],8); + + if (iprint == 1) { + printf(" Batch number: \n %6d %s\n",batch->num,batch->title); + } else if (iprint > 1) { + MtzPrintBatchHeader(batch); + } + + return 1; +} + +int MtzPrintBatchHeader(const MTZBAT *batch) { + + int i; + char labtype[26],axes[5],string1[40],string2[40]; + + switch (batch->ldtype) { + case 1: + strcpy(labtype,"oscillation data"); + break; + case 2: + strcpy(labtype,"area detector data"); + break; + case 3: + strcpy(labtype,"Laue data"); + break; + default: + strcpy(labtype,"*** unknown data type ***"); + } + + switch (batch->jumpax) { + case 1: + strcpy(axes,"a*"); + break; + case 2: + strcpy(axes,"b*"); + break; + case 3: + strcpy(axes,"c*"); + break; + default: + strcpy(axes,"none"); + } + + printf(" Batch number: \n"); + printf(" %6d %s\n",batch->num,batch->title); + printf("\n %s \n\n %s %7d %s \n\n %s %7d\n %s %7d\n %s %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f\n %s %7d %7d %7d %7d %7d %7d \n", + "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", + "Orientation data for batch",batch->num,labtype, + " Crystal number ...................",batch->ncryst, + " Associated dataset ID ............",batch->nbsetid, + " Cell dimensions ..................", + batch->cell[0],batch->cell[1],batch->cell[2], + batch->cell[3],batch->cell[4],batch->cell[5], + " Cell fix flags ...................", + batch->lbcell[0],batch->lbcell[1],batch->lbcell[2], + batch->lbcell[3],batch->lbcell[4],batch->lbcell[5]); + if (!batch->misflg) { + strcpy(string1,"Orientation matrix U ............."); + strcpy(string2," (including setting angles) "); + } else { + strcpy(string1,"Standard orientation matrix U ...."); + strcpy(string2," "); + } + printf(" %s %9.4f %9.4f %9.4f \n %s %9.4f %9.4f %9.4f \n %s %9.4f %9.4f %9.4f \n", + string1,batch->umat[0],batch->umat[3],batch->umat[6], + string2,batch->umat[1],batch->umat[4],batch->umat[7], + " ",batch->umat[2],batch->umat[5],batch->umat[8]); + if (batch->misflg == 1) { + printf(" %s %6.2f %6.2f %6.2f\n", + "Missetting angles PhiX PhiY PhiZ..", + batch->phixyz[0][0],batch->phixyz[0][1],batch->phixyz[0][2]); + } else if (batch->misflg > 1) { + printf(" %s %6.2f %6.2f %6.2f %6.2f %6.2f %6.2f\n", + "Missetting angles PhiX PhiY PhiZ..", + batch->phixyz[0][0],batch->phixyz[0][1],batch->phixyz[0][2], + batch->phixyz[1][0],batch->phixyz[1][1],batch->phixyz[1][2]); + } + printf(" %s%s%s %s\n", + "Reciprocal axis nearest ",batch->gonlab[batch->ngonax-1],"..",axes); + if (!batch->lcrflg) { + printf(" %s %6.3f \n", + "Mosaicity ........................",batch->crydat[0]); + } else { + printf(" %s %6.3f %6.3f \n", + "Mosaicity (horizontal, vertical)..",batch->crydat[0],batch->crydat[1]); + } + printf(" Datum goniostat angles (degrees).."); + for (i = 0; i < batch->ngonax; ++i) + printf(" %8.3f",batch->datum[i]); + printf("\n"); + + if (batch->jsaxs > 0 && batch->jsaxs <= batch->ngonax) + printf(" %s %s \n", + "Scan axis ........................",batch->gonlab[batch->jsaxs-1]); + printf(" %s %8.3f %8.3f \n %s %8.3f \n %s %8.2f %8.2f \n", + "Start & stop Phi angles (degrees).",batch->phistt,batch->phiend, + "Range of Phi angles (degrees).....",batch->phirange, + "Start & stop time (minutes).......",batch->time1,batch->time2); + + if (batch->nbscal == 4) { + printf(" %s %9.4f %9.4f \n %s %9.4f %9.4f \n", + " Batch scale & SD .................",batch->bscale,batch->sdbscale, + " Batch B-factor & SD ..............",batch->bbfac,batch->sdbfac); + } + + printf(" %s \n %s %7d \n %s %s %s %9.4f %9.4f %9.4f \n %s %s %s %9.4f %9.4f %9.4f \n %s %s %s %9.4f %9.4f %9.4f \n", + " Crystal goniostat information :-", + " Number of goniostat axes..........",batch->ngonax, + " Goniostat vectors.....",batch->gonlab[0],"....",batch->e1[0],batch->e1[1],batch->e1[2], + " .....",batch->gonlab[1],"....",batch->e2[0],batch->e2[1],batch->e2[2], + " .....",batch->gonlab[2],"....",batch->e3[0],batch->e3[1],batch->e3[2]); + + printf(" %s \n %s %9.4f %9.4f %9.4f \n %s %9.4f %9.4f %9.4f \n", + " Beam information :-", + " Idealized X-ray beam vector.......",batch->source[0],batch->source[1],batch->source[2], + " X-ray beam vector with tilts......",batch->so[0],batch->so[1],batch->so[2]); + + if (batch->lbmflg == 0) { + printf(" %s %9.5f %9.5f \n", + " Wavelength and dispersion ........",batch->alambd,batch->delamb); + } else if (batch->lbmflg == 1) { + printf(" %s %9.5f %9.5f %9.5f \n %s %7.3f %7.3f \n", + " Wavelength and dispersion ........",batch->alambd,batch->delamb,batch->delcor, + " Divergence .......................",batch->divhd,batch->divvd); + } + + printf(" Detector information :-\n Number of detectors...............%7d \n",batch->ndet); + printf(" %s%9.3f\n%s%9.3f\n%s%7.1f%7.1f%7.1f%7.1f\n", + " Crystal to Detector distance (mm).",batch->dx[0], + " Detector swing angle..............",batch->theta[0], + " Pixel limits on detector..........",batch->detlm[0][0][0],batch->detlm[0][0][1],batch->detlm[0][1][0],batch->detlm[0][1][1]); + printf(" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n"); + + return 1; +} + +int ccp4_lwtitl(MTZ *mtz, const char *ftitle, int flag) { + + int length; + + if (flag == 0) { + + strncpy(mtz->title,ftitle,70); + + } else { + + /* Append ftitle to existing title. + BEWARE this has been fixed a few times for special + cases. There is often a reaons behind numbers + such as 69, so don't change it lightly */ + + length = (int) strlen(mtz->title); + /* this shouldn't happen if title is NULL terminated */ + if (length > 70) length = 70; + while ((--length >= 0) && mtz->title[length] == ' '); + /* if there is an existing title and it doesn't take + up all 70 chars, then add a space before appending + new title */ + if (length >= 0 && length < 69) + mtz->title[++length] = ' '; + strncpy(mtz->title+length+1,ftitle,69-length); + + } + mtz->title[70] = '\0'; + + return 1; +} + +int MtzSetSortOrder(MTZ *mtz, MTZCOL *colsort[5]) { + + int i; + + for (i = 0; i < 5; ++i) + mtz->order[i] = colsort[i]; + + return 1; +} + +int MtzAddHistory(MTZ *mtz, const char history[][MTZRECORDLENGTH], const int nlines) { + + int i,j,numlines=0; + char *newhist; + + newhist = MtzCallocHist(mtz->histlines + nlines); + /* write new history lines */ + for (i = 0; i < nlines; ++i) { + for (j = 0; j < MTZRECORDLENGTH; ++j) { + /* remove leading blanks and blank lines */ + if ( *(history[i]+j) != ' ') { + strncpy(newhist + MTZRECORDLENGTH*i,history[i]+j,MTZRECORDLENGTH-j); + ++numlines; + break; + } + } + } + /* copy old history lines */ + for (i = 0; i < mtz->histlines; ++i) { + strncpy(newhist + MTZRECORDLENGTH*numlines + MTZRECORDLENGTH*i, + mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); + } + MtzFreeHist(mtz->hist); + mtz->hist = newhist; + mtz->histlines += numlines; + + return mtz->histlines; +} + +int ccp4_lwidx(MTZ *mtz, const char crystal_name[], const char dataset_name[], + const char project_name[], const float datcell[6], const float *datwave) { + + MTZXTAL *xtl; + MTZSET *set; + int i; + char path1[200]; + + /* Is it a new crystal? */ + if ((xtl = MtzXtalLookup(mtz,crystal_name)) == NULL) { + xtl = MtzAddXtal(mtz,crystal_name,project_name,datcell); + MtzAddDataset(mtz,xtl,dataset_name,*datwave); + } else { + /* Existing crystal - update parameters */ + if (project_name && strlen(project_name) > 0) { + strncpy(xtl->pname,project_name,64); + xtl->pname[64] = '\0'; + } + if (datcell[0] > 0.0) + for (i = 0; i < 6; ++i) + xtl->cell[i] = datcell[i]; + strcpy( path1, "/" ); + strcat( path1, xtl->xname ); + strcat( path1, "/" ); + strcat( path1, dataset_name ); + /* Is it a new dataset? */ + if ((set = MtzSetLookup(mtz,path1)) == NULL) { + MtzAddDataset(mtz,xtl,dataset_name,*datwave); + } else { + if (*datwave > 0.0) + set->wavelength = *datwave; + } + } + return 1; +} + +int MtzAssignHKLtoBase(MTZ *mtz) +{ + int i,j,k,l=0; + MTZSET *baseset=NULL; + MTZCOL *colarray[3]; + + /* get base dataset if it exists */ + baseset = MtzSetLookup(mtz,"HKL_base/HKL_base"); + + if (baseset) { + + for (i = 0; i < mtz->nxtal; ++i) + for (j = 0; j < mtz->xtal[i]->nset; ++j) + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) + if ( strcmp(mtz->xtal[i]->set[j]->col[k]->type,"H") == 0 ) { + colarray[l++] = mtz->xtal[i]->set[j]->col[k]; + if (l == 3) goto assign; + } + + assign: + for (l = 0; l < 3; ++l) + if (colarray[l]) MtzAssignColumn(mtz, colarray[l], "HKL_base","HKL_base"); + + } + return 1; +} + +int MtzAssignColumn(MTZ *mtz, MTZCOL *col, const char crystal_name[], + const char dataset_name[]) +{ + + MTZXTAL *xtl; + MTZSET *set, *oldset; + int i,j; + float datcell[6] = {0.0}, datwave = 0.0; + char path1[200], *path2; + + if ( !mtz || !col || !crystal_name || !dataset_name || + !strcmp(crystal_name,"") || !strcmp(dataset_name,"") ) + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ParamError),"MtzAssignColumn",NULL); + + /* if column already belongs in this dataset, do nothing and return */ + oldset = MtzColSet(mtz, col); + path2 = MtzSetPath(mtz, oldset); + strcpy( path1, "/" ); + strcat( path1, crystal_name ); + strcat( path1, "/" ); + strcat( path1, dataset_name ); + if ( MtzPathMatch( path1, path2 ) ) { + free (path2); + return 1; + } + free (path2); + + /* remove column from existing set */ + for (i = 0; i < oldset->ncol; ++i) { + if ( oldset->col[i] == col ) { + for (j = i; j < oldset->ncol - 1; ++j) + oldset->col[j] = oldset->col[j+1]; + oldset->col[--oldset->ncol] = NULL; + break; + } + } + + /* Does the requested new dataset exist? If not, create it. */ + if ( !(set = MtzSetLookup(mtz,path1)) ) { + if ( !(xtl = MtzXtalLookup(mtz,crystal_name)) ) + xtl = MtzAddXtal(mtz,crystal_name,crystal_name,datcell); + set = MtzAddDataset(mtz,xtl,dataset_name,datwave); + } + + /* Add column to new dataset */ + if ( ++set->ncol > ccp4array_size(set->col)) + ccp4array_resize(set->col, set->ncol + 9); + set->col[set->ncol - 1] = col; + + return 1; +} + +int ccp4_lwsymconf(MTZ *mtz, char spgconf[]) +{ + if (spgconf[0] != ' ' && spgconf[0] != '\0') mtz->mtzsymm.spg_confidence = spgconf[0]; + + return 1; +} + +int ccp4_lwsymm(MTZ *mtz, int nsymx, int nsympx, float rsymx[192][4][4], + char ltypex[], int nspgrx, char spgrnx[], char pgnamx[]) +{ + /* Could set this to "X" but beware of legacy programs where lwsymm + still used. Don't want to overwrite flag in newer file. */ + char spgconf_temp[2]=""; + + return ccp4_lwsymm_c(mtz, nsymx, nsympx, rsymx, ltypex, nspgrx, spgrnx, + pgnamx, spgconf_temp); +} + +int ccp4_lwsymm_c(MTZ *mtz, int nsymx, int nsympx, float rsymx[192][4][4], + char ltypex[], int nspgrx, char spgrnx[], char pgnamx[], + char spgconf[]) +{ + int i,j,k,length; + + if (nsymx > 0) { + mtz->mtzsymm.nsym = nsymx; + mtz->mtzsymm.nsymp = nsympx; + for (i = 0; i < nsymx; ++i) { + for (j = 0; j < 4; ++j) { + for (k = 0; k < 4; ++k) { + mtz->mtzsymm.sym[i][j][k] = rsymx[i][j][k]; + } + } + } + } + if (ltypex[0] != ' ' && ltypex[0] != '\0') mtz->mtzsymm.symtyp = ltypex[0]; + if (nspgrx != 0) mtz->mtzsymm.spcgrp = nspgrx; + if (spgconf[0] != ' ' && spgconf[0] != '\0') mtz->mtzsymm.spg_confidence = spgconf[0]; + + if (strcmp(spgrnx,"")) { + length = ( strlen(spgrnx) < MAXSPGNAMELENGTH ) ? strlen(spgrnx) : MAXSPGNAMELENGTH; + strncpy(mtz->mtzsymm.spcgrpname,spgrnx,length); + mtz->mtzsymm.spcgrpname[length] = '\0'; + } + if (strcmp(pgnamx,"")) { + length = ( strlen(pgnamx) < MAXPGNAMELENGTH ) ? strlen(pgnamx) : MAXPGNAMELENGTH; + strncpy(mtz->mtzsymm.pgname,pgnamx,length); + mtz->mtzsymm.pgname[length] = '\0'; + } + + return 1; +} + +MTZCOL **ccp4_lwassn(MTZ *mtz, const char labels[][31], const int nlabels, + const char types[][3], const int iappnd) +{ + int i,j,k,ilab; + MTZCOL *col, **lookup; + MTZSET *defaultset; + + lookup = (MTZCOL **) ccp4_utils_malloc(nlabels*sizeof(MTZCOL *)); + + /* if iappnd = 0, deactivate existing columns */ + if (iappnd == 0) { + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + mtz->xtal[i]->set[j]->col[k]->active = 0; + } + } + } + } + + /* new columns need to be assigned to a dataset. Set this + as the base dataset if it exists, else the first dataset. */ + if ( !(defaultset = MtzSetLookup(mtz,"HKL_base/HKL_base")) ) + defaultset = mtz->xtal[0]->set[0]; + + /* Loop over labels */ + for (ilab = 0; ilab < nlabels; ++ilab) { + if (strcmp(types[ilab],"Y") == 0 && strcmp(labels[ilab],"M/ISYM") == 0) { + col = MtzColLookup(mtz,"M_ISYM"); + } else { + col = MtzColLookup(mtz,labels[ilab]); + } + if (col) { + col->active = 1; + lookup[ilab] = col; + } else { + /* add new column to first dataset - MtzAssignColumn corrects this */ + if (strcmp(types[ilab],"Y") == 0 && strcmp(labels[ilab],"M/ISYM") == 0) { + lookup[ilab] = MtzAddColumn(mtz, defaultset, + "M/ISYM", types[ilab]); + } else { + lookup[ilab] = MtzAddColumn(mtz, defaultset, + labels[ilab], types[ilab]); + } + } + } + + return lookup; +} + +int ccp4_lwbat(MTZ *mtz, MTZBAT *batch, const int batno, const float *buf, const char *charbuf) + +{ + int *intbuf = (int *) buf; + const float *fltbuf = buf + NBATCHINTEGERS; + char cbatch[95]=" "; + int i,cbatch_len; + MTZBAT *otherbat; + + if (batch == NULL) { + /* add new batch at end of list */ + batch = mtz->batch; + /* is this the first ever batch? */ + if (batch == NULL) { + mtz->batch = MtzMallocBatch(); + batch = mtz->batch; + batch->num = batno; + batch->next = NULL; + } else { + /* first, skip over n_orig_bat batches if some were read in */ + for (i=0; i < mtz->n_orig_bat - 1; ++i) + batch = batch->next; + if (mtz->n_orig_bat == 0 && batch->num == batno) { + printf("From ccp4_lwbat: warning: attempt to add new batch with existing batch number %d!\n",batno); + return 0; + } + while (batch->next != NULL) { + batch = batch->next; + if (batch->num == batno) { + printf("From ccp4_lwbat: warning: attempt to add new batch with existing batch number %d!\n",batno); + return 0; + } + } + batch->next = MtzMallocBatch(); + batch = batch->next; + batch->num = batno; + batch->next = NULL; + } + } else { + if (batch->num != batno) { + /* renumbering - check unique */ + otherbat = mtz->batch; + while (otherbat != NULL) { + if (otherbat->num == batno && otherbat != batch) { + printf("From ccp4_lwbat: warning: attempt to change batch number to existing batch number %d!\n",batno); + return 0; + } + otherbat = otherbat->next; + } + batch->num = batno; + } + } + + MtzArrayToBatch(intbuf,fltbuf,batch); + + cbatch_len = ( strlen(charbuf) < 94 ) ? strlen(charbuf) : 94; + strncpy(cbatch,charbuf,cbatch_len); + + strncpy(batch->title,cbatch,70); + strncpy(batch->gonlab[0],cbatch+70,8); + strncpy(batch->gonlab[1],cbatch+78,8); + strncpy(batch->gonlab[2],cbatch+86,8); + batch->gonlab[0][8] = batch->gonlab[1][8] = batch->gonlab[2][8] = '\0'; + + return 1; +} + +int ccp4_lwbsetid(MTZ *mtz, MTZBAT *batch, const char xname[], const char dname[]) + +{ + MTZXTAL *xtl; + MTZSET *set; + char path1[200]; + + if ((xtl = MtzXtalLookup(mtz,xname)) != NULL) { + strcpy( path1, "/" ); + strcat( path1, xtl->xname ); + strcat( path1, "/" ); + strcat( path1, dname ); + if ((set = MtzSetLookup(mtz,path1)) != NULL) { + batch->nbsetid = set->setid; + return 1; + } + } + + printf("From ccp4_lwbsetid: warning: dataset id not found!\n"); + return 0; +} + +int MtzDeleteRefl(MTZ *mtz, int iref) + +{ + int i,j,k; + + /* only possible if reflections in memory */ + if (mtz->refs_in_memory) { + for (i = 0; i < mtz->nxtal; ++i) + for (j = 0; j < mtz->xtal[i]->nset; ++j) + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) + ccp4array_delete_ordered(mtz->xtal[i]->set[j]->col[k]->ref,iref); + --mtz->nref; + } + + return 1; +} + +int ccp4_lwrefl(MTZ *mtz, const float adata[], MTZCOL *lookup[], + const int ncol, const int iref) + +{ int i,j,k,l,icol,ind[3],ind_xtal,ind_set,ind_col[3]; + float refldata[MCOLUMNS],res; + double coefhkl[6]; + + /* if this is extra reflection, check memory for in-memory mode */ + if (mtz->refs_in_memory && iref > mtz->nref) { + if (iref > ccp4array_size(lookup[0]->ref)) { + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + ccp4array_resize(mtz->xtal[i]->set[j]->col[k]->ref, iref); + } + } + } + } + } + + /* update variables held in memory */ + icol = -1; + for (i = 0; i < ncol; ++i) { + if (lookup[i]) { + /* update reflection for in-memory mode */ + if (mtz->refs_in_memory) { + lookup[i]->ref[iref-1] = adata[i]; + } + /* update column ranges */ + if (iref == 1) { + lookup[i]->min = FLT_MAX; + lookup[i]->max = -FLT_MAX; + } + if (!ccp4_ismnf(mtz, adata[i])) { + if (adata[i] < lookup[i]->min) lookup[i]->min = adata[i]; + if (adata[i] > lookup[i]->max) lookup[i]->max = adata[i]; + } + } + } + + /* write reflection for on-disk mode */ + if (!mtz->refs_in_memory) { + + icol = -1; + /* Loop over all active columns */ + for (i = 0; i < mtz->nxtal; ++i) + for (j = 0; j < mtz->xtal[i]->nset; ++j) + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) + if (mtz->xtal[i]->set[j]->col[k]->active) { + ++icol; + /* for each active column, see if value to write */ + for (l = 0; l < ncol; ++l) + if (lookup[l] == mtz->xtal[i]->set[j]->col[k]) { + refldata[icol] = adata[l]; + break; + } + } + + if (MtzWrefl(mtz->fileout, icol+1, refldata) != icol+1 ) + return 0; + + /* Update resolution limits. For in-memory mode, this is done in MtzPut. */ + /* Check if HKL are first 3 columns */ + if (lookup[0]->type[0] == 'H' && lookup[1]->type[0] == 'H' && + lookup[2]->type[0] == 'H') { + ind[0] = (int) adata[0]; + ind[1] = (int) adata[1]; + ind[2] = (int) adata[2]; + } else { + MtzFindInd(mtz,&ind_xtal,&ind_set,ind_col); + for (l = 0; l < ncol; ++l) { + if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[0]]) + ind[0] = (int) adata[l]; + if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[1]]) + ind[1] = (int) adata[l]; + if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[2]]) + ind[2] = (int) adata[l]; + } + } + + for (i = 0; i < mtz->nxtal; ++i) { + if (mtz->xtal[i]->cell[0] > 0.001) { + MtzHklcoeffs(mtz->xtal[i]->cell, coefhkl); + res = MtzInd2reso(ind, coefhkl); + if (res > 0.0) { + if (res > mtz->xtal[i]->resmax) mtz->xtal[i]->resmax = res; + if (res < mtz->xtal[i]->resmin) mtz->xtal[i]->resmin = res; + if (res > mtz->resmax_out) mtz->resmax_out = res; + if (res < mtz->resmin_out) mtz->resmin_out = res; + } + } + } + } + + /* increment nref if we are adding new reflections */ + if (iref > mtz->nref) + mtz->nref = iref; + + return 1; +} + +int MtzPut(MTZ *mtz, const char *logname) + +{ char hdrrec[81],symline[81],spgname[MAXSPGNAMELENGTH+3]; + CCP4File *fileout; + int i, j, k, l, icol, numbat, isort[5], debug=0; + int ind[3],ind_xtal,ind_set,ind_col[3],length,glob_cell_written=0; + double coefhkl[6]; + float res,refldata[MCOLUMNS]; + int nwords=NBATCHWORDS,nintegers=NBATCHINTEGERS,nreals=NBATCHREALS; + float buf[NBATCHWORDS]; + int *intbuf = (int *) buf; + float *fltbuf = buf + NBATCHINTEGERS; + MTZBAT *batch, *lastoldbatch; + MTZXTAL *xtl; + char colsource[37], *taskenv; + int date3[3], time3[3]; + int32_t tmp_hdrst; + int64_t hdrst; + + if (debug) + printf(" MtzPut: entering \n"); + + /* get data to fill out column source information */ + taskenv = getenv( "CCP4_TASK_ID" ); + if ( taskenv != NULL ) { + strncpy( colsource, taskenv, 36 ); + colsource[36] = '\0'; + } else { + ccp4_utils_idate( date3 ); + ccp4_utils_itime( time3 ); + sprintf( colsource, "CREATED_%02d/%02d/%04d_%02d:%02d:%02d", + date3[0],date3[1],date3[2],time3[0],time3[1],time3[2] ); + } + for ( i = 0; i < strlen(colsource); i++ ) + if ( colsource[i] == ' ' ) colsource[i] = '_'; + for (i = 0; i < mtz->nxtal; ++i) + for (j = 0; j < mtz->xtal[i]->nset; ++j) + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) + if ( mtz->xtal[i]->set[j]->col[k]->source == 0 ) + strncpy(mtz->xtal[i]->set[j]->col[k]->colsource,colsource,36); + + if (!mtz->fileout) { + + if ( !(fileout = MtzOpenForWrite(logname)) ) return 0; + + if (debug) + printf(" MtzPut: file opened \n"); + + } else { + fileout = mtz->fileout; + } + + if (mtz->refs_in_memory) { + /* Write all reflections from memory - make this optional? */ + for (l = 0; l < mtz->nref; ++l) { + icol = 0; + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if (mtz->xtal[i]->set[j]->col[k]->active) { + refldata[icol++] = mtz->xtal[i]->set[j]->col[k]->ref[l]; + } + } + } + } + if (MtzWrefl(fileout, icol, refldata) != icol ) return 0; + } + + if (debug) + printf(" MtzPut: reflections written \n"); + + } + + ccp4_file_setmode(fileout,0); + /* Write header */ + sprintf(hdrrec,"VERS MTZ:V%d.%d",MTZ_MAJOR_VERSN,MTZ_MINOR_VERSN); + /* if MTZ_MAJOR_VERSN,MTZ_MINOR_VERSN get into double figures, + adjust following call to MtzWhdrLine */ + MtzWhdrLine(fileout,13,hdrrec); + strcpy(hdrrec,"TITLE "); + strncpy(hdrrec+6,mtz->title,70); + MtzWhdrLine(fileout,76,hdrrec); + /* if new batch headers have been written, lose the old ones */ + /* mtz->n_orig_bat is original number of batches, MtzNbat(mtz) the current */ + if (MtzNbat(mtz) == mtz->n_orig_bat) { + numbat = mtz->n_orig_bat; + } else { + numbat = MtzNbat(mtz) - mtz->n_orig_bat; + } + sprintf(hdrrec,"NCOL %8d %12d %8d",MtzNumActiveCol(mtz),mtz->nref,numbat); + MtzWhdrLine(fileout,35,hdrrec); + if (debug) printf(" MtzPut: NCOL just written \n"); + + /* Purely for backwards compatibility: output first non-zero cell as + global cell. Also update base dataset cell. */ + for (i = 0; i < mtz->nxtal; ++i) { + if ( !strcmp(mtz->xtal[i]->xname,"HKL_base") ) continue; + if ( (MtzNumActiveSetsInXtal(mtz,mtz->xtal[i]) == 0) ) continue; + if (mtz->xtal[i]->cell[0] > 0.001) { + sprintf(hdrrec,"CELL %9.4f %9.4f %9.4f %9.4f %9.4f %9.4f",mtz->xtal[i]->cell[0], + mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2],mtz->xtal[i]->cell[3], + mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); + MtzWhdrLine(fileout,65,hdrrec); + if ((xtl = MtzXtalLookup(mtz,"HKL_base")) != NULL) + for (j = 0; j < 6; ++j) + xtl->cell[j] = mtz->xtal[i]->cell[j]; + glob_cell_written=1; + break; + } + } + /* if no suitable cell found, then try HKL_base cell */ + if (!glob_cell_written) { + if ((xtl = MtzXtalLookup(mtz,"HKL_base")) != NULL) { + sprintf(hdrrec,"CELL %9.4f %9.4f %9.4f %9.4f %9.4f %9.4f",xtl->cell[0], + xtl->cell[1],xtl->cell[2],xtl->cell[3],xtl->cell[4],xtl->cell[5]); + MtzWhdrLine(fileout,65,hdrrec); + glob_cell_written=1; + } + } + if (debug) printf(" MtzPut: CELL just written \n"); + + ccp4_lrsort(mtz, isort); + sprintf(hdrrec,"SORT %3d %3d %3d %3d %3d",isort[0],isort[1],isort[2], + isort[3],isort[4]); + MtzWhdrLine(fileout,25,hdrrec); + if (debug) printf(" MtzPut: SORT just written \n"); + + spgname[0] = '\''; + length = strlen(mtz->mtzsymm.spcgrpname); + while ((--length >= 0) && mtz->mtzsymm.spcgrpname[length] == ' '); + strncpy(spgname+1,mtz->mtzsymm.spcgrpname,length+1); + spgname[length+2] = '\''; + spgname[length+3] = '\0'; + sprintf(hdrrec,"SYMINF %3d %2d %c %5d %22s %5s %c",mtz->mtzsymm.nsym, + mtz->mtzsymm.nsymp,mtz->mtzsymm.symtyp,mtz->mtzsymm.spcgrp,spgname, + mtz->mtzsymm.pgname,mtz->mtzsymm.spg_confidence); + MtzWhdrLine(fileout,52,hdrrec); + if (debug) printf(" MtzPut: SYMINF just written \n"); + + for (i = 0; i < mtz->mtzsymm.nsym; ++i) { + mat4_to_symop(symline,symline+74,(const float (*)[4])mtz->mtzsymm.sym[i]); + symline[74] = '\0'; + sprintf(hdrrec,"SYMM %74s",symline); + MtzWhdrLine(fileout,79,hdrrec); + } + if (debug) printf(" MtzPut: symmetry just written \n"); + + if (mtz->refs_in_memory) { + /* Find dataset of indices */ + MtzFindInd(mtz,&ind_xtal,&ind_set,ind_col); + + /* Recalculate crystal resolution limits */ + for (i = 0; i < mtz->nxtal; ++i) { + mtz->xtal[i]->resmax = 0.0; + mtz->xtal[i]->resmin = 100.0; + MtzHklcoeffs(mtz->xtal[i]->cell, coefhkl); + for (j = 0; j < mtz->nref; ++j) { + ind[0] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[0]]->ref[j]; + ind[1] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[1]]->ref[j]; + ind[2] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[2]]->ref[j]; + res = MtzInd2reso(ind, coefhkl); + /* crystal limits */ + if (res > 0.0) { + if (res > mtz->xtal[i]->resmax) mtz->xtal[i]->resmax = res; + if (res < mtz->xtal[i]->resmin) mtz->xtal[i]->resmin = res; + if (res > mtz->resmax_out) mtz->resmax_out = res; + if (res < mtz->resmin_out) mtz->resmin_out = res; + } + } + } + } + /* print enough digits to retain precision. C. Flensburg 20080227 */ + sprintf(hdrrec,"RESO %-20.16f %-20.16f",mtz->resmin_out,mtz->resmax_out); + MtzWhdrLine(fileout,46,hdrrec); + + if (debug) + printf(" MtzPut: resolution limts just written \n"); + + if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { + sprintf(hdrrec,"VALM NAN"); + MtzWhdrLine(fileout,8,hdrrec); + } else { + sprintf(hdrrec,"VALM %-20f",mtz->mnf.fmnf); + MtzWhdrLine(fileout,25,hdrrec); + } + + if (debug) + printf(" MtzPut: VALM just written \n"); + + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + if (mtz->xtal[i]->set[j]->col[k]->active) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && + strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { + sprintf(hdrrec,"COLUMN %-30s ","M/ISYM"); + } else { + sprintf(hdrrec,"COLUMN %-30s ",mtz->xtal[i]->set[j]->col[k]->label); + } + /* Check that the column type is set + If it is blank then the COLUMN record will be incomplete */ + if (mtz->xtal[i]->set[j]->col[k]->type[0] == '\0') { + if (ccp4_liberr_verbosity(-1)) + printf("From MtzPut: column type for %s is not set, assume type R\n", + mtz->xtal[i]->set[j]->col[k]->label); + strncpy(mtz->xtal[i]->set[j]->col[k]->type,"R",2); + } + /* catch case when min and max have not been set*/ + if ( mtz->xtal[i]->set[j]->col[k]->min == FLT_MAX ) mtz->xtal[i]->set[j]->col[k]->min = 0.0f; + if ( mtz->xtal[i]->set[j]->col[k]->max == -FLT_MAX ) mtz->xtal[i]->set[j]->col[k]->max = 0.0f; + + sprintf(hdrrec+38,"%c %17.9g %17.9g %4d", + mtz->xtal[i]->set[j]->col[k]->type[0], + mtz->xtal[i]->set[j]->col[k]->min, + mtz->xtal[i]->set[j]->col[k]->max, + mtz->xtal[i]->set[j]->setid); + MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); + + if ( mtz->xtal[i]->set[j]->col[k]->colsource[0] != '\0' ) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && + strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { + sprintf(hdrrec,"COLSRC %-30s %-36s %4d","M/ISYM",mtz->xtal[i]->set[j]->col[k]->colsource,mtz->xtal[i]->set[j]->setid); + } else { + sprintf(hdrrec,"COLSRC %-30s %-36s %4d",mtz->xtal[i]->set[j]->col[k]->label,mtz->xtal[i]->set[j]->col[k]->colsource,mtz->xtal[i]->set[j]->setid); + } + MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); + } + + if ( mtz->xtal[i]->set[j]->col[k]->grpname[0] != '\0' && + mtz->xtal[i]->set[j]->col[k]->grptype[0] != '\0' && + mtz->xtal[i]->set[j]->col[k]->grpposn >= 0 ) { + if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && + strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { + sprintf(hdrrec,"COLGRP %-30s %-30s %-4s %1X %4d","M/ISYM",mtz->xtal[i]->set[j]->col[k]->grpname,mtz->xtal[i]->set[j]->col[k]->grptype,mtz->xtal[i]->set[j]->col[k]->grpposn,mtz->xtal[i]->set[j]->setid); + } else { + sprintf(hdrrec,"COLGRP %-30s %-30s %-4s %1X %4d",mtz->xtal[i]->set[j]->col[k]->label,mtz->xtal[i]->set[j]->col[k]->grpname,mtz->xtal[i]->set[j]->col[k]->grptype,mtz->xtal[i]->set[j]->col[k]->grpposn,mtz->xtal[i]->set[j]->setid); + } + MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); + } + } + } + } + } + + if (debug) + printf(" MtzPut: column info just written \n"); + + sprintf(hdrrec,"NDIF %8d",MtzNumActiveSet(mtz)); + MtzWhdrLine(fileout,13,hdrrec); + + if (debug) + printf(" MtzPut: about to write dataset info \n"); + + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* check if dataset contains any active columns or batches */ + if ( (MtzNumActiveColsInSet(mtz->xtal[i]->set[j]) == 0) && + (MtzNbatchesInSet(mtz,mtz->xtal[i]->set[j]) == 0) ) continue; + sprintf(hdrrec,"PROJECT %7d %-64s",mtz->xtal[i]->set[j]->setid, + mtz->xtal[i]->pname); + MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); + sprintf(hdrrec,"CRYSTAL %7d %-64s",mtz->xtal[i]->set[j]->setid, + mtz->xtal[i]->xname); + MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); + sprintf(hdrrec,"DATASET %7d %-64s",mtz->xtal[i]->set[j]->setid, + mtz->xtal[i]->set[j]->dname); + MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); + sprintf(hdrrec,"DCELL %7d %10.4f%10.4f%10.4f%10.4f%10.4f%10.4f", + mtz->xtal[i]->set[j]->setid,mtz->xtal[i]->cell[0], + mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], + mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4], + mtz->xtal[i]->cell[5]); + MtzWhdrLine(fileout,76,hdrrec); + sprintf(hdrrec,"DWAVEL %7d %10.5f",mtz->xtal[i]->set[j]->setid, + mtz->xtal[i]->set[j]->wavelength); + MtzWhdrLine(fileout,26,hdrrec); + } + } + + if (MtzNbat(mtz) > 0) { + batch = mtz->batch; + /* if new batch headers have been written, lose the old ones */ + if (MtzNbat(mtz) > mtz->n_orig_bat) { + for (i=0; i < mtz->n_orig_bat; ++i) { + lastoldbatch = batch; + batch = batch->next; + } + numbat = MtzNbat(mtz) - mtz->n_orig_bat; + batch = sort_batches(batch,numbat); + if (mtz->n_orig_bat > 0) { + lastoldbatch->next = batch; + } else { + mtz->batch = batch; + } + } else { + numbat = mtz->n_orig_bat; + } + if (debug) { + printf(" MtzPut: original number of batches %d \n",mtz->n_orig_bat); + printf(" MtzPut: total number of batches %d \n",MtzNbat(mtz)); + printf(" MtzPut: number of batches to be written %d \n",numbat); + } + + for (i = 0; i < numbat; i += 12) { + sprintf(hdrrec,"BATCH "); + l = 6; + for (j = 0; j < 12 && i+j < numbat; ++j) { + sprintf(hdrrec+6+6*j,"%6d",batch->num); + l += 6; + batch = batch->next; + } + MtzWhdrLine(fileout,l,hdrrec); + } + } + + /* write out unrecognized headers */ + if ( mtz->unknown_headers ) + for (i = 0; i < mtz->n_unknown_headers; ++i) + MtzWhdrLine(fileout,MTZRECORDLENGTH,mtz->unknown_headers+i*MTZRECORDLENGTH); + + sprintf(hdrrec,"END "); + MtzWhdrLine(fileout,4,hdrrec); + + if (debug) + printf(" MtzPut: main header written \n"); + + if (mtz->histlines > 0) { + sprintf(hdrrec,"MTZHIST %3d",mtz->histlines); + MtzWhdrLine(fileout,11,hdrrec); + for (i = 0; i < mtz->histlines; ++i) { + strncpy(hdrrec,mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); + MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); + } + } + + if (MtzNbat(mtz) > 0) { + batch = mtz->batch; + /* if new batch headers have been written, lose the old ones */ + if (MtzNbat(mtz) > mtz->n_orig_bat) + for (i=0; i < mtz->n_orig_bat; ++i) + batch = batch->next; + sprintf(hdrrec,"MTZBATS"); + MtzWhdrLine(fileout,7,hdrrec); + while (batch != NULL) { + sprintf(hdrrec,"BH %8d%8d%8d%8d",batch->num,nwords,nintegers,nreals); + MtzWhdrLine(fileout,35,hdrrec); + strcpy(hdrrec,"TITLE "); + strncpy(hdrrec+6,batch->title,70); + MtzWhdrLine(fileout,76,hdrrec); + MtzBatchToArray(batch,intbuf,fltbuf); + intbuf[0] = nwords; + intbuf[1] = nintegers; + intbuf[2] = nreals; + ccp4_file_setmode(fileout,2); + ccp4_file_write(fileout, (uint8 *) buf, nwords); + ccp4_file_setmode(fileout,0); + if (batch->gonlab[0][0] != '\0') { + sprintf(hdrrec,"BHCH %8s%8s%8s",batch->gonlab[0],batch->gonlab[1],batch->gonlab[2]); + } else { + sprintf(hdrrec,"BHCH "); + } + MtzWhdrLine(fileout,29,hdrrec); + batch = batch->next; + } + } + + if (debug) + printf(" MtzPut: batch headers written \n"); + + sprintf(hdrrec,"MTZENDOFHEADERS "); + MtzWhdrLine(fileout,16,hdrrec); + + /* write XML data block */ + if ( mtz->xml != NULL ) { + ccp4_file_setmode(fileout,0); + ccp4_file_writechar(fileout,(const uint8 *)mtz->xml,strlen(mtz->xml)); + } + + /* go back and correct hdrst */ + ccp4_file_setmode(fileout,0); + ccp4_file_seek(fileout, 4, SEEK_SET); + hdrst = (int64_t) mtz->nref * (int64_t) MtzNumActiveCol(mtz) + SIZE1 + 1; + if (hdrst > INT_MAX) { + tmp_hdrst = -1; + } else { + tmp_hdrst = (int32_t) hdrst; + hdrst = 0; + } + ccp4_file_setmode(fileout, 2); + ccp4_file_write(fileout,(uint8 *) &tmp_hdrst, 1); + if (hdrst > 0) { + ccp4_file_seek(fileout, 3, SEEK_SET); + ccp4_file_setmode(fileout, 5); + ccp4_file_write(fileout,(uint8 *) &hdrst, 1); + ccp4_file_setmode(fileout, 2); + } + + /* And close the mtz file: */ + if (!mtz->fileout) + ccp4_file_close(fileout); + + if (debug) + printf(" MtzPut: bye bye \n"); + + return 1; +} + +MTZBAT *sort_batches(MTZBAT *batch, int numbat) + +{ int debug=0; + int i,max_num_bat,isort=0,nmerges,sublistsize=1,sublist1,sublist2; + MTZBAT *cur_batch1, *cur_batch2, *sorted_batch, *tail; + MTZBAT *tmp; + + /* first check if already in order */ + cur_batch1 = batch; + max_num_bat = cur_batch1->num; + for (i=0; i < numbat; ++i) { + cur_batch1 = cur_batch1->next; + /* reached end of list */ + if (!cur_batch1) return batch; + if (cur_batch1->num < max_num_bat) { + isort=1; + break; + } else { + max_num_bat = cur_batch1->num; + } + } + if (!isort) return batch; + + if (ccp4_liberr_verbosity(-1)) + printf("\n Note: Sorting batch headers prior to writing to file... \n\n"); + + /* Sort */ + /* This is Simon Tatham's algorithm, implemented for batches. */ + + if (debug) { + tmp = batch; + for (i=0; i < numbat; ++i) { + printf(" %d",tmp->num); + tmp = tmp->next; + } + printf(" \n"); + } + + while (1) { + + if (debug) printf(" sort_batches: pass with sublist size %d \n",sublistsize); + cur_batch1 = batch; + tail = NULL; + batch = NULL; + nmerges = 0; + while (cur_batch1) { + + ++nmerges; + cur_batch2 = cur_batch1; + sublist1 = 0; + while (cur_batch2 && sublist1 < sublistsize) { + ++sublist1; + cur_batch2 = cur_batch2->next; + } + sublist2 = sublistsize; + + while (sublist1 > 0 || (sublist2 > 0 && cur_batch2)) { + + /* decide whether next batch comes from cur_batch1 or cur_batch2 */ + if (sublist1 == 0) { + /* cur_batch1 is empty; batch must come from cur_batch2. */ + sorted_batch = cur_batch2; cur_batch2 = cur_batch2->next; sublist2--; + } else if (sublist2 == 0 || !cur_batch2) { + /* cur_batch2 is empty; batch must come from cur_batch1. */ + sorted_batch = cur_batch1; cur_batch1 = cur_batch1->next; sublist1--; + } else if (cur_batch1->num <= cur_batch2->num ) { + /* cur_batch1 number is lower (or same); batch must come from cur_batch1. */ + sorted_batch = cur_batch1; cur_batch1 = cur_batch1->next; sublist1--; + } else { + /* cur_batch2 number is lower; batch must come from cur_batch2. */ + sorted_batch = cur_batch2; cur_batch2 = cur_batch2->next; sublist2--; + } + + /* add the next element to the merged list */ + if (tail) { + tail->next = sorted_batch; + } else { + batch = sorted_batch; + } + tail = sorted_batch; + + } + + /* sorted this sub-list - move to next */ + cur_batch1 = cur_batch2; + + } + + tail->next = NULL; + + if (debug) { + tmp = batch; + for (i=0; i < numbat; ++i) { + printf(" %d",tmp->num); + tmp = tmp->next; + } + printf(" \n"); + } + + /* If we have done only one merge, we're finished. */ + if (nmerges <= 1) /* allow for nmerges==0, the empty list case */ + return batch; + + /* Otherwise repeat, merging lists twice the size */ + sublistsize *= 2; + } + +} + +CCP4File *MtzOpenForWrite(const char *logname) + +{ CCP4File *fileout; + int debug=0; + int32_t hdrst; + char *filename; + + if (debug) printf(" MtzOpenForWrite: entering \n"); + /* Open the mtz file: */ + if (getenv(logname) != NULL) { + filename = strdup(getenv(logname)); + } else { + filename = strdup(logname); + } + fileout = ccp4_file_open(filename,O_RDWR | O_TRUNC); + if (! fileout ) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_CantOpenFile),"MtzOpenForWrite",NULL); + return NULL; + } + if (debug) printf(" MtzOpenForWrite: file opened \n"); + + /* Write initial info */ + ccp4_file_setmode(fileout,0); + ccp4_file_writechar(fileout, (uint8 *) "MTZ ",4); + ccp4_file_setmode(fileout,2); + hdrst = SIZE1 + 1; + ccp4_file_write(fileout,(uint8 *) &hdrst,1); + + ccp4_file_setstamp(fileout,2); +/* Write architecture */ + ccp4_file_warch(fileout); + if (debug) printf(" MtzOpenForWrite: stamp written \n"); + + /* Position at start of reflections - intervening gap should be filled + with zeros */ + ccp4_file_seek(fileout, SIZE1, SEEK_SET); + + free(filename); + + if (debug) printf(" MtzOpenForWrite: bye bye \n"); + return fileout; +} + +int MtzBatchToArray(MTZBAT *batch, int *intbuf, float *fltbuf) + +{ int i; + + if (!batch) return 0; + + for (i = 0; i < NBATCHINTEGERS; ++i) + intbuf[i] = 0; + for (i = 0; i < NBATCHREALS; ++i) + fltbuf[i] = 0.0; + + intbuf[3] = batch->iortyp; + for (i = 0; i < 6; ++i) + intbuf[4+i] = batch->lbcell[i]; + intbuf[10] = batch->misflg; + intbuf[11] = batch->jumpax; + intbuf[12] = batch->ncryst; + intbuf[13] = batch->lcrflg; + intbuf[14] = batch->ldtype; + intbuf[15] = batch->jsaxs; + intbuf[16] = batch->nbscal; + intbuf[17] = batch->ngonax; + intbuf[18] = batch->lbmflg; + intbuf[19] = batch->ndet; + intbuf[20] = batch->nbsetid; + + for (i = 0; i < 6; ++i) + fltbuf[i] = batch->cell[i]; + for (i = 0; i < 9; ++i) + fltbuf[6 + i] = batch->umat[i]; + for (i = 0; i < 3; ++i) + fltbuf[15 + i] = batch->phixyz[0][i]; + for (i = 0; i < 3; ++i) + fltbuf[18 + i] = batch->phixyz[1][i]; + for (i = 0; i < 12; ++i) + fltbuf[21 + i] = batch->crydat[i]; + for (i = 0; i < 3; ++i) + fltbuf[33 + i] = batch->datum[i]; + fltbuf[36] = batch->phistt; + fltbuf[37] = batch->phiend; + for (i = 0; i < 3; ++i) + fltbuf[38 + i] = batch->scanax[i]; + fltbuf[41] = batch->time1; + fltbuf[42] = batch->time2; + fltbuf[43] = batch->bscale; + fltbuf[44] = batch->bbfac; + fltbuf[45] = batch->sdbscale; + fltbuf[46] = batch->sdbfac; + fltbuf[47] = batch->phirange; + for (i = 0; i < 3; ++i) + fltbuf[59 + i] = batch->e1[i]; + for (i = 0; i < 3; ++i) + fltbuf[62 + i] = batch->e2[i]; + for (i = 0; i < 3; ++i) + fltbuf[65 + i] = batch->e3[i]; + for (i = 0; i < 3; ++i) + fltbuf[80 + i] = batch->source[i]; + for (i = 0; i < 3; ++i) + fltbuf[83 + i] = batch->so[i]; + fltbuf[86] = batch->alambd; + fltbuf[87] = batch->delamb; + fltbuf[88] = batch->delcor; + fltbuf[89] = batch->divhd; + fltbuf[90] = batch->divvd; + for (i = 0; i < batch->ndet; ++i) + { fltbuf[111 + (i * 6)] = batch->dx[i]; + fltbuf[112 + (i * 6)] = batch->theta[i]; + fltbuf[113 + (i * 6)] = batch->detlm[i][0][0]; + fltbuf[114 + (i * 6)] = batch->detlm[i][0][1]; + fltbuf[115 + (i * 6)] = batch->detlm[i][1][0]; + fltbuf[116 + (i * 6)] = batch->detlm[i][1][1];} + + return 1; +} + +int MtzWhdrLine(CCP4File *fileout, int nitems, char buffer[]) { + + /* write header record to fileout. Record is filled from + nitems to MTZRECORDLENGTH by blanks. + + If a C-style null terminator is encountered before nitems + are copied then the null terminator character is not + copied and the string is padded with blanks from that + point onwards */ + + char hdrrec[MTZRECORDLENGTH]; + int i,j; + + for (i = 0; i < nitems; ++i) { + /* Trap for C-style null character */ + if (buffer[i] == '\0') { + break; + } + hdrrec[i] = buffer[i]; + } + for (j = i; j < MTZRECORDLENGTH; ++j) + hdrrec[j] = ' '; + + return (ccp4_file_writechar(fileout, (uint8 *) hdrrec,MTZRECORDLENGTH)); + +} + +int MtzWrefl(CCP4File *fileout, int ncol, float *refldata) { + + if (!fileout) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_NoFile),"MtzWrefl",NULL); + return 0; + } + return (ccp4_file_write(fileout, (uint8 *) refldata, ncol)); + +} + +MTZ *MtzMalloc(int nxtal, int nset[]) + +{ MTZ *mtz; + int i,j,itime[3]; + float zerocell[6]={0.0}; + char dummy_xname[17]; + + ccp4_utils_itime(itime); + sprintf(dummy_xname,"NULL_xname%2.2d%2.2d%2.2d",itime[0],itime[1],itime[2]); + dummy_xname[16]='\0'; + + /* Allocate main header and symmetry */ + mtz = (MTZ *) ccp4_utils_malloc(sizeof(MTZ)); + if (mtz == NULL) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzMalloc",NULL); + return NULL; + } + memset(mtz,'\0',sizeof(MTZ)); + + mtz->nxtal=0; + ccp4array_new_size(mtz->xtal,5); + /* Allocate crystals and datasets. */ + if (nxtal == 0) { + mtz->xtal[0] = NULL; + } else { + for (i = 0; i < nxtal; ++i) { + /* This adds mtz->xtal[i] */ + if ( ! MtzAddXtal(mtz,dummy_xname,"NULL_pname",zerocell) ) return NULL; + mtz->xtal[i]->nset = 0; + for (j = 0; j < nset[i]; ++j) { + /* This adds mtz->xtal[i]->set[j] */ + if ( ! MtzAddDataset(mtz,mtz->xtal[i],"NULL_dname",0.0) ) return NULL; + } + } + } + + /* initialise main header */ + mtz->filein = NULL; + mtz->fileout = NULL; + mtz->title[0] = '\0'; + mtz->hist = NULL; + mtz->histlines = 0; + mtz->nxtal = nxtal; + mtz->ncol_read = 0; + mtz->nref = 0; + mtz->nref_filein = 0; + mtz->refs_in_memory = 1; + mtz->n_orig_bat = 0; + mtz->resmax_out = 0.0f; + mtz->resmin_out = 999.0f; + sprintf(mtz->mnf.amnf,"NAN"); + mtz->mtzsymm.spcgrp = 0; + mtz->mtzsymm.spcgrpname[0] = '\0'; + mtz->mtzsymm.nsym = 0; + mtz->mtzsymm.nsymp = 0; + mtz->mtzsymm.symtyp = '\0'; + mtz->mtzsymm.pgname[0] = '\0'; + mtz->mtzsymm.spg_confidence = '\0'; + mtz->batch = NULL; + for (i = 0; i < 5; ++i) { + mtz->order[i] = NULL; + } + mtz->xml = NULL; + mtz->unknown_headers = NULL; + mtz->n_unknown_headers = 0; + + return(mtz); +} + +int MtzFree(MTZ *mtz) + +/* Frees the memory reserved for 'mtz' */ + +{ int i,j,k; + + /* Close attached mtz files */ + if (mtz->filein) { + ccp4_file_close(mtz->filein); + mtz->filein = NULL; + } + if (mtz->fileout) { + ccp4_file_close(mtz->fileout); + mtz->fileout = NULL; + } + + /* Loop over crystals */ + for (i = 0; i < mtz->nxtal; ++i) { + /* Loop over datasets for each crystal */ + for (j = 0; j < mtz->xtal[i]->nset; ++j) { + /* Loop over columns for each dataset */ + for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { + MtzFreeCol(mtz->xtal[i]->set[j]->col[k]); + } + ccp4array_free(mtz->xtal[i]->set[j]->col); + free((void *) mtz->xtal[i]->set[j]); + } + ccp4array_free(mtz->xtal[i]->set); + free((void *) mtz->xtal[i]); + } + ccp4array_free(mtz->xtal); + + if (mtz->batch) { + MtzFreeBatch(mtz->batch); + mtz->batch = NULL; + } + + if (mtz->hist != NULL) + MtzFreeHist(mtz->hist); + + if (mtz->xml != NULL) + free(mtz->xml); + + if (mtz->unknown_headers != NULL) + free(mtz->unknown_headers); + + free((void *) mtz); + return 1; +} + +MTZBAT *MtzMallocBatch() + +/* Allocates memory for a single batch header */ + +{ MTZBAT *batch; + + batch = (MTZBAT *) ccp4_utils_malloc(sizeof(MTZBAT)); + if (batch == NULL) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzMallocBatch",NULL); + return NULL; + } + memset(batch,'\0',sizeof(MTZBAT)); + batch->next = NULL; + + return(batch); +} + +int MtzFreeBatch(MTZBAT *batch) + +/* Frees the memory reserved for 'batch' */ + +{ + MTZBAT* cbatch = batch; + while (cbatch != NULL) + { + MTZBAT* pbatch = cbatch; + cbatch = cbatch->next; + free(pbatch); + pbatch = NULL; + } + + return 1; +} + +MTZCOL *MtzMallocCol(MTZ *mtz, int nref) + +{ MTZCOL *col; + + col = (MTZCOL *) ccp4_utils_malloc(sizeof(MTZCOL)); + if (col == NULL) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzMallocCol",NULL); + return NULL; + } + memset(col,'\0',sizeof(MTZCOL)); + + col->ref = NULL; + if (mtz->refs_in_memory) { + ccp4array_new_size(col->ref,nref); + if (col->ref == NULL) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzMallocCol",NULL); + return NULL; + } + } + + return(col); +} + +int MtzFreeCol(MTZCOL *col) + +{ if (col->ref) ccp4array_free(col->ref); + free((void *) col); + return 1; +} + +char *MtzCallocHist(int nhist) + +/* Allocates memory for the mtz history with 'nhist' lines */ + +{ char *hist; + + hist = (char *) ccp4_utils_calloc(nhist, sizeof(char)*MTZRECORDLENGTH); + return(hist); +} + +int MtzFreeHist(char *hist) + +/* Frees the memory reserved for 'hist' */ + +{ + free((void *) hist); + return 1; +} + +MTZXTAL *MtzAddXtal(MTZ *mtz, const char *xname, const char *pname, + const float cell[6]) +{ + /* add a new crystal to the mtz */ + int i,x; + MTZXTAL *xtal; + + xtal = (MTZXTAL *) ccp4_utils_malloc( sizeof(MTZXTAL) ); + if (! xtal ) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzAddXtal",NULL); + return NULL; + } + memset(xtal,'\0',sizeof(MTZXTAL)); + + /* fill out the data */ + strncpy( xtal->xname, xname, 64 ); + xtal->xname[64] = '\0'; + strncpy( xtal->pname, pname, 64 ); + xtal->pname[64] = '\0'; + xtal->resmin = 100.0; + xtal->resmax = 0.0; + for (i = 0; i < 6; i++) xtal->cell[i] = cell[i]; + /* make new xtalid */ + for (i = x = 0; x < mtz->nxtal; x++) + if (mtz->xtal[x]->xtalid > i) i = mtz->xtal[x]->xtalid; + xtal->xtalid = ++i; + xtal->nset = 0; + /* create initial array of 10 pointers to datasets */ + ccp4array_new_size(xtal->set,10); + + /* add pointer to mtz */ + if ( ++mtz->nxtal > ccp4array_size(mtz->xtal)) + ccp4array_resize(mtz->xtal, mtz->nxtal + 2); + mtz->xtal[ mtz->nxtal - 1 ] = xtal; + + return xtal; +} + +MTZSET *MtzAddDataset(MTZ *mtz, MTZXTAL *xtl, const char *dname, + const float wavelength) +{ + /* add a new dataset to the xtal */ + int i,x,s; + MTZSET *set; + + set = (MTZSET *) ccp4_utils_malloc( sizeof(MTZSET) ); + if ( ! set ) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzAddDataset",NULL); + return NULL; + } + memset(set,'\0',sizeof(MTZSET)); + + /* fill out the data */ + strncpy( set->dname, dname, 64 ); + set->dname[64] = '\0'; + set->wavelength = wavelength; + + /* New setid is one more than greatest current setid. + It must be at least 1, unless it is the base dataset setid=0. */ + if (!strcmp(set->dname,"HKL_base")) { + set->setid = 0; + } else { + i = 0; + for (x = 0; x < mtz->nxtal; x++) + for (s = 0; s < mtz->xtal[x]->nset; s++) + if (mtz->xtal[x]->set[s]->setid > i) i = mtz->xtal[x]->set[s]->setid; + set->setid = ++i; + } + + set->ncol = 0; + /* create initial array of 20 pointers to columns */ + ccp4array_new_size(set->col,20); + + /* add pointer to xtal */ + if ( ++xtl->nset > ccp4array_size(xtl->set)) + ccp4array_resize(xtl->set, xtl->nset + 4); + xtl->set[ xtl->nset - 1 ] = set; + + return set; +} + +MTZCOL *MtzAddColumn(MTZ *mtz, MTZSET *set, const char *label, + const char *type) +{ + /* add a new column to the dataset */ + int i,nref; + union float_uint_uchar uf; + MTZCOL *col; + + if (set->ncol == MCOLUMNS) { + printf("MtzAddColumn: No more columns! \n"); + return NULL; + } + + /* allocate some memory for first column */ + if (!mtz->refs_in_memory) { + nref = 0; + } else if (mtz->nref == 0) { + nref = 2000; + } else { + nref = mtz->nref; + } + col = MtzMallocCol(mtz, nref); + if (col == NULL) { + ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzAddColumn",NULL); + return NULL; + } + + /* fill out the data */ + strncpy( col->label, label, 30 ); + col->label[30] = '\0'; + strncpy( col->type, type, 2); + col->type[2] = '\0'; + col->active = 1; + col->source = 0; + col->min = 1.e06; + col->max = -1.e06; + col->colsource[0] = '\0'; + col->grpname[0] = '\0'; + col->grptype[0] = '\0'; + col->grpposn = -1; + /* add pointer to set */ + if ( ++set->ncol > ccp4array_size(set->col)) + ccp4array_resize(set->col, set->ncol + 9); + set->col[ set->ncol - 1 ] = col; + /* initialise column to MNF */ + if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { + uf = ccp4_nan(); + } else { + uf.f = mtz->mnf.fmnf; + } + for (i=0; i < nref; i++) col->ref[i] = uf.f; + + return col; +} + +int MtzToggleColumn(MTZCOL *col) +{ + /* Toggle active flag of column */ + if (col->active) { + col->active = 0; + } else { + col->active = 1; + } + return col->active; +} + +MTZSET *MtzColSet(const MTZ *mtz, const MTZCOL *col) +{ + int x,s,c; + for (x=0; x < mtz->nxtal; x++) + for (s=0; s < mtz->xtal[x]->nset; s++) + for (c=0; c < mtz->xtal[x]->set[s]->ncol; c++) + if (mtz->xtal[x]->set[s]->col[c] == col) + return mtz->xtal[x]->set[s]; + printf ("MtzColSet: no such column. \n"); + return NULL; +} + +MTZXTAL *MtzSetXtal(const MTZ *mtz, const MTZSET *set) +{ + int x,s; + for (x=0; x < mtz->nxtal; x++) + for (s=0; s < mtz->xtal[x]->nset; s++) + if (mtz->xtal[x]->set[s] == set) + return mtz->xtal[x]; + printf ("MtzSetXtal: no such dataset. \n"); + return NULL; +} + +int MtzNxtal(const MTZ *mtz) +{ + return mtz->nxtal; +} + +int MtzNumActiveXtal(const MTZ *mtz) +{ + int k,ixtal=0; + + for (k=0; k < mtz->nxtal; k++) + if (MtzNumActiveSetsInXtal(mtz,mtz->xtal[k])) ++ixtal; + return ixtal; +} + +MTZXTAL **MtzXtals(MTZ *mtz) +{ + return mtz->xtal; +} + +MTZXTAL *MtzIxtal(const MTZ *mtz, const int ixtal) +{ + return mtz->xtal[ixtal]; +} + +int MtzNsetsInXtal(const MTZXTAL *xtal) +{ + return xtal->nset; +} + +int MtzNumActiveSetsInXtal(const MTZ *mtz, const MTZXTAL *xtal) +{ + int k,iset=0; + + for (k=0; k < xtal->nset; k++) + if (MtzNumActiveColsInSet(xtal->set[k]) || + MtzNbatchesInSet(mtz, xtal->set[k])) ++iset; + return iset; +} + +MTZSET **MtzSetsInXtal(MTZXTAL *xtal) +{ + return xtal->set; +} + +MTZSET *MtzIsetInXtal(const MTZXTAL *xtal, const int iset) +{ + return xtal->set[iset]; +} + +int MtzNcolsInSet(const MTZSET *set) +{ + return set->ncol; +} + +int MtzNumActiveColsInSet(const MTZSET *set) +{ + int k,icol=0; + + for (k=0; k < set->ncol; k++) + icol += set->col[k]->active; + return icol; +} + +int MtzNumSourceColsInSet(const MTZSET *set) +{ + int k,icol=0; + + for (k=0; k < set->ncol; k++) + if (set->col[k]->source) ++icol; + return icol; +} + +int MtzNbatchesInSet(const MTZ *mtz, const MTZSET *set) +{ + int i,ibatch=0; + MTZBAT *batch; + + batch = mtz->batch; + + /* if new batch headers have been written, lose the old ones */ + if (MtzNbat(mtz) > mtz->n_orig_bat) + for (i=0; i < mtz->n_orig_bat; ++i) + batch = batch->next; + + while (batch) { + if (batch->nbsetid == set->setid) ++ibatch; + batch = batch->next; + } + + return ibatch; +} + +MTZCOL **MtzColsInSet(MTZSET *set) +{ + return set->col; +} + +MTZCOL *MtzIcolInSet(const MTZSET *set, const int icol) +{ + return set->col[icol]; +} + +char *MtzColType(MTZCOL *col) +{ + return col->type; +} + +int MtzNset(const MTZ *mtz) +{ + int x,iset=0; + for (x=0; x < mtz->nxtal; x++) + iset += MtzNsetsInXtal(mtz->xtal[x]); + return iset; +} + +int MtzNumActiveSet(const MTZ *mtz) +{ + int x,iset=0; + for (x=0; x < mtz->nxtal; x++) + iset += MtzNumActiveSetsInXtal(mtz,mtz->xtal[x]); + return iset; +} + +int MtzNcol(const MTZ *mtz) +{ + int x,s,icol=0; + for (x=0; x < mtz->nxtal; x++) + for (s=0; s < mtz->xtal[x]->nset; s++) + icol += MtzNcolsInSet(mtz->xtal[x]->set[s]); + return icol; +} + +int MtzNumActiveCol(const MTZ *mtz) +{ + int x,s,icol=0; + for (x=0; x < mtz->nxtal; x++) + for (s=0; s < mtz->xtal[x]->nset; s++) + icol += MtzNumActiveColsInSet(mtz->xtal[x]->set[s]); + return icol; +} + +int MtzNumSourceCol(const MTZ *mtz) +{ + int x,s,icol=0; + for (x=0; x < mtz->nxtal; x++) + for (s=0; s < mtz->xtal[x]->nset; s++) + icol += MtzNumSourceColsInSet(mtz->xtal[x]->set[s]); + return icol; +} + +int MtzNref(const MTZ *mtz) +{ + /* get the number of reflections in the mtz */ + + return mtz->nref; +} + +int MtzNbat(const MTZ *mtz) +{ + /* get the number of batches in the mtz */ + int cnt=0; + MTZBAT *batch; + + for (batch = mtz->batch ; batch != NULL ; batch = batch->next ) + ++cnt; + + return cnt; +} + +char *MtzXtalPath(const MTZXTAL *xtal) +{ + /* Return the full path name of a crystal */ + char *path; + size_t length; + + length = strlen(xtal->xname)+2; + path = (char *) ccp4_utils_malloc(length*sizeof(char)); + strcpy( path, "/" ); + strcat( path, xtal->xname ); + path[length-1] = '\0'; + return ( path ); +} + +char *MtzSetPath(const MTZ *mtz, const MTZSET *set) +{ + /* Return the full path name of a dataset */ + char *path, *path1; + size_t length; + + path1 = MtzXtalPath( MtzSetXtal( mtz, set ) ); + length = strlen(path1)+strlen(set->dname)+2; + path = ccp4_utils_malloc(length*sizeof(char)); + strcpy( path, path1 ); + free (path1); + strcat( path, "/" ); + strcat( path, set->dname ); + path[length-1] = '\0'; + return ( path ); +} + +char *MtzColPath(const MTZ *mtz, const MTZCOL *col) +{ + /* Return the full path name of a column */ + char *path, *path1; + size_t length; + + path1 = MtzSetPath( mtz, MtzColSet( mtz, col ) ); + length = strlen(path1)+strlen(col->label)+2; + path = (char *) ccp4_utils_malloc(length*sizeof(char)); + strcpy( path, path1 ); + free (path1); + strcat( path, "/" ); + strcat( path, col->label ); + path[length-1] = '\0'; + return ( path ); +} + +int MtzRJustPath(char *path, const char *partial, const int njust) +{ + /* Complete a right-justified path by prefixing with wildcards */ + int i, j; + /* count the slashes */ + for ( i = j = 0; i < strlen(partial); i++ ) if ( partial[i] == '/' ) j++; + + strcpy( path, ""); + if ( j++ < njust ) strcat( path, "/" ); + while ( j++ < njust ) strcat( path, "*/" ); + strcat( path, partial ); + + return 1; +} + +int MtzPathMatch(const char *path1, const char *path2) +{ + /* test for match between two paths, including wildcards */ + /* this version only handles wildcards at the end of name components */ + int p1 = 0, p2 = 0; + while ( path1[p1] != '\0' && path2[p2] != '\0' ) { /* search both paths */ + if ( path1[p1] != path2[p2] ) { + if ( path1[p1] != '*' && path2[p2] != '*' ) + return FALSE; /* non-wild mismatch is terminal */ + while ( path1[p1] != '/' && path1[p1] != '\0' ) p1++; /* skip compnt */ + while ( path2[p2] != '/' && path2[p2] != '\0' ) p2++; /* skip compnt */ + } else { + p1++; p2++; + } + } + return (path1[p1] == path2[p2]); /* true only if both paths ended */ +} + + +MTZCOL *MtzColLookup(const MTZ *mtz, const char *label) +{ + /* Returns a pointer to the column of mtz with the given `label`, or NULL */ + int x,s,c; + char *path1, path2[200]; + + /* complete the right-justified path */ + MtzRJustPath( path2, label, 3 ); + /* now find the matching column */ + for (x=0; x < mtz->nxtal; x++) /* not much point in optimising this */ + for (s=0; s < mtz->xtal[x]->nset; s++) + for (c=0; c < mtz->xtal[x]->set[s]->ncol; c++) { + path1 = MtzColPath(mtz, mtz->xtal[x]->set[s]->col[c]); + if ( MtzPathMatch( path1, path2 ) ) { + free (path1); + return mtz->xtal[x]->set[s]->col[c]; + } + free (path1); + } + return NULL; +} + +MTZSET *MtzSetLookup(const MTZ *mtz, const char *label) +{ + int x,s; + char *path1, path2[200]; + + /* complete the right-justified path */ + MtzRJustPath( path2, label, 2 ); + /* now find the matching column */ + for (x=0; x < mtz->nxtal; x++) + for (s=0; s < mtz->xtal[x]->nset; s++) { + path1 = MtzSetPath(mtz, mtz->xtal[x]->set[s]); + if ( MtzPathMatch( path1, path2 ) ) { + free (path1); + return mtz->xtal[x]->set[s]; + } + free (path1); + } + return NULL; +} + +MTZXTAL *MtzXtalLookup(const MTZ *mtz, const char *label) +{ + /* Returns a pointer to the crystal of mtz with the given `label`, or NULL */ + int x; + char *path1, path2[200]; + + /* complete the right-justified path */ + MtzRJustPath( path2, label, 1 ); + /* now find the matching column */ + for (x=0; x < mtz->nxtal; x++) { + path1 = MtzXtalPath(mtz->xtal[x]); + if ( MtzPathMatch( path1, path2 ) ) { + free (path1); + return mtz->xtal[x]; + } + free (path1); + } + return NULL; +} + diff --git a/ccp4c/ccp4/cmtzlib.h b/ccp4c/ccp4/cmtzlib.h new file mode 100644 index 00000000..6880d4b7 --- /dev/null +++ b/ccp4c/ccp4/cmtzlib.h @@ -0,0 +1,1054 @@ +/* + cmtzlib.h: header file for cmtzlib.c + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @page cmtz_page CMTZ library + * + * @verbatim + + + + @endverbatim + * + * @section cmtz_file_list File list + +
    +
  • cmtzlib.h - contains details of the C/C++ API +
  • mtzdata.h - contains details of the MTZ data structure +
+ + * @section cmtz_overview Overview + +The CMTZ library is centred around a data structure, defined in +mtzdata.h Reading an MTZ file causes a data structure to be +created and populated from the MTZ header. There are a variety of functions +for manipulating the data structure, for example adding crystals, datasets +or columns. The data structure can be dumped to an output MTZ data file. +

+The library operates in two modes with respect to the reflection data. +If mtz->refs_in_memory = 1 (as set e.g. by the argument to +MtzGet), then all reflection data is read into memory from +the file, and can be manipulated in memory. Else if +mtz->refs_in_memory = 0 then explicit calls to ccp4_lrrefl, +ccp4_lrreff and ccp4_lwrefl are required to read +and write reflections from/to disk. +

+Information on the data structure is given in mtzdata.h + + * @section cmtz_princ_func Principal Functions + * @subsection cmtz_reading Reading MTZ files + +Start by looking at MtzGet and ccp4_lrrefl / ccp4_lrreff. + + * @subsection cmtz_writing Writing MTZ files + +If you have a structure in memory already, use MtzPut followed +by MtzFree to release the memory. +

+If you need to create a structure from scratch (i.e. without reading +from an input file) then use MtzMalloc, MtzOpenForWrite, +ccp4_lwsymm, MtzAddXtal, MtzAddDataset, +MtzAddColumn and ccp4_lwrefl. + + * @section cmtz_symmetry Symmetry Information + +All reflection data in an MTZ file is assumed to belong to the same +spacegroup. The spacegroup is identified in the MTZ file by SYMINF +and SYMM records in the file header. This information is copied +into the in-memory data structure. The list of symmetry operators +(copied from the SYMM header records) is taken to be the definitive +indicator of the spacegroup. +

+The functions ccp4_lrsymi, ccp4_lrsymm and +ccp4_lwsymm read from and write to the symmetry sections +of the data structure. No symmetry manipulations are done within +the CMTZ library itself. Within CCP4, the CSYM library provides +appropriate functions, but other symmetry libraries could be used. + + * @section cmtz_examples Examples + +See examples on ftp area + + */ + +/** @file cmtzlib.h + * + * @brief C-level library for input, output and manipulation of MTZ files. + * + * Functions defining the C-level API for accessing MTZ files. + * MtzGet and MtzPut read and write MTZ files to/from a data + * structure defined in mtzdata.h Other functions allow one + * to access data structure members, and to manipulate the structure + * and the values of structure members. Functions with names + * beginning ccp4_lr or ccp4_lw are primarily + * to support the Fortran API. + * + * @author Martyn Winn + */ + +#ifndef __CMTZLib__ +#define __CMTZLib__ + +/* rcsidhm[100] = "$Id$" */ + +/* defines CCP4::CCP4File */ +#include "ccp4_utils.h" + +#ifdef __cplusplus +namespace CMtz { +extern "C" { +typedef CCP4::CCP4File CCP4File; +#endif + +/* needs to be here for C++ to use CCP4File typedef */ +#include "mtzdata.h" + +/**** MTZ i/o ****/ + +/** Reads the contents of the MTZ file into an MTZ structure. + * @param logname (I) Logical name of MTZ file + * @param read_refs (I) Whether to read reflections into memory (non-zero) or + * to read later from file (zero) + * @return Pointer to MTZ struct + */ +MTZ *MtzGet(const char *logname, int read_refs); + +/** Reads the contents of the MTZ file into an MTZ structure. As for function + * MtzGet except for extra argument cell_tolerance. + * @param logname (I) Logical name of MTZ file + * @param read_refs (I) Whether to read reflections into memory (non-zero) or + * to read later from file (zero) + * @param cell_tolerance (I) User-defined tolerance for ccp4uc_cells_differ. + * Setting this to zero means that a new crystal is generated whenever + * dataset cell dimensions are different. MtzGet allows for a certain + * variation within a single crystal. + * @return Pointer to MTZ struct + */ +MTZ *MtzGetUserCellTolerance(const char *logname, int read_refs, const double cell_tolerance); + +/** Reads reflection data from MTZ file. + * @param filein pointer to input file + * @param ncol number of columns to read + * @param refldata array of reflection data + * @return istat from ccp4_file_read + */ +int MtzRrefl(CCP4File *filein, int ncol, float *refldata); + +/** Writes an MTZ data structure to disk. If file is already open, MtzPut + * uses file pointer in mtz struct, else uses logical name of file. + * @param mtz pointer to MTZ struct. + * @param logname logical name for output file or blank. + * @return 1 on success, 0 on failure + */ +int MtzPut(MTZ *mtz, const char *logname); + +/** Opens a new MTZ file for writing. The output file can be specified + * either with a true filename, or more likely as a logical name + * corresponding to an environment variable or a CCP4 command line + * argument such as HKLOUT. + * @param logname logical name or filename for output file. + * @return pointer to file or NULL on failure + */ +CCP4File *MtzOpenForWrite(const char *logname); + +/** Write header record to fileout. Record is filled from + * buffer and padded by blanks to a total length of MTZRECORDLENGTH. + * @param fileout Pointer to output file. + * @param nitems Number of characters in buffer. + * @param buffer Character buffer containing MTZ header line. + * @return Number of bytes written on success, EOF on failure. + */ +int MtzWhdrLine(CCP4File *fileout, int nitems, char buffer[]); + +/** Write ncol column entries to fileout from refldata. + * @param fileout pointer to output MTZ file. + * @param ncol number of reflection data items to write. + * @param refldata array of reflection data items. + * @return Number of items written. If this is less than ncol, then + * that indicates a write error. + */ +int MtzWrefl(CCP4File *fileout, int ncol, float *refldata); + +/** Delete a reflection from the data structure. Beware, there + * is no going back! + * @param mtz pointer to MTZ struct. + * @param iref index of reflection + * @return 0 if successful, 1 otherwise + */ +int MtzDeleteRefl(MTZ *mtz, int iref); + +/** Position input file at start of reflections. Useful if you need + * to read the reflections a second time. + * @param mtz pointer to MTZ struct. + */ +void MtzRewdInput(MTZ *mtz); + +/**** Memory allocation ****/ + +/** Allocates memory for an MTZ header structure. The structure can + * contain 0, 1 or more crystals, and for each crystal 0, 1 or more + * datasets. Crystals have a name based on the time "NULL_xnameHHMMSS" + * to ensure uniqueness (compared to crystals defined elsewhere - all + * new crystals created here will (probably) have the same name). + * Crystals have the project name "NULL_pname", and datasets have the + * name "NULL_dname". + * @param nxtal Number of crystals to allocate. + * @param nset Number of datasets for each crystal to allocate. + * @return pointer to MTZ header struct + */ +MTZ *MtzMalloc(int nxtal, int nset[]); + +/** Frees the memory reserved for the MTZ header struct. + * @param mtz pointer to MTZ header struct. + * @return 1 on success, 0 on failure + */ +int MtzFree(MTZ *mtz); + +/** Allocates memory for an MTZ column. Space is allocated for + * the reflection data if and only if mtz->refs_in_memory is set. + * @param mtz pointer to MTZ header struct. + * @param nref number of reflections in column. + * @return pointer to MTZ column. + */ +MTZCOL *MtzMallocCol(MTZ *mtz, int nref); + +/** Frees the memory reserved for 'col' + * @param col pointer to MTZ column. + * @return 1 on success, 0 on failure + */ +int MtzFreeCol(MTZCOL *col); + +/** Allocates memory for a single batch header. + * @return pointer to batch + */ +MTZBAT *MtzMallocBatch(void); + +/** Frees the memory reserved for 'batch'. + * @param batch + * @return 1 on success, 0 on failure + */ +int MtzFreeBatch(MTZBAT *batch); + +/** Allocates memory for the mtz history with 'nhist' lines. + * @param nhist + * @return pointer to history + */ +char *MtzCallocHist(int nhist); + +/** Frees the memory reserved for 'hist'. + * @param hist + * @return 1 on success, 0 on failure + */ +int MtzFreeHist(char *hist); + +/** Free all memory malloc'd from static pointers. + * To be called before program exit. The function can be + * registered with atexit. + * @return void + */ +void MtzMemTidy(void); + +/**** Header operations ****/ + +/** Get the number of batches in the mtz. + * @param mtz pointer to MTZ struct + * @return Number of batches. + */ +int MtzNbat(const MTZ *mtz); + +/** Get the number of reflections in the mtz. + * @param mtz pointer to MTZ struct + * @return Number of reflections. + */ +int MtzNref(const MTZ *mtz); + +/** Get the spacegroup number (likely CCP4 convention). + * @param mtz pointer to MTZ struct + * @return Spacegroup number. + */ +int MtzSpacegroupNumber(const MTZ *mtz); + +/** Return the overall resolution limits of the MTZ structure. + * These are the widest limits over all crystals present. + * @param mtz pointer to MTZ struct + * @param minres minimum resolution + * @param maxres maximum resolution + * @return 1 on success, 0 on failure + */ +int MtzResLimits(const MTZ *mtz, float *minres, float *maxres); + +/**** Crystal operations ****/ + +/** Get the total number of crystals in the MTZ structure + * @param mtz pointer to MTZ struct + * @return number of active crystals + */ +int MtzNxtal(const MTZ *mtz); + +/** Get the number of active crystals in the MTZ structure + * @param mtz pointer to MTZ struct + * @return number of active crystals + */ +int MtzNumActiveXtal(const MTZ *mtz); + +/** Return array of pointers to crystals. + * @param mtz pointer to MTZ struct + * @return array of pointers to crystals + */ +MTZXTAL **MtzXtals(MTZ *mtz); + +/** Return pointer to the ixtal'th crystal. + * @param mtz pointer to MTZ struct + * @param ixtal number of the particular crystal (ixtal = 0 ... MtzNxtal(xtal) -1 + * @return pointer to the specified crystal + */ +MTZXTAL *MtzIxtal(const MTZ *mtz, const int ixtal); + +/** Return the full path name of a crystal as "/xname" + * Memory for the path name is assigned with malloc, and can + * be free'd by the calling function. + * @param xtal pointer to the crystal struct + * @return pointer to string containing path name + */ +char *MtzXtalPath(const MTZXTAL *xtal); + +/** Returns a pointer to the crystal of mtz with the given `label`, or NULL. + * @param mtz pointer to MTZ struct + * @param label + * @return pointer to crystal + */ +MTZXTAL *MtzXtalLookup(const MTZ *mtz, const char *label); + +/** Add a crystal to header mtz. + * @param mtz pointer to MTZ struct + * @param xname Crystal name. + * @param pname Name of associated project. + * @param cell Cell dimensions of crystal. + * @return Pointer to crystal. + */ +MTZXTAL *MtzAddXtal(MTZ *mtz, const char *xname, const char *pname, + const float cell[6]); + +/** For a given crystal, return number of datasets in that crystal. + * @param xtal pointer to the crystal struct + * @return number of datasets + */ +int MtzNsetsInXtal(const MTZXTAL *xtal); + +/** For a given crystal, return number of active datasets in that crystal. + * @param xtal pointer to the crystal struct + * @return number of datasets + */ +int MtzNumActiveSetsInXtal(const MTZ *mtz, const MTZXTAL *xtal); + +/** For a given crystal, return array of pointers to datasets + * in that crystal. + * @param xtal pointer to the crystal struct + * @return array of pointers to datasets + */ +MTZSET **MtzSetsInXtal(MTZXTAL *xtal); + +/** For a given crystal, return pointer to the iset'th dataset + * in that crystal. + * @param xtal pointer to the crystal struct + * @param iset number of the particular dataset (iset = 0 ... MtzNsetsInXtal(xtal) -1 + * @return pointer to specified dataset + */ +MTZSET *MtzIsetInXtal(const MTZXTAL *xtal, const int iset); + +/**** Dataset operations ****/ + +/** Get the number of datasets in the MTZ structure + * @param mtz pointer to MTZ struct + * @return total number of datasets + */ +int MtzNset(const MTZ *mtz); + +/** Get the number of active datasets in the MTZ structure + * @param mtz pointer to MTZ struct + * @return total number of datasets + */ +int MtzNumActiveSet(const MTZ *mtz); + +/** Get the crystal associated with a dataset + * The pointer to MTZ is required to do reverse lookup of xname. + * @param mtz pointer to MTZ struct + * @param set pointer to dataset + * @return pointer to parent crystal, or NULL if "set" is + * not present in "mtz". + */ +MTZXTAL *MtzSetXtal(const MTZ *mtz, const MTZSET *set); + +/** Return the full path name of a dataset as "/xname/dname" + * The pointer to MTZ is required to do reverse lookup of xname. + * Memory for the path name is assigned with malloc, and can + * be free'd by the calling function. + * @param mtz pointer to MTZ struct + * @param set pointer to dataset + * @return pointer to string containing path name + */ +char *MtzSetPath(const MTZ *mtz, const MTZSET *set); + +/** Returns a pointer to the dataset of MTZ with the given label. + * @param mtz pointer to MTZ struct. + * @param label Label of desired set. This could be or + * /. + * @return pointer to set or NULL if not found + */ +MTZSET *MtzSetLookup(const MTZ *mtz, const char *label); + +/** Add a dataset to crystal xtl + * @param mtz pointer to MTZ struct. + * @param xtl pointer to crystal struct. + * @param dname Dataset name + * @param wavelength X-ray wavelength of dataset + * @return pointer to set + */ +MTZSET *MtzAddDataset(MTZ *mtz, MTZXTAL *xtl, const char *dname, + const float wavelength); + +/** For a given dataset, return number of columns in that dataset. + * This is simply set->ncol and so includes all columns irrespective + * of col->active + * @param set pointer to dataset + * @return number of columns + */ +int MtzNcolsInSet(const MTZSET *set); + +/** For a given dataset, return number of active columns in that dataset. + * @param set pointer to dataset + * @return number of active columns + */ +int MtzNumActiveColsInSet(const MTZSET *set); + +/** For a given dataset, return number of columns in that dataset + * which have a source in an input file (i.e. non-zero source attribute). + * @param set pointer to dataset + * @return number of source columns + */ +int MtzNumSourceColsInSet(const MTZSET *set); + +/** For a given dataset, return number of batches in that dataset. + * @param mtz pointer to MTZ struct + * @param set pointer to dataset + * @return number of batches + */ +int MtzNbatchesInSet(const MTZ *mtz, const MTZSET *set); + +/** For a given dataset, return array of pointers to columns + * in that dataset. + * @param set pointer to dataset + * @return array of pointers to columns + */ +MTZCOL **MtzColsInSet(MTZSET *set); + +/** For a given dataset, return pointer to the icol'th column + * in that dataset. + * @param set pointer to dataset + * @param icol number of + * the particular column (icol = 0 ... MtzNcolsInSet(set) -1 + * @return pointer to specified column + */ +MTZCOL *MtzIcolInSet(const MTZSET *set, const int icol); + +/**** Column operations ****/ + +/** Add a column to dataset set and create + fill with NAN + * @param mtz pointer to MTZ struct + * @param set pointer to dataset + * @param label Column label + * @param type Column type + * @return pointer to column + */ +MTZCOL *MtzAddColumn(MTZ *mtz, MTZSET *set, const char *label, + const char *type); + +/** Assigns HKL columns to the base dataset. + * @param mtz pointer to MTZ struct + * @return 1 on success, 0 on failure + */ +int MtzAssignHKLtoBase(MTZ *mtz); + +/** Assigns a column to a dataset identified by crystal_name and + * dataset_name. First, the function checks whether the + * column already belongs to this dataset, in which case it does nothing. + * Then it checks if the requested dataset exists. If not, it is created, + * though it is better to explicitly create it beforehand. Finally, the column + * is assigned to the dataset. + * @param mtz pointer to MTZ struct + * @param col pointer to column + * @param crystal_name name of crystal containing dataset + * @param dataset_name name of dataset + * @return 1 on success, 0 on failure + */ +int MtzAssignColumn(MTZ *mtz, MTZCOL *col, const char crystal_name[], + const char dataset_name[]); + +/** Toggle active flag of column. A value of 0 means inactive and will + * not be written out, whereas a value of 1 means active and will + * be written out. + * @param col pointer to column + * @return New value of col->active. + */ +int MtzToggleColumn(MTZCOL *col); + +/** Get the dataset associated with a column. + * @param mtz pointer to MTZ struct + * @param col pointer to column of interest + * @return pointer to set containing column of interest, or NULL + * if "col" is not contained in "mtz". + */ +MTZSET *MtzColSet(const MTZ *mtz, const MTZCOL *col); + +/** Get the number of columns in the MTZ data structure. + * @param mtz pointer to MTZ struct + * @return number of columns + */ +int MtzNcol(const MTZ *mtz); + +/** Get the number of active columns in the MTZ data structure. + * @param mtz pointer to MTZ struct + * @return number of columns + */ +int MtzNumActiveCol(const MTZ *mtz); + +/** Get the number of columns in the MTZ data structure which have + * a source in an input file (i.e. non-zero source attribute). + * @param mtz pointer to MTZ struct + * @return number of columns + */ +int MtzNumSourceCol(const MTZ *mtz); + +/** Return the full path name of a column as "/xname/dname/label" + * Memory for the path name is assigned with malloc, and can + * be free'd by the calling function. + * @param mtz pointer to MTZ struct + * @param col pointer to MTZ column. + * @return full path name of column + */ +char *MtzColPath(const MTZ *mtz, const MTZCOL *col); + +/** Complete a right-justified path by prefixing with wildcards + * @param path Completed path. + * @param partial Partial right-justified path + * @param njust + * @return 1 on success, 0 on failure. + */ +int MtzRJustPath(char *path, const char *partial, const int njust); + +/** Test for match between two paths, including wildcards + * @param path1 First path + * @param path2 Second path + * @return 1 if paths match, else 0. + */ +int MtzPathMatch(const char *path1, const char *path2); + +/** Returns a pointer to the column of mtz with the given `label`, or NULL + * @param mtz pointer to MTZ struct + * @param label Column label. + * @return pointer to column + */ +MTZCOL *MtzColLookup(const MTZ *mtz, const char *label); + +/** Get the MTZ column type of a particular column. + * @param col pointer to MTZ column. + * @return column type + */ +char *MtzColType(MTZCOL *col); + +/** Print summary of current crystal/dataset/column hierarchy. This + * is designed for debugging purposes rather than for the user. + * @param mtz pointer to MTZ struct + * @return void + */ +void MtzDebugHierarchy(const MTZ *mtz); + +/** List of column information: label, type, dataset. + * @param mtz pointer to MTZ struct + * @param clabs List of labels (output). + * @param ctyps List of column types (output). + * @param csetid List of dataset IDs (output). + * @return number of columns in current structure. + */ +int MtzListColumn(const MTZ *mtz, char clabs[][31], char ctyps[][3], int csetid[]); + +/** List of column information from input file: label, type, dataset. + * @param mtz pointer to MTZ struct + * @param clabs List of labels (output). + * @param ctyps List of column types (output). + * @param csetid List of dataset IDs (output). + * @return number of columns in input file. + */ +int MtzListInputColumn(const MTZ *mtz, char clabs[][31], char ctyps[][3], int csetid[]); + +/**** helper functions ****/ + +/** Find where indices h, k, l are in MTZ structure. Usually, they + * will be first 3 columns of 1st dataset, but safest not to assume this. + * @param mtz pointer to MTZ struct + * @param ind_xtal crystal containing indices + * @param ind_set dataset containing indices + * @param ind_col 3 columns containing indices + * @return 1 on success, 0 on failure + */ +int MtzFindInd(const MTZ *mtz, int *ind_xtal, int *ind_set, int ind_col[3]); + +/** Calculate resolution from indices and coefhkl. + * coefhkl is obtained from MtzHklcoeffs. + * @param in integer array of 3 indices + * @param coefhkl double array of 6 coefficients + * @return resolution + */ +float MtzInd2reso(const int in[3], const double coefhkl[6]); + +/** Generate coefhkl coefficients from given cell parameters. + * @param cell cell dimensions to be used for resolution calculation. + * @param coefhkl double array of 6 coefficients + * @return 1 on success, 0 on failure + */ +int MtzHklcoeffs(const float cell[6], double coefhkl[6]); + +/** Reads batch arrays into data structure. + * @param intbuf pointer to integer batch array + * @param fltbuf pointer to float batch array + * @param batch pointer to batch structure + * @return 1 on success, 0 on failure + */ +int MtzArrayToBatch(const int *intbuf, const float *fltbuf, MTZBAT *batch); + +/** Writes data structure to batch arrays. + * @param batch pointer to batch structure + * @param intbuf pointer to integer batch array + * @param fltbuf pointer to float batch array + * @return 1 on success, 0 on failure + */ +int MtzBatchToArray(MTZBAT *batch, int *intbuf, float *fltbuf); + +/** Sort a linked list of batches on batch number. The function + * first checks whether batches are already in order, as they + * will usually be. + * @param batch pointer to beginning of batch list + * @param numbat number of batches to be sorted + * @return Sorted list if batches sorted, original list if batches + * already in order + */ +MTZBAT *sort_batches(MTZBAT *batch, int numbat); + +/**** pseudo-mtzlib routines ****/ + +/** Returns title of MTZ structure 'mtz' + * @param mtz pointer to MTZ struct + * @param title MTZ title as character string + * @return length of title excluding trailing blanks and terminating null + * character. + */ +int ccp4_lrtitl(const MTZ *mtz, char *title); + +/** Get history lines from MTZ structure. + * @param mtz Pointer to MTZ struct. + * @param history Returned history lines. + * @param nlines Requested number of history lines. + * @return Actual number of history lines returned. + */ +int ccp4_lrhist(const MTZ *mtz, char history[][MTZRECORDLENGTH], int nlines); + +/** Get sort order from MTZ structure. + * @param mtz Pointer to MTZ struct. + * @param isort Returned sort order. + * @return 1 on success, 0 on failure + */ +int ccp4_lrsort(const MTZ *mtz, int isort[5]); + +/** Get batch numbers from MTZ structure. + * @param mtz Pointer to MTZ struct. + * @param nbatx Number of batches in input file. + * @param batchx Returned array of batch numbers. + * @return Number of batches. + */ +int ccp4_lrbats(const MTZ *mtz, int *nbatx, int batchx[]); + +/** Get cell dimensions for a particular crystal. + * @param xtl Pointer to crystal. + * @param cell Output cell dimensions. + * @return 1 on success, 0 on failure. + */ +int ccp4_lrcell(const MTZXTAL *xtl, float cell[]); + +/** Get spacegroup information as held in MTZ header. + * @param mtz Pointer to MTZ struct. + * @param nsympx Number of primitive symmetry operators. + * @param ltypex Lattice type (P,A,B,C,I,F,R). + * @param nspgrx Spacegroup number. + * @param spgrnx Spacegroup name. + * @param pgnamx Pointgroup name. + * @return Spacegroup number. + */ +int ccp4_lrsymi(const MTZ *mtz, int *nsympx, char *ltypex, int *nspgrx, + char *spgrnx, char *pgnamx); + +/** Get spacegroup information as held in MTZ header. Extended version of + * ccp4_lrsymi to return confidence flag as well. + * @param mtz Pointer to MTZ struct. + * @param nsympx Number of primitive symmetry operators. + * @param ltypex Lattice type (P,A,B,C,I,F,R). + * @param nspgrx Spacegroup number. + * @param spgrnx Spacegroup name. + * @param pgnamx Pointgroup name. + * @param spgconf One-character flag indicating confidence in nominal spacegroup. + * @return Spacegroup number. + */ +int ccp4_lrsymi_c(const MTZ *mtz, int *nsympx, char *ltypex, int *nspgrx, + char *spgrnx, char *pgnamx, char *spgconf); + +/** Get symmetry matrices from MTZ structure. Note: ordering of matrices + * in rsymx was changed in April 2004. + * @param mtz Pointer to MTZ struct. + * @param nsymx Number of symmetry operators held in MTZ header. + * @param rsymx Symmetry operators as 4 x 4 matrices, in the order they + * are held in the MTZ header. Each matrix has translations in + * elements [*][3]. + * @return Number of symmetry operators. + */ +int ccp4_lrsymm(const MTZ *mtz, int *nsymx, float rsymx[192][4][4]); + +/** Uses LABIN or LABOUT line to convert program labels to user labels. + * This is a helper function, but does not access reflection structure at all. + * @param labin_line (I) LABIN/LABOUT line from Parser. + * @param prog_labels (I) Progam labels. + * @param nlprgi (I) Number of program labels. + * @param user_labels (O) On output, user-supplied file labels in corresponding + * positions. For unassigned program labels, user_labels is empty string. + * @return Number of program labels matched, or -1 if there was an error. + */ +int MtzParseLabin(char *labin_line, const char prog_labels[][31], + const int nlprgi, char user_labels[][2][31]); + +/** Finds columns in an MTZ struct according to column labels. Column types + * are checked for agreement between requested type (in argument 'types') + * and file type. If requested type is blank, file type is returned in + * argument 'types'. Note, this function is different from Fortranic LRASSN, + * in that any conversion from program labels to user labels should have been done + * previously. + * @param mtz Pointer to MTZ struct. + * @param labels Input array of column labels to be found in MTZ struct. + * @param nlabels Number of columns to be found. + * @param types Input array of column types of columns to be found. + * @return Array of pointers to columns in MTZ struct. Array element is + * NULL if column not found. + */ +MTZCOL **ccp4_lrassn(const MTZ *mtz, const char labels[][31], const int nlabels, + char types[][3]); + +/** Report information on a particular dataset. This represents the + * collection of data held in one series of dataset records in the MTZ header. + * It is mainly useful for supporting old Fortran calls. + * @param mtz pointer to MTZ struct + * @param set pointer to dataset + * @param crystal_name Crystal name + * @param dataset_name Dataset name + * @param project_name Project name + * @param isets Dataset ID. + * @param datcell Cell dimensions of crystal that dataset belongs to. + * @param datwave X-ray wavelength associated with dataset. + * @return 1 on success, 0 on failure + */ +int ccp4_lridx(const MTZ *mtz, const MTZSET *set, char crystal_name[64], + char dataset_name[64], char project_name[64], int *isets, + float datcell[6], float *datwave); + +/** Returns iref'th reflection from file held in MTZ struct mtz. Returns + * data for all columns held in input file, in the order that they are + * held in the source file. The value of col->source can be used to find + * particular columns. + * In "in-memory" mode, reflection data is taken from arrays held in + * memory. In the traditional file-based mode, a reflection record is + * read from the input file. + * @param mtz pointer to MTZ struct + * @param resol resolution of reflection (output). + * @param adata array of requested values (output). + * @param logmss array of flags for missing data (output). A value of 1 indicates + * a Missing Number Flag, and a value of 0 indicates usable data. + * @param iref index of requested reflection (starting at 1). + * @return 1 if past last reflection, else 0 + */ +int ccp4_lrrefl(const MTZ *mtz, float *resol, float adata[], int logmss[], int iref); + +/** Returns iref'th reflection from file held in MTZ struct mtz. Returns + * data for certain columns held in input file, as specified by the + * column pointers held in lookup. + * In "in-memory" mode, reflection data is taken from arrays held in + * memory. In the traditional file-based mode, a reflection record is + * read from the input file. + * @param mtz pointer to MTZ struct + * @param resol resolution of reflection (output). + * @param adata array of requested values (output). + * @param logmss array of flags for missing data (output). A value of 1 indicates + * a Missing Number Flag, and a value of 0 indicates usable data. + * @param lookup array of pointers to requested columns + * @param ncols number of requested columns + * @param iref index of requested reflection (starting at 1). + * @return 1 if past last reflection, else 0 + */ +int ccp4_lrreff(const MTZ *mtz, float *resol, float adata[], int logmss[], + const MTZCOL *lookup[], const int ncols, const int iref); + +/** Checks whether a particular reflection value represents missing data. + * @param mtz Pointer to the MTZ struct, which holds the value representing + * missing data (the Missing Number Flag) against which the input datum + * is compared. + * @param datum Reflection value to be checked. + * @return Returns 1 is datum is the MNF, and 0 otherwise. + */ +int ccp4_ismnf(const MTZ *mtz, const float datum); + +/** Function to print header information in traditional format. + * @param mtz Pointer to MTZ struct + * @param iprint Print level + * @return 1 on success, 0 on failure + */ +int ccp4_lhprt(const MTZ *mtz, int iprint); + +/** Function to print header information in format appropriate + * to data structure hierarchy. + * @param mtz Pointer to MTZ struct + * @param iprint Print level + * @return 1 on success, 0 on failure + */ +int ccp4_lhprt_adv(const MTZ *mtz, int iprint); + +/** Function to return batch header data for a specified batch. + * @param batch Pointer to requested batch. + * @param buf On return, real and integer batch data. + * @param charbuf On return, character batch data (title and axes names). + * @param iprint =0 no printing, =1 print title only, >1 print full header. + * @return 1 on success, 0 on failure + */ +int ccp4_lrbat(MTZBAT *batch, float *buf, char *charbuf, int iprint); + +/** Function to print batch header data for a specified batch to stdout. + * @param batch Pointer to requested batch. + * @return 1 on success, 0 on failure + */ +int MtzPrintBatchHeader(const MTZBAT *batch); + +/** Write header title for later output to file. + * @param mtz Pointer to MTZ struct. + * @param ftitle Title string. + * @param flag If 0 overwrite existing title, else append to + * existing title. + * @return 1 on success, 0 on failure + */ +int ccp4_lwtitl(MTZ *mtz, const char *ftitle, int flag); + +/** Sets the sort order in the MTZ header. The sort order is + * a list of columns to be used for sorting, to be applied in + * the order they appear in the list, i.e. sort first on + * colsort[0], then on colsort[1], etc. If there are less than + * 5 columns to be used for sorting, some of colsort[] may be NULL. + * @param mtz Pointer to MTZ struct + * @param colsort Array of pointers to columns. + * @return 1 on success, 0 on failure + */ +int MtzSetSortOrder(MTZ *mtz, MTZCOL *colsort[5]); + +/** Adds history lines to the MTZ header in front of existing history lines. + * @param mtz pointer to MTZ struct + * @param history lines to be added + * @param nlines number of lines to be added + * @return total number of history lines + */ +int MtzAddHistory(MTZ *mtz, const char history[][MTZRECORDLENGTH], const int nlines); + +/** Write or update symmetry information for MTZ header. This provides support + * for the Fortran API, and is not particularly convenient for C programs. + * Note: ordering of matrices in rsymx was changed in November 2003. + * @param mtz Pointer to MTZ struct + * @param nsymx Number of symmetry operators. If zero, symmetry operations + * are not updated. + * @param nsympx Number of primitive symmetry operators. + * @param rsymx Array of symmetry operators (dimensions ordered in C convention, + * with translations in elements [*][3]) + * @param ltypex Lattice type. If blank, not updated. + * @param nspgrx Spacegroup number. If zero, not updated. + * @param spgrnx Spacegroup name. If blank, not updated. + * @param pgnamx Point group name. If blank, not updated. + * @return 1 on success, 0 on failure + */ +int ccp4_lwsymm(MTZ *mtz, int nsymx, int nsympx, float rsymx[192][4][4], + char ltypex[], int nspgrx, char spgrnx[], char pgnamx[]); + +/** Write or update symmetry information for MTZ header. This provides support + * for the Fortran API, and is not particularly convenient for C programs. Extended + * version of ccp4_lwsymm to set confidence flag as well. + * Note: ordering of matrices in rsymx was changed in November 2003. + * @param mtz Pointer to MTZ struct + * @param nsymx Number of symmetry operators. If zero, symmetry operations + * are not updated. + * @param nsympx Number of primitive symmetry operators. + * @param rsymx Array of symmetry operators (dimensions ordered in C convention, + * with translations in elements [*][3]) + * @param ltypex Lattice type. If blank, not updated. + * @param nspgrx Spacegroup number. If zero, not updated. + * @param spgrnx Spacegroup name. If blank, not updated. + * @param pgnamx Point group name. If blank, not updated. + * @param spgconf One-character flag indicating confidence in nominal spacegroup. + * @return 1 on success, 0 on failure + */ +int ccp4_lwsymm_c(MTZ *mtz, int nsymx, int nsympx, float rsymx[192][4][4], + char ltypex[], int nspgrx, char spgrnx[], char pgnamx[], + char spgconf[]); + +/** Write or update symmetry confidence information for MTZ header. + * @param mtz Pointer to MTZ struct + * @param spgconf One-character flag indicating confidence in nominal spacegroup. + * @return 1 on success, 0 on failure + */ +int ccp4_lwsymconf(MTZ *mtz, char spgconf[]); + +/* Assign columns for writing. Check to see if columns already exist, + * else create them. New columns are assigned to the base dataset if it + * exists, else the first dataset. + * @param mtz pointer to MTZ struct + * @param labels Input array of column labels to be assigned. + * @param nlabels Number of columns. + * @param types Input array of column types of columns. + * @param iappnd If iappnd = 0, then deactivate columns which are + * not selected (allows one to write out a subset of columns). Else + * if iappnd = 1, append these columns to existing ones. + * @return Array of pointers to columns in MTZ struct. + */ +MTZCOL **ccp4_lwassn(MTZ *mtz, const char labels[][31], const int nlabels, + const char types[][3], const int iappnd); + +/* Add or update a dataset in the MTZ structure. If the crystal name is + * not recognised, then a new crystal is created containing a single + * dataset. If the crystal name is recognised, then the parameters of + * the crystal are updated. The child dataset is then created if necessary + * or an existing dataset updated. + * Note that this function is used to update crystal parameters, as well + * as add crystals. If a duplicate crystal name is used by mistake, then + * the old crystal parameters are lost. + * @param mtz pointer to MTZ struct + * @param crystal_name Crystal name + * @param dataset_name Dataset name + * @param project_name Project name + * @param datcell Cell dimensions of crystal that dataset belongs to. + * @param datwave X-ray wavelength associated with dataset. + * @return 1 on success, 0 on failure + */ +int ccp4_lwidx(MTZ *mtz, const char crystal_name[], const char dataset_name[], + const char project_name[], const float datcell[6], const float *datwave); + + +/** Function to output reflection values for iref'th reflection. + * The reflection values are provided in an array "adata". The value + * in adata[i] will be assigned to the MTZ column pointed to by lookup[i]. + * Typically, lookup[i] is a pointer returned from an earlier call to + * MtzAddColumn(). + * In "in-memory" mode, values are added/updated to column data held + * in memory. In the traditional file-based mode, a reflection record is + * written to file. + * This function will also update the column ranges and the crystal/file + * resolution limits. + * @param mtz pointer to MTZ struct + * @param adata array of reflection column values. + * @param lookup array of pointers to columns. + * @param ncol number of columns. + * @param iref Reflection number such that 1st reflection is iref=1. + * @return 1 on success, 0 on failure + */ +int ccp4_lwrefl(MTZ *mtz, const float adata[], MTZCOL *lookup[], + const int ncol, const int iref); + +/** Write new batch information to 'batch' or if 'batch' is NULL create + * new batch header with batch number 'batno'. If you try to create more + * than one new batch header with the same batch number, the function will + * complain and return. It is OK to create a new batch with the same + * number as one read from file - this is the mechanism for changing + * batch headers. + * @param mtz pointer to MTZ struct + * @param batch pointer to batch + * @param batno batch number + * @param buf pointer to batch array + * @param charbuf pointer to character batch array + * @return 1 on success, 0 on failure + */ +int ccp4_lwbat(MTZ *mtz, MTZBAT *batch, const int batno, const float *buf, const char *charbuf); + +int ccp4_lwbsetid(MTZ *mtz, MTZBAT *batch, const char xname[], const char dname[]); + +/* -- Below here there are no implementations -- */ + +/* COMPLEX HLToSF(float hla, float hlb, float hlc, float hld, BOOLEAN centric); */ +/* Returns the mean structure factor as a complex number from a structure + factor probability distribution described by Hendrickson/Lattman + coefficients. If `centric == TRUE`, the coefficients describe a centric + distribution. */ + +/* MTZ *MtzSort(MTZ *mtz, char *ident); */ +/* Sorts `mtz` using the identifiers (separated by spaces) in `ident` as + keys. Sorting can be done on up to 200 columns. A pointer to `*mtz` is + returned. */ + +/* MTZ *HLCombine (MTZ *to, float toscale, MTZ *frm, float frmscale); */ +/* Combines extra phase information for common reflections between 'frm' + and 'to' into the phase information of 'to'. The phase probabilities + are described by Hendrickson Lattman coefficients, with the identifiers + "HLA", "HLB", HLC", and "HLD", the indices are identified by "H", "K" + and "L". HL-coeffs from 'to' are scaled by 'toscale', the coeffs from + 'frm' are scaled by 'frmscale'. A pointer to `to` is returned. */ + +/* void MtzPhiFom(MTZ *mtz); */ +/* Calculates the best phase and the figure of from Hendrickson Lattman + coefficients. The following columns should be present in `mtz`: + "H", "K" & "L" (indices); "PHIB" & "FOM" (best phase (degrees) and figure of + merit); "HLA", "HLB", "HLC" & "HLD" (Hendrickson Lattman coefficients). */ + +/* MTZ *MtzCopy(MTZ *frm); */ +/* Produces an exact copy of `frm` and returns a pointer to it. */ + +/* MTZ *MtzColAppend(MTZ *mtz, char *ident, char type); */ +/* Appends a column to `*mtz` with identity `ident` and type `type`, provided + no column with identity `ident` exists. */ + +/* MTZ *MtzColRemove(MTZ *mtz, char *ident); */ +/* Removes a column from `*mtz` with identity `ident`. */ + +/* MTZ *MtzUpdateRanges(MTZ *mtz); */ +/* Updates ranges of all columns in `mtz` and returns `mtz`. */ + +/* MTZCOL *MtzColNewRange(MTZCOL *col, int nref); */ +/* Updates the minimum & maximum values in `col` and returns `col`. */ + +/* int *MtzUnique(MTZ *mtz, char *ident); */ +/* Returns an array (k) of indices: k[j] returns the first occurrence of a set + of idents, eg. MtzUnique(mtz, "H K L") returns an array from which all the + unique reflections can be determined by indexing with k: k[i] is the index + of the last relection of a set which all have the same hkl indices. It is + assumed that `mtz` is sorted, using `ident` as keys. */ + +/* float PhaseProb(float phase, float hla, float hlb, float hlc, float hld, + BOOLEAN centric); */ +/* Returns the probability of `phase` (expressed in radians) as determined by + the Hendrickson-Lattman coefficients `hla`, `hlb`, `hlc` and `hld`. If + `centric == TRUE`, the coefficients describe a centric distribution. */ + +#ifdef __cplusplus +} } +#endif +#endif diff --git a/ccp4c/ccp4/csymlib.c b/ccp4c/ccp4/csymlib.c new file mode 100644 index 00000000..76bc70bc --- /dev/null +++ b/ccp4c/ccp4/csymlib.c @@ -0,0 +1,2086 @@ +/* + csymlib.c: C-level library for symmetry information. + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/* DO NOT put Doxygen comments here - put in csymlib.h */ +/* See csymlib.h for descriptions of functions */ + +#include +#include +#include +#include +#include "ccp4_parser.h" +#include "ccp4_types.h" +#include "ccp4_utils.h" +#include "csymlib.h" +#include "cvecmat.h" +#include "ccp4_errno.h" +#include "ccp4_unitcell.h" +#include "ccp4_general.h" +/* rcsid[] = "$Id$" */ + +/* stuff for error reporting */ +#define CSYM_ERRNO(n) (CCP4_ERR_SYM | (n)) + +/* error defs */ +#define CSYMERR_Ok 0 +#define CSYMERR_ParserFail 1 +#define CSYMERR_NoSyminfoFile 2 +#define CSYMERR_NullSpacegroup 3 +#define CSYMERR_NoAsuDefined 4 +#define CSYMERR_NoLaueCodeDefined 5 +#define CSYMERR_SyminfoTokensMissing 6 + +/* copy of constants from fortran/csymlib_f.c */ +#define MAXSYMOPS 20 +#define MAXLENSYMOPSTR 80 + +CCP4SPG *ccp4spg_load_by_standard_num(const int numspg) +{ + return ccp4spg_load_spacegroup(numspg, 0, NULL, NULL, 0, NULL); +} + +CCP4SPG *ccp4spg_load_by_ccp4_num(const int ccp4numspg) +{ + return ccp4spg_load_spacegroup(0, ccp4numspg, NULL, NULL, 0, NULL); +} + +CCP4SPG *ccp4spg_load_by_spgname(const char *spgname) +{ + return ccp4spg_load_spacegroup(0, 0, spgname, NULL, 0, NULL); +} + +CCP4SPG *ccp4spg_load_by_ccp4_spgname(const char *ccp4spgname) +{ + return ccp4spg_load_spacegroup(0, 0, NULL, ccp4spgname, 0, NULL); +} + +CCP4SPG *ccp4_spgrp_reverse_lookup(const int nsym1, const ccp4_symop *op1) +{ + return ccp4spg_load_spacegroup(0, 0, NULL, NULL, nsym1, op1); +} + +CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg, + const char *spgname, const char *ccp4spgname, + const int nsym1, const ccp4_symop *op1) + +{ CCP4SPG *spacegroup; + int i,j,k,l,debug=0,nsym2,symops_provided=0,ierr,ilaue; + float sg_chb[4][4],limits[2],rot1[4][4],rot2[4][4],det; + FILE *filein; + char *symopfile, *ccp4dir, filerec[80]; + ccp4_symop *op2,*op3,opinv; + + /* spacegroup variables */ + int sg_num, sg_ccp4_num, sg_nsymp, sg_num_cent; + float cent_ops[4][4]; + char sg_symbol_old[20],sg_symbol_Hall[40],sg_symbol_xHM[20], + sg_point_group[20],sg_patt_group[40]; + char sg_basisop[80],sg_symop[192][80],sg_cenop[4][80]; + char sg_asu_descr[80], map_asu_x[12], map_asu_y[12], map_asu_z[12]; + char map_asu_ccp4_x[12], map_asu_ccp4_y[12], map_asu_ccp4_z[12]; + + /* For cparser */ + CCP4PARSERARRAY *parser; + CCP4PARSERTOKEN *token=NULL; + char *key; + int iprint=0; + + /* initialisations */ + sg_nsymp=0; + sg_num_cent=0; + + if (nsym1) symops_provided=1; + + spacegroup = (CCP4SPG *) ccp4_utils_malloc(sizeof(CCP4SPG)); + + if (debug) { + printf(" Entering ccp4spg_load_spacegroup, with arguments %d %d %d \n", + numspg,ccp4numspg,nsym1); + if (spgname) printf(" spgname = %s \n",spgname); + if (ccp4spgname) printf(" ccp4spgname = %s \n",ccp4spgname); + for (i = 0; i < nsym1; ++i) { + printf(" %f %f %f \n",op1[i].rot[0][0],op1[i].rot[0][1],op1[i].rot[0][2]); + printf(" %f %f %f \n",op1[i].rot[1][0],op1[i].rot[1][1],op1[i].rot[1][2]); + printf(" %f %f %f \n",op1[i].rot[2][0],op1[i].rot[2][1],op1[i].rot[2][2]); + printf(" %f %f %f \n\n",op1[i].trn[0],op1[i].trn[1],op1[i].trn[2]); + } + } + + /* if we are searching with symops, make sure translations are modulo 1 */ + if (symops_provided) { + op3 = (ccp4_symop *) ccp4_utils_malloc(nsym1*sizeof(ccp4_symop)); + for (i = 0; i < nsym1; ++i) { + for (k = 0; k < 3; ++k) { + for (l = 0; l < 3; ++l) { + op3[i].rot[k][l]=op1[i].rot[k][l]; + } + op3[i].trn[k] = op1[i].trn[k]; + } + ccp4spg_norm_trans(&op3[i]); + } + } + + /* Open the symop file: */ + if (!(symopfile = getenv("SYMINFO"))) { + if (debug) + printf("Environment variable SYMINFO not set ... guessing location of symmetry file. \n"); + if (!(ccp4dir = getenv("CLIBD"))) { + printf("Environment variable CLIBD not set ... big trouble! \n"); + return NULL; + } + + symopfile = ccp4_utils_malloc((strlen(ccp4dir)+22)*sizeof(char)); + strcpy(symopfile,ccp4_utils_joinfilenames(ccp4dir,"syminfo.lib")); + symopfile[strlen(ccp4dir)+21] = '\0'; + ccp4printf(1," SYMINFO file set to %s \n",symopfile); + } else { + if (debug) { + ccp4printf(1,"\n Spacegroup information obtained from library file: \n"); + ccp4printf(1," Logical Name: SYMINFO Filename: %s\n\n",symopfile); + } + } + + filein = fopen(symopfile,"r"); + if (!filein) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NoSyminfoFile),"ccp4spg_load_spacegroup",NULL); + return NULL; + } + + if (!(getenv("SYMINFO"))) free(symopfile); + + parser = ccp4_parse_start(20); + if (parser == NULL) + ccp4_signal(CSYM_ERRNO(CSYMERR_ParserFail),"ccp4spg_load_spacegroup",NULL); + /* "=" is used in map asu fields, so remove it as delimiter */ + ccp4_parse_delimiters(parser," \t,",","); + /* Set some convenient pointers to members of the parser array */ + key = parser->keyword; + token = parser->token; + + if (debug) + printf(" parser initialised \n"); + + while (fgets(filerec,80,filein)) { + + /* If syminfo.lib comes from a DOS platform, and we are on + unix, need to strip spurious \r character. Note this is + necessary because we have removed \r as parser delimiter. */ + if (strlen(filerec) > 1){ + if (filerec[strlen(filerec)-2]=='\r') { + filerec[strlen(filerec)-2]='\n'; + filerec[strlen(filerec)-1]='\0'; + } + } + + if (strlen(filerec) > 1) { + + ccp4_parser(filerec, 80, parser, iprint); + + if (ccp4_keymatch(key, "number")) { + if (parser->ntokens < 2) { + printf("Current SYMINFO line = %s\n",filerec); + ccp4_signal(CCP4_ERRLEVEL(2) | CSYM_ERRNO(CSYMERR_SyminfoTokensMissing),"ccp4spg_load_spacegroup",NULL); + } else { + sg_num = (int) token[1].value; + } + } + + if (ccp4_keymatch(key, "basisop")) { + strcpy(sg_basisop,filerec+8); + } + + if (ccp4_keymatch(key, "symbol")) { + if (parser->ntokens < 3) { + printf("Current SYMINFO line = %s\n",filerec); + ccp4_signal(CCP4_ERRLEVEL(2) | CSYM_ERRNO(CSYMERR_SyminfoTokensMissing),"ccp4spg_load_spacegroup",NULL); + } else { + if (strcmp(token[1].fullstring,"ccp4") == 0) + sg_ccp4_num = (int) token[2].value; + if (strcmp(token[1].fullstring,"Hall") == 0) + strcpy(sg_symbol_Hall,token[2].fullstring); + if (strcmp(token[1].fullstring,"xHM") == 0) + strcpy(sg_symbol_xHM,token[2].fullstring); + if (strcmp(token[1].fullstring,"old") == 0) + strcpy(sg_symbol_old,token[2].fullstring); + if (strcmp(token[1].fullstring,"patt") == 0) + strcpy(sg_patt_group,token[3].fullstring); + if (strcmp(token[1].fullstring,"pgrp") == 0) + strcpy(sg_point_group,token[3].fullstring); + } + } + + if (ccp4_keymatch(key, "hklasu")) { + if (parser->ntokens < 3) { + printf("Current SYMINFO line = %s\n",filerec); + ccp4_signal(CCP4_ERRLEVEL(2) | CSYM_ERRNO(CSYMERR_SyminfoTokensMissing),"ccp4spg_load_spacegroup",NULL); + } else { + if (strcmp(token[1].fullstring,"ccp4") == 0) + strcpy(sg_asu_descr,token[2].fullstring); + } + } + + if (ccp4_keymatch(key, "mapasu")) { + if (parser->ntokens < 5) { + printf("Current SYMINFO line = %s\n",filerec); + ccp4_signal(CCP4_ERRLEVEL(2) | CSYM_ERRNO(CSYMERR_SyminfoTokensMissing),"ccp4spg_load_spacegroup",NULL); + } else { + if (strcmp(token[1].fullstring,"zero") == 0) { + strcpy(map_asu_x,token[2].fullstring); + strcpy(map_asu_y,token[3].fullstring); + strcpy(map_asu_z,token[4].fullstring); + } else if (strcmp(token[1].fullstring,"ccp4") == 0) { + strcpy(map_asu_ccp4_x,token[2].fullstring); + strcpy(map_asu_ccp4_y,token[3].fullstring); + strcpy(map_asu_ccp4_z,token[4].fullstring); + } + } + } + + if (ccp4_keymatch(key, "symop")) { + strcpy(sg_symop[sg_nsymp++],filerec+6); + } + + if (ccp4_keymatch(key, "cenop")) { + strcpy(sg_cenop[sg_num_cent++],filerec+6); + } + + if (ccp4_keymatch(key, "end_spacegroup")) { + /* end of spacegroup block, so check if right one */ + if (numspg) { + if (sg_num == numspg) + break; + } else if (ccp4numspg) { + if (sg_ccp4_num == ccp4numspg) + break; + } else if (spgname) { + if (ccp4spg_name_equal_to_lib(sg_symbol_xHM,spgname)) + break; + } else if (ccp4spgname) { + if (ccp4spg_name_equal_to_lib(sg_symbol_old,ccp4spgname)) + break; + if (ccp4spg_name_equal_to_lib(sg_symbol_xHM,ccp4spgname)) + break; + } else if (symops_provided) { + nsym2 = sg_nsymp*sg_num_cent; + if (nsym2 == nsym1) { + op2 = (ccp4_symop *) ccp4_utils_malloc(nsym2*sizeof(ccp4_symop)); + for (i = 0; i < sg_num_cent; ++i) { + symop_to_mat4(sg_cenop[i],sg_cenop[i]+strlen(sg_cenop[i]),cent_ops[0]); + for (j = 0; j < sg_nsymp; ++j) { + symop_to_mat4(sg_symop[j],sg_symop[j]+strlen(sg_symop[j]),rot2[0]); + ccp4_4matmul(rot1,(const float (*)[4])cent_ops,(const float (*)[4])rot2); + op2[i*sg_nsymp+j] = mat4_to_rotandtrn((const float (*)[4])rot1); + /* combination of primitive and centering operators can + produce translations greater than one. */ + ccp4spg_norm_trans(&op2[i*sg_nsymp+j]); + } + } + /* op3 are requested operators and op2 are from SYMINFO file */ + if (ccp4_spgrp_equal(nsym1,op3,nsym2,op2)) { + if (debug) printf(" ops match for sg %d ! \n",sg_num); + free(op2); + break; + } + free(op2); + } + } + sg_nsymp = 0; + sg_num_cent = 0; + sg_symbol_xHM[0]='\0'; + sg_symbol_old[0]='\0'; + } + } + } + if (symops_provided) free(op3); + + if (debug) + printf(" parser finished \n"); + + /* Finished with the parser array */ + ccp4_parse_end(parser); + fclose(filein); + + if (!sg_nsymp) { + ccp4printf(0," Failed to find spacegroup in SYMINFO! \n"); + return NULL; + } + + /* extract various symbols for spacegroup */ + spacegroup->spg_num = sg_num; + spacegroup->spg_ccp4_num = sg_ccp4_num; + strcpy(spacegroup->symbol_Hall,sg_symbol_Hall); + strcpy(spacegroup->symbol_xHM,sg_symbol_xHM); + strcpy(spacegroup->symbol_old,sg_symbol_old); + strcpy(spacegroup->point_group,"PG"); + strcpy(spacegroup->point_group+2,sg_point_group); + if (sg_num <= 2) { + strcpy(spacegroup->crystal,"TRICLINIC"); + } else if (sg_num >= 3 && sg_num <= 15) { + strcpy(spacegroup->crystal,"MONOCLINIC"); + } else if (sg_num >= 16 && sg_num <= 74) { + strcpy(spacegroup->crystal,"ORTHORHOMBIC"); + } else if (sg_num >= 75 && sg_num <= 142) { + strcpy(spacegroup->crystal,"TETRAGONAL"); + } else if (sg_num >= 143 && sg_num <= 167) { + strcpy(spacegroup->crystal,"TRIGONAL"); + } else if (sg_num >= 168 && sg_num <= 194) { + strcpy(spacegroup->crystal,"HEXAGONAL"); + } else if (sg_num >= 195 && sg_num <= 230) { + strcpy(spacegroup->crystal,"CUBIC"); + } else { + strcpy(spacegroup->crystal," "); + } + + if (debug) + printf(" Read in details of spacegroup %d %d \n",sg_num,sg_ccp4_num); + + /* change of basis */ + if (debug) + printf(" Change of basis %s \n",sg_basisop); + symop_to_mat4(sg_basisop,sg_basisop+strlen(sg_basisop),sg_chb[0]); + for (i = 0; i < 3; ++i) { + for (j = 0; j < 3; ++j) { + spacegroup->chb[i][j] = sg_chb[i][j]; + } + } + if (debug) + for (k = 0; k < 3; ++k) + printf("chb: %f %f %f\n",spacegroup->chb[k][0], + spacegroup->chb[k][1],spacegroup->chb[k][2]); + + /* symmetry operators */ + spacegroup->nsymop_prim = sg_nsymp; + spacegroup->nsymop = sg_nsymp*sg_num_cent; + spacegroup->symop = (ccp4_symop *) ccp4_utils_malloc(spacegroup->nsymop*sizeof(ccp4_symop)); + spacegroup->invsymop = (ccp4_symop *) ccp4_utils_malloc(spacegroup->nsymop*sizeof(ccp4_symop)); + if (symops_provided) { + for (i = 0; i < nsym1; ++i) { + opinv = ccp4_symop_invert(op1[i]); + for (k = 0; k < 3; ++k) { + for (l = 0; l < 3; ++l) { + spacegroup->symop[i].rot[k][l]=op1[i].rot[k][l]; + spacegroup->invsymop[i].rot[k][l]=opinv.rot[k][l]; + } + spacegroup->symop[i].trn[k] = op1[i].trn[k]; + spacegroup->invsymop[i].trn[k] = opinv.trn[k]; + } + } + } else { + for (i = 0; i < sg_num_cent; ++i) { + symop_to_mat4(sg_cenop[i],sg_cenop[i]+strlen(sg_cenop[i]),cent_ops[0]); + for (j = 0; j < sg_nsymp; ++j) { + strncpy(filerec,sg_symop[j],80); /* symop_to_mat4 overwrites later sg_symop */ + symop_to_mat4(filerec,filerec+strlen(filerec),rot2[0]); + ccp4_4matmul(rot1,(const float (*)[4])cent_ops,(const float (*)[4])rot2); + det=invert4matrix((const float (*)[4])rot1,rot2); + if (debug) printf("symop determinant: %f\n",det); + for (k = 0; k < 3; ++k) { + for (l = 0; l < 3; ++l) { + spacegroup->symop[i*sg_nsymp+j].rot[k][l]=rot1[k][l]; + spacegroup->invsymop[i*sg_nsymp+j].rot[k][l]=rot2[k][l]; + } + spacegroup->symop[i*sg_nsymp+j].trn[k] = rot1[k][3]; + spacegroup->invsymop[i*sg_nsymp+j].trn[k] = rot2[k][3]; + } + /* unless symops have been provided, store normalised operators */ + ccp4spg_norm_trans(&spacegroup->symop[i*sg_nsymp+j]); + ccp4spg_norm_trans(&spacegroup->invsymop[i*sg_nsymp+j]); + } + } + } + if (debug) + for (i = 0; i < sg_num_cent; ++i) + for (j = 0; j < sg_nsymp; ++j) { + for (k = 0; k < 3; ++k) + printf("rot/trn: %f %f %f %f\n",spacegroup->symop[i*sg_nsymp+j].rot[k][0], + spacegroup->symop[i*sg_nsymp+j].rot[k][1], + spacegroup->symop[i*sg_nsymp+j].rot[k][2], + spacegroup->symop[i*sg_nsymp+j].trn[k]); + for (k = 0; k < 3; ++k) + printf("inv rot/trn: %f %f %f %f\n",spacegroup->invsymop[i*sg_nsymp+j].rot[k][0], + spacegroup->invsymop[i*sg_nsymp+j].rot[k][1], + spacegroup->invsymop[i*sg_nsymp+j].rot[k][2], + spacegroup->invsymop[i*sg_nsymp+j].trn[k]); + } + + /* reciprocal asymmetric unit */ + strcpy(spacegroup->asu_descr,sg_asu_descr); + + /* Select ASU function (referred to default basis) from asu desc */ + /* Also infer Laue and Patterson groups. This uses additional + information from spacegroup name. In general, we use Hall symbol + because syminfo.lib is missing a few xHM symbols. However, we + need to use the latter for R vs. H settings. */ + ierr = 1; + ilaue = 1; + + if ( strcmp( sg_asu_descr, "l>0 or (l==0 and (h>0 or (h==0 and k>=0)))" ) == 0 ) { + spacegroup->asufn = &ASU_1b; + ilaue = ccp4spg_load_laue(spacegroup,3); + spacegroup->npatt = 2; + strcpy(spacegroup->patt_name,"P-1"); + ierr = 0; + } + if ( strcmp( sg_asu_descr, "k>=0 and (l>0 or (l=0 and h>=0))" ) == 0 ) { + spacegroup->asufn = &ASU_2_m; + ilaue = ccp4spg_load_laue(spacegroup,4); + if (strchr(spacegroup->symbol_Hall,'P')) { + spacegroup->npatt = 10; + strcpy(spacegroup->patt_name,"P2/m"); + } else if (strchr(spacegroup->symbol_Hall,'C')) { + spacegroup->npatt = 12; + strcpy(spacegroup->patt_name,"C2/m"); + } + ierr = 0; + } + if ( strcmp( sg_asu_descr, "h>=0 and k>=0 and l>=0" ) == 0 ) { + spacegroup->asufn = &ASU_mmm; + ilaue = ccp4spg_load_laue(spacegroup,6); + if (strchr(spacegroup->symbol_Hall,'P')) { + spacegroup->npatt = 47; + strcpy(spacegroup->patt_name,"Pmmm"); + } else if (strchr(spacegroup->symbol_Hall,'C')) { + spacegroup->npatt = 65; + strcpy(spacegroup->patt_name,"Cmmm"); + } else if (strchr(spacegroup->symbol_Hall,'I')) { + spacegroup->npatt = 71; + strcpy(spacegroup->patt_name,"Immm"); + } else if (strchr(spacegroup->symbol_Hall,'F')) { + spacegroup->npatt = 69; + strcpy(spacegroup->patt_name,"Fmmm"); + } + ierr = 0; + } + if ( strcmp( sg_asu_descr, "l>=0 and ((h>=0 and k>0) or (h=0 and k=0))" ) == 0 && + strcmp( sg_patt_group, "4/m" ) == 0 ) { + spacegroup->asufn = &ASU_4_m; + ilaue = ccp4spg_load_laue(spacegroup,7); + spacegroup->nlaue = 7; + strcpy(spacegroup->laue_name,"4/m"); + spacegroup->laue_sampling[0] = 4; + spacegroup->laue_sampling[1] = 4; + spacegroup->laue_sampling[2] = 8; + if (strchr(spacegroup->symbol_Hall,'P')) { + spacegroup->npatt = 83; + strcpy(spacegroup->patt_name,"P4/m"); + } else if (strchr(spacegroup->symbol_Hall,'I')) { + spacegroup->npatt = 87; + strcpy(spacegroup->patt_name,"I4/m"); + } + ierr = 0; + } + if ( strcmp( sg_asu_descr, "h>=k and k>=0 and l>=0" ) == 0 && + strcmp( sg_patt_group, "4/mmm" ) == 0 ) { + spacegroup->asufn = &ASU_4_mmm; + ilaue = ccp4spg_load_laue(spacegroup,8); + if (strchr(spacegroup->symbol_Hall,'P')) { + spacegroup->npatt = 123; + strcpy(spacegroup->patt_name,"P4/mmm"); + } else if (strchr(spacegroup->symbol_Hall,'I')) { + spacegroup->npatt = 139; + strcpy(spacegroup->patt_name,"I4/mmm"); + } + ierr = 0; + } + if ( strcmp( sg_asu_descr, "(h>=0 and k>0) or (h=0 and k=0 and l>=0)" ) == 0 ) { + spacegroup->asufn = &ASU_3b; + ilaue = ccp4spg_load_laue(spacegroup,9); + if (strchr(spacegroup->symbol_Hall,'P')) { + spacegroup->npatt = 147; + strcpy(spacegroup->patt_name,"P-3"); + } else if (strchr(spacegroup->symbol_xHM,'H')) { + /* this is special case, as Hall doesn't specify H */ + spacegroup->npatt = 148; + strcpy(spacegroup->patt_name,"H-3"); + } else if (strchr(spacegroup->symbol_Hall,'R')) { + spacegroup->npatt = 1148; + strcpy(spacegroup->patt_name,"R-3"); + } + ierr = 0; + } + if ( strcmp( sg_asu_descr, "h>=k and k>=0 and (k>0 or l>=0)" ) == 0 ) { + spacegroup->asufn = &ASU_3bm; + ilaue = ccp4spg_load_laue(spacegroup,10); + spacegroup->npatt = 162; + strcpy(spacegroup->patt_name,"P-31m"); + ierr = 0; + } + if ( strcmp( sg_asu_descr, "h>=k and k>=0 and (h>k or l>=0)" ) == 0 ) { + spacegroup->asufn = &ASU_3bmx; + ilaue = ccp4spg_load_laue(spacegroup,11); + if (strchr(spacegroup->symbol_Hall,'P')) { + spacegroup->npatt = 164; + strcpy(spacegroup->patt_name,"P-3m1"); + } else if (strchr(spacegroup->symbol_xHM,'H')) { + /* this is special case, as Hall doesn't specify H */ + spacegroup->npatt = 166; + strcpy(spacegroup->patt_name,"H-3m"); + } else if (strchr(spacegroup->symbol_Hall,'R')) { + spacegroup->npatt = 1166; + strcpy(spacegroup->patt_name,"R-3m"); + } + ierr = 0; + } + if ( strcmp( sg_asu_descr, "l>=0 and ((h>=0 and k>0) or (h=0 and k=0))" ) == 0 && + strcmp( sg_patt_group, "6/m" ) == 0 ) { + spacegroup->asufn = &ASU_6_m; + ilaue = ccp4spg_load_laue(spacegroup,12); + spacegroup->npatt = 175; + strcpy(spacegroup->patt_name,"P6/m"); + ierr = 0; + } + if ( strcmp( sg_asu_descr, "h>=k and k>=0 and l>=0" ) == 0 && + strcmp( sg_patt_group, "6/mmm" ) == 0 ) { + spacegroup->asufn = &ASU_6_mmm; + ilaue = ccp4spg_load_laue(spacegroup,13); + spacegroup->nlaue = 13; + strcpy(spacegroup->laue_name,"6/mmm"); + spacegroup->laue_sampling[0] = 6; + spacegroup->laue_sampling[1] = 6; + spacegroup->laue_sampling[2] = 12; + spacegroup->npatt = 191; + strcpy(spacegroup->patt_name,"P6/mmm"); + ierr = 0; + } + if ( strcmp( sg_asu_descr, "h>=0 and ((l>=h and k>h) or (l=h and k=h))" ) == 0 ) { + spacegroup->asufn = &ASU_m3b; + ilaue = ccp4spg_load_laue(spacegroup,14); + if (strchr(spacegroup->symbol_Hall,'P')) { + spacegroup->npatt = 200; + strcpy(spacegroup->patt_name,"Pm-3"); + } else if (strchr(spacegroup->symbol_Hall,'I')) { + spacegroup->npatt = 204; + strcpy(spacegroup->patt_name,"Im-3"); + } else if (strchr(spacegroup->symbol_Hall,'F')) { + spacegroup->npatt = 202; + strcpy(spacegroup->patt_name,"Fm-3"); + } + ierr = 0; + } + if ( strcmp( sg_asu_descr, "k>=l and l>=h and h>=0" ) == 0 ) { + spacegroup->asufn = &ASU_m3bm; + ilaue = ccp4spg_load_laue(spacegroup,15); + if (strchr(spacegroup->symbol_Hall,'P')) { + spacegroup->npatt = 221; + strcpy(spacegroup->patt_name,"Pm-3m"); + } else if (strchr(spacegroup->symbol_Hall,'I')) { + spacegroup->npatt = 229; + strcpy(spacegroup->patt_name,"Im-3m"); + } else if (strchr(spacegroup->symbol_Hall,'F')) { + spacegroup->npatt = 225; + strcpy(spacegroup->patt_name,"Fm-3m"); + } + ierr = 0; + } + + /* Raise an error if failed to match the ASU description */ + if (ierr) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NoAsuDefined),"ccp4spg_load_spacegroup",NULL); + if (spacegroup) free(spacegroup); + return NULL; + } + + /* Raise an error if failed to match the Laue code */ + if (ilaue) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NoLaueCodeDefined),"ccp4spg_load_spacegroup",NULL); + if (spacegroup) free(spacegroup); + return NULL; + } + + /* real asymmetric unit */ + /* origin-based choice */ + sprintf(spacegroup->mapasu_zero_descr,"%s %s %s",map_asu_x,map_asu_y,map_asu_z); + range_to_limits(map_asu_x, limits); + spacegroup->mapasu_zero[0] = limits[1]; + range_to_limits(map_asu_y, limits); + spacegroup->mapasu_zero[1] = limits[1]; + range_to_limits(map_asu_z, limits); + spacegroup->mapasu_zero[2] = limits[1]; + /* CCP4 choice a la SETLIM - defaults to origin-based choice */ + range_to_limits(map_asu_ccp4_x, limits); + if (limits[1] > 0) { + sprintf(spacegroup->mapasu_ccp4_descr,"%s %s %s",map_asu_ccp4_x,map_asu_ccp4_y,map_asu_ccp4_z); + spacegroup->mapasu_ccp4[0] = limits[1]; + range_to_limits(map_asu_ccp4_y, limits); + spacegroup->mapasu_ccp4[1] = limits[1]; + range_to_limits(map_asu_ccp4_z, limits); + spacegroup->mapasu_ccp4[2] = limits[1]; + } else { + strcpy(spacegroup->mapasu_ccp4_descr,spacegroup->mapasu_zero_descr); + spacegroup->mapasu_ccp4[0] = spacegroup->mapasu_zero[0]; + spacegroup->mapasu_ccp4[1] = spacegroup->mapasu_zero[1]; + spacegroup->mapasu_ccp4[2] = spacegroup->mapasu_zero[2]; + } + if (debug) { + printf(" mapasu limits %f %f %f \n",spacegroup->mapasu_zero[0], + spacegroup->mapasu_zero[1],spacegroup->mapasu_zero[2]); + printf(" CCP4 mapasu limits %f %f %f \n",spacegroup->mapasu_ccp4[0], + spacegroup->mapasu_ccp4[1],spacegroup->mapasu_ccp4[2]); + } + + /* set up centric and epsilon zones for this spacegroup */ + ccp4spg_set_centric_zones(spacegroup); + ccp4spg_set_epsilon_zones(spacegroup); + + if (debug) + printf(" Leaving ccp4spg_load_spacegroup \n"); + + return spacegroup; +} + + +/* symfr_driver + + Convert one or more symop description strings into 4x4 matrix + representations via multiple calls to symop_to_mat4. + + "line" is a string containing one or more symop description + strings to be translated into matrix representations. + Multiple symmetry operations can be specified in a single + input line, and must be separated by * (with spaces either + side). + "rot" is an array of 4x4 matrices in which the symops are + returned. + + On success, symfr returns the number of symops translated and + stored; on failure -1 is returned. + + See comments for SYMFR2 for description of the symop formats. +*/ +int symfr_driver (const char *line, float rot[MAXSYMOPS][4][4]) +{ + CCP4PARSERARRAY *symops=NULL; + int i,j,k,got_symop=0; + int ns=0,nsym=0,maxsymops=MAXSYMOPS; + char *symop=NULL,symopbuf[MAXLENSYMOPSTR]; + float tmp_rot[4][4]; + + //CSYMLIB_DEBUG(puts("CSYMLIB: symfr_driver");) + + /* Set up a parser structure to break the line up into + individual symop strings */ + if ((symops = ccp4_parse_start(maxsymops)) == NULL) { + /* Couldn't set up a parser structure - abort */ + printf(" symfr_driver: failed to set up parser structure for reading symops.\n"); + return -1; + } + + /* Tokenise the line, splitting on spaces */ + ccp4_parse_delimiters(symops," ",""); + if ((ns = ccp4_parse(line,symops)) > 0) { + + /* Initialise */ + got_symop = 0; + symopbuf[0] = '\0'; + + /* Loop over tokens and reconstruct symop strings */ + for (i=0; itoken[i].fullstring; + + /* If there are multiple symop strings then these + will be delimited by asterisks */ + if (strlen(symop) == 1 && symop[0] == '*') { + /* End of symop */ + got_symop = 1; + } else { + /* Append token to symop */ + if (strlen(symopbuf)+strlen(symop)+1 <= MAXLENSYMOPSTR) { + strcat(symopbuf,symop); + } else { + /* Error - symop string is too long */ + printf("SYMFR: symmetry operator string is too long!\n"); + if (symops) ccp4_parse_end(symops); + return -1; + } + /* Check if this is the last token, in which case + flag it to be processed */ + if ((i+1)==ns) got_symop = 1; + } + + /* Process a complete symop */ + if (got_symop && strlen(symopbuf) > 0) { + /* Translate */ + if (!symop_to_mat4(&(symopbuf[0]),&(symopbuf[0])+strlen(symopbuf),tmp_rot[0])) { + /* Error */ + if (symops) ccp4_parse_end(symops); + return -1; + } + /* Load result into the appropriate array location */ + for (j = 0; j < 4; ++j) + for (k = 0; k < 4; ++k) + rot[nsym][j][k] = tmp_rot[j][k]; + nsym++; + /* Reset for next symop */ + got_symop = 0; + symopbuf[0] = '\0'; + } + } + } + + /* Tidy up and return the number of symops */ + if (symops) ccp4_parse_end(symops); + return nsym; +} + +void ccp4spg_free(CCP4SPG **sp) { + free ((*sp)->symop); + free ((*sp)->invsymop); + free (*sp); + *sp=NULL; +} + +int ccp4_spg_get_centering(const char *symbol_Hall, float cent_ops[4][3]) +{ + int debug=0; + int i,j; + + for (i = 0; i < 4; ++i) + for (j = 0; j < 3; ++j) + cent_ops[i][j] = 0.0; + + if (strchr(symbol_Hall,'P')) { + if (debug) printf("Primitive \n"); + return 1; + } else if (strchr(symbol_Hall,'A')) { + if (debug) printf("A centering \n"); + cent_ops[1][1] = 0.5; + cent_ops[1][2] = 0.5; + return 2; + } else if (strchr(symbol_Hall,'B')) { + if (debug) printf("B centering \n"); + cent_ops[1][0] = 0.5; + cent_ops[1][2] = 0.5; + return 2; + } else if (strchr(symbol_Hall,'C')) { + if (debug) printf("C centering \n"); + cent_ops[1][0] = 0.5; + cent_ops[1][1] = 0.5; + return 2; + } else if (strchr(symbol_Hall,'F')) { + if (debug) printf("F centering \n"); + cent_ops[1][1] = 0.5; + cent_ops[1][2] = 0.5; + cent_ops[2][0] = 0.5; + cent_ops[2][2] = 0.5; + cent_ops[3][0] = 0.5; + cent_ops[3][1] = 0.5; + return 4; + } else if (strchr(symbol_Hall,'I')) { + if (debug) printf("I centering \n"); + cent_ops[1][0] = 0.5; + cent_ops[1][1] = 0.5; + cent_ops[1][2] = 0.5; + return 2; + } else if (strchr(symbol_Hall,'H')) { + /* fixme: Hall doesn't specify H, whereas xHM does */ + if (debug) printf("H centering \n"); + cent_ops[1][0] = 2.0/3.0; + cent_ops[1][1] = 1.0/3.0; + cent_ops[1][2] = 1.0/3.0; + cent_ops[2][0] = 1.0/3.0; + cent_ops[2][1] = 2.0/3.0; + cent_ops[2][2] = 2.0/3.0; + return 3; + } else if (strchr(symbol_Hall,'R')) { + if (debug) printf("R centering \n"); + return 1; + } + return 0; +} + +/* standard asu tests for 11 Laue classes */ + +int ASU_1b (const int h, const int k, const int l) + { return (l>0 || (l==0 && (h>0 || (h==0 && k>=0)))); } +int ASU_2_m (const int h, const int k, const int l) + { return (k>=0 && (l>0 || (l==0 && h>=0))); } +int ASU_mmm (const int h, const int k, const int l) + { return (h>=0 && k>=0 && l>=0); } +int ASU_4_m (const int h, const int k, const int l) + { return (l>=0 && ((h>=0 && k>0) || (h==0 && k==0))); } +int ASU_4_mmm(const int h, const int k, const int l) + { return (h>=k && k>=0 && l>=0); } +int ASU_3b (const int h, const int k, const int l) + { return (h>=0 && k>0) || (h==0 && k==0 && l >= 0); } +int ASU_3bm (const int h, const int k, const int l) + { return (h>=k && k>=0 && (k>0 || l>=0)); } +int ASU_3bmx (const int h, const int k, const int l) + { return (h>=k && k>=0 && (h>k || l>=0)); } +int ASU_6_m (const int h, const int k, const int l) + { return (l>=0 && ((h>=0 && k>0) || (h==0 && k==0))); } +int ASU_6_mmm(const int h, const int k, const int l) + { return (h>=k && k>=0 && l>=0); } +int ASU_m3b (const int h, const int k, const int l) + { return (h>=0 && ((l>=h && k>h) || (l==h && k==h))); } +int ASU_m3bm (const int h, const int k, const int l) + { return (h>=0 && k>=l && l>=h); } + +char *ccp4spg_symbol_Hall(CCP4SPG* sp) { + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_symbol_Hall",NULL); + return NULL; + } + return sp->symbol_Hall; +} + +ccp4_symop ccp4_symop_invert( const ccp4_symop op1 ) +{ + float rot1[4][4],rot2[4][4]; + + rotandtrn_to_mat4(rot1,op1); + invert4matrix((const float (*)[4])rot1,rot2); + return (mat4_to_rotandtrn((const float (*)[4])rot2)); +} + +int ccp4spg_name_equal(const char *spgname1, const char *spgname2) { + + char *ch1, *ch2, *spgname1_upper, *spgname2_upper; + + /* create copies of input strings, and convert to upper case */ + spgname1_upper = strdup(spgname1); + strtoupper(spgname1_upper,spgname1); + spgname2_upper = strdup(spgname2); + strtoupper(spgname2_upper,spgname2); + + ch1 = spgname1_upper; + ch2 = spgname2_upper; + while (*ch1 == *ch2) { + if (*ch1 == '\0' && *ch2 == '\0') { + free(spgname1_upper); + free(spgname2_upper); + return 1; + } + ++ch1; + ++ch2; + } + free(spgname1_upper); + free(spgname2_upper); + return 0; +} + +int ccp4spg_name_equal_to_lib(const char *spgname_lib, const char *spgname_match) { + + char *ch1, *ch2, *spgname1_upper, *spgname2_upper, *tmpstr; + int have_one_1=0, have_one_2=0; + + /* create copies of input strings, convert to upper case, and + deal with colons */ + spgname1_upper = strdup(spgname_lib); + strtoupper(spgname1_upper,spgname_lib); + ccp4spg_name_de_colon(spgname1_upper); + spgname2_upper = strdup(spgname_match); + strtoupper(spgname2_upper,spgname_match); + ccp4spg_name_de_colon(spgname2_upper); + + /* see if strings are equal, except for spaces */ + ch1 = spgname1_upper; + ch2 = spgname2_upper; + while (*ch1 == *ch2) { + if (*ch1 == '\0' && *ch2 == '\0') { + free(spgname1_upper); + free(spgname2_upper); + return 1; + } + while (*(++ch1) == ' ') ; + while (*(++ch2) == ' ') ; + } + + /* if that didn't work, and spgname_match is a short name, try removing + " 1 " from spgname_lib, and matching again. This would match P21 to + 'P 1 21 1' for instance. */ + + /* try to identify if "short names" are being used. */ + if (strstr(spgname1_upper," 1 ")) have_one_1 = 1; + if (strstr(spgname2_upper," 1 ")) have_one_2 = 1; + /* if spgname_lib has " 1 " and spgname_match doesn't, then strip + out " 1" to do "short" comparison */ + if (have_one_1 && ! have_one_2) { + tmpstr = strdup(spgname1_upper); + ccp4spg_to_shortname(tmpstr,spgname1_upper); + strcpy(spgname1_upper,tmpstr); + free(tmpstr); + } + + /* see if strings are equal, except for spaces */ + ch1 = spgname1_upper; + ch2 = spgname2_upper; + while (*ch1 == *ch2) { + if (*ch1 == '\0' && *ch2 == '\0') { + free(spgname1_upper); + free(spgname2_upper); + return 1; + } + while (*(++ch1) == ' ') ; + while (*(++ch2) == ' ') ; + } + + free(spgname1_upper); + free(spgname2_upper); + return 0; +} + +char *ccp4spg_to_shortname(char *shortname, const char *longname) { + + const char *ch1; + char *ch2; + int trigonal=0; + + ch1 = longname; + ch2 = shortname; + + /* "P 1" is an exception */ + if (!strcmp(ch1,"P 1")) { + strcpy(ch2,"P1"); + return ch2; + } + + /* trigonal are another exception, don't want to lose significant " 1" */ + if (!strncmp(ch1,"P 3",3) || !strncmp(ch1,"P -3",4) || !strncmp(ch1,"R 3",3) || !strncmp(ch1,"R -3",4)) trigonal=1; + + while (*ch1 != '\0') { + if (!trigonal && !strncmp(ch1," 1",2)) { + ch1 += 2; + } else { + /* take out blanks - note check for " 1" takes precedence */ + while (*ch1 == ' ') ++ch1; + if (*ch1 != '\0') { *ch2 = *ch1; ++ch2; ++ch1; } + } + } + *ch2 = '\0'; + return ch2; +} + +void ccp4spg_name_de_colon(char *name) { + + char *ch1; + + /* various spacegroup names have settings specified by colon. We'll + deal with these on a case-by-case basis. */ + if ((ch1 = strstr(name,":R")) != NULL) { + /* :R spacegroup should be R already so just replace with blanks */ + *ch1 = ' '; + *(ch1+1) = ' '; + } else if ((ch1 = strstr(name,":H")) != NULL) { + /* :H spacegroup should be R so change to H */ + *ch1 = ' '; + *(ch1+1) = ' '; + ch1 = strstr(name,"R"); + if (ch1 != NULL) *ch1 = 'H'; + } + + return; +} + +int ccp4spg_pgname_equal(const char *pgname1, const char *pgname2) { + + char *ch1, *ch2, *pgname1_upper, *pgname2_upper; + + pgname1_upper = strdup(pgname1); + strtoupper(pgname1_upper,pgname1); + pgname2_upper = strdup(pgname2); + strtoupper(pgname2_upper,pgname2); + + ch1 = pgname1_upper; + if (pgname1_upper[0] == 'P' && pgname1_upper[1] == 'G') ch1 += 2; + ch2 = pgname2_upper; + if (pgname2_upper[0] == 'P' && pgname2_upper[1] == 'G') ch2 += 2; + while (*ch1 == *ch2) { + if (*ch1 == '\0' && *ch2 == '\0') { + free(pgname1_upper); + free(pgname2_upper); + return 1; + } + while (*(++ch1) == ' ') ; + while (*(++ch2) == ' ') ; + } + free(pgname1_upper); + free(pgname2_upper); + return 0; +} + +ccp4_symop *ccp4spg_norm_trans(ccp4_symop *op) { + + int i; + + for ( i = 0; i < 3; i++ ) { + while (op->trn[i] < 0.0) op->trn[i] += 1.0; + while (op->trn[i] >= 1.0) op->trn[i] -= 1.0; + } + + return op; +} + +int ccp4_spgrp_equal( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2 ) +{ + int i, n; + int *symcode1, *symcode2; + + /* first check that we have equal number of symops */ + if ( nsym1 != nsym2 ) return 0; + + n = nsym1; + + /* now make the sym code arrays */ + symcode1 = ccp4_utils_malloc( n * sizeof(int) ); + symcode2 = ccp4_utils_malloc( n * sizeof(int) ); + for ( i = 0; i < n; i++ ) { + symcode1[i] = ccp4_symop_code( op1[i] ); + symcode2[i] = ccp4_symop_code( op2[i] ); + } + /* sort the symcodes */ + /* Kevin suggests maybe just compare all pairs rather than sort */ + qsort( symcode1, n, sizeof(int), &ccp4_int_compare ); + qsort( symcode2, n, sizeof(int), &ccp4_int_compare ); + /* compare the symcodes */ + for ( i = 0; i < n; i++ ) { + if ( symcode1[i] != symcode2[i] ) break; + } + /* delete the symcodes */ + free(symcode1); + free(symcode2); + + /* return true if they are equal */ + return ( i == n ); +} + +int ccp4_spgrp_equal_order( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2 ) +{ + int i; + + /* first check that we have equal number of symops */ + if ( nsym1 != nsym2 ) return 0; + + /* compare the symcodes */ + for ( i = 0; i < nsym1; i++ ) { + if ( ccp4_symop_code( op1[i] ) != ccp4_symop_code( op2[i] ) ) break; + } + + /* return true if they are equal */ + return ( i == nsym1 ); +} + +int ccp4_symop_code(ccp4_symop op) +{ + int i, j, code=0; + for ( i=0; i<3; i++ ) + for ( j=0; j<3; j++ ) + code = ( code << 2 ) | ( (int) rint( op.rot[i][j] ) & 0x03 ) ; + for ( i=0; i<3; i++ ) + code = ( code << 4 ) | ( (int) rint( op.trn[i]*12.0 ) & 0x0f ) ; + return code; +} + +int ccp4_int_compare( const void *p1, const void *p2 ) +{ + return ( *((int*)p1) - *((int*)p2) ); +} + +int ccp4spg_is_in_pm_asu(const CCP4SPG* sp, const int h, const int k, const int l) { + if (ccp4spg_is_in_asu(sp,h,k,l)) return (1); + if (ccp4spg_is_in_asu(sp,-h,-k,-l)) return (-1); + return 0; +} + +int ccp4spg_is_in_asu(const CCP4SPG* sp, const int h, const int k, const int l) { + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_is_in_asu",NULL); + return 0; + } + if ( ccp4spg_do_chb(sp->chb) ) return sp->asufn( + (int) rint( h*sp->chb[0][0] + k*sp->chb[1][0] + l*sp->chb[2][0] ), + (int) rint( h*sp->chb[0][1] + k*sp->chb[1][1] + l*sp->chb[2][1] ), + (int) rint( h*sp->chb[0][2] + k*sp->chb[1][2] + l*sp->chb[2][2] ) ); + else + return sp->asufn( h, k, l ); +} + +int ccp4spg_put_in_asu(const CCP4SPG* sp, const int hin, const int kin, const int lin, + int *hout, int *kout, int *lout ) { + + int i, isign; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_put_in_asu",NULL); + return 0; + } + + /* cycle through all primitive symmetry operations until in asu */ + + for (i = 0; i < sp->nsymop_prim; ++i) { + *hout = (int) rint( hin*sp->symop[i].rot[0][0] + kin*sp->symop[i].rot[1][0] + + lin*sp->symop[i].rot[2][0] ); + *kout = (int) rint( hin*sp->symop[i].rot[0][1] + kin*sp->symop[i].rot[1][1] + + lin*sp->symop[i].rot[2][1] ); + *lout = (int) rint( hin*sp->symop[i].rot[0][2] + kin*sp->symop[i].rot[1][2] + + lin*sp->symop[i].rot[2][2] ); + if ((isign = ccp4spg_is_in_pm_asu(sp,*hout,*kout,*lout)) != 0) { + *hout = *hout * isign; + *kout = *kout * isign; + *lout = *lout * isign; + return ( (isign > 0) ? 2*i+1 : 2*i+2 ); + } + } + + printf ("Can't put in asu ! \n"); + return 0; +} + +/* Generate indices according to symmetry operation isym */ + +void ccp4spg_generate_indices(const CCP4SPG* sp, const int isym, + const int hin, const int kin, const int lin, + int *hout, int *kout, int *lout ) { + + int jsym, isign; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_generate_indices",NULL); + return; + } + + jsym = (isym - 1) / 2; + isign = (isym % 2) ? 1 : -1 ; + + *hout = isign * (int) rint(hin*sp->invsymop[jsym].rot[0][0] + + kin*sp->invsymop[jsym].rot[1][0] + lin*sp->invsymop[jsym].rot[2][0]); + *kout = isign * (int) rint(hin*sp->invsymop[jsym].rot[0][1] + + kin*sp->invsymop[jsym].rot[1][1] + lin*sp->invsymop[jsym].rot[2][1]); + *lout = isign * (int) rint(hin*sp->invsymop[jsym].rot[0][2] + + kin*sp->invsymop[jsym].rot[1][2] + lin*sp->invsymop[jsym].rot[2][2]); + +} + +/* shift phase value associated with hin,kin,lin according to translation +and optional sign change. Return in range 0,360 */ + +float ccp4spg_phase_shift(const int hin, const int kin, const int lin, + const float phasin, const float trans[3], const int isign) +{ + double phasout; + + phasout = (double) phasin; + if (isign == -1) phasout = - phasout; + + phasout += (hin*trans[0] + kin*trans[1] + lin*trans[2]) * 360.0; + + phasout = fmod(phasout,360.0); + if (phasout < 0.0) phasout += 360.0; + + return ((float) phasout); + +} + +int ccp4spg_do_chb(const float chb[3][3]) { + + return ( chb[0][0] != 1 || chb[1][1] != 1 || chb[2][2] != 1 || + chb[0][1] != 0 || chb[0][2] != 0 || chb[1][2] != 0 || + chb[1][0] != 0 || chb[2][0] != 0 || chb[2][1] != 0 ); + +} + +/* functions to identify centrics - based on Randy's method */ + +void ccp4spg_set_centric_zones(CCP4SPG* sp) { + + int i,j,hnew,knew,lnew; + int ihkl[12][3]; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_set_centric_zones",NULL); + return; + } + ihkl[0][0] = 0; ihkl[0][1] = 1; ihkl[0][2] = 2; + ihkl[1][0] = 1; ihkl[1][1] = 0; ihkl[1][2] = 2; + ihkl[2][0] = 1; ihkl[2][1] = 2; ihkl[2][2] = 0; + ihkl[3][0] = 1; ihkl[3][1] = 1; ihkl[3][2] = 10; + ihkl[4][0] = 1; ihkl[4][1] = 10; ihkl[4][2] = 1; + ihkl[5][0] = 10; ihkl[5][1] = 1; ihkl[5][2] = 1; + ihkl[6][0] = 1; ihkl[6][1] = -1; ihkl[6][2] = 10; + ihkl[7][0] = 1; ihkl[7][1] = 10; ihkl[7][2] = -1; + ihkl[8][0] = 10; ihkl[8][1] = 1; ihkl[8][2] = -1; + ihkl[9][0] = -1; ihkl[9][1] = 2; ihkl[9][2] = 10; + ihkl[10][0] = 2; ihkl[10][1] = -1; ihkl[10][2] = 10; + ihkl[11][0] = 1; ihkl[11][1] = 4; ihkl[11][2] = 8; + + /* loop over all possible centric zones */ + for (i = 0; i < 12; ++i) { + sp->centrics[i] = 0; + for (j = 0; j < sp->nsymop; ++j) { + hnew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][0] + + ihkl[i][1]*sp->symop[j].rot[1][0] + ihkl[i][2]*sp->symop[j].rot[2][0] ); + if (hnew == -ihkl[i][0]) { + knew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][1] + + ihkl[i][1]*sp->symop[j].rot[1][1] + ihkl[i][2]*sp->symop[j].rot[2][1] ); + if (knew == -ihkl[i][1]) { + lnew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][2] + + ihkl[i][1]*sp->symop[j].rot[1][2] + ihkl[i][2]*sp->symop[j].rot[2][2] ); + if (lnew == -ihkl[i][2]) { + sp->centrics[i] = j+1; + break; + } + } + } + } + } +} + +int ccp4spg_is_centric(const CCP4SPG* sp, const int h, const int k, const int l) { + + int i; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_is_centric",NULL); + return -1; + } + /* loop over all possible centric zones */ + for (i = 0; i < 12; ++i) + if (sp->centrics[i]) + if (ccp4spg_check_centric_zone(i+1,h,k,l) == 0) + return 1; + + return 0; +} + +/* check indices against centric zones - return 0 if in zone "nzone" */ + +int ccp4spg_check_centric_zone(const int nzone, const int h, const int k, const int l) { + + switch (nzone) { + case 1: + return h; + case 2: + return k; + case 3: + return l; + case 4: + return h - k; + case 5: + return h - l; + case 6: + return k - l; + case 7: + return h + k; + case 8: + return h + l; + case 9: + return k + l; + case 10: + return 2*h + k; + case 11: + return h + 2*k; + case 12: + return 0; + } + printf ("Invalid nzone ! \n"); + return 0; +} + +float ccp4spg_centric_phase(const CCP4SPG* sp, const int h, const int k, const int l) { + + int i,isym; + float centric_phase; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_centric_phase",NULL); + return 0.0; + } + /* loop over all possible centric zones */ + for (i = 0; i < 12; ++i) + if (sp->centrics[i]) + if (ccp4spg_check_centric_zone(i+1,h,k,l) == 0) { + isym = sp->centrics[i]; + centric_phase = h*sp->symop[isym-1].trn[0] + + k*sp->symop[isym-1].trn[1] + l*sp->symop[isym-1].trn[2]; + centric_phase = 180.0*(centric_phase - rint(centric_phase)); + if (centric_phase < 0.0) centric_phase = centric_phase + 180.0; + return centric_phase; + } + + return 0; +} + +void ccp4spg_print_centric_zones(const CCP4SPG* sp) { + + int i,j=0; + char centric_zone[8]; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_print_centric_zones",NULL); + return; + } + printf("\n ****** CENTRIC ZONES ****** \n\n"); + + /* loop over all possible centric zones */ + for (i = 0; i < 12; ++i) + if (sp->centrics[i]) { + printf(" CENTRIC Zone %d\n",++j); + printf(" Reflections of type %s \n\n", + ccp4spg_describe_centric_zone(i+1,centric_zone)); + } + + if (!j) printf(" (no centric zones for this spacegroup) \n\n"); +} + +char *ccp4spg_describe_centric_zone(const int nzone, char *centric_zone) { + + switch (nzone) { + case 1: + return ( strcpy(centric_zone,"0kl") ); + case 2: + return ( strcpy(centric_zone,"h0l") ); + case 3: + return ( strcpy(centric_zone,"hk0") ); + case 4: + return ( strcpy(centric_zone,"hhl") ); + case 5: + return ( strcpy(centric_zone,"hkh") ); + case 6: + return ( strcpy(centric_zone,"hkk") ); + case 7: + return ( strcpy(centric_zone,"h -hl") ); + case 8: + return ( strcpy(centric_zone,"hk -h") ); + case 9: + return ( strcpy(centric_zone,"hk -k") ); + case 10: + return ( strcpy(centric_zone,"-h 2h l") ); + case 11: + return ( strcpy(centric_zone,"2h -h l") ); + case 12: + return ( strcpy(centric_zone,"hkl") ); + } + printf ("Invalid nzone ! \n"); + return "null"; +} + +/* functions to identify epsilon zones - based on Randy's method */ + +void ccp4spg_set_epsilon_zones(CCP4SPG* sp) { + + int i,j,hnew,knew,lnew,neps; + int ihkl[13][3]; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_set_epsilon_zones",NULL); + return; + } + ihkl[0][0] = 1; ihkl[0][1] = 0; ihkl[0][2] = 0; + ihkl[1][0] = 0; ihkl[1][1] = 2; ihkl[1][2] = 0; + ihkl[2][0] = 0; ihkl[2][1] = 0; ihkl[2][2] = 2; + ihkl[3][0] = 1; ihkl[3][1] = 1; ihkl[3][2] = 0; + ihkl[4][0] = 1; ihkl[4][1] = 0; ihkl[4][2] = 1; + ihkl[5][0] = 0; ihkl[5][1] = 1; ihkl[5][2] = 1; + ihkl[6][0] = 1; ihkl[6][1] = -1; ihkl[6][2] = 0; + ihkl[7][0] = 1; ihkl[7][1] = 0; ihkl[7][2] = -1; + ihkl[8][0] = 0; ihkl[8][1] = 1; ihkl[8][2] = -1; + ihkl[9][0] = -1; ihkl[9][1] = 2; ihkl[9][2] = 0; + ihkl[10][0] = 2; ihkl[10][1] = -1; ihkl[10][2] = 0; + ihkl[11][0] = 1; ihkl[11][1] = 1; ihkl[11][2] = 1; + ihkl[12][0] = 1; ihkl[12][1] = 2; ihkl[12][2] = 3; + + /* Loop over all possible epsilon zones, except the catch-all 13th. For each + zone, "neps" counts the number of symmetry operators that map a representative + reflection "ihkl" to itself. At least the identity will do this. If any + more do, then this is a relevant epsilon zone. */ + for (i = 0; i < 12; ++i) { + sp->epsilon[i] = 0; + neps = 0; + for (j = 0; j < sp->nsymop_prim; ++j) { + hnew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][0] + + ihkl[i][1]*sp->symop[j].rot[1][0] + ihkl[i][2]*sp->symop[j].rot[2][0] ); + if (hnew == ihkl[i][0]) { + knew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][1] + + ihkl[i][1]*sp->symop[j].rot[1][1] + ihkl[i][2]*sp->symop[j].rot[2][1] ); + if (knew == ihkl[i][1]) { + lnew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][2] + + ihkl[i][1]*sp->symop[j].rot[1][2] + ihkl[i][2]*sp->symop[j].rot[2][2] ); + if (lnew == ihkl[i][2]) { + ++neps; + } + } + } + } + if (neps > 1) sp->epsilon[i] = neps * (sp->nsymop/sp->nsymop_prim); + } + /* hkl zone covers all with neps of 1 */ + sp->epsilon[12] = sp->nsymop/sp->nsymop_prim; +} + +int ccp4spg_get_multiplicity(const CCP4SPG* sp, const int h, const int k, const int l) { + + int i; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_get_multiplicity",NULL); + return 0; + } + /* loop over all possible epsilon zones */ + for (i = 0; i < 13; ++i) + if (sp->epsilon[i]) + if (ccp4spg_check_epsilon_zone(i+1,h,k,l) == 0) + return sp->epsilon[i]; + + return 0; +} + +int ccp4spg_check_epsilon_zone(const int nzone, const int h, const int k, const int l) { + + int bigfac=1000; /* this needs to be big enough to prevent accidental zeros */ + + switch (nzone) { + case 1: + return bigfac*k + l; + case 2: + return h + bigfac*l; + case 3: + return h + bigfac*k; + case 4: + return h - k + bigfac*l; + case 5: + return h + bigfac*k - l; + case 6: + return bigfac*h + k - l; + case 7: + return h + k + bigfac*l; + case 8: + return h + bigfac*k + l; + case 9: + return bigfac*h + k + l; + case 10: + return 2*h + k + bigfac*l; + case 11: + return h + 2*k + bigfac*l; + case 12: + return h + bigfac*k - (bigfac+1)*l; + case 13: + return 0; + } + printf ("Invalid nzone ! \n"); + return 0; +} + +void ccp4spg_print_epsilon_zones(const CCP4SPG* sp) { + + int i,j=0; + char epsilon_zone[8]; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_print_epsilon_zones",NULL); + return; + } + printf("\n ****** EPSILON ZONES - Reflection Classes and their multiplicity ****** \n"); + + /* loop over all possible epsilon zones */ + for (i = 0; i < 13; ++i) + if (sp->epsilon[i]) { + printf("\n EPSILON Zone %d\n",++j); + printf(" Reflections of type %s \n", + ccp4spg_describe_epsilon_zone(i+1,epsilon_zone)); + printf(" Multiplicity %d\n",sp->epsilon[i]); + } +} + +char *ccp4spg_describe_epsilon_zone(const int nzone, char *epsilon_zone) { + + switch (nzone) { + case 1: + return ( strcpy(epsilon_zone,"h00") ); + case 2: + return ( strcpy(epsilon_zone,"0k0") ); + case 3: + return ( strcpy(epsilon_zone,"00l") ); + case 4: + return ( strcpy(epsilon_zone,"hh0") ); + case 5: + return ( strcpy(epsilon_zone,"h0h") ); + case 6: + return ( strcpy(epsilon_zone,"0kk") ); + case 7: + return ( strcpy(epsilon_zone,"h -h0") ); + case 8: + return ( strcpy(epsilon_zone,"h0 -h") ); + case 9: + return ( strcpy(epsilon_zone,"0k -k") ); + case 10: + return ( strcpy(epsilon_zone,"-h 2h 0") ); + case 11: + return ( strcpy(epsilon_zone,"2h -h 0") ); + case 12: + return ( strcpy(epsilon_zone,"hhh") ); + case 13: + return ( strcpy(epsilon_zone,"hkl") ); + } + printf ("Invalid nzone ! \n"); + return "null"; +} + +int ccp4spg_is_sysabs(const CCP4SPG* sp, const int h, const int k, const int l) +{ + int j,hnew,knew,lnew; + float del_phas; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_is_sysabs",NULL); + return -1; + } + if (sp->nsymop > 1) { + for (j = 1; j < sp->nsymop; ++j) { + hnew = (int) rint( h*sp->invsymop[j].rot[0][0] + k*sp->invsymop[j].rot[1][0] + + l*sp->invsymop[j].rot[2][0] ); + if (hnew == h) { + knew = (int) rint( h*sp->invsymop[j].rot[0][1] + k*sp->invsymop[j].rot[1][1] + + l*sp->invsymop[j].rot[2][1] ); + if (knew == k) { + lnew = (int) rint( h*sp->invsymop[j].rot[0][2] + k*sp->invsymop[j].rot[1][2] + + l*sp->invsymop[j].rot[2][2] ); + if (lnew == l) { + /* phase shift from translational component of sym op */ + del_phas = h*sp->symop[j].trn[0] + k*sp->symop[j].trn[1] + + l*sp->symop[j].trn[2]; + if ( fabs(del_phas - rint( del_phas )) > 0.05 ) return (1); + } + } + } + } + } + return (0); + +} + +int ccp4spg_generate_origins(const char *namspg, const int nsym, const float rsym[][4][4], + float origins[][3], int *polarx, int *polary, int *polarz, + const int iprint) +{ + int i,j,k,norigins,k1,k2,k3,alt_orig,ichk; + int id[6]={0,6,4,8,3,9},is[3]; + float xin=0.13,yin=0.17,zin=0.19,xout,yout,zout,rsymd[3][3]; + + *polarx = *polary = *polarz = 1; + + for (i = 1; i < nsym; ++i) { + xout = rsym[i][0][0]*xin + rsym[i][0][1]*yin + rsym[i][0][2]*zin; + if (fabs(xout-xin) > 0.01) *polarx = 0; + yout = rsym[i][1][0]*xin + rsym[i][1][1]*yin + rsym[i][1][2]*zin; + if (fabs(yout-yin) > 0.01) *polary = 0; + zout = rsym[i][2][0]*xin + rsym[i][2][1]*yin + rsym[i][2][2]*zin; + if (fabs(zout-zin) > 0.01) *polarz = 0; + } + + /* First origin is 0,0,0 */ + norigins=1; + origins[0][0]=0.0; + origins[0][1]=0.0; + origins[0][2]=0.0; + + /* check which points can be an alternate origin. + only six possibilities which are 0 1/2 1/3 2/3 1/4 3/4 + is/id expressed as twelfths */ + for (k1 = 0; k1 < 6; ++k1) { + for (k2 = 0; k2 < 6; ++k2) { + for (k3 = 0; k3 < 6; ++k3) { + if (k1==0 && k2 == 0 && k3 ==0) continue; + is[0]=id[k1]; + is[1]=id[k2]; + is[2]=id[k3]; + if ( *polarx && is[0] ) continue; + if ( *polary && is[1] ) continue; + if ( *polarz && is[2] ) continue; + +/* Let [Si] =[RSYMi] be (3x4) symmetry operator. + Need to Check if the symmetry operator shifts of each alternate origin + [ORx,ORy,ORz) are preserved for each symmetry operator. + Origin (0,0,0) shifts to Ti(1), Ti(2) Ti(3) + == RSYMi(1,4),RSYMi(2,4),RSYMi(3,4) + + [RSYMi] [OR] = [OR] + [Ti] + n[I] = [1 0 0 RSYMi(1,4)] [OR1] + n[I] + [0 1 0 RSYMi(2,4)] [OR2] + [0 0 1 RSYMi(3,4)] [OR3] + + Hence [RSYMi(1,1) -1 RSYMi(1,2) RSYMi(1,3) 0] [OR1] = n[I] + [RSYMi(2,1) RSYMi(2,2) -1 RSYMi(2,3) 0] [OR2] + [RSYMi(3,1) RSYMi(3,2) RSYMi(3,3) -1 0] [OR3] + [ 0 0 0 1] [1 ] + + Use RSYM(..1) to respresent indentity.. Enough to use 3x3 matrix.. */ + + alt_orig=1; + for (i = 1; i < nsym && alt_orig; ++i) { + for (j = 0; j < 3; ++j) + for (k = 0; k < 3; ++k) + rsymd[j][k] = rsym[i][j][k] - rsym[0][j][k]; + for (j = 0; j < 3; ++j) { + ichk = (int) rint( rsymd[j][0]*is[0]+rsymd[j][1]*is[1]+rsymd[j][2]*is[2] ); + if ( ichk % 12 ) { + alt_orig=0; + break; + } + } + } + if (alt_orig) { + norigins+=1; + origins[norigins-1][0]=is[0]/12.0; + origins[norigins-1][1]=is[1]/12.0; + origins[norigins-1][2]=is[2]/12.0; + } + } + } + } + + if (iprint) { + if( *polarx && *polary && *polarz) { + printf(" this is p1: origin anywhere"); + printf("\n %s %s %s \n", + "Number of alternate origins for spacegroup: ",namspg," is infinite."); + } else if( *polarx && *polary) { + printf(" this is a polar+ spacegroup: origin anywhere in a b plane"); + printf("\n %s %s %s %d \n", + "Number of alternate origin containing planes for spacegroup:", + namspg, " is:",norigins); + } else if( *polarx && *polarz) { + printf(" this is a polar+ spacegroup: origin anywhere in a c plane"); + printf("\n %s %s %s %d \n", + "Number of alternate origin containing planes for spacegroup:", + namspg, " is:",norigins); + } else if( *polary && *polarz) { + printf(" this is a polar+ spacegroup: origin anywhere in b c plane"); + printf("\n %s %s %s %d \n", + "Number of alternate origin containing planes for spacegroup:", + namspg, " is:",norigins); + } else if( *polarx) { + printf(" this is a polar spacegroup: origin is not fixed along a axis"); + printf("\n %s %s %s %d \n", + "Number of alternate origin containing lines for spacegroup: ", + namspg, " is:",norigins); + } else if( *polary) { + printf(" this is a polar spacegroup: origin is not fixed along b axis"); + printf("\n %s %s %s %d \n", + "Number of alternate origin containing lines for spacegroup: ", + namspg, " is:",norigins); + } else if( *polarz) { + printf(" this is a polar spacegroup: origin is not fixed along c axis"); + printf("\n %s %s %s %d \n", + "Number of alternate origin containing lines for spacegroup: ", + namspg, " is:",norigins); + } else { + printf("\n %s %s %s %d \n", + "Number of alternate origins for spacegroup: ",namspg, + " is:",norigins); + } + + printf("\n Norigin Ox Oy Oz\n\n"); + for (i = 0; i < norigins; ++i) { + if (*polary && *polarz && *polarx) { + printf("%8d ?? ?? ?? \n", i+1); + } else if(*polarx && *polary) { + printf("%8d ?? ?? %8.4f\n", i+1,origins[i][2]); + } else if(*polarx && *polarz) { + printf("%8d ?? %8.4f ?? \n", i+1,origins[i][1]); + } else if(*polary && *polarz) { + printf("%8d%8.4f ?? ?? \n", i+1,origins[i][0]); + } else if( *polarx) { + printf("%8d ?? %8.4f%8.4f\n", i+1,origins[i][1],origins[i][2]); + } else if(*polary) { + printf("%8d%8.4f ?? %8.4f\n", i+1,origins[i][0],origins[i][2]); + } else if(*polarz) { + printf("%8d%8.4f%8.4f ?? \n", i+1,origins[i][0],origins[i][1]); + } else { + printf("%8d%8.4f%8.4f%8.4f\n", i+1,origins[i][0],origins[i][1],origins[i][2]); + } + } + } + return norigins; +} + +void ccp4spg_print_recip_spgrp(const CCP4SPG* sp) +{ + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_print_recip_spgrp",NULL); + return; + } + + printf("Reciprocal space symmetry: \n"); + printf("Space group: \"%s\" Point group: \"%s\" Laue group: \"%s\" \n", + sp->symbol_xHM,sp->point_group,sp->laue_name); + printf("Reference asymmetric unit: \"%s\" \n",sp->asu_descr); + printf(" (change of basis may be applied) \n"); + ccp4spg_print_recip_ops(sp); +} + +void ccp4spg_print_recip_ops(const CCP4SPG* sp) +{ + int i,j,k,l,nrow, n_in_last_row,rsymop_len=80; + float tmp_symop[4][4]; + char rsymop[80]; + + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_print_recip_ops",NULL); + return; + } + + nrow = (sp->nsymop_prim + 3)/ 4; + n_in_last_row = sp->nsymop_prim % 4; + if (n_in_last_row == 0) n_in_last_row = 4; + + printf("\n Spacegroup %d \"%s\" \n",sp->spg_ccp4_num,sp->symbol_xHM); + printf(" Original indices for reflection hkl with symmetry number ISYM \n"); + printf("\n Bijvoet positive \n"); + printf(" %-18s%-18s%-18s%-18s\n","ISYM","ISYM","ISYM","ISYM"); + for (i = 0 ; i < nrow-1 ; ++i) { + printf(" ISYM"); + for (j = 0 ; j < 4 ; ++j) { + for (k = 0; k < 3; ++k) { + /* note we use the transpose for reciprocal space operators */ + for (l = 0; l < 3; ++l) + tmp_symop[k][l] = sp->invsymop[4*i+j].rot[l][k]; + tmp_symop[k][3] = 0.0; + tmp_symop[3][k] = 0.0; + } + tmp_symop[3][3] = 1.0; + mat4_to_recip_symop(rsymop,rsymop+rsymop_len,(const float (*)[4])tmp_symop); + rsymop[12] = '\0'; + printf(" %3d %-12s",2*(4*i+j)+1,rsymop); + } + printf("\n"); + } + printf(" ISYM"); + for (j = 0 ; j < n_in_last_row ; ++j) { + for (k = 0; k < 3; ++k) { + for (l = 0; l < 3; ++l) + tmp_symop[k][l] = sp->invsymop[4*i+j].rot[l][k]; + tmp_symop[k][3] = 0.0; + tmp_symop[3][k] = 0.0; + } + tmp_symop[3][3] = 1.0; + mat4_to_recip_symop(rsymop,rsymop+rsymop_len,(const float (*)[4])tmp_symop); + rsymop[12] = '\0'; + printf(" %3d %-12s",2*(4*(nrow-1)+j)+1,rsymop); + } + printf("\n"); + + printf("\n Bijvoet negative \n"); + printf(" %-18s%-18s%-18s%-18s\n","ISYM","ISYM","ISYM","ISYM"); + for (i = 0 ; i < nrow-1 ; ++i) { + printf(" ISYM"); + for (j = 0 ; j < 4 ; ++j) { + for (k = 0; k < 3; ++k) { + for (l = 0; l < 3; ++l) + tmp_symop[k][l] = - sp->invsymop[4*i+j].rot[l][k]; + tmp_symop[k][3] = 0.0; + tmp_symop[3][k] = 0.0; + } + tmp_symop[3][3] = 1.0; + mat4_to_recip_symop(rsymop,rsymop+rsymop_len,(const float (*)[4])tmp_symop); + rsymop[12] = '\0'; + printf(" %3d %-12s",2*(4*i+j)+2,rsymop); + } + printf("\n"); + } + printf(" ISYM"); + for (j = 0 ; j < n_in_last_row ; ++j) { + for (k = 0; k < 3; ++k) { + for (l = 0; l < 3; ++l) + tmp_symop[k][l] = - sp->invsymop[4*i+j].rot[l][k]; + tmp_symop[k][3] = 0.0; + tmp_symop[3][k] = 0.0; + } + tmp_symop[3][3] = 1.0; + mat4_to_recip_symop(rsymop,rsymop+rsymop_len,(const float (*)[4])tmp_symop); + rsymop[12] = '\0'; + printf(" %3d %-12s",2*(4*(nrow-1)+j)+2,rsymop); + } + printf("\n"); +} + +int range_to_limits(const char *range, float limits[2]) +{ + int i,in_value=1,neg=0,frac=0,equal=0; + float value1,value2; + float delta=0.00001; + char ch; + char buf[2]; + buf[1] = 0; + + for (i = 0 ; i < strlen(range) ; ++i) { + ch = range[i]; + if (ch == '<') { + if (in_value) { + /* finishing lower value */ + limits[0] = value1; + if (frac) limits[0] = value1/value2; + if (neg) limits[0] = - limits[0]; + limits[0] += delta; + neg = 0; + frac = 0; + in_value = 0; + } else { + /* starting upper value */ + + in_value = 1; + } + } else if (ch == '-') { + neg = 1; + } else if (ch == '/') { + frac = 1; + } else if (ch == '=') { + if (in_value) { + equal = 1; + } else { + limits[0] -= 2.0*delta; + } + } else if (ch == ';' || ch == ' ') { + ; + } else { + if (in_value) { + buf[0] = ch; + if (frac) { + value2 = (float) atoi(buf); + } else { + value1 = (float) atoi(buf); + } + } + } + } + /* finishing upper value */ + limits[1] = value1; + if (frac) limits[1] = value1/value2; + if (neg) limits[1] = - limits[1]; + limits[1] -= delta; + if (equal) limits[1] += 2.0*delta; + + return 0; +} + +void set_fft_grid(CCP4SPG* sp, const int nxmin, const int nymin, const int nzmin, + const float sample, int *nx, int *ny, int *nz) +{ + if (!sp) { + ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"set_fft_grid",NULL); + return; + } + *nx = get_grid_sample(nxmin, sp->laue_sampling[0], sample); + *ny = get_grid_sample(nymin, sp->laue_sampling[1], sample); + *nz = get_grid_sample(nzmin, sp->laue_sampling[2], sample); +} + +int all_factors_le_19(const int n) +{ + int i,ifact[8]={2,3,5,7,11,13,17,19}; + + int nn = n; + + for (i = 0 ; i < 8 ; ++i) { + while (nn % ifact[i] == 0) { + /* factor found, divide & continue if required */ + nn = nn/ifact[i]; + /* success */ + if (nn == 1) + return 1; + } + } + return 0; +} + +int get_grid_sample(const int minsmp, const int nmul, const float sample) +{ + int n; + float r1min=1.0, r1max=1.6, r2min=1.4, r2max=4.0; + + /* check minsmp <= 0, if so set nsampl = nmul */ + if (minsmp <= 0) + return nmul; + + /* set search limits */ + if (sample >= 1.0) { + r1max = sample; + r2min = sample*0.95 < 1.0 ? 1.0 : sample*0.95; + } + + /* start with multiple of nmul */ + n = (int) rint((r1max*minsmp)/nmul)*nmul; + + while (n > (int) rint(r1min*minsmp)) { + /* suitable sample interval found, accept it */ + if (all_factors_le_19(n)) + return n; + /* decrement trial value & continue if still in range */ + n -= nmul; + } + + /* now try 2nd search if 1st unsuccesful */ + n = (int) rint((r2min*minsmp)/nmul)*nmul; + + while (n < (int) rint(r2max*minsmp)) { + /* suitable sample interval found, accept it */ + if (all_factors_le_19(n)) + return n; + /* increment trial value & continue if still in range */ + n += nmul; + } + + /* failed */ + return -1; +} + +int ccp4spg_load_laue(CCP4SPG *spacegroup, const int nlaue) +{ + int ierr = 1; + + if (!spacegroup) return ierr; + + if ( nlaue == 3 ) { + spacegroup->asufn = &ASU_1b; + spacegroup->nlaue = 3; + strcpy(spacegroup->laue_name,"-1"); + spacegroup->laue_sampling[0] = 2; + spacegroup->laue_sampling[1] = 2; + spacegroup->laue_sampling[2] = 2; + ierr = 0; + } + if ( nlaue == 4 ) { + spacegroup->nlaue = 4; + strcpy(spacegroup->laue_name,"2/m"); + spacegroup->laue_sampling[0] = 2; + spacegroup->laue_sampling[1] = 4; + spacegroup->laue_sampling[2] = 2; + ierr = 0; + } + if ( nlaue == 5 ) { + spacegroup->nlaue = 5; + strcpy(spacegroup->laue_name,"2/m"); + spacegroup->laue_sampling[0] = 2; + spacegroup->laue_sampling[1] = 8; + spacegroup->laue_sampling[2] = 4; + ierr = 0; + } + if ( nlaue == 6 ) { + spacegroup->nlaue = 6; + strcpy(spacegroup->laue_name,"mmm"); + spacegroup->laue_sampling[0] = 4; + spacegroup->laue_sampling[1] = 4; + spacegroup->laue_sampling[2] = 4; + ierr = 0; + } + if ( nlaue == 7 ) { + spacegroup->nlaue = 7; + strcpy(spacegroup->laue_name,"4/m"); + spacegroup->laue_sampling[0] = 4; + spacegroup->laue_sampling[1] = 4; + spacegroup->laue_sampling[2] = 8; + ierr = 0; + } + if ( nlaue == 8 ) { + spacegroup->nlaue = 8; + strcpy(spacegroup->laue_name,"4/mmm"); + spacegroup->laue_sampling[0] = 4; + spacegroup->laue_sampling[1] = 4; + spacegroup->laue_sampling[2] = 8; + ierr = 0; + } + if ( nlaue == 9 ) { + spacegroup->nlaue = 9; + strcpy(spacegroup->laue_name,"-3"); + spacegroup->laue_sampling[0] = 6; + spacegroup->laue_sampling[1] = 6; + spacegroup->laue_sampling[2] = 6; + ierr = 0; + } + if ( nlaue == 10 ) { + spacegroup->nlaue = 10; + strcpy(spacegroup->laue_name,"3bar1m"); + spacegroup->laue_sampling[0] = 6; + spacegroup->laue_sampling[1] = 6; + spacegroup->laue_sampling[2] = 6; + ierr = 0; + } + if ( nlaue == 11 ) { + spacegroup->nlaue = 11; + strcpy(spacegroup->laue_name,"3barm"); + spacegroup->laue_sampling[0] = 6; + spacegroup->laue_sampling[1] = 6; + spacegroup->laue_sampling[2] = 6; + ierr = 0; + } + if ( nlaue == 12 ) { + spacegroup->nlaue = 12; + strcpy(spacegroup->laue_name,"6/m"); + spacegroup->laue_sampling[0] = 6; + spacegroup->laue_sampling[1] = 6; + spacegroup->laue_sampling[2] = 12; + ierr = 0; + } + if ( nlaue == 13 ) { + spacegroup->nlaue = 13; + strcpy(spacegroup->laue_name,"6/mmm"); + spacegroup->laue_sampling[0] = 6; + spacegroup->laue_sampling[1] = 6; + spacegroup->laue_sampling[2] = 12; + ierr = 0; + } + if ( nlaue == 14 ) { + spacegroup->nlaue = 14; + strcpy(spacegroup->laue_name,"m3bar"); + spacegroup->laue_sampling[0] = 4; + spacegroup->laue_sampling[1] = 4; + spacegroup->laue_sampling[2] = 4; + ierr = 0; + } + if ( nlaue == 15 ) { + spacegroup->nlaue = 15; + strcpy(spacegroup->laue_name,"m3barm"); + spacegroup->laue_sampling[0] = 8; + spacegroup->laue_sampling[1] = 8; + spacegroup->laue_sampling[2] = 8; + ierr = 0; + } + return ierr; +} + +int ccp4spg_check_symm_cell(int nsym, float rsym[][4][4], float cell[6]) { + + CCP4SPG *spacegroup; + int i,k,l,status=1; + ccp4_symop *op1; + + if (nsym <= 0) return 0; + + /* identify spacegroup from supplied symops */ + op1 = (ccp4_symop *) ccp4_utils_malloc(nsym*sizeof(ccp4_symop)); + for (i = 0; i < nsym; ++i) { + for (k = 0; k < 3; ++k) { + for (l = 0; l < 3; ++l) { + op1[i].rot[k][l] = rsym[i][k][l]; + } + op1[i].trn[k] = rsym[i][k][3]; + } + } + spacegroup = ccp4_spgrp_reverse_lookup(nsym,op1); + + /* test cell against symmetry on case-by-case basis */ + if (strstr(spacegroup->symbol_xHM,":R")) { + status = ccp4uc_is_rhombohedral(cell,0.01F); + } else if (strstr(spacegroup->symbol_xHM,":H")) { + status = ccp4uc_is_hexagonal(cell,0.01F); + } else if (spacegroup->spg_num >= 168 && spacegroup->spg_num <= 194) { + status = ccp4uc_is_hexagonal(cell,0.01F); + } + + free(op1); + + return status; +} diff --git a/ccp4c/ccp4/csymlib.h b/ccp4c/ccp4/csymlib.h new file mode 100644 index 00000000..92eb0d0e --- /dev/null +++ b/ccp4c/ccp4/csymlib.h @@ -0,0 +1,645 @@ +/* + csymlib.h: header file for csymlib.c + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @page csym_page CSYM library + * + * @verbatim + + + + @endverbatim + * + * @section csym_file_list File list + +

    +
  • csymlib.h - contains details of the C/C++ API +
  • ccp4_spg.h - contains details of the spacegroup data structure +
+ * + * @section csym_overview Overview + +The CSYM library is centred around a data file syminfo.lib which is +auto-generated from sgtbx (the Space Group Toolbox of +cctbx). A description of +the contents of this file is given in the +documentation of the Fortran API. + +

A particular spacegroup in a particular setting +is loaded into an in-memory data structure by requesting a particular +spacegroup name, number, or set of operators. See the functions +ccp4spg_load_by_standard_num, ccp4spg_load_by_ccp4_num, +ccp4spg_load_by_spgname, ccp4spg_load_by_ccp4_spgname +and ccp4_spgrp_reverse_lookup. Information on the in-memory +data structure is given in ccp4_spg.h The memory can be freed by the +function ccp4spg_free. + +

Functions are provided to: +

    +
  • Query the data structure, e.g. ccp4spg_symbol_Hall, etc. (members +of the structure can of course be obtained directly) +
  • Check reciprocal space indices for a particular spacegroup, +e.g. ccp4spg_is_in_asu, ccp4spg_is_centric, +ccp4spg_get_multiplicity, ccp4spg_is_sysabs, etc. +
  • Set appropriate grids for FFT, e.g. set_fft_grid +
+ * + * @section csym_operators Symmetry operators + +Symmetry operators are expressed in a variety of ways: +
    +
  • Using the struct ccp4_symop, which consists of a 3 x 3 rotation +matrix and a translation vector. +
  • As a 4 x 4 matrix, in which the rotation matrix is in the top-left-hand +corner and the translation vector is in elements [*][3]. Element [3][3] is +set to 1.0 +
  • As a string, such as "-x+1/2,-y,z+1/2" +
+Check the function description for which form is expected. Often, there +are alternative functions if you wish to supply the operators in a +different form. There are also the following conversion functions: +
    +
  • rotandtrn_to_mat4 +
  • rotandtrn_to_symop +
  • mat4_to_rotandtrn +
  • mat4_to_symop +
  • mat4_to_recip_symop +
  • symop_to_rotandtrn +
  • symop_to_mat4 +
+Note that the order of symmetry operators may be important in some cases, for +example in MTZ files with a M/ISYM column where ISYM encodes the symmetry operation +used. + + * @section csym_examples Examples + +See examples on ftp area + +*/ + +/** @file csymlib.h + * + * @brief C-level library for symmetry information. + * + * Functions defining the C-level API for accessing spacegroup properties. + * The primary spacegroup information comes from the data file syminfo.lib + * + * @author Martyn Winn + */ + +#ifndef __CSymLib__ +#define __CSymLib__ + +/* rcsidhs[] = "$Id$" */ + +/* note that definitions in ccp4_spg.h are within the CSym namespace */ +#include "ccp4_spg.h" + +#ifdef __cplusplus +namespace CSym { +extern "C" { +#endif + +/** Look up spacegroup in standard setting by number, and load properties. + * Allocates memory for the spacegroup structure. This can be freed + * later by ccp4spg_free(). + * @param numspg spacegroup number + * @return pointer to spacegroup + */ +CCP4SPG *ccp4spg_load_by_standard_num(const int numspg); + +/** Look up spacegroup by CCP4 number, and load properties. + * Allocates memory for the spacegroup structure. This can be freed + * later by ccp4spg_free(). + * @param ccp4numspg CCP4 spacegroup number + * @return pointer to spacegroup + */ +CCP4SPG *ccp4spg_load_by_ccp4_num(const int ccp4numspg); + +/** Look up spacegroup by the extended Hermann Mauguin symbol. + * Allocates memory for the spacegroup structure. This can be freed + * later by ccp4spg_free(). + * @param spgname Spacegroup name in form of extended Hermann Mauguin symbol. + * @return pointer to spacegroup + */ +CCP4SPG *ccp4spg_load_by_spgname(const char *spgname); + +/** Look up spacegroup by name. This is for use by CCP4 programs + * and is more complicated than ccp4spg_load_by_spgname. For each + * spacegroup in syminfo.lib it checks the CCP4 spacegroup name + * first, and then the extended Hermann Mauguin symbol. + * Allocates memory for the spacegroup structure. This can be freed + * later by ccp4spg_free(). + * @param ccp4spgname Spacegroup name. + * @return pointer to spacegroup + */ +CCP4SPG *ccp4spg_load_by_ccp4_spgname(const char *ccp4spgname); + +/** Look up spacegroup by symmetry operators and load properties. + * Allocates memory for the spacegroup structure. This can be freed + * later by ccp4spg_free(). + * @param nsym1 number of operators (including non-primitive) + * @param op1 pointer to array of operators + * @return pointer to spacegroup + */ +CCP4SPG * ccp4_spgrp_reverse_lookup(const int nsym1, const ccp4_symop *op1); + +/** Look up spacegroup from SYMOP. + * This would not normally be called directly, but via one of + * the wrapping functions. + * Allocates memory for the spacegroup structure. This can be freed + * later by ccp4spg_free(). + * @param numspg spacegroup number + * @param ccp4numspg CCP4 spacegroup number + * @param spgname Spacegroup name. + * @param ccp4spgname Spacegroup name. + * @param nsym1 number of operators (including non-primitive) + * @param op1 pointer to array of operators + * @return pointer to spacegroup + */ +CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg, + const char *spgname, const char *ccp4spgname, + const int nsym1, const ccp4_symop *op1); + +/** Free all memory malloc'd from static pointers. + * To be called before program exit. The function can be + * registered with atexit. + */ +void ccp4spg_mem_tidy(void); + +/** Generate symop matrices from description strings + * This would not normally be called directly, but via one of + * the wrapping functions SYMFR2 and SYMFR3 in the Fortran API. + * @param line null-terminated string containing symop descriptions + * @param rot array of 4x4 matrices + * @return number of symops read, or -1 on failure + */ +int symfr_driver (const char *line, float rot[][4][4]); + +/** Free memory associated with spacegroup. + * @param sp pointer to spacegroup + */ +void ccp4spg_free(CCP4SPG **sp); + +/** Look up spacegroup in standard setting by number and load into + * static storage of csymlib_f. + * @param numspg spacegroup number + * @return void + */ +void ccp4spg_register_by_ccp4_num(int numspg); + +/** Look up spacegroup by set of symmetry operators and load into + * static storage of csymlib_f. + * @param nops number of symops + * @param rsm symmetry operators + * @return void + */ +void ccp4spg_register_by_symops(int nops, float rsm[][4][4]); + +/** Derive centering operators from Hall symbol (deprecated). + * Centering operators are now read from syminfo.lib + * @param symbol_Hall Hall symbol for spacegroup + * @param cent_ops centering operators + * @return number of centering operators (0 if none found) + */ +int ccp4_spg_get_centering(const char *symbol_Hall, float cent_ops[4][3]); + +/** Load Laue data into spacegroup structure. + * @param nlaue CCP4 code for Laue group + * @param spacegroup Pointer to CCP4 spacegroup structure + * @return 0 on success, 1 on failure to load Laue data + */ +int ccp4spg_load_laue(CCP4SPG* spacegroup, const int nlaue); + +/** Test if reflection is in asu of Laue group 1bar. + * @return 1 if in asu else 0 + */ +int ASU_1b (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group 2/m. + * @return 1 if in asu else 0 + */ +int ASU_2_m (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group mmm. + * @return 1 if in asu else 0 + */ +int ASU_mmm (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group 4/m. + * @return 1 if in asu else 0 + */ +int ASU_4_m (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group 4/mmm. + * @return 1 if in asu else 0 + */ +int ASU_4_mmm(const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group 3bar. + * @return 1 if in asu else 0 + */ +int ASU_3b (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group 3bar1m. + * @return 1 if in asu else 0 + */ +int ASU_3bm (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group 3barm. + * @return 1 if in asu else 0 + */ +int ASU_3bmx (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group 6/m. + * @return 1 if in asu else 0 + */ +int ASU_6_m (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group 6/mmm. + * @return 1 if in asu else 0 + */ +int ASU_6_mmm(const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group m3bar. + * @return 1 if in asu else 0 + */ +int ASU_m3b (const int h, const int k, const int l); + +/** Test if reflection is in asu of Laue group m3barm. + * @return 1 if in asu else 0 + */ +int ASU_m3bm (const int h, const int k, const int l); + +/** Function to return Hall symbol for spacegroup. + * @param sp pointer to spacegroup + * @return pointer to Hall symbol for spacegroup + */ +char *ccp4spg_symbol_Hall(CCP4SPG* sp); + +/** inverts a symmetry operator. The input operator is + * converted to a 4 x 4 matrix, inverted, and converted back. + * @param ccp4_symop input symmetry operator + * @return inverted symmetry operator + */ +ccp4_symop ccp4_symop_invert( const ccp4_symop op1 ); + +/** Compare two spacegroup names. Strings are converted to upper + * case before making the comparison, but otherwise match must be + * exact. + * @param spgname1 First spacegroup name. + * @param spgname2 Second spacegroup name. + * @return 1 if they are equal else 0. +*/ +int ccp4spg_name_equal(const char *spgname1, const char *spgname2); + +/** Try to match a spacegroup name to one from SYMINFO. Blanks are + * removed when making the comparison. Strings are converted to upper + * case before making the comparison. If spgname_lib has " 1 " and + * spgname_match doesn't, then strip out " 1" to do "short" comparison. + * @param spgname1 First spacegroup name, assumed to be a standard one + * obtained at some point from SYMINFO + * @param spgname2 Second spacegroup name that you are trying to match + * to a standard SYMINFO one. E.g. it might have been provided by the + * user. + * @return 1 if they are equal else 0. +*/ +int ccp4spg_name_equal_to_lib(const char *spgname_lib, const char *spgname_match); + +/** Function to create "short" name of spacegroup. Blanks + * are removed, as are " 1" elements (except for the special case + * of "P 1"). + * @param shortname String long enough to hold short name. + * @param longname Long version of spacegroup name. + * @return Pointer to shortname. +*/ +char *ccp4spg_to_shortname(char *shortname, const char *longname); + +/** Function to deal with colon-specified spacegroup settings. + * E.g. 'R 3 :H' is converted to 'H 3 '. Note that spaces are + * returned and should be dealt with by the calling function. + * @param name Spacegroup name. + * @return void +*/ +void ccp4spg_name_de_colon(char *name); + +/** Compare two point group names. Blanks are removed when + * making the comparison. Strings are converted to upper + * case before making the comparison. Any initial "PG" is ignored. + * @param pgname1 First point group name. + * @param pgname2 Second point group name. + * @return 1 if they are equal else 0. +*/ +int ccp4spg_pgname_equal(const char *pgname1, const char *pgname2); + +/** Function to normalise translations of a symmetry operator, + * i.e. to ensure 0.0 <= op.trn[i] < 1.0. + * @param op pointer to symmetry operator. + * @return Pointer to normalised symmetry operator. +*/ +ccp4_symop *ccp4spg_norm_trans(ccp4_symop *op); + +/** Sort and compare two symmetry operator lists. + * Kevin's code. The lists are coded as ints, which are then sorted and compared. + * Note that no changes are made to the input operators, so that operators + * differing by an integral number of unit cell translations are considered + * unequal. If this is not what you want, normalise the operators with + * ccp4spg_norm_trans first. + * @param nsym1 number of symmetry operators in first list + * @param op1 first list of symmetry operators + * @param nsym2 number of symmetry operators in second list + * @param op2 second list of symmetry operators + * @return 1 if they are equal else 0. +*/ +int ccp4_spgrp_equal( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2); + +/** Compare two symmetry operator lists. + * Kevin's code. The lists are coded as ints, which are compared. + * Unlike ccp4_spgrp_equal, the lists are not sorted, so the same operators + * in a different order will be considered unequal. + * @param nsym1 number of symmetry operators in first list + * @param op1 first list of symmetry operators + * @param nsym2 number of symmetry operators in second list + * @param op2 second list of symmetry operators + * @return 1 if they are equal else 0. +*/ +int ccp4_spgrp_equal_order( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2); + +/** Make an integer coding of a symmetry operator. + * The coding takes 30 bits: 18 for the rotation and 12 for the translation. + * @param op symmetry operator + * @return int code. + */ +int ccp4_symop_code(ccp4_symop op); + +/** Comparison of symmetry operators encoded as integers. + * In ccp4_spgrp_equal, this is passed to the stdlib qsort. + * @param p1 pointer to first integer + * @param p1 pointer to second integer + * @return difference between integers +*/ +int ccp4_int_compare( const void *p1, const void *p2 ); + +/** Test whether reflection or it's Friedel mate is in asu. + * @param sp pointer to spacegroup + * @param h reflection index + * @param k reflection index + * @param l reflection index + * @return 1 if in asu, -1 if -h -k -l is in asu, 0 otherwise + */ +int ccp4spg_is_in_pm_asu(const CCP4SPG* sp, const int h, const int k, const int l); + +/** Test whether reflection is in asu. + * @param sp pointer to spacegroup + * @param h reflection index + * @param k reflection index + * @param l reflection index + * @return 1 if in asu, 0 otherwise + */ +int ccp4spg_is_in_asu(const CCP4SPG* sp, const int h, const int k, const int l); + +/** Place reflection (hin,kin,lin) in the asymmetric unit of spacegroup "sp". + * Resultant indices are placed in (hout,kout,lout). + * @param sp pointer to spacegroup + * @param hin input reflection index + * @param kin input reflection index + * @param lin input reflection index + * @param hout output reflection index + * @param kout output reflection index + * @param lout output reflection index + * @return "isym" if successful, 0 otherwise. "isym" = 2*isymop - 1 for + * reflections placed in the positive asu, i.e. I+ of a Friedel pair, and + * "isym" = 2*isymop for reflections placed in the negative asu, i.e. I- of + * a Friedel pair. Here "isymop" is the number of the symmetry operator used. + */ +int ccp4spg_put_in_asu(const CCP4SPG* sp, const int hin, const int kin, const int lin, + int *hout, int *kout, int *lout ); + +/** Transform reflection (hin,kin,lin) according to spacegroup "sp" and + * operation "isym". Resultant indices are placed in (hout,kout,lout). + * @param sp pointer to spacegroup + * @param isym required operation, see ccp4spg_put_in_asu + * @param hin input reflection index + * @param kin input reflection index + * @param lin input reflection index + * @param hout output reflection index + * @param kout output reflection index + * @param lout output reflection index + * @return void + */ +void ccp4spg_generate_indices(const CCP4SPG* sp, const int isym, + const int hin, const int kin, const int lin, + int *hout, int *kout, int *lout ); + +/** Shift phase value associated with hin,kin,lin according to translation +and optional sign change. Return in range 0,360. + * @param hin reflection index + * @param kin reflection index + * @param lin reflection index + * @param phasin Input phase. + * @param trans Requested translation + * @param isign If -1, change sign of phase + * @return shifted phase + */ +float ccp4spg_phase_shift(const int hin, const int kin, const int lin, + const float phasin, const float trans[3], const int isign); + +/** Check whether change of basis is necessary, i.e. whether the + * change of basis matrix is not the identity. + * @param chb change of basis matrix + * @return 1 if change of basis is necessary, 0 otherwise + */ +int ccp4spg_do_chb(const float chb[3][3]); + +/** Set up centric zones for a given spacegroup. This is called + * upon loading a spacegroup. + * @param sp pointer to spacegroup + * @return void + */ +void ccp4spg_set_centric_zones(CCP4SPG* sp); + +/** Function to determine whether or not h,k,l is a centric reflection + * in spacegroup "sp". + * @param sp pointer to spacegroup + * @param h input reflection index + * @param k input reflection index + * @param l input reflection index + * @return 1 if h,k,l is centric, 0 if not centric, and -1 if there is + * an error. + */ +int ccp4spg_is_centric(const CCP4SPG* sp, const int h, const int k, const int l); + +/** Check indices against a centric zone for a given spacegroup. + * @param nzone index of centric zone + * @param h reflection index + * @param k reflection index + * @param l reflection index + * @return 0 if in zone "nzone", non-zero otherwise + */ +int ccp4spg_check_centric_zone(const int nzone, const int h, const int k, const int l); + +/** Return phase of a centric reflection in the range 0.0 <= phase < 180.0. + * You should first check that reflection really is centric. + * @param sp pointer to spacegroup + * @param h reflection index + * @param k reflection index + * @param l reflection index + * @return phase of a centric reflection + */ +float ccp4spg_centric_phase(const CCP4SPG* sp, const int h, const int k, const int l); + +/** Print a summary of the centric zones of a spacegroup. + * @param sp pointer to spacegroup + * @return void + */ +void ccp4spg_print_centric_zones(const CCP4SPG* sp); + +/** Obtain string description of centric zone. + * @param nzone index of centric zone + * @param centric_zone string description of centric zone + * @return string description of centric zone + */ +char *ccp4spg_describe_centric_zone(const int nzone, char *centric_zone); + +/** Set up epsilon zones for a given spacegroup. This is called + * upon loading a spacegroup. + * @param sp pointer to spacegroup + * @return void + */ +void ccp4spg_set_epsilon_zones(CCP4SPG* sp); + +/** Return reflection multiplicity factor for a given hkl in a given + * spacegroup. + * @param sp pointer to spacegroup + * @param h reflection index + * @param k reflection index + * @param l reflection index + * @return reflection multiplicity factor + */ +int ccp4spg_get_multiplicity(const CCP4SPG* sp, const int h, const int k, const int l); + +/** Check indices against an epsilon zone for a given spacegroup. + * @param nzone index of epsilon zone (runs from 1 to 13) + * @param h reflection index + * @param k reflection index + * @param l reflection index + * @return 0 if in zone "nzone", non-zero otherwise + */ +int ccp4spg_check_epsilon_zone(const int nzone, const int h, const int k, const int l); + +/** Print a summary of the epsilon zones of a spacegroup. + * @param sp pointer to spacegroup + * @return void + */ +void ccp4spg_print_epsilon_zones(const CCP4SPG* sp); + +/** Obtain string description of epsilon zone. + * @param nzone index of epsilon zone + * @param epsilon_zone string description of epsilon zone + * @return string description of epsilon zone + */ +char *ccp4spg_describe_epsilon_zone(const int nzone, char *epsilon_zone); + + +/** Check if reflection is a systematic absence. + * @param sp pointer to spacegroup + * @param h reflection index + * @param k reflection index + * @param l reflection index + * @return 1 if reflection is a systematic absence, 0 otherwise. + */ +int ccp4spg_is_sysabs(const CCP4SPG* sp, const int h, const int k, const int l); + +/** Translated from Alexei Vagin's CALC_ORIG_PS. + * @param namspg Spacegroup name for printing only. + * @param nsym Input number of symmetry operators. + * @param rsym Input symmetry operators. + * @param origins Array containing alternative origins on output. + * @param polarx Return whether polar along x axis. + * @param polary Return whether polar along y axis. + * @param polarz Return whether polar along z axis. + * @param iprint If true, print out list of alternative origins. + * @return Number of alternate origins for spacegroup. + */ +int ccp4spg_generate_origins(const char *namspg, const int nsym, const float rsym[][4][4], + float origins[][3], int *polarx, int *polary, int *polarz, + const int iprint); + +/** Print details on reciprocal spacegroup. + * @param sp pointer to spacegroup + * @return void + */ +void ccp4spg_print_recip_spgrp(const CCP4SPG* sp); + +/** Print reciprocal symops. + * @param sp pointer to spacegroup + * @return void + */ +void ccp4spg_print_recip_ops(const CCP4SPG* sp); + +/** Convert string of type 0<=y<=1/4 to 0.0-delta, 0.25+delta, where + * delta is set to 0.00001 Makes many assumptions about string. + * @param range input string. + * @param limits output range limits. + * @return 0 on success + */ +int range_to_limits(const char *range, float limits[2]); + +/** Sets an FFT grid for a spacegroup. + * @param sp pointer to spacegroup + * @param nxmin minimum sampling on x + * @param nymin minimum sampling on y + * @param nzmin minimum sampling on z + * @param sample default fineness of sample + * @param nx returns sampling intervals along x + * @param ny returns sampling intervals along y + * @param nz returns sampling intervals along z + * @return void + */ +void set_fft_grid(CCP4SPG* sp, const int nxmin, const int nymin, const int nzmin, + const float sample, int *nx, int *ny, int *nz); + +/** Checks whether all factors of a number n are less than or + * equal to 19. + * @param n Number to be tested. + * @return 1 on success, O on failure. + */ +int all_factors_le_19(const int n); + +/** Sets a grid sample greater than minsmp, which has no prime + * factors greater than 19, and contains the factor nmul. + * @param minsmp + * @param nmul + * @param sample + * @return Grid sample or -1 on failure. + */ +int get_grid_sample(const int minsmp, const int nmul, const float sample); + +/** Check for consistency between cell dimensions and spacegroup. Latter + * is identified from symmetry operators. + * @param nsym No. of symmetry operators. + * @param rsym Symmetry operators. + * @param cell Cell dimensions. + * @return 1 if they are consistent, 0 if there is a problem. + */ +int ccp4spg_check_symm_cell(int nsym, float rsym[][4][4], float cell[6]); + +#ifdef __cplusplus +} } +#endif +#endif diff --git a/ccp4c/ccp4/cvecmat.c b/ccp4c/ccp4/cvecmat.c new file mode 100644 index 00000000..d178f84c --- /dev/null +++ b/ccp4c/ccp4/cvecmat.c @@ -0,0 +1,162 @@ +/* + cvecmat.c: C library for vector and matrix manipulations + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file cvecmat.c + * C library for vector and matrix manipulations. + * Martyn Winn + */ + +#include +#include "cvecmat.h" +/* rcsid[] = "$Id$" */ + +/* c = a X b */ + +void ccp4_dcross(const double a[3], const double b[3], double c[3]) +{ + c[0] = a[1]*b[2] - b[1]*a[2]; + c[1] = a[2]*b[0] - b[2]*a[0]; + c[2] = a[0]*b[1] - b[0]*a[1]; +} + +void ccp4_3matmul(double c[3][3], const double a[3][3], const double b[3][3]) +{ + int i,j,k; + + for ( i = 0; i < 3; i++ ) + for ( j = 0; j < 3; j++ ) { + c[i][j] = 0.0; + for ( k = 0; k < 3; k++ ) + c[i][j] += a[i][k]*b[k][j]; + } +} + +void ccp4_4matmul( float c[4][4], const float a[4][4], const float b[4][4]) +{ + int i,j,k; + + for ( i = 0; i < 4; i++ ) + for ( j = 0; j < 4; j++ ) { + c[i][j] = 0.0; + for ( k = 0; k < 4; k++ ) + c[i][j] += a[i][k]*b[k][j]; + } +} + +/* A (I) 3*3 matrix to be inverted */ +/* AI (O) inverse matrix */ +/* returns determinant */ + +double invert3matrix(const double a[3][3], double ai[3][3]) + +{ int i,j; + double c[3][3],d; + + ccp4_dcross(a[1],a[2],c[0]); + ccp4_dcross(a[2],a[0],c[1]); + ccp4_dcross(a[0],a[1],c[2]); + + d = a[0][0]*c[0][0] + a[0][1]*c[0][1] + a[0][2]*c[0][2]; + + if (fabs(d) > 1.0e-30) { + for ( i = 0; i < 3; i++ ) + for ( j = 0; j < 3; j++ ) + ai[i][j] = c[j][i] / d; + } else { + return 0.0; + } + return d; +} + +/* A (I) 4*4 matrix to be inverted */ +/* AI (O) inverse matrix */ +/* returns determinant */ + +float invert4matrix(const float a[4][4], float ai[4][4]) + +{ + double c[4][4], d; + int i, j; + double x[3][3]; + int i1, j1, i2 ; + double am, q; + int ii, jj; + + /* Function Body */ + for (ii = 0; ii < 4; ++ii) { + for (jj = 0; jj < 4; ++jj) { + ai[ii][jj] = 0.0; + i = -1; + for (i1 = 0; i1 < 4; ++i1) { + if (i1 != ii) { + ++i; + j = -1; + for (j1 = 0; j1 < 4; ++j1) { + if (j1 != jj) { + ++j; + x[i][j] = a[i1][j1]; + } + } + } + } + + am = x[0][0]*x[1][1]*x[2][2] - x[0][0]*x[1][2]*x[2][1] + + x[0][1]*x[1][2]*x[2][0] - x[0][1]*x[1][0]*x[2][2] + + x[0][2]*x[1][0]*x[2][1] - x[0][2]*x[1][1]*x[2][0]; + i2 = ii + jj; + c[ii][jj] = ccp4_pow_ii(-1.0, i2) * am; + } + } + +/* ---- Calculate determinant */ + + d = 0.0; + + for (i = 0; i < 4; ++i) { + d = a[i][0] * c[i][0] + d; + } + +/* ---- Get inverse matrix */ + + + if (fabs(d) > 1.0e-30) { + q = 1.0/d; + for (i = 0; i < 4; ++i) { + for (j = 0; j < 4; ++j) { + ai[i][j] = (float) (c[j][i] * q); + } + } + } else { + return 0.0; + } + + return ((float) d); +} + +float ccp4_pow_ii(const float base, const int power) { + + int i = 0; + float pow = 1; + + while (++i <= power) + pow *= base; + + return pow; +} + diff --git a/ccp4c/ccp4/cvecmat.h b/ccp4c/ccp4/cvecmat.h new file mode 100644 index 00000000..d8cc4a81 --- /dev/null +++ b/ccp4c/ccp4/cvecmat.h @@ -0,0 +1,39 @@ +/* + cvecmat.h: header file for cvecmat.c + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#ifndef __CCP4_VECMAT +#define __CCP4_VECMAT + +#ifdef __cplusplus +extern "C" { +#endif +/* rcsidhv[] = "$Id$" */ + +void ccp4_dcross(const double a[3], const double b[3], double c[3]); +void ccp4_3matmul(double c[3][3], const double a[3][3], const double b[3][3]); +void ccp4_4matmul( float c[4][4], const float a[4][4], const float b[4][4]); +double invert3matrix(const double a[3][3], double ai[3][3]); +float invert4matrix(const float a[4][4], float ai[4][4]); + +float ccp4_pow_ii(const float base, const int power); + +#ifdef __cplusplus +} +#endif + +#endif /*!CCP4_VECMAT */ diff --git a/ccp4c/ccp4/library_err.c b/ccp4c/ccp4/library_err.c new file mode 100644 index 00000000..f6033c07 --- /dev/null +++ b/ccp4c/ccp4/library_err.c @@ -0,0 +1,324 @@ +/* + library_err.c: Error handling library + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file library_err.c + * Error handling library. + * Charles Ballard + */ + +#include +#include +#include +#include "ccp4_errno.h" +/* rcsid[] = "$Id$" */ + +/** @global ccp4_errno: global to store data +*/ +int ccp4_errno = 0; + +/* error_levels: error level descriptions */ +static const char * const error_levels[] = + { + "Success", /* 0 */ + "Informational", /* 1 */ + "Warning", /* 2 */ + "Error", /* 3 */ + "FATAL ERROR" /* 4 */ +}; + +/* file io errors */ +static const char *const cfile_errlist[] = + { + "Error 0", /* 0 = CIO_Ok */ + "Bad mode", /* 1 = CIO_BadMode */ + "Cannot open file", /* 2 = CIO_CantOpenFile */ + "Too many open files", /* 3 = CIO_MaxFile */ + "Read failed", /* 4 = CIO_ReadFail */ + "Write failed", /* 5 = CIO_WriteFail */ + "Close fail", /* 6 = CIO_CloseFail */ + "Seek fail", /* 7 = CIO_SeekFail */ + "Null pointer passed", /* 8 = CIO_NullPtr */ + "End of File", /* 9 = CIO_EOF */ + "No file" /* 10 = CIO_NoFile */ + "File not open", /* 11 = CIO_NotOpen */ + "Unlink failed" /* 12 = CIO_UnlinkFail */ + }; + +/* map library errors */ +static const char *const cmap_errlist[] = + { + "Error 0", /* 0 = CMERR_Ok */ + "Unassigned unit", /* 1 = CMERR_NoChannel */ + "Unassigned unit or disposed file", /* 2 = CMERR_NoFile */ + "Logical name does not exist", /* 3 = CMERR_NoLogicalName */ + "Cannot open file", /* 4 = CMERR_CantOpenFile */ + "No associated header", /* 5 = CMERR_NoHeader */ + "Read failed", /* 6 = CMERR_ReadFail */ + "Write failed", /* 7 = CMERR_WriteFail */ + "Parameter or dimension is incorrect ", /* 8 = CMERR_ParamError */ + "Unrecognised keyword", /* 9 = CMERR_UnrecognK */ + "File stamp error", /* 10 = CMERR_FileStamp */ + "Symmetry", /* 11 = CMERR_SymErr */ + "Cannot allocate memory", /* 12 = CMERR_AllocFail */ + "Too many open files", /* 13 = CMERR_MaxFile */ + }; + +/* mtz library errrors */ +static const char *const cmtz_errlist[] = + { + "Error 0", /* 0 = CMTZERR_Ok */ + "Unassigned unit", /* 1 = CMTZERR_NoChannel */ + "Null file handle, file not opened", /* 2 = CMTZERR_NoFile */ + "Logical name does not exist", /* 3 = CMTZERR_NoLogicalName */ + "Cannot open file", /* 4 = CMTZERR_CantOpenFile */ + "No associated header", /* 5 = CMTZERR_NoHeader */ + "Read failed", /* 6 = CMTZERR_ReadFail */ + "Write failed", /* 7 = CMTZERR_WriteFail */ + "Function parameter is incorrect", /* 8 = CMTZERR_ParamError */ + "Invalid cell dimensions", /* 9 = CMTZERR_Cellerr */ + "File stamp error", /* 10 = CMTZERR_FileStamp */ + "Symmetry", /* 11 = CMTZERR_SymErr */ + "Cannot allocate memory", /* 12 = CMTZERR_AllocFail */ + "Too many open files", /* 13 = CMTZERR_MaxFile */ + "Failed to initialise parser", /* 14 = CMTZERR_ParserFail */ + "File not identified as MTZ", /* 15 = CMTZERR_NotMTZ */ + "Missing or incomplete dataset information in input file.", /* 16 = CMTZERR_DatasetIncomplete */ + "No architecture information in file.", /* 17 = CMTZERR_NoArch */ + "Attempt to access unallocated dataset", /* 18 = CMTZERR_NullDataset */ + "Input MTZ file has incorrect major version for current library", /* 19 = CMTZERR_BadVersion */ + "MTZ header is corrupted: missing tokens in SYMINF record", /* 20 = CMTZERR_SYMINFIncomplete */ + "MTZ header is corrupted: missing tokens in COLUMN record", /* 21 = CMTZERR_COLUMNIncomplete */ + "Batch headers corrupted", /* 22 = CMTZERR_BadBatchHeader */ + "Input MTZ file has different minor version to that supported by current library", /* 23 = CMTZERR_DifferentVersion */ + "File column type different from type expected by program", /* 24 = CMTZERR_ColTypeMismatch */ + "MTZ header: error in column group specification", /* 25 = CMTZERR_ColGroupError */ + "MTZ header: error in column source specification", /* 26 = CMTZERR_ColSourceError */ + }; + +/* parser library errors */ +static const char *const cpars_errlist[] = + { + "Error 0", /* 0 = CPARSERR_Ok */ + "Maximum number of tokens exceeded", /* 1 = CPARSERR_MaxTokExceeded */ + "Cannot allocate memory", /* 2 = CPARSERR_AllocFail */ + "Null pointer", /* 3 = CPARSERR_NullPointer */ + "Line is longer than allocated length, so truncated", /* 4 = CPARSERR_LongLine */ + "Failed to open external command file", /* 5 = CPARSERR_CantOpenFile */ + "Failed to get name for external file", /* 6 = CPARSERR_NoName */ + "Overflow - exponent is too big to be evaluated", /* 7 = CPARSERR_ExpOverflow */ + "Underflow - exponent is too small to be evaluated", /* 8 = CPARSERR_ExpUnderflow */ + "Problem in mat4_to_symop", /* 9 = CPARSERR_MatToSymop */ + "Failed to interpret symop string", /* 10 = CPARSERR_SymopToMat */ + }; + +/* symmetry library errors */ +static const char *const csym_errlist[] = + { + "Error 0", /* 0 = CSYMERR_Ok */ + "Failed to initialise parser", /* 1 = CSYMERR_ParserFail */ + "Cannot find SYMINFO file - no symmetry information", /* 2 = CSYMERR_NoSyminfoFile */ + "Pointer to spacegroup structure is NULL", /* 3 = CSYMERR_NullSpacegroup */ + "ASU definition not found for this spacegroup", /* 4 = CSYMERR_NoAsuDefined */ + "Undefined Laue code for this spacegroup", /* 5 = CSYMERR_NoLaueCodeDefined */ + "Not enough tokens on SYMINFO line", /* 6 = CSYMERR_SyminfoTokensMissing */ + }; + +static const char *const cgen_errlist[] = + { + "Error 0", /* 0 = CGENERR_Ok */ + "Cannot allocate memory", /* 1 = CGENERR_AllocFail */ + "Cannot set environment variable", /* 2 = CGENERR_CantSetEnvironment */ + "Maximum number of logical names exceeded", /* 3 = CGENERR_MaxNamesExceeded */ + "Use: -e filename", /* 4 = CGENERR_EOptionUseError */ + "Use: -d filename", /* 5 = CGENERR_DOptionUseError */ + "Use: ", /* 6 = CGENERR_LogicalNameUseError */ + "Cannot open environ.def", /* 7 = CGENERR_CantOpenEnvFile */ + "Cannot open default.def", /* 8 = CGENERR_CantOpenDefFile */ + "Cannot parse environ.def file", /* 9 = CGENERR_ParseEnvFail */ + "Cannot parse default.def file", /* 10= CGENERR_ParseDefFail */ + "Cannot find input file", /* 11= CGENERR_CantFindInFile */ + "Failed to set path for environ.def file", /* 12= CGENERR_EnvPathFail */ + "Failed to set path for default.def file", /* 13= CGENERR_DefPathFail */ + "Cannot get CLIBD from environment", /* 14= CGENERR_CantGetClibd */ + "Cannot get CCP4_SCR from environment", /* 15= CGENERR_CantGetCcp4Scr */ + }; + +struct error_system { + char system[32]; + int system_nerr; + const char * const *error_list; +}; + +/* construct error list */ +static const struct error_system ccp4_errlist[] = { + {"system", 0, 0, }, + {"library_file", CCP4_COUNT(cfile_errlist), cfile_errlist,}, + {"mmdb", 0, 0,}, + {"mtz", CCP4_COUNT(cmtz_errlist), cmtz_errlist,}, + {"ccp4_map", CCP4_COUNT(cmap_errlist), cmap_errlist,}, + {"utils", 0, 0}, + {"ccp4_parser", CCP4_COUNT(cpars_errlist), cpars_errlist,}, + {"csym", CCP4_COUNT(csym_errlist), csym_errlist,}, + {"ccp4_general", CCP4_COUNT(cgen_errlist), cgen_errlist,} +}; + +static const int ccp4_system_nerr = CCP4_COUNT(ccp4_errlist); + +/* Obtain character string based upon error code. + Typical use ccp4_strerror(ccp4_errno) + The returned string is statically allocated in the + library_err.c file and should not be freed. + param error code (int) + returns const pointer to error message. +*/ +const char *ccp4_strerror(int error) +{ + int system = CCP4_ERRGETSYS(error); + /* int level = CCP4_ERRGETLEVEL(error); */ + int code = CCP4_ERRGETCODE(error); + + if (error == -1 || system == 0) + return strerror(errno); + + if (system >= ccp4_system_nerr) + return ("bad system error"); + if (code >= ccp4_errlist[system].system_nerr) + return ("bad error code"); + return (ccp4_errlist[system].error_list[code]); +} + +/* Print out passed message and internal message based upon + ccp4_errno + "message : error message " + param message (const char *) + return void +*/ +void ccp4_error (const char *msg) +{ + const char *colon; + + if (msg == 0 || *msg == '\0') + colon = ""; + else + colon = ": "; + + fprintf (stderr, "%s%s%s\n", + msg, colon, ccp4_strerror(ccp4_errno)); + if(ccp4_errno != -1 && CCP4_ERRGETSYS(ccp4_errno)) { + fprintf (stderr, "System: %s\nLevel: %d\n", + ccp4_errlist[CCP4_ERRGETSYS(ccp4_errno)].system, + CCP4_ERRGETLEVEL(ccp4_errno)); + if (errno) + fprintf (stderr, "%s%s\n", + "Last system message: ",strerror(errno)); } +} + +/* Wrapper for ccp4_error which also calls exit(1) + param message (const char *) +*/ +void ccp4_fatal (const char *message) +{ + ccp4_error(message); + exit(1); +} + +int CFile_Perror(const char *msg) +{ + const char * colon; + int error = CCP4_ERRGETCODE(ccp4_errno); + int cfile_nerr = ccp4_errlist[4].system_nerr; + + if (msg == NULL || msg == '\0') colon = ""; + else colon = ": "; + + if (error > 0 && error <= cfile_nerr) { + fprintf(stderr,"%s%s%s \n", + msg,colon,cfile_errlist[error]); + return error; } + fprintf(stderr,"Unknown error code"); + return -1; +} + +int ccp4_liberr_verbosity(int iverb) { + static int verbosity_level=1; + + if (iverb >= 0) + verbosity_level = iverb; + + return verbosity_level; +} + +/* Routine to set ccp4_errno and print out message for + error tracing. This should be the only way in + which ccp4_errno is set. + See error codes above for levels and systems. + A callback with prototype void function(void) + may also be passed to the routine. + Note: FATAL calls exit(1). + param error code (int) + param message (const char * const) + param callback (point to routine) +*/ +void ccp4_signal(const int code, const char * const msg, + void (*callback) ()) +{ + int severity = CCP4_ERRGETLEVEL(code), + system = CCP4_ERRGETSYS(code), + msg_no = CCP4_ERRGETCODE(code), + fatal_err = (severity == 4); + static const char msg_fmt[] = ">>>>>> CCP4 library signal %s:%s (%s)\n\t raised in %s <<<<<<\n"; + static const char sys_fmt[] = ">>>>>> System signal %d:%s (%s)\n\t raised in %s <<<<<<\n"; + ccp4_errno = code; + + /* use this function to control whether error messages are printed */ + if (!ccp4_liberr_verbosity(-1)) return; + + if (system == 0) { + if (msg) + printf(sys_fmt, + errno, + strerror(errno), + error_levels[severity], + msg); + else + printf(">>>>>> System signal %d:%s (%s) <<<<<<", + errno, + strerror(errno), + error_levels[severity]); + ccp4_errno = errno; } + else + if (msg) + printf(msg_fmt, + ccp4_errlist[system].system, + ccp4_errlist[system].error_list[msg_no], + error_levels[severity], + msg); + else + printf(">>>>>> CCP4 library signal %s:%s (%s) <<<<<<\n", + ccp4_errlist[system].system, + ccp4_errlist[system].error_list[msg_no], + error_levels[severity]); + + if (callback) + (*callback)(); + + if (fatal_err) exit(1); +} + + diff --git a/ccp4c/ccp4/library_file.c b/ccp4c/ccp4/library_file.c new file mode 100644 index 00000000..ee42c707 --- /dev/null +++ b/ccp4c/ccp4/library_file.c @@ -0,0 +1,2375 @@ +/* + library_file.c: functions for file i/o + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file library_file.c + * Functions for file i/o. + * Charles Ballard + */ + +#include +#include +#include +#if defined _MSC_VER +#include +#endif +#include "library_file.h" +#include "ccp4_errno.h" +#include "ccp4_file_err.h" +/* rcsid[] = "$Id: library_file.c,v 1.26 2012/08/20 12:21:16 gxg60988 Exp $" */ + +static uint16 nativeIT = NATIVEIT; /* machine integer type */ +static uint16 nativeFT = NATIVEFT; /* machine float type */ + +static int _item_sizes[] = { + (int) sizeof (char), /* 0: bytes */ + (int) sizeof (short int), /* 1: (integer) half words */ + (int) sizeof (float), /* 2: reals/words */ + (int) sizeof (int), /* 3: `short complex' (pairs of half words). + NB int rather than 2*short since must fit + into fortran integer */ + (int) 2*sizeof (float), /* 4: complex (pairs of words) */ + (int) 2*sizeof (int), /* 5: double integers */ + (int) sizeof (int) /* 6: integers */ +}; + +static int (*_read_mode[])(CCP4File *, uint8 *, size_t) = { + ccp4_file_readchar, + ccp4_file_readshort, + ccp4_file_readfloat, + ccp4_file_readshortcomp, + ccp4_file_readcomp, + ccp4_file_readint64, + ccp4_file_readint +}; + +static int (*_write_mode[])(CCP4File *, const uint8 *, size_t) = { + ccp4_file_writechar, + ccp4_file_writeshort, + ccp4_file_writefloat, + ccp4_file_writeshortcomp, + ccp4_file_writecomp, + ccp4_file_writeint64, + ccp4_file_writeint +}; + +/** + * vaxF2ieeeF: + * @param buffer (float_uint_uchar *) vax order float array + * @param size (unsigned int) number of items + * + * Translation from Vax floating point format to ieee. + * + */ +static void vaxF2ieeeF(union float_uint_uchar *buffer, const unsigned int size) +{ + union float_uint_uchar out; + unsigned char exp; + unsigned int i; + + if ( buffer == NULL || size == 0) return; + + for (i = 0; i < size; i++) { + exp = (buffer[i].c[1] << 1) | (buffer[i].c[0] >> 7); /* extract exponent */ + if (!exp && !buffer[i].c[1]) /* zero value */ + out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; + else if (exp > 2) { /* normal value */ + out.c[0] = buffer[i].c[1] - (uint8)1; /* subtracts 2 from exponent */ + /* copy mantissa, LSB of exponent */ + out.c[1] = buffer[i].c[0]; + out.c[2] = buffer[i].c[3]; + out.c[3] = buffer[i].c[2]; + } else if (exp) { /* denormalized number */ + int shft; + + out.c[0] = buffer[i].c[1] & 0x80; /* keep sign, zero exponent */ + shft = 3 - exp; + /* shift original mant by 1 or 2 to get denormalized mant */ + /* prefix mantissa with '1'b or '01'b as appropriate */ + out.c[1] = (uint8)((buffer[i].c[0] & 0x7f) >> shft) | + (uint8)(0x10 << exp); + out.c[2] = (uint8)(buffer[i].c[0] << (8-shft)) | + (uint8)(buffer[i].c[3] >> shft); + out.c[3] = (uint8)(buffer[i].c[3] << (8-shft)) | + (uint8)(buffer[i].c[2] >> shft); + } else { /* sign=1 -> infinity or NaN */ + out.c[0] = 0xff; /* set exp to 255 */ + /* copy mantissa */ + out.c[1] = buffer[i].c[0] | (uint8)0x80; /* LSB of exp = 1 */ + out.c[2] = buffer[i].c[3]; + out.c[3] = buffer[i].c[2]; + } + buffer[i] = out; /* copy back result */ + } +} + +/** + * ieeeF2vaxF: + * @param buffer (float_uint_uchar *) big endian order float array + * @param size (unsigned int) number of items + * + * Translation from ieee floating point format to vax. + * + */ +static void ieeeF2vaxF(union float_uint_uchar *buffer, const unsigned int size) +{ + union float_uint_uchar out; + unsigned char exp; + unsigned int i; + + if ( buffer == NULL || size == 0) return; + + for (i=0; i>7); /* extract exponent */ + if (exp) { /* non-zero exponent */ + /* copy mantissa, last bit of exponent */ + out.c[0] = buffer[i].c[1]; + out.c[2] = buffer[i].c[3]; + out.c[3] = buffer[i].c[2]; + if (exp < 254) /* normal value */ + out.c[1] = buffer[i].c[0] + (uint8)1; /* actually adds two to exp */ + else { /* infinity or NaN */ + if (exp == 254) /* unrepresentable - OFL */ + /* set mant=0 for overflow */ + out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; + out.c[0] &= 0x7f; /* set last bit of exp to 0 */ + out.c[1] = 0x80; /* sign=1 exp=0 -> OFL or NaN. this will raise + a reserved operand exception if used. */ + } + } else if (buffer[i].c[1] & 0x60) { /* denormalized value */ + int shft; + + shft = (buffer[i].c[1] & 0x40) ? 1 : 2; /* shift needed to normalize */ + /* shift mantissa */ + /* note last bit of exp set to 1 implicitly */ + out.c[0] = (uint8)(buffer[i].c[1] << shft) | + (uint8)(buffer[i].c[2] >> (8-shft)); + out.c[3] = (uint8)(buffer[i].c[2] << shft) | + (uint8)(buffer[i].c[3] >> (8-shft)); + out.c[2] = (uint8)(buffer[i].c[3] << shft); + out.c[1] = (uint8)(buffer[i].c[0] & 0x80); /* sign */ + if (shft==1) { /* set exp to 2 */ + out.c[1] |= 0x01; + out.c[0] &= 0x7f; /* set LSB of exp to 0 */ + } + } else /* zero */ + out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; + buffer[i] = out; /* copy back the result */ + } +} + +/** + * convexF2ieeeF: + * @param buffer (float_uint_uchar *) float array with convex byte ordering + * @param size (unsigned int) number of items + * + * Translation from convex floating point format to ieee. + * + */ +static void convexF2ieeeF(union float_uint_uchar *buffer, const unsigned int size) +{ + union float_uint_uchar out; + unsigned char exp; + unsigned int i; + + if ( buffer == NULL || size == 0) return; + + for (i = 0; i < size; i++) { + exp = (buffer[i].c[0]<<1) | (buffer[i].c[1]>>7); /* extract exponent */ + if (!exp && !buffer[i].c[0]) /* zero value */ + out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; + else if (exp > 2) { /* normal value */ + out.c[0] = buffer[i].c[0] - (uint8)1; /* subtracts 2 from exponent */ + /* copy mantissa, LSB of exponent */ + out.c[1] = buffer[i].c[1]; + out.c[2] = buffer[i].c[2]; + out.c[3] = buffer[i].c[3]; + } else if (exp) { /* denormalized number */ + int shft; + + out.c[0] = buffer[i].c[0] & 0x80; /* keep sign, zero exponent */ + shft = 3 - exp; + /* shift original mant by 1 or 2 to get denormalized mant */ + /* prefix mantissa with '1'b or '01'b as appropriate */ + out.c[1] = (uint8)((buffer[i].c[1] & 0x7f) >> shft) | + (uint8)(0x10 << exp); + out.c[2] = (uint8)(buffer[i].c[1] << (8-shft)) | + (uint8)(buffer[i].c[2] >> shft); + out.c[3] = (uint8)(buffer[i].c[2] << (8-shft)) | + (uint8)(buffer[i].c[3] >> shft); + } else { /* sign=1 -> infinity or NaN */ + out.c[0] = 0xff; /* set exp to 255 */ + /* copy mantissa */ + out.c[1] = buffer[i].c[1] | (uint8)0x80; /* LSB of exp = 1 */ + out.c[2] = buffer[i].c[2]; + out.c[3] = buffer[i].c[3]; + } + buffer[i] = out; /* copy back result */ + } +} + +/** + * ieeeF2convexF: + * @param buffer (float_uint_uchar *) float array with big endian byte ordering + * @param size (const unsigned int) numnber of items + * + * Translation from ieee floating point format to convex. + * + */ +static void ieeeF2convexF(union float_uint_uchar *buffer, const unsigned int size) +{ + union float_uint_uchar out; + unsigned char exp; + unsigned int i; + + if ( buffer == NULL || size == 0) return; + + for (i=0; i < size; i++) { + exp = (uint8)(buffer[i].c[0] << 1) | + (uint8)(buffer[i].c[1] >> 7); /* extract exponent */ + if (exp) { /* non-zero exponent */ + /* copy mantissa, last bit of exponent */ + out.c[1] = buffer[i].c[1]; + out.c[3] = buffer[i].c[3]; + out.c[2] = buffer[i].c[2]; + if (exp < 254) /* normal value */ + out.c[0] = buffer[i].c[0] + (uint8)1; /* actually adds two to exp */ + else { /* infinity or NaN */ + if (exp == 254) /* unrepresentable - OFL */ + /* set mant=0 for overflow */ + out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; + out.c[1] &= 0x7f; /* set last bit of exp to 0 */ + out.c[0] = 0x80; /* sign=1 exp=0 -> OFL or NaN. this will raise + a reserved operand exception if used. */ + } + } else if (buffer[i].c[1] & 0x60) { /* denormalized value */ + int shft; + + shft = (buffer[i].c[1] & 0x40) ? 1 : 2; /* shift needed to normalize */ + /* shift mantissa */ + /* note last bit of exp set to 1 implicitly */ + out.c[1] = (uint8)(buffer[i].c[1] << shft) | + (uint8)(buffer[i].c[2] >> (8-shft)); + out.c[2] = (uint8)(buffer[i].c[2] << shft) | + (uint8)(buffer[i].c[3] >> (8-shft)); + out.c[3] = (uint8)(buffer[i].c[3] << shft); + out.c[0] = (uint8)(buffer[i].c[0] & 0x80); /* sign */ + if (shft==1) { /* set exp to 2 */ + out.c[0] |= 0x01; + out.c[1] &= 0x7f; /* set LSB of exp to 0 */ + } + } else /* zero */ + out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; + buffer[i] = out; /* copy back the result */ + } +} + +/** + * ccp4_file_raw_read: + * @param cfile * (CCP4File *) + * @param buffer * (char *) input array + * @param n_items (size_t) number of items + * + * reads block of n_items bytes from cfile to buffer via + * FILE struct cfile->stream(fread) or file desc cfile->fd + * read/_read). Increments location value cfile->loc. The + * cfile->iostat flag is set on failure. + * @return number of bytes read. + */ +int ccp4_file_raw_read(CCP4File *cfile, char *buffer, size_t n_items) +{ + int result; + + if (cfile->buffered && cfile->stream) { + result = fread (buffer, (size_t) sizeof(char), n_items, + cfile->stream); + if (result != n_items && feof(cfile->stream)) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_EOF), + "ccp4_file_raw_read", NULL); + cfile->iostat = CIO_EOF; + result = EOF; + } else if (result != n_items && ferror(cfile->stream)) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_raw_read", NULL); + cfile->iostat = CIO_ReadFail; + result = 0; } + } else { +#if defined _MSC_VER + result = _read (cfile->fd, buffer, n_items); +#else + result = read (cfile->fd, buffer, n_items); +#endif + if (n_items && result <= 0) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_ReadFail), + "ccp4_file_raw_read", NULL); + cfile->iostat = CIO_ReadFail; + result = 0; } + } + cfile->last_op = READ_OP; + + cfile->loc += result; + cfile->getbuff = 0; + + return result; +} + +/** + * ccp4_file_raw_write: + * @param cfile (CCP4File *) + * @param buffer (char *) output array + * @param n_items (size_t) number of items + * + * writes block of @n_items bytes from @buffer to @cfile via FILE struct + * @cfile->stream(fwrite) or file desc @cfile->fd(write/_write). Increments + * @cfile->loc on success, or resets on failure, which is then used to + * determine the file length. On failure @cfile->iostat is set. + * @return number of bytes written. + */ +int ccp4_file_raw_write(CCP4File *cfile, const char *buffer, size_t n_items) +{ + int result; + + if (cfile->buffered && cfile->stream) + result = fwrite (buffer, (size_t) sizeof(char), n_items, + cfile->stream); + else +#if defined _MSC_VER + result = _write (cfile->fd, buffer, n_items); +#else + result = write (cfile->fd, buffer, n_items); +#endif + + cfile->last_op = WRITE_OP; + + if (result == n_items) + cfile->loc += n_items; + else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_WriteFail), + "ccp4_file_raw_write", NULL); + cfile->iostat = CIO_WriteFail; + ccp4_file_tell(cfile); } + cfile->length = MAX(cfile->loc,cfile->length); + cfile->getbuff = 0; + + return result; +} + +/** + * ccp4_file_raw_seek: + * @param cfile (CCP4File *) + * @param offset (long) offset in bytes + * @param whence (int) SEEK_SET, SEEK_CUR, or SEEK_END + * + * if the file is "seekable" (not stdin) the function + * seeks on @cfile by offset bytes using fseek/ftell (@cfile->stream) + * or lseek (@cfile->fd). %SEEK_SET is relative + * to start of file, %SEEK_CUR to current, %SEEK_END to + * end. + * @return offset in bytes on success, -1 on failure. + */ +int ccp4_file_raw_seek(CCP4File *cfile, long offset, int whence) +{ + int result = -1; + + if (!cfile->direct) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_raw_seek", NULL); + return result; } + + if (cfile->buffered) { +#if defined (__alpha) && defined (vms) + (void) fflush (cfile->stream); +#endif + if (!(result = (fseek (cfile->stream,offset,whence)))) + result = ftell(cfile->stream); + } else { +#if defined _MSC_VER + result = _lseek(cfile->fd,offset,whence); +#else + result = lseek(cfile->fd, offset, whence); +#endif + } + + cfile->last_op = IRRELEVANT_OP; + + if (result == -1) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_SeekFail), + "ccp4_file_raw_seek", NULL); + cfile->iostat = CIO_SeekFail; + } else + cfile->loc = result; + cfile->getbuff = 0; + + return (result); +} + +/** + * _file_free: + * @param cfile (CCP4File *) + * + * free up @cfile + */ +static void _file_free(CCP4File *cfile) +{ + if(cfile->name) free(cfile->name); + cfile->name = NULL; + free(cfile); +} + +/** + * _file_init: + * @param cfile () + * + * initialise cfile struct + * @return cfile struct + */ +static CCP4File *_file_init() +{ + CCP4File *cfile = (CCP4File *) malloc(sizeof(CCP4File)); + char *foreign = getenv ("CONVERT_FROM"); + char *native = getenv ("NATIVEMTZ"); + + memset(cfile,'\0',sizeof(CCP4File)); + cfile->fd = -1; + cfile->buffered = 1; + cfile->binary = 1; + cfile->last_op = IRRELEVANT_OP; + cfile->mode = DEFMODE; + cfile->itemsize = _item_sizes[DEFMODE]; + if (native == NULL && foreign != NULL) { + if (strcmp (foreign, "BEIEEE") == 0) { + cfile->fconvert = DFNTF_BEIEEE ; + cfile->iconvert = DFNTI_MBO ; } + else if (strcmp (foreign, "LEIEEE") == 0) { + cfile->fconvert = DFNTF_LEIEEE; + cfile->iconvert = DFNTI_IBO ; } + else if (strcmp (foreign, "VAX") == 0) { + cfile->fconvert = DFNTF_VAX ; + cfile->iconvert = DFNTI_IBO ; } + else if (strcmp (foreign, "CONVEXNATIVE") == 0) { + cfile->fconvert = DFNTF_CONVEXNATIVE ; + cfile->iconvert = DFNTI_MBO ; } + } else { + cfile->fconvert = nativeFT; + cfile->iconvert = nativeIT; + } + cfile->_read=_read_mode[DEFMODE]; + cfile->_write=_write_mode[DEFMODE]; + return (cfile); +} + +/** + * _file_open_mode: + * @param cfile (CCP4File *) + * @param flag (const int) mode flag + * + * set file open mode elements of @cfile (see ccp4_sysdep.h) + * O_TMP = 0x0010 + * O_RDONLY = 0x0000 + * O_WRONLY = 0x0001 + * O_RDWR = 0x0002 + * O_APPEND = 0x0008 + */ +static void _file_open_mode(CCP4File * cfile, const int flag) +{ + if (flag & O_TMP) + cfile->scratch = 1; + if (flag & (O_WRONLY | O_RDWR | O_APPEND) ) { + cfile->write = 1; + if (flag & O_RDWR) + cfile->read = 1; + if (flag & O_APPEND) + cfile->append = 1; + } else + cfile->read = 1; +} + +/** + * _file_close: + * @param cfile (CCP4File *) + * + * close @cfile if it is "owned" (@cfile->own) using fclose or close. + * Reset @cfile to some safe value. Note: flush anyway. + * @return 0 on success, -1 on failure. + */ +static int _file_close (CCP4File *cfile) +{ + int result = 0; + + if(cfile->buffered && cfile->stream) { + if (cfile->own) + result = fclose (cfile->stream); + else + result = fflush(cfile->stream); + } else { + if (cfile->own) +#if defined _MSC_VER + result = _close(cfile->fd); +#else + result = close (cfile->fd); +#endif + } + + if (result == EOF) + cfile->iostat = CIO_CloseFail; + else + cfile->stream = NULL; + + return (result); +} + +/** + * ccp4_file_is_write: + * @param cfile (CCP4File *) + * + * is the @cfile writeable + * @return 1 if true + */ +int ccp4_file_is_write(const CCP4File *cfile) +{ + return (cfile->write); +} + +/** + * ccp4_file_is_read: + * @param cfile (CCP4File *) + * + * is the @cfile readable + * @return 1 if true. + */ +int ccp4_file_is_read(const CCP4File *cfile) +{ + return (cfile->read); +} + +/** + * ccp4_file_is_append: + * @param cfile (CCP4File *) + * + * is the @cfile in append mode + * @return 1 if true. + */ +int ccp4_file_is_append(const CCP4File *cfile) +{ + return (cfile->append); +} + +/** + * ccp4_file_is_scratch: + * @param cfile (CCP4File *) + * + * is scratch file + * @return 1 if true. + */ +int ccp4_file_is_scratch(const CCP4File *cfile) +{ + return (cfile->scratch); +} + +/** + * ccp4_file_is_buffered: + * @param cfile (CCP4File *) + * + * is the file buffered + * @return 1 if true + */ +int ccp4_file_is_buffered(const CCP4File *cfile) +{ + return (cfile->buffered); +} + +/** + * ccp4_file_status: + * @param cfile (CCP4File *) + * + * @return @cfile error status + */ +int ccp4_file_status(const CCP4File *cfile) +{ + return (cfile->iostat); +} + +int ccp4_file_raw_setstamp(CCP4File *cfile, const size_t offset) +{ + cfile->stamp_loc = offset; + return 0; +} + +/** + * ccp4_file_setstamp: + * @param cfile (CCP4File *) + * @param stamp_loc (size_t) offset in items + * + * set the machine stamp offset in CCP4 items determined + * by the mode of @cfile. See ccp4_file_setmode(). + * @return 0 on success, %EOF on failure + */ +int ccp4_file_setstamp(CCP4File *cfile, const size_t offset) +{ + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_setstamp", NULL); + return EOF; } + + return ccp4_file_raw_setstamp(cfile, offset*cfile->itemsize); +} + +/** + * ccp4_file_setmode: + * @param cfile (CCP4File *) + * @param mode (int) io_mode + * + * set the data mode of cfile to mode + * (CCP4_BYTE (8 bit) = 0, + * CCP4_INT16 (16 bit) = 1, + * CCP4_INT64 (64 bit) = 5, + * CCP4_INT32 (32 bit) = 6, + * FLOAT32 (32 bit) = 2, + * COMP32 (2*16 bit) = 3, + * COMP64 (2*32 bit) = 4). + * @return 0 on success, EOF on failure. + */ +int ccp4_file_setmode (CCP4File *cfile, const int mode) +{ + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_mode", NULL); + return EOF; } + + if (mode >= 0 && mode <= 6) { + cfile->mode = mode; + cfile->itemsize = _item_sizes[mode]; + cfile->_read=_read_mode[mode]; + cfile->_write=_write_mode[mode]; + } else { + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_BadMode), + "ccp4_file_mode", NULL); + return EOF; } + + return 0; +} + +/** + * ccp4_file_mode: + * @param cfile (CCP4File *) + * + * get data mode of @cfile (CCP4_BYTE =0, CCP4_INT16 =1, CCP4_INT64 =5, CCP4_INT32 =6, + * FLOAT32 =2, COMP32 =3, COMP64 =4) + * @return %mode + */ +int ccp4_file_mode (const CCP4File *cfile) +{ + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_mode", NULL); + return EOF; } + + return (cfile->mode); +} + +/** + * ccp4_file_itemsize: + * @param cfile (CCP4File *) + * + * @return %itemsize of @cfile. + */ +int ccp4_file_itemsize(const CCP4File *cfile) +{ + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_BadMode), + "ccp4_file_itemsize", NULL); + return EOF; } + + return (cfile->itemsize); +} + +/** + * ccp4_file_name: + * @param cfile (CCP4File *) + * + * strdup @cfile->name + * @return name of file as char * + */ +char *ccp4_file_name( CCP4File *cfile) +{ +#if defined _MSC_VER + return ( cfile == NULL ? NULL : _strdup(cfile->name)); +#else + return ( cfile == NULL ? NULL : strdup(cfile->name)); +#endif +} + +/** + * ccp4_file_setbyte: + * @param cfile (CCP4File *) + * @param byte_order (int) + * + * set byte ordering for file + * Return: + */ +int ccp4_file_setbyte(CCP4File *cfile, const int byte_order) +{ + int result = (cfile->fconvert | (cfile->iconvert<<8)); + + switch (byte_order) { + case DFNTF_BEIEEE: + cfile->fconvert = DFNTF_BEIEEE; + cfile->iconvert = DFNTI_MBO; + break; + case DFNTF_LEIEEE: + cfile->fconvert = DFNTF_LEIEEE; + cfile->iconvert = DFNTI_IBO ; + break; + case DFNTF_VAX: + cfile->fconvert = DFNTF_VAX ; + cfile->iconvert = DFNTI_IBO ; + break; + case DFNTF_CONVEXNATIVE: + cfile->fconvert = DFNTF_CONVEXNATIVE ; + cfile->iconvert = DFNTI_MBO ; + break; + default: + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_BadMode), + "ccp4_file_setbyte", NULL); + result = 0; + } + return result; +} + +/** + * ccp4_file_byte: + * @param cfile (CCP4File *) + * + * get byte ordering for file + * @return byte ordering information + */ +int ccp4_file_byte(CCP4File *cfile) +{ + return (cfile->fconvert | (cfile->iconvert<<8)); +} + +/** + * ccp4_file_open_file: + * @param file (const FILE *) FILE struct + * @param flag (const int) io mode (O_RDONLY =0, O_WRONLY =1, O_RDWR =2, + * O_TMP =, O_APPEND =) + * + * open @cfile with existing handle FILE struct file and mode @flag. + * The struct stat is check to determine if file is a regular file, + * if it is, and is not stdin, it is assumed to be direct access. + * @return (CCP4File *) on success, NULL on failure + */ +CCP4File *ccp4_file_open_file (const FILE *file, const int flag) +{ + CCP4File *cfile; +#if defined _MSC_VER + struct _stat st; +#else + struct stat st; +#endif + + if (!file) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_open_file", NULL); + return NULL; } + + if (!(cfile = _file_init() ) ) { + ccp4_signal(CCP4_ERRLEVEL(3), + "ccp4_file_open_file", NULL); + return NULL; } + + /* set values in structure */ + _file_open_mode(cfile,flag); + cfile->stream = (FILE *) file; + cfile->buffered = 1; + cfile->open = 1; + +#if defined _MSC_VER + _fstat(_fileno(cfile->stream), &st); + if ( !(st.st_mode & S_IFREG) || file == stdin) { +#else + fstat(fileno(cfile->stream), &st); + if ( !S_ISREG(st.st_mode) || file == stdin ) { +#endif + cfile->length = INT_MAX; + cfile->direct = 0; + } else { + cfile->length = st.st_size; + cfile->direct = 1; + } + cfile->loc = ftell( (FILE *)file); + + return cfile; +} + +/** + * ccp4_file_open_fd: + * @param fd (const int) file descriptor + * @param flag (const int) io mode (O_RDONLY =0, O_WRONLY =1, O_RDWR =2, + * O_TMP =, O_APPEND =) + * + * initialise CCP4File struct with file descriptor @fd and mode @flag + * The struct stat is check to determine if file is a regular file, + * if it is, and is not stdin, it is assumed to be direct access. + * @return (CCP4File *) on success, NULL on failure + */ +CCP4File *ccp4_file_open_fd (const int fd, const int flag) +{ + CCP4File * cfile; +#if defined _MSC_VER + struct _stat st; +#else + struct stat st; +#endif + + if (!(cfile = _file_init() ) ) { + ccp4_signal(CCP4_ERRLEVEL(3), + "ccp4_file_open_fd", NULL); + return NULL; } + + _file_open_mode(cfile, flag); + cfile->fd = fd; + cfile->open = 1; + cfile->buffered = 0; + +#if defined _MSC_VER + _fstat(fd, &st); + if ( !(st.st_mode & S_IFREG) || fd == 0) { +#else + fstat(fd, &st); + if ( !S_ISREG(st.st_mode) || fd == 0 ) { +#endif + cfile->length = INT_MAX; + cfile->direct = 0; + cfile->loc = 0; + } else { + cfile->length = st.st_size; + cfile->direct = 1; +#if defined _MSC_VER + cfile->loc = _lseek(fd, 0L, SEEK_CUR); +#else + cfile->loc = lseek(fd, 0L, SEEK_CUR); +#endif + } + + return cfile; +} + +/** + * ccp4_file_open: + * @param filename (const char *) filename + * @param flag (const int) i/o mode, possible values are O_RDONLY, O_WRONLY, + * O_RDWR, O_APPEND, O_TMP, O_CREAT, O_TRUNC - see ccp4_sysdep.h + * + * initialise CCP4File struct for file filename with mode @flag. + * If !buffered use open(), otherwise fopen() + * The struct stat is check to determine if file is a regular file, + * if it is, and is not stdin, it is assumed to be direct access. + * + * @return (CCP4File *) on success, NULL on failure + */ +CCP4File *ccp4_file_open (const char *filename, const int flag) +{ + CCP4File *cfile; + int openflags = O_RDONLY; + char fmode[5]; +#if defined _MSC_VER + struct _stat st; +#else + struct stat st; +#endif + + if (!(cfile = _file_init())) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_open", NULL); + return NULL; } + _file_open_mode(cfile, flag); + + if (!cfile->buffered) { + if (cfile->read && cfile->write) openflags = (O_RDWR | O_CREAT); + else if (cfile->write) openflags = (O_WRONLY | O_CREAT); + if (cfile->append) openflags |= O_APPEND; + if (flag & O_TRUNC) openflags |= O_TRUNC; +#if defined _MSC_VER + if (cfile->scratch) openflags |= O_TEMPORARY; +#endif +#if defined(__DECC) && defined(VMS) || defined (_MSC_VER) + openflags |= O_BINARY; +#endif +#if defined _MSC_VER + cfile->fd = _open(filename, openflags); +#else + cfile->fd = open(filename, openflags); +#endif + if (cfile->fd == -1) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_CantOpenFile), + "ccp4_file_open1", NULL); + return NULL; + } else { +#if defined _MSC_VER + _fstat(cfile->fd, &st); } +#else + fstat(cfile->fd, &st); } +#endif + } else { + char *mptr = fmode; + if (cfile->append) { + *mptr++ = 'a'; + if (cfile->read) *mptr++ = '+'; + } else { + if (cfile->read && cfile->write) { + if (flag & O_TRUNC) {*mptr++ = 'w'; } + else *mptr++ = 'r'; + *mptr++ = '+'; + } else if (cfile->write) + *mptr++ = 'w'; + else + *mptr++ = 'r'; + } +#if defined(__DECC) && defined(VMS) || defined (_WIN32) + *mptr++ = 'b'; +#endif + *mptr++ = '\0'; + +#ifdef VMS + if (cfile->scratch) + cfile->stream = fopen (filename, fmode, + "mbc=16", /* bigger blocksize */ + "fop=tmd"); /* temporary, delete on close */ + else + cfile->stream = fopen (filename, fmode, + "mbc=16", /* bigger blocksize */ + "ctx=stm", "mrs=0", "rat=cr", "rfm=stmlf"); +#elif defined(_WIN32) + if (cfile->scratch) { + cfile->stream = tmpfile(); + if (!cfile->stream) { + ccp4_signal(CCP4_ERRLEVEL(2) | CCP4_ERRNO(CIO_CantOpenFile), + "tmpfile() failed, opening normal file instead.", NULL); + cfile->stream = fopen (filename, fmode); + } + } + else + cfile->stream = fopen (filename, fmode); +#else + cfile->stream = fopen (filename, fmode); + if (cfile->stream) + if (cfile->scratch && unlink (filename)!=0) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_UnlinkFail), + "ccp4_file_open(unlink)", NULL); + cfile->iostat = CIO_UnlinkFail; return NULL; } +#endif + if (!cfile->stream) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_CantOpenFile), + "ccp4_file_open2", NULL); + cfile->iostat = CIO_CantOpenFile; + free(cfile); + return NULL; } +#if defined (__alpha) && defined (vms) +(void) fflush (cfile->stream); +#endif +#if defined _MSC_VER + _fstat(_fileno(cfile->stream), &st); +#else + fstat(fileno(cfile->stream), &st); +#endif + } +#if defined _MSC_VER + cfile->name = _strdup(filename); +#else + cfile->name = strdup(filename); +#endif + cfile->open = 1; + cfile->own = 1; +#if defined _MSC_VER + if ( !(st.st_mode & S_IFREG) ) { +#else + if ( !cfile->scratch && !S_ISREG(st.st_mode) ) { +#endif + cfile->length = INT_MAX; + cfile->direct = 0; + } else { + cfile->length = st.st_size; + cfile->direct = 1; + } + cfile->loc = cfile->append ? cfile->length : 0; + + return cfile; +} + +/** + * ccp4_file_close: + * @param cfile (CCP4File *) + * + * close @cfile if owned, close (non-buffered) or + * fclose (buffered), or fflush if stream not owned. + * Free resources. + * @return 0 on success, EOF on failure + */ +int ccp4_file_close (CCP4File *cfile) +{ + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_close", NULL); + return EOF; } + + if (_file_close (cfile) == EOF) { + ccp4_signal(CCP4_ERRLEVEL(3),"ccp4_file_close", NULL); + return EOF; } + + _file_free(cfile); + + return (0); +} + +/** + * ccp4_file_rarch: + * @param cfile (CCP4File *) + * + * read machine stamp from file @cfile->stream. + * The machine stamp is at @cfile->stamp_loc items, set + * by ccp4_file_setstamp() (default 0). + * NB. these values may be overrriden with the environmental + * variable CONVERT_FROM. + * @return fileFT | (fileIT<<8) + */ +int ccp4_file_rarch (CCP4File *cfile) +{ + unsigned char mtstring[4]; /* machine stamp */ + char *native = getenv ("NATIVEMTZ"); + char *foreign = getenv ("CONVERT_FROM"); + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_rarch", NULL); + return EOF; } + + if (native != NULL) return (nativeFT | (nativeIT<<8)); + if (foreign == NULL) { + if (ccp4_file_raw_seek(cfile, cfile->stamp_loc, SEEK_SET) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3),"ccp4_file_rarch", NULL); + return EOF; } + + if (ccp4_file_raw_read(cfile, (char *) mtstring, 4UL) != 4) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_rarch", NULL); + return EOF; } + + cfile->iconvert = (mtstring[1]>>4) & 0x0f; + cfile->fconvert = (mtstring[0]>>4) & 0x0f; + + /* iconvert and fconvert should be one of the DFNTI/DFNTF values listed + in ccp4_sysdep.h and hence non-zero. Some machine stamps can be corrupted + (e.g. mrc files from chimera). We try to trap for this, and revert to + native. */ + if (cfile->iconvert == 0 || cfile->fconvert == 0) { + if (ccp4_liberr_verbosity(-1)) + printf("Warning: Machine stamp corrupted? Assuming native format. \n"); + cfile->iconvert = nativeIT; + cfile->fconvert = nativeFT; + } + } + + return (cfile->fconvert | (cfile->iconvert<<8)); +} + +/** + * ccp4_file_warch: + * @param cfile (CCP4File *) + * + * write machine stamp to file @cfile->stream. + * The machine stamp is placed at @cfile->stamp_loc items, + * set by ccp4_file_setstamp() (defaults to 0). + * + * @return 0 on success, EOF on failure + */ +int ccp4_file_warch (CCP4File *cfile) +{ + unsigned char mtstring[4]; /* machine stamp */ + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_warch", NULL); + return EOF; } + + if (ccp4_file_raw_seek(cfile, cfile->stamp_loc, SEEK_SET) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_warch", NULL); + return EOF; } + + mtstring[0] = cfile->fconvert | (cfile->fconvert << 4); + mtstring[1] = 1 | (cfile->iconvert << 4); + mtstring[2] = mtstring[3] = 0; + + if (ccp4_file_raw_write(cfile, (const char *) mtstring, 4) != 4) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_warch", NULL); + return EOF; } + + return 0; +} + +/** + * ccp4_file_read: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * mode dependent read function. Reads @nitems items from stream + * @cfile->stream to @buffer as determined by cfile->mode. + * + * @return number of items read on success, EOF on failure + */ +int ccp4_file_read (CCP4File *cfile, uint8 *buffer, size_t nitems) +{ + int result; + + result = cfile->_read(cfile,(uint8 *) buffer,nitems); + + if (result != nitems) + ccp4_signal(CCP4_ERRLEVEL(3), + "ccp4_file_read", NULL); + return (result); +} + +/** + * ccp4_file_readcomp: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * float complex {float,float} read function. Reads @nitems complex from stream + * @cfile->stream to @buffer. Allows short count when eof is detected ( + * buffered input only). + * + * @return number of complex read on success, EOF on failure + */ +int ccp4_file_readcomp (CCP4File *cfile, uint8 *buffer, size_t nitems) +{ + int i, n, result; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_readcomp", NULL); + return EOF; } + + if ( !cfile->read || cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readcomp", NULL); + return EOF; } + + if (cfile->last_op == WRITE_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readcomp", NULL); + return EOF; } + + n = _item_sizes[COMP64] * nitems; + if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readcomp", NULL); + if (cfile->stream && !feof(cfile->stream)) + return EOF; } /* short count on stream is OK if EOF */ + + result /= _item_sizes[COMP64]; + n = result; + if (cfile->fconvert != nativeFT) { + n *= 2; /* pairs of reals */ + switch (cfile->fconvert) { /* get to BE IEEE */ + case DFNTF_VAX : + vaxF2ieeeF((union float_uint_uchar *) buffer, n); + break; + case DFNTF_CONVEXNATIVE : + convexF2ieeeF((union float_uint_uchar *) buffer, n); + break; + case DFNTF_BEIEEE : + break; + case DFNTF_LEIEEE : + { + char j; + for (i=0; i < n*4; i+=4) { + j = buffer[i]; + buffer[i] = buffer[i+3]; + buffer[i+3] = j; + j = buffer[i+1]; + buffer[i+1] = buffer[i+2]; + buffer[i+2] =j; } + } + break; + default : + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readcomp", NULL); + return EOF; + } + switch (nativeFT) { /* get to Native if not BE IEEE */ + case DFNTF_BEIEEE : + break; + case DFNTF_LEIEEE : + { + char j; + for (i=0; i < n*4; i+=4) { + j = buffer[i]; + buffer[i] = buffer[i+3]; + buffer[i+3] = j; + j = buffer[i+1]; + buffer[i+1] = buffer[i+2]; + buffer[i+2] =j; } + } + break; + case DFNTF_CONVEXNATIVE : + ieeeF2convexF((union float_uint_uchar *) buffer, n); + break; + case DFNTF_VAX : + ieeeF2vaxF((union float_uint_uchar *) buffer, n); + break; + default : + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readcomp", NULL); + return EOF; + } + } + return (result); +} + +/** + * ccp4_file_readshortcomp: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * short complex {short,short} read function. Reads @nitems complex from stream + * @cfile->stream to @buffer. Allows short count when eof is detected ( + * buffered input only). + * + * @return number of complex read on success, EOF on failure + */ +int ccp4_file_readshortcomp (CCP4File *cfile, uint8 *buffer, size_t nitems) +{ + int i, n, result; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_readshortcomp", NULL); + return EOF; } + + if ( !cfile->read || cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readshortcomp", NULL); + return EOF; } + + if (cfile->last_op == WRITE_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readshortcomp", NULL); + return EOF; } + + n = _item_sizes[COMP32] * nitems; + if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readshortcomp", NULL); + if (cfile->stream && !feof(cfile->stream)) + return EOF; } + + result /= _item_sizes[COMP32]; + + n = result; + if (cfile->iconvert != nativeIT) { + n *= 2; /* pairs of ints */ + { + if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || + (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { + char j; + for (i=0; i < n*2; i+=2) { + j = buffer[i]; + buffer[i] = buffer[i+1]; + buffer[i+1] = j; } } + else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readshortcomp", NULL); + return EOF; } + } + } + return (result); +} + +/** + * ccp4_file_readfloat: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * float read function. Reads @nitems floats from stream + * @cfile->stream to @buffer. + * + * @return number of floats read on success, EOF on failure + */ +int ccp4_file_readfloat (CCP4File *cfile, uint8 *buffer, size_t nitems) +{ + int i, n, result; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_readfloat", NULL); + return EOF; } + + if (!cfile->read || cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readfloat", NULL); + return EOF; } + + if (cfile->last_op == WRITE_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readfloat", NULL); + return EOF; } + + n = _item_sizes[FLOAT32] * nitems; + if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readfloat", NULL); + if (cfile->stream && !feof(cfile->stream)) + return EOF; } + + result /= _item_sizes[FLOAT32]; + + n = result; + if (cfile->fconvert != nativeFT) { + switch (cfile->fconvert) { /* get to BE IEEE */ + case DFNTF_VAX : + vaxF2ieeeF((union float_uint_uchar *) buffer, n); + break; + case DFNTF_CONVEXNATIVE : + convexF2ieeeF((union float_uint_uchar *) buffer, n); + break; + case DFNTF_BEIEEE : + break; + case DFNTF_LEIEEE : + { + char j; + for (i=0; i < n*4; i+=4) { + j = buffer[i]; + buffer[i] = buffer[i+3]; + buffer[i+3] = j; + j = buffer[i+1]; + buffer[i+1] = buffer[i+2]; + buffer[i+2] =j; } + } + break; + default : + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readfloat", NULL); + return EOF; + } + switch (nativeFT) { + case DFNTF_BEIEEE : + break; /* done enough */ + case DFNTF_LEIEEE : + { + char j; + for (i=0; i < n*4; i+=4) { + j = buffer[i]; + buffer[i] = buffer[i+3]; + buffer[i+3] = j; + j = buffer[i+1]; + buffer[i+1] = buffer[i+2]; + buffer[i+2] =j; } + } + break; + case DFNTF_CONVEXNATIVE : + ieeeF2convexF((union float_uint_uchar *) buffer, n); + break; + case DFNTF_VAX : + ieeeF2vaxF((union float_uint_uchar *) buffer, n); + break; + default : + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readfloat", NULL); + return EOF; + } + } + return (result); +} + +/** + * ccp4_file_readint64: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * integer read function. Reads @nitems int64 from stream + * @cfile->stream to @buffer. + * + * @return number of int64 read on success, EOF on failure + */ +int ccp4_file_readint64 (CCP4File *cfile, uint8 *buffer, size_t nitems) +{ + int n, result; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_readint64", NULL); + return EOF; } + + if ( !cfile->read || cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readint64", NULL); + return EOF; } + + if (cfile->last_op == WRITE_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readint64", NULL); + return EOF; } + + n = _item_sizes[CCP4_INT64] * nitems; + if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readint64", NULL); + if (cfile->stream && !feof(cfile->stream)) + return EOF; } + + result /= _item_sizes[CCP4_INT64]; + + n = result; + + if (cfile->iconvert != nativeIT) { + if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || + (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { + char j; + int i; + for (i=0; i < n*8; i+=8) { + j = buffer[i]; + buffer[i] = buffer[i+7]; + buffer[i+7] = j; + j = buffer[i+1]; + buffer[i+1] = buffer[i+6]; + buffer[i+6] = j; + j = buffer[i+2]; + buffer[i+2] = buffer[i+5]; + buffer[i+5] = j; + j = buffer[i+3]; + buffer[i+3] = buffer[i+4]; + buffer[i+4] = j; } + } else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readint64", NULL); + return EOF; } + } + return (result); +} + +/** + * ccp4_file_readint: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * integer read function. Reads @nitems int from stream + * @cfile->stream to @buffer. + * + * @return number of int read on success, EOF on failure + */ +int ccp4_file_readint (CCP4File *cfile, uint8 *buffer, size_t nitems) +{ + int n, result; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_readint", NULL); + return EOF; } + + if ( !cfile->read || cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readint", NULL); + return EOF; } + + if (cfile->last_op == WRITE_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readint", NULL); + return EOF; } + + n = _item_sizes[CCP4_INT32] * nitems; + if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readint", NULL); + if (cfile->stream && !feof(cfile->stream)) + return EOF; } + + result /= _item_sizes[CCP4_INT32]; + + n = result; + + if (cfile->iconvert != nativeIT) { + if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || + (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { + char j; + int i; + for (i=0; i < n*4; i+=4) { + j = buffer[i]; + buffer[i] = buffer[i+3]; + buffer[i+3] = j; + j = buffer[i+1]; + buffer[i+1] = buffer[i+2]; + buffer[i+2] =j; } + } else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readint", NULL); + return EOF; } + } + return (result); +} + +/** + * ccp4_file_readshort: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * short read function. Reads @nitems shorts from stream + * @cfile->stream to @buffer. + * + * @return number of shorts read on success, EOF on failure + */ +int ccp4_file_readshort (CCP4File *cfile, uint8 *buffer, size_t nitems) +{ + int n, result; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_readshort", NULL); + return EOF; } + + if (!cfile->read || cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readshort", NULL); + return EOF; } + + if (cfile->last_op == WRITE_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readshort", NULL); + return EOF; } + + n = _item_sizes[CCP4_INT16] * nitems; + if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readshort", NULL); + if (cfile->stream && !feof(cfile->stream)) + return EOF; } + + result /= _item_sizes[CCP4_INT16]; + + n = result; + if (cfile->iconvert != nativeIT) { + if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || + (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { + char j; + int i; + for (i=0; i < n*2; i+=2) { + j = buffer[i]; + buffer[i] = buffer[i+1]; + buffer[i+1] = j; } + } else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readshort", NULL); + return EOF; } + } + return (result); +} + +/** + * ccp4_file_readchar: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * character read function. Reads @nitems characters from stream + * @cfile->stream to @buffer. + * + * @return number of characters read on success, EOF on failure + */ +int ccp4_file_readchar (CCP4File *cfile, uint8 *buffer, size_t nitems) +{ + size_t result; + + if (! cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_readchar", NULL); + return EOF; } + + if (!cfile->read || cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readchar", NULL); + return EOF; } + + if (cfile->last_op == WRITE_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readchar", NULL); + return EOF; } + + if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, nitems)) != nitems) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readchar", NULL); + if (cfile->stream && !feof(cfile->stream)) + return EOF; } + + return (result); +} + +/** + * ccp4_file_write: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * mode dependent write function. Write @nitems items from @buffer + * to @cfile->stream as determined by cfile->mode. + * + * @return number of items written on success, EOF on failure + */ +int ccp4_file_write (CCP4File *cfile, const uint8 *buffer, size_t nitems) +{ + size_t result; + + result = cfile->_write(cfile, buffer, nitems); + + if ( result != nitems) + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_write", NULL); + + return (result); +} + +/** + * ccp4_file_writecomp: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * complex {float,float} write function. Write @nitems items from @buffer + * to @cfile->stream. + * + * @return number of complex items written on success, EOF on failure + */ +int ccp4_file_writecomp (CCP4File *cfile, const uint8 *buffer, size_t nitems) +{ + size_t result = 0, n; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_writecomp", NULL); + return EOF; } + + if (!cfile->write ||cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writecomp", NULL); + return EOF;} + + if (cfile->last_op == READ_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writecomp", NULL); + return EOF; } + + n = nitems * _item_sizes[COMP64]; + + if (cfile->fconvert != nativeFT) { + char out_buffer[8]; + const char *out_ptr = (char *) buffer; + size_t i; + for (i = 0; i != nitems; i++) { + switch (nativeFT) { + case DFNTF_BEIEEE : + memcpy(out_buffer, out_ptr, _item_sizes[COMP64]); + out_ptr += _item_sizes[COMP64]; + break; + case DFNTF_LEIEEE : + out_buffer[3] = *out_ptr++; + out_buffer[2] = *out_ptr++; + out_buffer[1] = *out_ptr++; + out_buffer[0] = *out_ptr++; + out_buffer[7] = *out_ptr++; + out_buffer[6] = *out_ptr++; + out_buffer[5] = *out_ptr++; + out_buffer[4] = *out_ptr++; + break; + case DFNTF_CONVEXNATIVE : + memcpy(out_buffer, out_ptr, _item_sizes[COMP64]); + out_ptr += _item_sizes[COMP64]; + ieeeF2convexF((union float_uint_uchar *) out_buffer, 2); + break; + case DFNTF_VAX : + memcpy(out_buffer, out_ptr, _item_sizes[COMP64]); + out_ptr += _item_sizes[COMP64]; + ieeeF2vaxF((union float_uint_uchar *) out_buffer, 2); + break; + default : + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "CCP4_File::writecomp", NULL); + } + switch (cfile->fconvert) { + case DFNTF_VAX : + vaxF2ieeeF((union float_uint_uchar *) out_buffer, 2); + break; + case DFNTF_CONVEXNATIVE : + convexF2ieeeF((union float_uint_uchar *) out_buffer, 2); + break; + case DFNTF_BEIEEE : + break; + case DFNTF_LEIEEE : + { + char j; + j = out_buffer[0]; + out_buffer[0] = out_buffer[3]; + out_buffer[3] = j; + j = out_buffer[1]; + out_buffer[1] = out_buffer[2]; + out_buffer[2] =j; + j = out_buffer[4]; + out_buffer[4] = out_buffer[7]; + out_buffer[7] = j; + j = out_buffer[5]; + out_buffer[5] = out_buffer[6]; + out_buffer[6] =j; + } + break; + default : + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writecomp", NULL); + return EOF; + } + result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[COMP64]); + } + } else { + result = ccp4_file_raw_write (cfile, (char *) buffer, n); + } + + if (result != n) + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writecomp", NULL); + + return (result / _item_sizes[COMP64]); +} + +/** + * ccp4_file_writeshortcomp: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * short complex {short,short} write function. Write @nitems items from @buffer + * to @cfile->stream. + * + * @return number of complex items written on success, EOF on failure + */ +int ccp4_file_writeshortcomp (CCP4File *cfile, const uint8 *buffer, size_t nitems) +{ + size_t result = 0, n; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_writeshortcomp", NULL); + return EOF; } + + if (!cfile->write ||cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writeshortcomp", NULL); + return EOF;} + + if (cfile->last_op == READ_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeshortcomp", NULL); + return EOF; } + + n = nitems * _item_sizes[COMP32]; + + if (cfile->iconvert != nativeIT) { + char out_buffer[4]; + const char *out_ptr = (char *) buffer; + size_t i; + for (i = 0; i != nitems; i++) { + if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || + (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { + out_buffer[1] = *out_ptr++; + out_buffer[0] = *out_ptr++; + out_buffer[3] = *out_ptr++; + out_buffer[2] = *out_ptr++; + } else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writeshortcomp", NULL); + return EOF; } + result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[COMP32]); + } + } else { + result = ccp4_file_raw_write (cfile, (char *) buffer, n); + } + + if ( result != n) + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeshortcomp", NULL); + + return (result / _item_sizes[COMP32]); +} + +/** + * ccp4_file_writefloat: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * float write function. Write @nitems items from @buffer + * to @cfile->stream. + * + * Returns number of floats written on success, EOF on failure + */ +int ccp4_file_writefloat (CCP4File *cfile, const uint8 *buffer, size_t nitems) +{ + size_t result = 0, n; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_writefloat", NULL); + return EOF; } + + if (!cfile->write ||cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writefloat", NULL); + return EOF;} + + if (cfile->last_op == READ_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writefloat", NULL); + return EOF; } + + n = nitems * _item_sizes[FLOAT32]; + + if (cfile->fconvert != nativeFT) { + char out_buffer[4]; + const char *out_ptr = (char *) buffer; + size_t i; + for (i = 0; i != nitems; i++) { + switch (nativeFT) { + case DFNTF_BEIEEE : + memcpy(out_buffer, out_ptr, _item_sizes[FLOAT32]); + out_ptr += _item_sizes[FLOAT32]; + break; + case DFNTF_LEIEEE : + out_buffer[3] = *out_ptr++; + out_buffer[2] = *out_ptr++; + out_buffer[1] = *out_ptr++; + out_buffer[0] = *out_ptr++; + break; + case DFNTF_CONVEXNATIVE : + memcpy(out_buffer, out_ptr, _item_sizes[FLOAT32]); + out_ptr += _item_sizes[FLOAT32]; + ieeeF2convexF((union float_uint_uchar *) out_buffer, 1); + break; + case DFNTF_VAX : + memcpy(out_buffer, out_ptr, _item_sizes[FLOAT32]); + out_ptr += _item_sizes[FLOAT32]; + ieeeF2vaxF((union float_uint_uchar *) out_buffer, 1); + break; + default : + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "CCP4_File::writefloat", NULL); + } + switch (cfile->fconvert) { + case DFNTF_VAX : + vaxF2ieeeF((union float_uint_uchar *) out_buffer, 1); + break; + case DFNTF_CONVEXNATIVE : + convexF2ieeeF((union float_uint_uchar *) out_buffer, 1); + break; + case DFNTF_BEIEEE : + break; + case DFNTF_LEIEEE : + { + char j; + j = out_buffer[0]; + out_buffer[0] = out_buffer[3]; + out_buffer[3] = j; + j = out_buffer[1]; + out_buffer[1] = out_buffer[2]; + out_buffer[2] =j; + } + break; + default : + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writefloat", NULL); + return EOF; + } + result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[FLOAT32]); + } + } else { + result = ccp4_file_raw_write (cfile, (char *) buffer, n); + } + + if (result != n) + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writefloat", NULL); + + return (result / _item_sizes[FLOAT32]); +} + +/** + * ccp4_file_writeint64: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * int64 write function. Write @nitems items from @buffer + * to @cfile->stream. + * + * @return number of int64 written on success, EOF on failure + */ +int ccp4_file_writeint64 (CCP4File *cfile, const uint8 *buffer, size_t nitems) +{ + size_t result = 0, n; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_writeint64", NULL); + return EOF; } + + if (!cfile->write ||cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writeint64", NULL); + return EOF;} + + if (cfile->last_op == READ_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeint64", NULL); + return EOF; } + + n = nitems * _item_sizes[CCP4_INT64]; + + if (cfile->iconvert != nativeIT) { + char out_buffer[8]; + const char *out_ptr = (char *) buffer; + size_t i; + for (i = 0; i != nitems; i++) { + if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || + (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { + out_buffer[7] = *out_ptr++; + out_buffer[6] = *out_ptr++; + out_buffer[5] = *out_ptr++; + out_buffer[4] = *out_ptr++; + out_buffer[3] = *out_ptr++; + out_buffer[2] = *out_ptr++; + out_buffer[1] = *out_ptr++; + out_buffer[0] = *out_ptr++; + } else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writeint64", NULL); + return EOF; } + result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[CCP4_INT64]); + } + } else { + result = ccp4_file_raw_write (cfile, (char *) buffer, n); + } + + if ( result != n) + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeint64", NULL); + + return (result / _item_sizes[CCP4_INT64]); +} + +/** + * ccp4_file_writeint: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * int write function. Write @nitems items from @buffer + * to @cfile->stream. + * + * @return number of int written on success, EOF on failure + */ +int ccp4_file_writeint (CCP4File *cfile, const uint8 *buffer, size_t nitems) +{ + size_t result = 0, n; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_writeint", NULL); + return EOF; } + + if (!cfile->write ||cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writeint", NULL); + return EOF;} + + if (cfile->last_op == READ_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeint", NULL); + return EOF; } + + n = nitems * _item_sizes[CCP4_INT32]; + + if (cfile->iconvert != nativeIT) { + char out_buffer[4]; + const char *out_ptr = (char *) buffer; + size_t i; + for (i = 0; i != nitems; i++) { + if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || + (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { + out_buffer[3] = *out_ptr++; + out_buffer[2] = *out_ptr++; + out_buffer[1] = *out_ptr++; + out_buffer[0] = *out_ptr++; + } else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writeint", NULL); + return EOF; } + result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[CCP4_INT32]); + } + } else { + result = ccp4_file_raw_write (cfile, (char *) buffer, n); + } + + if ( result != n) + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeint", NULL); + + return (result / _item_sizes[CCP4_INT32]); +} + +/** + * ccp4_file_writeshort: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * short write function. Write @nitems items from @buffer + * to @cfile->stream. + * + * @return number of short written on success, EOF on failure + */ +int ccp4_file_writeshort (CCP4File *cfile, const uint8 *buffer, size_t nitems) +{ + size_t result = 0, n; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_writeshort", NULL); + return EOF; } + + if (!cfile->write ||cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writeshort", NULL); + return EOF;} + + if (cfile->last_op == READ_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeshort", NULL); + return EOF; } + + n = nitems * _item_sizes[CCP4_INT16]; + + if (cfile->iconvert != nativeIT) { + char out_buffer[2]; + const char *out_ptr = (char *) buffer; + size_t i; + for (i = 0; i != nitems; i++) { + if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || + (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { + out_buffer[1] = *out_ptr++; + out_buffer[0] = *out_ptr++; + } else { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_readint", NULL); + return EOF; } + result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[CCP4_INT16]); + } + } else { + result = ccp4_file_raw_write (cfile, (char *) buffer, n); + } + + if ( result != n) + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeshort", NULL); + + return (result / _item_sizes[CCP4_INT16]); +} + +/** + * ccp4_file_writechar: + * @param cfile (CCP4File *) + * @param buffer (uint8 *) buffer + * @param nitems (size_t) number of items + * + * char write function. Write @nitems items from @buffer + * to @cfile->stream. + * + * @return number of bytes written on success, EOF on failure + */ +int ccp4_file_writechar (CCP4File *cfile, const uint8 *buffer, size_t nitems) +{ + size_t result; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_writechar", NULL); + return EOF; } + + if (!cfile->write ||cfile->iostat) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), + "ccp4_file_writechar", NULL); + return EOF;} + + if (cfile->last_op == READ_OP) + if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writechar", NULL); + return EOF; } + + if ( (result = ccp4_file_raw_write (cfile, (char *) buffer, nitems)) != nitems) + ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writechar", NULL); + + return (result); +} + +/** + * ccp4_file_seek: + * @param cfile (CCP4File *) + * @param offset (long) offset in items + * @param whence (int) SEEK_SET, SEEK_CUR, or SEEK_END + * + * seeks on file by offset items. SEEK_SET is relative + * to start of file, SEEK_CUR to current, SEEK_END to + * end. + * + * @return 0 on success, -1 on failure + */ +int ccp4_file_seek (CCP4File *cfile, long offset, int whence) +{ + int result; + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_seek", NULL); + return -1; } + + result = ccp4_file_raw_seek(cfile, offset*cfile->itemsize, whence); + + if (result != -1) ccp4_file_clearerr(cfile); + + return ((result == -1) ? -1 : 0); +} + +/** + * ccp4_file_rewind: + * @param cfile (CCP4File *) + * + * Seek to start of file. Clear error status. + * + * @return 0 on success, EOF on failure + */ +void ccp4_file_rewind (CCP4File *cfile) +{ + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_rewind", NULL); + return ; } + + if (ccp4_file_raw_seek(cfile, 0, SEEK_SET)) { + ccp4_signal(CCP4_ERRLEVEL(3), + "ccp4_file_rewind", NULL); + } else { + ccp4_file_clearerr(cfile); + } +} + +/** + * ccp4_file_length: + * @param cfile (CCP4File *) + * + * Length of file on disk. + * @return length of @cfile on success, EOF on failure + */ +long ccp4_file_length (CCP4File *cfile) +{ +#if defined _MSC_VER + struct _stat st; +#else + struct stat st; +#endif + + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_length", NULL); + return EOF; } + + cfile->last_op = IRRELEVANT_OP; + + if (cfile->buffered && cfile->stream) + fflush (cfile->stream); +#if defined _MSC_VER + _fstat(cfile->stream ? _fileno(cfile->stream) : cfile->fd, &st); +#else + fstat(cfile->stream ? fileno(cfile->stream) : cfile->fd, &st); +#endif + cfile->length = st.st_size; + + return (st.st_size); +} + +/** + * ccp4_file_tell: + * @param cfile (CCP4File *) + * + * Current location in file, uses either ftell or lseek. + * @return current offset of @cfile in bytes. + */ +long ccp4_file_tell (CCP4File *cfile) +{ + long result; + + if (! cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_tell", NULL); + return EOF; } + + cfile->last_op = IRRELEVANT_OP; + + if (cfile->buffered && cfile->stream) { +#if !defined (_MSC_VER) + if ( cfile->last_op == WRITE_OP ) fflush (cfile->stream); +#endif + result = (long) ftell(cfile->stream); + } else +#if defined _MSC_VER + result = _lseek(cfile->fd, 0L, SEEK_CUR); +#else + result = lseek(cfile->fd, 0L, SEEK_CUR); +#endif + + cfile->loc = result; + + return (result); +} + +/** + * ccp4_file_feof: + * @param cfile (CCP4File *) + * + * @return true if @cfile is at EoF. + * + */ +int ccp4_file_feof(CCP4File *cfile) +{ + if (!cfile) { + ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), + "ccp4_file_feof", NULL); + return EOF; } + + return (cfile->stream) ? feof(cfile->stream) : cfile->loc >= cfile->length; +} + +/** + * ccp4_file_clearerr: + * @param cfile (CCP4File *) + * + * Clears error status of @cfile. + * + */ +void ccp4_file_clearerr(CCP4File *cfile) +{ + if (!cfile || !cfile->stream) + return; + cfile->iostat = CIO_Ok; + clearerr(cfile->stream); +} + +/** + * ccp4_file_fatal: + * @param cfile (CCP4File *) + * + * Die with error message based on @cfile error status. + */ +void ccp4_file_fatal (CCP4File *cfile, char *message) +{ + char *buff; + size_t l; + + if (!cfile) + ccp4_signal(CCP4_ERRLEVEL(4) | CCP4_ERRNO(CIO_NullPtr), "ccp4_file_fatal", + NULL); + + l = strlen (message) + strlen (cfile->name) + 1; + if ( !(buff = malloc(l))) + ccp4_signal(CCP4_ERRLEVEL(4), "ccp4_file_fatal", NULL); + buff[0] = '\0'; + strcat (buff, message); + strcat (buff, cfile->name); + ccp4_fatal(buff); +} + +/** + * ccp4_file_error: + * @param cfile (CCP4File *) + * + * print error mesage. + * @return associated error code + */ +int ccp4_file_error(CCP4File *cfile) +{ + if (!cfile->iostat) + return 0; + fprintf(stderr,"%s %s \n", + cfile->name,ccp4_strerror(cfile->iostat)); + return CCP4_ERRGETCODE(cfile->iostat); +} + +/** + * ccp4_file_flush: + * @param cfile (CCP4File *) + * + * flush buffer contents of @cfile + */ +void ccp4_file_flush(CCP4File *cfile) +{ + if (cfile && cfile->stream && cfile->buffered) + fflush(cfile->stream); +} + +/** + * ccp4_file_print: + * @param cfile (CCP4File *) + * + * @return @cfile information in char array for printing. + */ +char *ccp4_file_print(CCP4File *cfile, char *msg_start, char *msg_end) +{ + char *msg_curr = msg_start; + + if (!cfile) + return msg_start; + + if (cfile->name) + if ((msg_end - msg_curr) > strlen(cfile->name)) { + strcpy(msg_curr,cfile->name); + msg_curr = strrchr(msg_curr,'\0'); } + + if (cfile->open) { + if ((msg_end - msg_curr) > 6 ) { + strcat(msg_start, " opened"); + msg_curr = strrchr(msg_curr,'\0'); } + } else { + if ((msg_end - msg_curr) > 7 ) { + strcat(msg_start, " closed"); + msg_curr = strrchr(msg_curr,'\0'); } + } + + if (cfile->append) { + if ((msg_end - msg_curr) > 13 ) { + strcat(msg_start, ", append mode"); + msg_curr = strrchr(msg_curr,'\0'); } + } else if (cfile->read && cfile->write) { + if ((msg_end - msg_curr) > 17 ) { + strcat(msg_start, ", read-write mode"); + msg_curr = strrchr(msg_curr,'\0'); } + } else if (cfile->write) { + if ((msg_end - msg_curr) > 12 ) { + strcat(msg_start, ", write mode"); + msg_curr = strrchr(msg_curr,'\0'); } + } else { + if ((msg_end - msg_curr) > 11 ) { + strcat(msg_start, ", read mode"); + msg_curr = strrchr(msg_curr,'\0'); } + } + + return msg_curr; +} + diff --git a/ccp4c/ccp4/library_file.h b/ccp4c/ccp4/library_file.h new file mode 100644 index 00000000..e00506ed --- /dev/null +++ b/ccp4c/ccp4/library_file.h @@ -0,0 +1,167 @@ +/* + library_file.h: header file for library_file.c + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file library_file.h + * Functions for file i/o. + * Charles Ballard + */ + +#ifndef __CCP4_LIB_FILE +#define __CCP4_LIB_FILE + +#include "ccp4_sysdep.h" +#include "ccp4_types.h" + +#ifdef __cplusplus +namespace CCP4 { +extern "C" { +#endif + +/** Generic CCP4 file. */ +typedef struct _CFileStruct CCP4File; + +struct _CFileStruct { + char *name; + FILE *stream; + int fd; + unsigned int read : 1; + unsigned int write : 1; + unsigned int append : 1; + unsigned int binary : 1; + unsigned int scratch : 1 , : 3; + unsigned int buffered : 1; + unsigned int sync : 1, : 6; + unsigned int direct : 1, : 7; + unsigned int open : 1; + unsigned int own : 1; + unsigned int last_op : 2; + unsigned int getbuff : 1, : 4; + int iostat; + unsigned int mode : 8; + unsigned int itemsize : 8; + unsigned int iconvert : 8; + unsigned int fconvert: 8; + off_t length; + off_t loc; + size_t stamp_loc; + int (*_read) (CCP4File *, uint8 *, size_t); + int (*_write) (CCP4File *, const uint8 *, size_t); + char buff[8]; + void *priv; +}; + + +CCP4File *ccp4_file_open (const char *, const int); + +CCP4File *ccp4_file_open_file (const FILE *, const int); + +CCP4File *ccp4_file_open_fd (const int, const int); + +int ccp4_file_rarch ( CCP4File*); + +int ccp4_file_warch ( CCP4File*); + +int ccp4_file_close ( CCP4File*); + +int ccp4_file_mode ( const CCP4File*); + +int ccp4_file_setmode ( CCP4File*, const int); + +int ccp4_file_setstamp( CCP4File *, const size_t); + +int ccp4_file_itemsize( const CCP4File*); + +int ccp4_file_setbyte( CCP4File *, const int); + +int ccp4_file_byteorder( CCP4File *); + +int ccp4_file_is_write(const CCP4File *); + +int ccp4_file_is_read(const CCP4File *); + +int ccp4_file_is_append(const CCP4File *); + +int ccp4_file_is_scratch(const CCP4File *); + +int ccp4_file_is_buffered(const CCP4File *); + +int ccp4_file_status(const CCP4File *); + +char *ccp4_file_name( CCP4File *); + +int ccp4_file_read ( CCP4File*, uint8 *, size_t); + +int ccp4_file_readcomp ( CCP4File*, uint8 *, size_t); + +int ccp4_file_readshortcomp ( CCP4File*, uint8 *, size_t); + +int ccp4_file_readfloat ( CCP4File*, uint8 *, size_t); + +int ccp4_file_readint64 ( CCP4File*, uint8 *, size_t); + +int ccp4_file_readint ( CCP4File*, uint8 *, size_t); + +int ccp4_file_readshort ( CCP4File*, uint8 *, size_t); + +int ccp4_file_readchar ( CCP4File*, uint8 *, size_t); + +int ccp4_file_write ( CCP4File*, const uint8 *, size_t); + +int ccp4_file_writecomp ( CCP4File*, const uint8 *, size_t); + +int ccp4_file_writeshortcomp ( CCP4File*, const uint8 *, size_t); + +int ccp4_file_writefloat ( CCP4File*, const uint8 *, size_t); + +int ccp4_file_writeint ( CCP4File*, const uint8 *, size_t); + +int ccp4_file_writeint64 ( CCP4File*, const uint8 *, size_t); + +int ccp4_file_writeshort ( CCP4File*, const uint8 *, size_t); + +int ccp4_file_writechar ( CCP4File*, const uint8 *, size_t); + +int ccp4_file_seek ( CCP4File*, long, int); + +void ccp4_file_rewind ( CCP4File*); + +void ccp4_file_flush (CCP4File *); + +long ccp4_file_length ( CCP4File*); + +long ccp4_file_tell ( CCP4File*); + +int ccp4_file_feof(CCP4File *); + +void ccp4_file_clearerr(CCP4File *); + +void ccp4_file_fatal (CCP4File *, char *); + +char *ccp4_file_print(CCP4File *, char *, char *); + +int ccp4_file_raw_seek( CCP4File *, long, int); +int ccp4_file_raw_read ( CCP4File*, char *, size_t); +int ccp4_file_raw_write ( CCP4File*, const char *, size_t); +int ccp4_file_raw_setstamp( CCP4File *, const size_t); +#ifdef __cplusplus +} +} +#endif + +#endif /* __CCP4_LIB_FILE */ diff --git a/ccp4c/ccp4/library_utils.c b/ccp4c/ccp4/library_utils.c new file mode 100644 index 00000000..92186c4e --- /dev/null +++ b/ccp4c/ccp4/library_utils.c @@ -0,0 +1,674 @@ +/* + library_utils.c: CCP4 Library Utilities + Copyright (C) 2001 CCLRC, Charles Ballard + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @page utilities_page CCP4 Library Utilities + * + * @section utilities_list File list + +
    +
  • library_utils.c +
  • ccp4_general.c +
  • ccp4_parser.c +
  • ccp4_program.c +
+ + * @section utilities_overview Overview + +The CCP4 C-library provides many utility functions which either give +specific CCP4 functionality (e.g. traditional keyword parsing) or +are just generally useful (platform independent date). + + */ + +/** @file library_utils.c + * @brief Utility functions. + * @author Charles Ballard + */ + +#include "ccp4_sysdep.h" +#include +#include +#include "ccp4_utils.h" +#include "ccp4_errno.h" + +#if defined (_WIN32) +#define WIN32_LEAN_AND_MEAN +#include +#endif + +#define CCP4_ERRNO(y) (CCP4_ERR_UTILS | (y)) + +/* rcsid[] = "$Id$" */ + +/* static uint16 nativeIT = NATIVEIT; */ /* machine integer type - currently unused here */ +static uint16 nativeFT = NATIVEFT; /* machine float type */ + +/** . + * + * @return + */ +int ccp4_utils_translate_mode_float(float *out, const void *buffer, int dim, int mode) +{ + unsigned char *ucp; + unsigned short *usp; + float *fp = out, *ufp, tmp1, tmp2; + register int ctr=0; + + switch(mode) { + case 0: + ucp = (unsigned char *)buffer; + for(ctr = 0; ctr < dim ; ++ctr) + *fp++ = (float) *ucp++; + break; + case 1: + usp = (unsigned short *)buffer; + for(ctr = 0; ctr < dim ; ++ctr) + *fp++ = (float) *usp++; + break; + case 3: + /* complex short (define type ?) */ + usp = (unsigned short *)buffer; + for(ctr = 0; ctr < dim ; ++ctr) { + tmp1 = (float) *usp++; + tmp2 = (float) *usp++; + *fp++ = (float) sqrt(tmp1*tmp1 + tmp2*tmp2); + } + break; + case 4: + /* complex real (define type ?) */ + ufp = (float *)buffer; + for(ctr = 0; ctr < dim ; ++ctr) { + tmp1 = *ufp++; + tmp2 = *ufp++; + *fp++ = (float) sqrt(tmp1*tmp1 + tmp2*tmp2); + } + break; + case 2: + default: + break; + } + + return (ctr); +} + +/** Gets the length of a Fortran string with trailing blanks removed. + * + * @return length of string + */ +size_t ccp4_utils_flength (char *s, int len) +{ + if (len <= 0 ) return 0; + while (s[--len] == ' ') + if (len == 0) return 0; + return (++len); +} + +/** . + * + * @return + */ +void ccp4_utils_print (const char *message) +{ + printf ("%s\n",message); + } + +#if ! defined (VMS) +/** . + * + * @return + */ +int ccp4_utils_setenv (char *str) +{ +#if defined (sgi) || defined (sun) || defined (__hpux) || \ + defined(_AIX) || defined (__OSF1__) || \ + defined (__osf__) || defined (__FreeBSD__) || defined (linux) || \ + defined (_WIN32) || defined __linux__ + /* putenv is the POSIX.1, draft 3 proposed mechanism */ +#if !(defined(__hpux) && defined(__HP_cc)) + int putenv (); +#endif + char *param; + + if ( (param = (char *) ccp4_utils_malloc( (strlen(str)+1)*sizeof(char) )) == NULL) { + ccp4_errno = CCP4_ERRNO(errno); + return -1; } + strcpy(param,str); + return (putenv (param)); + /* note the necessary lack of free() */ +#else + /* setenv is not POSIX, BSD might have to use `index' */ + int setenv (); + char *param1,*param2; + + if ( (param1 = (char *) ccp4_utils_malloc( (strlen(str)+1)*sizeof(char) )) == NULL) { + ccp4_errno = CCP4_ERRNO(errno); + return -1; } + strcpy(param1,str); + if ((param2 = (char *) strchr(param1, '=')) == NULL) { + ccp4_errno = CCP4_ERRNO(errno); + return -1; } + *param2++ = '\0'; + return (setenv (param1, param2, 1)); +#endif +} +#endif + +#if ! defined (VMS) +/** . + * + * @return + */ +int ccp4_utils_outbuf(void) +{ +#if defined (sgi) || defined (sun) || \ + defined (__OSF1__) || \ + defined (__FreeBSD__) + return setlinebuf(stdout); +#else +#if defined(_MSC_VER) + return setvbuf(stdout, NULL, _IONBF, 80); +#else +# if defined (_AIX) + return -1; +# else + /* Windows requires size argument, though 0 works on unix */ + return setvbuf(stdout, NULL, _IOLBF, 80); +# endif +#endif +#endif +} + +/** . + * + * @return + */ +int ccp4_utils_noinpbuf(void) +{ + return setvbuf(stdin, NULL, _IONBF, 0); +} +#endif + +union float_uint_uchar ccp4_nan () + +#if NATIVEFT == DFNTF_BEIEEE || NATIVEFT == DFNTF_LEIEEE +# define CCP4_NAN 0xfffa5a5a +#endif +/* For \idx{Convex} native mode and \idx{VAX} use a \idx{Rop} value: */ +/* */ +/* = */ +#if NATIVEFT == DFNTF_CONVEXNATIVE +# define CCP4_NAN 0x80000000 +#endif +#if NATIVEFT == DFNTF_VAX +# define CCP4_NAN 0x00008000 +#endif +#ifndef CCP4_NAN +# error "CCP4_NAN isn't defined (needs NATIVEFT)" +#endif +{ + union float_uint_uchar realnum; + + realnum.i = CCP4_NAN; + return (realnum); +} + +/** . + * + * @return + */ +int ccp4_utils_isnan (const union float_uint_uchar *realnum) +{ + switch (nativeFT) { + case DFNTF_BEIEEE : + case DFNTF_LEIEEE : + return ((realnum->i & 0x7f800000) == 0x7f800000); /* exponent all 1s */ + case DFNTF_CONVEXNATIVE : + return ((realnum->i & 0xff800000) == 0x80000000); + case DFNTF_VAX : + return ((realnum->i & 0x0000ff80) == 0x00008000); + default : + ccp4_fatal("CCP4_UTILS_ISNAN: bad nativeFT"); + return 0; /* avoid compiler warning */ + } +} + +#define MDFBIG -1.0E10 /* BIOMOL absence flag value */ +/** . + * + * @return + */ +void ccp4_utils_bml (int ncols, union float_uint_uchar cols[]) +{ + int i; + for (i=0; i MDFBIG) { + if (cols[i].f < wminmax[2*i]) wminmax[2*i] = cols[i].f; + if (cols[i].f > wminmax[1+2*i]) wminmax[1+2*i] = cols[i].f; } +} + +/** . + * + * @return + */ +void ccp4_utils_hgetlimits (int *IValueNotDet, float *ValueNotDet) +{ + *IValueNotDet = INT_MAX; + *ValueNotDet = FLT_MAX; +} + +#ifndef _WIN32 +static unsigned parse_mode(const char *cmode) +{ + unsigned mode = 0; +#if defined (__APPLE__) + static const unsigned TBM = 0x07; + + switch (strlen(cmode)) { + case 4: + mode |= (*cmode & TBM) << 9 ; + mode |= (*(cmode+1) & TBM) << 6 ; + mode |= (*(cmode+2) & TBM) << 3 ; + mode |= (*(cmode+3) & TBM) ; + break; + case 3: + mode |= (*cmode & TBM) << 6 ; + mode |= (*(cmode+1) & TBM) << 3 ; + mode |= (*(cmode+2) & TBM) ; + break; + case 2: + mode |= (*cmode & TBM) << 3 ; + mode |= (*(cmode+1) & TBM) ; + break; + case 1: + mode |= (*cmode & TBM) ; + break; + default: + mode = 0x0fff ; + } +#else +/* Possible modes (see stat.h) + Currently pass 3-character string and interpret as octal. + Try also S_IRWXU, S_IRWXG, etc. */ + sscanf(cmode,"%o",&mode); +#endif + return mode; +} +#endif + +/** . + * + * @return + */ +int ccp4_utils_mkdir (const char *path, const char *cmode) +{ + int result; +#if defined(_WIN32) + result = mkdir(path); +#else + unsigned mode = parse_mode(cmode); + result = mkdir(path, (mode_t) mode); +#endif + + if (result == -1) { + if (errno == EEXIST) { + result = 1; + } + } + return (result); +} + +/** . + * + * @return + */ +int ccp4_utils_chmod (const char *path, const char *cmode) +{ +#if defined(_WIN32) + return (chmod(path,0x0fff)); +#else + unsigned mode = parse_mode(cmode); + return (chmod(path, (mode_t) mode)); +#endif +} + +/** This is a wrapper for the malloc function, which adds some + * error trapping. + * + * @return void + */ +void *ccp4_utils_malloc(size_t size) + +{ void *val; + + val = malloc (size); + if (!val && size) + { + perror ("Failure in ccp4_utils_malloc"); + abort (); + } + return val;} + +/** This is a wrapper for the realloc function, which adds some + * error trapping. + * + * @return + */ +void *ccp4_utils_realloc(void *ptr, size_t size) +{ void *val; + + val = realloc (ptr, size); + if (!val && size) + { + perror ("Failure in ccp4_utils_realloc"); + abort (); + } + return val;} + +/** This is a wrapper for the calloc function, which adds some + * error trapping. + * + * @return + */ +void *ccp4_utils_calloc(size_t nelem , size_t elsize) +{ void *val; + + val = calloc (nelem, elsize); + if (!val && elsize) + { + perror ("Failure in ccp4_utils_calloc"); + abort (); + } + return val;} + + +/** Return the user's login name. + * Note that getlogin only works for processes attached to + * a terminal (and hence won't work from the GUI). + * @return pointer to character string containing login name. + */ +char *ccp4_utils_username(void) +{ + static char userid_unknown[] = "unknown"; + char *userid = NULL; +#if defined(_WIN32) + static char windows_username[512]; + DWORD bufsize = sizeof(windows_username); + if (GetUserName(windows_username, &bufsize)) + userid = windows_username; +#else + userid = getlogin(); +#endif + return userid ? userid : userid_unknown; +} + +static int is_sep(char c) +{ +#ifdef _WIN32 + /* allow alternative separator for Windows (for MSYS, Cygwin, Wine) */ + return c == PATH_SEPARATOR || c == '/'; +#else + return c == PATH_SEPARATOR; +#endif +} + +/** Extracts the basename from a full file name. + * Separators for directories and extensions are OS-specific. + * @param filename full file name string. + * @return pointer to basename + */ +char *ccp4_utils_basename(const char *filename) +{ + int i, indx1=-1, length; + char *basename; + + for ( i = strlen(filename)-1; i >= 0; i-- ) { + if (is_sep(filename[i])) { + indx1 = i; + break; + } + } + length = strlen(filename) - indx1; + /* Search for extension separators must be performed backwards + in case filename has multiple extension separators */ + for ( i = strlen(filename)-1; i >= (indx1 < 0 ? 0 : indx1) ; i-- ) { + if (filename[i] == EXT_SEPARATOR) { + length = i - indx1; + break; + } + } + basename = ccp4_utils_malloc(length*sizeof(char)); + strncpy(basename,filename+indx1+1,length-1); + basename[length-1]='\0'; + return basename; +} + +/** Extracts the pathname from a full file name. + * Separators for directories and extensions are OS-specific. + * @param filename full file name string. + * @return pointer to pathname with trailing separator. + */ +char *ccp4_utils_pathname(const char *filename) +{ + int i, indx1=-1, length; + char *pathname; + + for ( i = strlen(filename)-1; i >= 0; i-- ) { + if (is_sep(filename[i])) { + indx1 = i; + break; + } + } + length = indx1+2; + pathname = ccp4_utils_malloc(length*sizeof(char)); + strncpy(pathname,filename,length-1); + pathname[length-1]='\0'; + return pathname; +} + +/** Extracts the extension from a full file name. + * Separators for directories and extensions are OS-specific. + * @param filename full file name string. + * @return pointer to extension + */ +char *ccp4_utils_extension(const char *filename) +{ + int i, indx1=-1, length=1; + char *extension; + + for ( i = strlen(filename)-1; i >= 0; i-- ) { + if (filename[i] == EXT_SEPARATOR) { + indx1 = i; + length = strlen(filename) - indx1; + break; + } else if (is_sep(filename[i])) { + indx1 = i; + length = 1; + break; + } + } + extension = ccp4_utils_malloc(length*sizeof(char)); + strncpy(extension,filename+indx1+1,length-1); + extension[length-1]='\0'; + return extension; +} + +/** Joins a leading directory with a filename. + * Separators for directories and extensions are OS-specific. + * @param dir directory path. + * @param file file name string. + * @return pointer to joined directory-filename path. + */ +char *ccp4_utils_joinfilenames(const char *dir, const char *file) +{ + char *join=NULL; + int lendir,lenfile,lenjoin; + + lendir = strlen(dir); + lenfile = strlen(file); + lenjoin = lendir + lenfile + 2; + + join = (char *) ccp4_utils_malloc(sizeof(char)*lenjoin); + if (!join) { + return NULL; + } + + strncpy(join,dir,lendir); + join[lendir] = PATH_SEPARATOR; + join[lendir+1] = '\0'; + strncat(join,file,lenfile); + join[lenjoin-1] = '\0'; + + return join; +} + +/** . + * + * @return + */ +void ccp4_utils_idate (int iarray[3]) +{ + struct tm *lt=NULL; + time_t tim; + tim = time(NULL); + lt = localtime(&tim); + iarray[0] = lt->tm_mday; + iarray[1] = lt->tm_mon+1; /* need range 1-12 */ + iarray[2] = lt->tm_year + 1900; +} + +/** . + * + * @return + */ +char *ccp4_utils_date(char *date) +{ + int iarray[3]; + + ccp4_utils_idate(iarray); + sprintf(date,"%2d/%2d/%4d",iarray[0],iarray[1],iarray[2]); + date[10] = '\0'; + + return (date); +} + +/** Function to obtain current time. + * @param iarray Array containing hours, minutes and seconds. + * @return void. + */ +void ccp4_utils_itime (int iarray[3]) +{ + struct tm *lt; + time_t tim; + tim = time(NULL); + lt = localtime(&tim); + iarray[0] = lt->tm_hour; + iarray[1] = lt->tm_min; + iarray[2] = lt->tm_sec; +} + +/** Alternative to ccp4_utils_itime with time as character string. + * @param time Character string of form HH:MM:SS + * @return pointer to character string. + */ +char *ccp4_utils_time(char *time) +{ + int iarray[3]; + + ccp4_utils_itime(iarray); + sprintf(time,"%2.2d:%2.2d:%2.2d",iarray[0],iarray[1],iarray[2]); + time[8] = '\0'; + + return (time); +} + +/** Function to obtain User and System times. + * @param tarray Array containing User and System times. + * @return Sum of User and System times. + */ +float ccp4_utils_etime (float tarray[2]) +{ +#ifdef _WIN32 + tarray[0] = tarray[1] = 0.; +#else + static long clk_tck = 0; + + struct tms buffer; + if (! clk_tck) clk_tck = sysconf(_SC_CLK_TCK); + (void) times(&buffer); + tarray[0] = (float) buffer.tms_utime / (float)clk_tck; + tarray[1] = (float) buffer.tms_stime / (float)clk_tck; +#endif + return (tarray[0]+tarray[1]); +} + +#if defined(_MSC_VER) +double ccp4_erfc( double x ) +{ + double t,z,ans; + + z=fabs(x); + t=1.0/(1.0+0.5*z); + ans=t*exp(-z*z-1.26551223+t*(1.00002368+t*(0.37409196+t*(0.09678418+ + t*(-0.18628806+t*(0.27886807+t*(-1.13520398+t*(1.48851587+ + t*(-0.82215223+t*0.17087277))))))))); + return x >= 0.0 ? ans : 2.0-ans; +} +#endif + +#if defined (__APPLE__) && defined (__GNUC__) && ( __GNUC__ < 3 ) +void _carbon_init(int argc, char **argv) {} +void _objcInit(void) {} +#endif + +#if defined (__APPLE__) && defined (__GNUC__) && ( __GNUC__ == 3 ) && (__GNUC_MINOR__ == 1) +float acosf(float x) { + return (float) acos( (double) x); +} + +float atanf(float x) { + return (float) atan( (double) x); +} + +float asinf(float x) { + return (float) asin( (double) x); +} + +#endif + +#if defined(_MSC_VER) && _MSC_VER < 1800 +double rint(double x) { + if (x >= 0.) { + return (double)(int)(x+.5); + } + return (double)(int)(x-.5); +} +#endif diff --git a/ccp4c/ccp4/mtzdata.h b/ccp4c/ccp4/mtzdata.h new file mode 100644 index 00000000..ce9bbf94 --- /dev/null +++ b/ccp4c/ccp4/mtzdata.h @@ -0,0 +1,199 @@ +/* + mtzdata.h: Definition of MTZ data structure. + Copyright (C) 2001 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +/** @file mtzdata.h + * + * @brief Definition of MTZ data structure. + * + * The file defines a hierarchy of structs which hold the + * MTZ data structure. + * + * @author Martyn Winn + */ + +#ifndef __CMTZData__ +#define __CMTZData__ + +#define MTZVERSN "MTZ:V1.1" /**< traditional version number! */ +#define MTZ_MAJOR_VERSN 1 /**< MTZ file major version - keep to single digit */ +#define MTZ_MINOR_VERSN 1 /**< MTZ file minor version - keep to single digit */ +#define CCP4_MTZDATA 20100630 /**< Date stamp for the cmtz data structure + (update if there are changes to the structs in this file) */ + +/** defines for sizes in MTZ structure */ +#define SIZE1 20 /**< size of pre-reflection block */ +#define MTZRECORDLENGTH 80 /**< length of records */ +#define MAXSPGNAMELENGTH 20 /**< max length of a spacegroup name */ +#define MAXPGNAMELENGTH 10 /**< max length of a pointgroup name */ + +#define NBATCHWORDS 185 /**< total size of batch header buffer */ +#define NBATCHINTEGERS 29 /**< size of integer section of batch header buffer */ +#define NBATCHREALS 156 /**< size of float section of batch header buffer */ + +/* cctbx uses smaller values for these three */ +#ifndef MXTALS +#define MXTALS 100 /**< maximum number of crystals (for a few arrays - to be removed!) */ +#endif +#ifndef MSETS +#define MSETS 1000 /**< maximum number of datasets (for a few arrays - to be removed!) */ +#endif +#ifndef MCOLUMNS +#define MCOLUMNS 10000 /**< maximum number of columns (for a few arrays - to be removed!) */ +#endif + +/** MTZ column struct. */ +typedef struct { char label[31]; /**< column name as given by user */ + char type[3]; /**< column type */ + int active; /**< whether column in active list */ + unsigned int source; /**< column index in input file */ + float min; /**< minimum data element */ + float max; /**< maximum data element */ + float *ref; /**< data array */ + char colsource[37]; /**< column source - originating job */ + char grpname[31]; /**< column group name */ + char grptype[5]; /**< column group type */ + int grpposn; /**< column group position in group */ + } MTZCOL; + +/** MTZ dataset struct. */ +typedef struct { int setid; /**< Dataset id */ + char dname[65]; /**< Dataset name */ + float wavelength; /**< Dataset wavelength */ + int ncol; /**< number of columns */ + MTZCOL **col; /**< columns */ + } MTZSET; + +/** MTZ crystal struct. */ +typedef struct { int xtalid; /**< Crystal id */ + char xname[65]; /**< Crystal name */ + char pname[65]; /**< Project name */ + float cell[6]; /**< Crystal cell */ + float resmin; /**< Low resolution limit */ + float resmax; /**< High resolution limit */ + int nset; /**< number of datasets */ + MTZSET **set; /**< datasets */ + } MTZXTAL; + +/** MTZ batch struct. */ +typedef struct bathead { int num; /**< batch number */ + char title[71]; /**< batch title */ + char gonlab[3][9]; /**< names of the three axes */ + int iortyp; /**< type of orientation block (for + possible future use, now = 0) */ + int lbcell[6]; /**< refinement flags for cell */ + int misflg; /**< number of phixyz used (0, 1, or 2) */ + int jumpax; /**< reciprocal axis closest to rotation + axis */ + int ncryst; /**< crystal number */ + int lcrflg; /**< mosaicity model: 0 = isotropic, + 1 = anisotropic */ + int ldtype; /**< type of data: 2D (1), 3D (2), or + Laue (3) */ + int jsaxs; /**< goniostat scan axis number */ + int nbscal; /**< number of batch scales & Bfactors + (0 if unset) */ + int ngonax; /**< number of goniostat axes */ + int lbmflg; /**< flag for type of beam info: + = 0 for alambd, delamb + = 1 also delcor, divhd, divvd */ + int ndet; /**< number of detectors (current maximum + 2) */ + int nbsetid; /**< dataset id - should be pointer? */ + float cell[6]; /**< cell dimensions */ + float umat[9]; /**< orientation matrix U in Fortranic order, + i.e. U(1,1), U(2,1) ... */ + float phixyz[2][3]; /**< missetting angles at beginning and + end of oscillation */ + float crydat[12]; /**< mosaicity */ + float datum[3]; /**< datum values of goniostat axes */ + float phistt; /**< start of phi relative to datum */ + float phiend; /**< end of phi relative to datum */ + float scanax[3]; /**< rotation axis in lab frame */ + float time1; /**< start time */ + float time2; /**< stop time */ + float bscale; /**< batch scale */ + float bbfac; /**< batch temperature factor */ + float sdbscale; /**< sd bscale */ + float sdbfac; /**< sd bbfac */ + float phirange; /**< phi range */ + float e1[3]; /**< vector 1 ("Cambridge" laboratory axes) + defining ngonax goniostat axes */ + float e2[3]; /**< vector 2 ("Cambridge" laboratory axes) + defining ngonax goniostat axes */ + float e3[3]; /**< vector 3 ("Cambridge" laboratory axes) + defining ngonax goniostat axes */ + float source[3]; /**< idealised source vector */ + float so[3]; /**< source vector */ + float alambd; /**< wavelength (A) */ + float delamb; /**< dispersion (deltalambda / lambda) */ + float delcor; /**< correlated component */ + float divhd; /**< horizontal beam divergence */ + float divvd; /**< vertical beam divergence */ + float dx[2]; /**< xtal to detector distance */ + float theta[2]; /**< detector tilt angle */ + float detlm[2][2][2]; /**< min & max values of detector coords + (pixels) */ + struct bathead *next; /**< next batch in list */ + } MTZBAT; + +/** MTZ symmetry struct. */ +typedef struct { int spcgrp; /**< spacegroup number */ + char spcgrpname[MAXSPGNAMELENGTH+1]; /**< spacegroup name */ + int nsym; /**< number of symmetry operations */ + float sym[192][4][4]; /**< symmetry operations + (translations in [*][3]) */ + int nsymp; /**< number of primitive symmetry ops. */ + char symtyp; /**< lattice type (P,A,B,C,I,F,R) */ + char pgname[MAXPGNAMELENGTH+1]; /**< pointgroup name */ + char spg_confidence; /**< L => Bravais lattice correct + P => pointgroup correct + E => spacegroup or enantiomorph + S => spacegroup is correct + X => flag not set */ + } SYMGRP; + +typedef union { char amnf[4]; + float fmnf; + } MNF; + +/** Top level of MTZ struct. */ +typedef struct { CCP4File *filein; /**< file for reading */ + CCP4File *fileout; /**< file for writing */ + char title[71]; /**< title of mtz structure */ + char *hist; /**< history of mtz file */ + int histlines; /**< number of lines in hist */ + int nxtal; /**< number of crystals */ + int ncol_read; /**< number of columns from file */ + int nref; /**< total number of reflections */ + int nref_filein; /**< number of reflections from input file */ + int refs_in_memory; /**< whether reflections are held in memory */ + int n_orig_bat; /**< original number of batches */ + float resmax_out; /**< output file max res */ + float resmin_out; /**< output file min res */ + MNF mnf; /**< value of missing number flag */ + SYMGRP mtzsymm; /**< symmetry information */ + MTZXTAL **xtal; /**< crystals */ + MTZBAT *batch; /**< first batch header */ + MTZCOL *order[5]; /**< sort order */ + char *xml; /**< xml data block */ + char *unknown_headers;/**< unknown header data */ + int n_unknown_headers;/**< unknown header data */ + } MTZ; + +#endif diff --git a/ccp4c/ccp4/overview.h b/ccp4c/ccp4/overview.h new file mode 100644 index 00000000..04f1479b --- /dev/null +++ b/ccp4c/ccp4/overview.h @@ -0,0 +1,88 @@ +/* + overview.h: overview of CINCH - Crystallography IN C Headers + Copyright (C) 2003 CCLRC, Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +/** @mainpage CINCH - Crystallography IN C Headers + * + * @note I'm fed up of the uninspiring "new library" and here's + * my first attempt at a funky name. Alternatives welcome! + * + * @verbatim + + + + @endverbatim + * + * @section aims Aims + +The CCP4 software suite is based around a library of routines which +cover common tasks, such as file opening, parsing keyworded input, +reading and writing of standard data formats, applying symmetry +operations, etc. Programs in the suite call these routines which, as +well as saving the programmer some effort, ensure that the varied +programs in the suite have a similar look-and-feel. +

+Since 2002, there has been a major effort to re-write +much of the CCP4 library into C/C++. The aims are: + +

    +
  • To implement a better representation of the underlying data model. +For example, Eugene Krissinel's MMDB library acts on a data structure +which represents the various levels of structure of a protein model. +The new MTZ library encapsulates the crystal/dataset hierarchy that +is increasingly being used by programs. +
  • To maintain support for existing programs. In particular, the +existing Fortran APIs will be maintained, although they will now often +be only wrappers to functions in the new library. It is hoped that many +existing programs will be migrated to using the new library directly. +
  • To provide support for scripting. It is possible to generate APIs +for Python, Tcl and Perl automatically from the core C code. Thus, much +of the standard CCP4 functionality wil be available to scripts used +e.g. in ccp4i or the molecular graphics project. +
+ +This incremental approach, maintaining the existing suite while +improving the underlying code, puts constraints on what is possible, but +is considered more appropriate for a collaborative project like CCP4. + + * @section start This documentation + +

+This documentation is generated automatically by +Doxygen from +comment sections in the code. It is therefore detailed and extensive. +The library divides roughly into the following sections: +

+
CMTZ library +
See the @ref cmtz_page page for C/C++ programmers, and the +@ref cmtz_f_page page for Fortran programmers. +
CMAP library +
See the @ref cmap_page page for C/C++ programmers, and the +@ref cmap_f_page page for Fortran programmers. +
MMDB library +
See Eugene's documentation. +
CSYM library +
See the @ref csym_page page for C/C++ programmers, and the +@ref csym_f_page page for Fortran programmers. +
CCP4 utility library +
See the @ref utilities_page page for C/C++ programmers. +
Low level disk i/o +
See the @ref diskio_f_page page for Fortran programmers. +
+ + */ + diff --git a/ccp4c/ccp4/pack_c.c b/ccp4c/ccp4/pack_c.c new file mode 100644 index 00000000..0f423da4 --- /dev/null +++ b/ccp4c/ccp4/pack_c.c @@ -0,0 +1,1521 @@ +/* + pack_c.c: (de)compress diffraction image files + Copyright (C) 1995 Jan P Abrahams + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include +#include +#include "pack_c.h" + + +/* pack_c.c, version 2 (backwards compatible with earlier versions)... + JPA, 26 June 1995 + jpa@mrc-lmb.cam.ac.uk + + This file contains functions capable of compressing and decompressing + images. It is especially suited for X-ray diffraction patterns, or other + image formats in which orthogonal pixels contain "grey-levels" and + vary smoothly accross the image. Clean images measured by a MAR-research + image plate scanner containing two bytes per pixel can be compressed by + a factor of 3.5 to 4.5 . + + Since the images are encoded in a byte-stream, there should be no problem + concerening big- or little ended machines: both will produce an identical + packed image. + + Compression is achieved by first calculating the differences between every + pixel and the truncated value of four of its neighbours. For example: + the difference for a pixel at img[x, y] is: + + img[x, y] - (int) (img[x-1, y-1] + + img[x-1, y] + + img[x-1, y+1] + + img[x, y-1]) / 4 + + After calculating the differences, they are encoded in a packed array. A + packed array consists of consequitive chunks which have the following format: + - Three bits containing the logarithm base 2 of the number of pixels encoded + in the chunk. + - Three bits defining the number of bits used to encode one element of the + chunk. The value of these three bits is used as index in a lookup table + to get the actual number of bits of the elements of the chunk. + Note: in version 2, there are four bits in this position!! This allows + more efficient packing of synchrotron data! The routines in this + sourcefile are backwards compatible. + JPA, 26 June 1995 + - The truncated pixel differences. + + To compress an image, call pack_wordimage_c() or pack_longimage_c(). These + will append the packed image to any header information already written to + disk (take care that the file containing this information is closed before + calling). To decompress an image, call readpack_word_c() or + readpack_long_c(). These functions will find the start of the packed image + themselves, irrespective of the header format. + + In order to provide an interface to fortran programs, the functions + pack_wordimage_f(), pack_longimage_f(), read_wordimage_f() and + read_long_image_f() are provided. They are called by the fortran subroutines + PACK_WORDIMAGE, PACK_LONGIMAGE, READPACK_WORD, and READPACK_LONG, which + can be found in the accompanying sourcefile "pack_f.f". + + + Jan Pieter Abrahams, 6 Jan 1993 */ + + + + +/******************************************************************************/ + + +/* Some fortran compilers require c-functions to end with an underscore. */ + +#if defined(_AIX) || defined (___AIX) || defined(__hpux) +/* no underscore by default */ +#else +# if defined (VMS) || defined (vms) || defined (__vms) || defined (__VMS) || defined(_MSC_VER) +# define pack_wordimage_f PACK_WORDIMAGE_F +# define v2pack_wordimage_f V2PACK_WORDIMAGE_F +# define pack_longimage_f PACK_LONGIMAGE_F +# define v2pack_longimage_f V2PACK_LONGIMAGE_F +# define readpack_word_f READPACK_WORD_F +# define readpack_long_f READPACK_LONG_F +# define mirror_wordimage MIRROR_WORDIMAGE +# define mirror_longimage MIRROR_LONGIMAGE +# define imsiz_f IMSIZ_F +# else +# define pack_wordimage_f pack_wordimage_f_ +# define v2pack_wordimage_f v2pack_wordimage_f_ +# define pack_longimage_f pack_longimage_f_ +# define v2pack_longimage_f v2pack_longimage_f_ +# define readpack_word_f readpack_word_f_ +# define readpack_long_f readpack_long_f_ +# define mirror_wordimage mirror_wordimage_ +# define mirror_longimage mirror_longimage_ +# define imsiz_f imsiz_f_ +# endif +#endif + +/******************************************************************************/ + +/* Prototypes of the functions in this sourcefile, as required by the ANSI + standard. The pack_c.h file contains the functions other routines might + call. Here are functions which will are not really usefull for image + processing programmes, and which are used locally in this file. Also + front-end fortran callable C-functions are not included in the pack_c.h + file. */ + + +#if defined (PROTOTYPE) + +/* Functions required for packing: */ + + +void pack_wordimage_f(WORD *img, LONG *x, LONG *y, LONG *filename); +/* Fortran frontend of pack_wordimage_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +void v2pack_wordimage_f(WORD *img, LONG *x, LONG *y, LONG *filename); +/* Fortran frontend of pack_wordimage_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. This function generates + Version 2 images! */ + +void pack_longimage_f(LONG *img, LONG *x, LONG *y, LONG *filename); +/* Fortran frontend of pack_longimage_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +void v2pack_longimage_f(LONG *img, LONG *x, LONG *y, LONG *filename); +/* Fortran frontend of pack_longimage_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. This function generates + Version 2 images! */ + +void pack_wordimage_c(WORD *img, int x, int y, char *filename); +/* Pack image 'img', containing 'x * y' WORD-sized pixels into 'filename'. + Opens file and wraps pack_wordimage_copen() */ + +void pack_wordimage_copen(WORD *img, int x, int y, FILE *packfile); +/* Pack image 'img', containing 'x * y' WORD-sized pixels into open file + 'packfile'. */ + +void pack_longimage_c(LONG *img, int x, int y, char *filename); +/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. + Opens file and wraps pack_long_image_copen()*/ + +void pack_longimage_copen(LONG *img, int x, int y, FILE *packfile); +/* Pack image 'img', containing 'x * y' LONG-sized pixels into open file + 'packfile'. */ + +LONG *diff_words(WORD *img, int x, int y, LONG *diffs, LONG done); +/* Calculates the difference of WORD-sized pixels of an image with the + truncated mean value of four of its neighbours. 'x' is the number of fast + coordinates of the image 'img', 'y' is the number of slow coordinates, + 'diffs' will contain the differences, 'done' defines the index of the pixel + where calculating the differences should start. A pointer to the last + difference is returned. Maximally DIFFBUFSIZ differences are returned in + 'diffs'.*/ + +LONG *diff_longs(LONG *img, int x, int y, LONG *diffs, LONG done); +/* Calculates the difference of LONG-sized pixels of an image with the + truncated mean value of four of its neighbours. 'x' is the number of fast + coordinates of the image 'img', 'y' is the number of slow coordinates, + 'diffs' will contain the differences, 'done' defines the index of the pixel + where calculating the differences should start. A pointer to the last + difference is returned. Maximally DIFFBUFSIZ differences are returned in + 'diffs'.*/ + +int bits(LONG *chunk, int n); +/* Returns the number of bits neccesary to encode the longword-array 'chunk' + of size 'n' The size in bits of one encoded element can be 0, 4, 5, 6, 7, + 8, 16 or 32. */ + +int v2bits(LONG *chunk, int n); +/* Returns the number of bits neccesary to encode the longword-array 'chunk' + of size 'n' The size in bits of one encoded element can be 0, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16 or 32. */ + +void pack_chunk(LONG *lng, int nmbr, int bitsize, FILE *file); +/* Packs 'nmbr' LONGs starting at 'lng[0]' into a packed array of 'bitsize' + sized elements. If the internal buffer in which the array is packed is full, + it is flushed to 'file', making room for more of the packed array. If + ('lng == NULL'), the buffer is flushed aswell. */ + +void v2pack_chunk(LONG *lng, int nmbr, int bitsize, FILE *file); +/* Packs 'nmbr' LONGs starting at 'lng[0]' into a packed array of 'bitsize' + sized elements. If the internal buffer in which the array is packed is full, + it is flushed to 'file', making room for more of the packed array. If + ('lng == NULL'), the buffer is flushed aswell. This is a new function + included in version 2, but not existing in version 1! */ + +void pack_longs(LONG *lng, int n, BYTE **target, int *bit, int size); +/* Pack 'n' WORDS, starting with 'lng[0]' into the packed array 'target'. The + elements of such a packed array do not obey BYTE-boundaries, but are put one + behind the other without any spacing. Only the 'bitsiz' number of least + significant bits are used, the rest is truncated. The starting bit of + 'target' is 'bit' (bits range from 0 to 7). After completion of + 'pack_words()', both '**target' and '*bit' are updated and define the next + position in 'target' from where packing could continue. */ + + + +/* Functions required for unpacking: */ + + +void readpack_word_f(WORD *img, LONG *filename); +/* Fortran frontend of readpack_word_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +void readpack_long_f(LONG *img, LONG *filename); +/* Fortran frontend of readpack_long_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +void unpack_word(FILE *packfile, int x, int y, WORD *img); +/* Unpacks a packed image into the WORD-array 'img'. The image is stored + in 'packfile'. The file should be properly positioned: the first BYTE + read is assumed to be the first BYTE of the packed image. */ + +void v2unpack_word(FILE *packfile, int x, int y, WORD *img); +/* Unpacks a packed image into the WORD-array 'img'. The image is stored + in 'packfile'. The file should be properly positioned: the first BYTE + read is assumed to be the first BYTE of the packed image. This function + reads Version 2 packed images! */ + +void unpack_long(FILE *packfile, int x, int y, LONG *img); +/* Unpacks a packed image into the LONG-array 'img'. The image is stored + in 'packfile'. The file should be properly positioned: the first BYTE + read is assumed to be the first BYTE of the packed image. */ + +void v2unpack_long(FILE *packfile, int x, int y, LONG *img); +/* Unpacks a packed image into the LONG-array 'img'. The image is stored + in 'packfile'. The file should be properly positioned: the first BYTE + read is assumed to be the first BYTE of the packed image. This function + reads Version 2 packed images! */ + + + + +/* Function required to convert a WORD-array into a char array, required for + both compression and decompression if called from fortran. */ + +char *long_to_char(LONG *lng, char *string); +/* Shrinks an array of LONGs into an array of chars, used in order to translate + an encoded string array passed by fortran into a c-type string. Returns + 'string'. */ + +void imsiz_f(LONG *filename, LONG *x, LONG *y); +/* Fortran frontend of imsiz_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + + + +/* Some other usefull functions for manipulating images. */ + +void mirror_wordimg(WORD *img, LONG *x, LONG *y); +/* Replaces img with its mirror by interchanging rows. '*x' is the fast index, + '*y' is the slow index. */ + +void mirror_longimg(LONG *img, LONG *x, LONG *y); +/* Replaces img with its mirror by interchanging rows. '*x' is the fast index, + '*y' is the slow index. */ + +#endif /* (PROTOTYPE) */ + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void pack_wordimage_f(WORD *img, LONG *x, LONG *y, LONG *filename) +#else + void pack_wordimage_f(img, x, y, filename) + WORD *img; + LONG *x, *y, *filename; +#endif +/* Fortran frontend of pack_wordimage_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +{ char c_filename[1024]; +#if !defined (PROTOTYPE) + void pack_wordimage_c(); + char *long_to_char(); +#endif + + pack_wordimage_c(img, (LONG) *x, (LONG) *y, + long_to_char(filename, c_filename));} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void v2pack_wordimage_f(WORD *img, LONG *x, LONG *y, LONG *filename) +#else + void v2pack_wordimage_f(img, x, y, filename) + WORD *img; + LONG *x, *y, *filename; +#endif +/* Fortran frontend of pack_wordimage_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. This function generates + Version 2 images!*/ + +{ char c_filename[1024]; +#if !defined (PROTOTYPE) + void v2pack_wordimage_c(); + char *long_to_char(); +#endif + + v2pack_wordimage_c(img, (LONG) *x, (LONG) *y, + long_to_char(filename, c_filename));} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void pack_longimage_f(LONG *img, LONG *x, LONG *y, LONG *filename) +#else + void pack_longimage_f(img, x, y, filename) + LONG *img, *x, *y, *filename; +#endif +/* Fortran frontend of pack_longimage_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +{ char c_filename[1024]; +#if !defined (PROTOTYPE) + void pack_longimage_c(); + char *long_to_char(); +#endif + + pack_longimage_c(img, (LONG) *x, (LONG) *y, + long_to_char(filename, c_filename));} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void v2pack_longimage_f(LONG *img, LONG *x, LONG *y, LONG *filename) +#else + void v2pack_longimage_f(img, x, y, filename) + LONG *img, *x, *y, *filename; +#endif +/* Fortran frontend of pack_longimage_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +{ char c_filename[1024]; +#if !defined (PROTOTYPE) + void v2pack_longimage_c(); + char *long_to_char(); +#endif + + v2pack_longimage_c(img, (LONG) *x, (LONG) *y, + long_to_char(filename, c_filename));} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void pack_wordimage_copen(WORD *img, int x, int y, FILE *packfile) +#else + void pack_wordimage_copen(img, x, y, packfile) + WORD *img; + int x, y; + FILE *packfile; +#endif +/* Pack image 'img', containing 'x * y' WORD-sized pixels into 'filename'. */ + +{ int chunksiz, packsiz, nbits, next_nbits, tot_nbits; + LONG buffer[DIFFBUFSIZ]; + LONG *diffs = buffer; + LONG *end = diffs - 1; + LONG done = 0; +#if !defined (PROTOTYPE) + LONG *diff_words(); + int bits(); + void pack_chunk(); +#endif + + fprintf(packfile, PACKIDENTIFIER, x, y); + while (done < (x * y)) + { end = diff_words(img, x, y, buffer, done); + done += (end - buffer) + 1; + diffs = buffer; + while (diffs <= end) + { packsiz = 0; + chunksiz = 1; + nbits = bits(diffs, 1); + while (packsiz == 0) + { if (end <= (diffs + chunksiz * 2)) + packsiz = chunksiz; + else + { next_nbits = bits(diffs + chunksiz, chunksiz); + tot_nbits = 2 * max(nbits, next_nbits); + if (tot_nbits >= (nbits + next_nbits + 6)) + packsiz = chunksiz; + else + { nbits = tot_nbits; + if (chunksiz == 64) + packsiz = 128; + else + chunksiz *= 2;}}} + pack_chunk(diffs, packsiz, nbits / packsiz, packfile); + diffs += packsiz;}} + pack_chunk(NULL, 0, 0, packfile); +} + + +#if defined (PROTOTYPE) + void pack_wordimage_c(WORD *img, int x, int y, char *filename) +#else + void pack_wordimage_c(img, x, y, filename) + WORD *img; + int x, y; + char *filename; +#endif +{ + FILE *packfile = fopen(filename, "a"); + if (packfile == NULL) { + fprintf(stderr,"The file %s cannot be created!\n ...giving up...\n", + filename); + exit(1); + } else { + pack_wordimage_copen(img, x, y, packfile); + fclose(packfile); + } +} + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void v2pack_wordimage_c(WORD *img, int x, int y, char *filename) +#else + void v2pack_wordimage_c(img, x, y, filename) + WORD *img; + int x, y; + char *filename; +#endif +/* Pack image 'img', containing 'x * y' WORD-sized pixels into 'filename'. */ + +{ int chunksiz, packsiz, nbits, next_nbits, tot_nbits; + LONG buffer[DIFFBUFSIZ]; + LONG *diffs = buffer; + LONG *end = diffs - 1; + LONG done = 0; + FILE *packfile; +#if !defined (PROTOTYPE) + LONG *diff_words(); + int v2bits(); + void v2pack_chunk(); +#endif + + packfile = fopen(filename, "a"); + if (packfile == NULL) + { fprintf(stderr,"The file %s cannot be created!\n ...giving up...\n", + filename); + exit(1);} + else + { fprintf(packfile, V2IDENTIFIER, x, y); + while (done < (x * y)) + { end = diff_words(img, x, y, buffer, done); + done += (end - buffer) + 1; + diffs = buffer; + while (diffs <= end) + { packsiz = 0; + chunksiz = 1; + nbits = v2bits(diffs, 1); + while (packsiz == 0) + { if (end <= (diffs + chunksiz * 2)) + packsiz = chunksiz; + else + { next_nbits = v2bits(diffs + chunksiz, chunksiz); + tot_nbits = 2 * max(nbits, next_nbits); + if (tot_nbits >= (nbits + next_nbits + 7)) + packsiz = chunksiz; + else + { nbits = tot_nbits; + if (chunksiz == 64) + packsiz = 128; + else + chunksiz *= 2;}}} + v2pack_chunk(diffs, packsiz, nbits / packsiz, packfile); + diffs += packsiz;}} + v2pack_chunk(NULL, 0, 0, packfile); + fclose(packfile);}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void pack_longimage_copen(LONG *img, int x, int y, FILE *packfile) +#else + void pack_longimage_copen(img, x, y, packfile) + LONG *img; + int x, y; + FILE *packfile; +#endif +/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. */ +{ int chunksiz, packsiz, nbits, next_nbits, tot_nbits; + LONG buffer[DIFFBUFSIZ]; + LONG *diffs = buffer; + LONG *end = diffs - 1; + LONG done = 0; +#if !defined (PROTOTYPE) + LONG *diff_longs(); + int bits(); + void pack_chunk(); +#endif + + fprintf(packfile, PACKIDENTIFIER, x, y); + while (done < (x * y)) + { end = diff_longs(img, x, y, buffer, done); + done += (end - buffer) + 1; + diffs = buffer; + while (diffs <= end) + { packsiz = 0; + chunksiz = 1; + nbits = bits(diffs, 1); + while (packsiz == 0) + { if (end <= (diffs + chunksiz * 2)) + packsiz = chunksiz; + else + { next_nbits = bits(diffs + chunksiz, chunksiz); + tot_nbits = 2 * max(nbits, next_nbits); + if (tot_nbits >= (nbits + next_nbits + 6)) + packsiz = chunksiz; + else + { nbits = tot_nbits; + if (chunksiz == 64) + packsiz = chunksiz * 2; + else + chunksiz *= 2;}}} + pack_chunk(diffs, packsiz, nbits / packsiz, packfile); + diffs += packsiz;}} + pack_chunk(NULL, 0, 0, packfile); +} + + +#if defined (PROTOTYPE) + void pack_longimage_c(LONG *img, int x, int y, char *filename) +#else + void pack_longimage_c(img, x, y, filename) + LONG *img; + int x, y; + char *filename; +#endif +/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. */ +{ + FILE *packfile = fopen(filename, "a"); + if (packfile == NULL) + { fprintf(stderr,"The file %s cannot be created!\n ...giving up...\n", + filename); + exit(1);} + else + { pack_longimage_copen(img, x, y, packfile); + fclose(packfile); + } +} + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void v2pack_longimage_c(LONG *img, int x, int y, char *filename) +#else + void v2pack_longimage_c(img, x, y, filename) + LONG *img; + int x, y; + char *filename; +#endif +/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. */ + +{ int chunksiz, packsiz, nbits, next_nbits, tot_nbits; + LONG buffer[DIFFBUFSIZ]; + LONG *diffs = buffer; + LONG *end = diffs - 1; + LONG done = 0; + FILE *packfile; +#if !defined (PROTOTYPE) + LONG *diff_longs(); + int v2bits(); + void v2pack_chunk(); +#endif + + packfile = fopen(filename, "a"); + if (packfile == NULL) + { fprintf(stderr,"The file %s cannot be created!\n ...giving up...\n", + filename); + exit(1);} + else + { fprintf(packfile, V2IDENTIFIER, x, y); + while (done < (x * y)) + { end = diff_longs(img, x, y, buffer, done); + done += (end - buffer) + 1; + diffs = buffer; + while (diffs <= end) + { packsiz = 0; + chunksiz = 1; + nbits = v2bits(diffs, 1); + while (packsiz == 0) + { if (end <= (diffs + chunksiz * 2)) + packsiz = chunksiz; + else + { next_nbits = v2bits(diffs + chunksiz, chunksiz); + tot_nbits = 2 * max(nbits, next_nbits); + if (tot_nbits >= (nbits + next_nbits + 7)) + packsiz = chunksiz; + else + { nbits = tot_nbits; + if (chunksiz == 64) + packsiz = chunksiz * 2; + else + chunksiz *= 2;}}} + v2pack_chunk(diffs, packsiz, nbits / packsiz, packfile); + diffs += packsiz;}} + v2pack_chunk(NULL, 0, 0, packfile); + fclose(packfile);}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + LONG *diff_words(WORD *word, int x, int y, LONG *diffs, LONG done) +#else + LONG *diff_words(word, x, y, diffs, done) + WORD *word; + int x, y; + LONG *diffs, done; +#endif +/* Calculates the difference of WORD-sized pixels of an image with the + truncated mean value of four of its neighbours. 'x' is the number of fast + coordinates of the image 'img', 'y' is the number of slow coordinates, + 'diffs' will contain the differences, 'done' defines the index of the pixel + where calculating the differences should start. A pointer to the last + difference is returned. Maximally DIFFBUFSIZ differences are returned in + 'diffs'.*/ + +{ LONG i = 0; + LONG tot = x * y; + + if (done == 0) + { *diffs = word[0]; + ++diffs; + ++done; + ++i;} + while ((done <= x) && (i < DIFFBUFSIZ)) + { *diffs = word[done] - word[done - 1]; + ++diffs; + ++done; + ++i;} + while ((done < tot) && (i < DIFFBUFSIZ)) + { *diffs = word[done] - (word[done - 1] + word[done - x + 1] + + word[done - x] + word[done - x - 1] + 2) / 4; + ++diffs; + ++done; + ++i;} + return(--diffs);} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + LONG *diff_longs(LONG *lng, int x, int y, LONG *diffs, LONG done) +#else + LONG *diff_longs(lng, x, y, diffs, done) + LONG *lng, *diffs, done; + int x, y; +#endif +/* Calculates the difference of LONG-sized pixels of an image with the + truncated mean value of four of its neighbours. 'x' is the number of fast + coordinates of the image 'img', 'y' is the number of slow coordinates, + 'diffs' will contain the differences, 'done' defines the index of the pixel + where calculating the differences should start. A pointer to the last + difference is returned. Maximally DIFFBUFSIZ differences are returned in + 'diffs'.*/ + +{ LONG i = 0, d; + LONG tot = x * y; + LONG huge = shift_left(1, 30); + + if (done == 0) + { *diffs = min(max(-huge, lng[0]), huge); + ++diffs; + ++done; + ++i;} + while ((done <= x) && (i < DIFFBUFSIZ)) + { d = lng[done] - lng[done - 1]; + *diffs = min(max(-huge, d), huge); + ++diffs; + ++done; + ++i;} + while ((done < tot) && (i < DIFFBUFSIZ)) + { d = lng[done] - (lng[done - 1] + lng[done - x + 1] + + lng[done - x] + lng[done - x - 1] + 2) / 4; + *diffs = min(max(-huge, d), huge); + ++diffs; + ++done; + ++i;} + return(--diffs);} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + int bits(LONG *chunk, int n) +#else + int bits(chunk, n) + LONG *chunk; + int n; +#endif +/* Returns the number of bits neccesary to encode the longword-array 'chunk' + of size 'n' The size in bits of one encoded element can be 0, 4, 5, 6, 7, + 8, 16 or 32. */ + +{ int size, maxsize, i; + + for (i = 1, maxsize = abs(chunk[0]); i < n; ++i) + maxsize = max(maxsize, abs(chunk[i])); + if (maxsize == 0) + size = 0; + else if (maxsize < 8) + size = 4 * n; + else if (maxsize < 16) + size = 5 * n; + else if (maxsize < 32) + size = 6 * n; + else if (maxsize < 64) + size = 7 * n; + else if (maxsize < 128) + size = 8 * n; + else if (maxsize < 32768) + size = 16 * n; + else + size = 32 * n; + return(size);} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + int v2bits(LONG *chunk, int n) +#else + int v2bits(chunk, n) + LONG *chunk; + int n; +#endif +/* Returns the number of bits neccesary to encode the longword-array 'chunk' + of size 'n' The size in bits of one encoded element can be 0, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16 or 32. */ + +{ int size, maxsize, i; + + for (i = 1, maxsize = abs(chunk[0]); i < n; ++i) + maxsize = max(maxsize, abs(chunk[i])); + if (maxsize == 0) + size = 0; + else if (maxsize < 4) + size = 3 * n; + else if (maxsize < 8) + size = 4 * n; + else if (maxsize < 16) + size = 5 * n; + else if (maxsize < 32) + size = 6 * n; + else if (maxsize < 64) + size = 7 * n; + else if (maxsize < 128) + size = 8 * n; + else if (maxsize < 256) + size = 9 * n; + else if (maxsize < 512) + size = 10 * n; + else if (maxsize < 1024) + size = 11 * n; + else if (maxsize < 2048) + size = 12 * n; + else if (maxsize < 4096) + size = 13 * n; + else if (maxsize < 8192) + size = 14 * n; + else if (maxsize < 16384) + size = 15 * n; + else if (maxsize < 32768) + size = 16 * n; + else + size = 32 * n; + return(size);} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void pack_chunk(LONG *lng, int nmbr, int bitsize, FILE *packfile) +#else + void pack_chunk(lng, nmbr, bitsize, packfile) + LONG *lng; + int nmbr, bitsize; + FILE *packfile; +#endif +/* Packs 'nmbr' LONGs starting at 'lng[0]' into a packed array of 'bitsize' + sized elements. If the internal buffer in which the array is packed is full, + it is flushed to 'file', making room for more of the packed array. If + ('lng == NULL'), the buffer is flushed aswell. */ + +{ static LONG bitsize_encode[33] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}; + LONG descriptor[2], i, j; + static BYTE *buffer = NULL; + static BYTE *buffree = NULL; + static int bitmark; +#if !defined (PROTOTYPE) + void pack_longs(); +#endif + + if (buffer == NULL) + { buffree = buffer = (BYTE *) malloc(PACKBUFSIZ); + bitmark = 0;} + if (lng != NULL) + { for (i = nmbr, j = 0; i > 1; i /= 2, ++j); + descriptor[0] = j; + descriptor[1] = bitsize_encode[bitsize]; + if ((buffree - buffer) > (PACKBUFSIZ - (130 * 4))) + { fwrite(buffer, sizeof(BYTE), buffree - buffer, packfile); + buffer[0] = buffree[0]; + buffree = buffer;} + pack_longs(descriptor, 2, &buffree, &bitmark, 3); + pack_longs(lng, nmbr, &buffree, &bitmark, bitsize);} + else + { int len=buffree-buffer; + if (bitmark!=0) len++; + fwrite(buffer, sizeof(BYTE), len, packfile); + free((void *) buffer); + buffer = NULL;}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void v2pack_chunk(LONG *lng, int nmbr, int bitsize, FILE *packfile) +#else + void v2pack_chunk(lng, nmbr, bitsize, packfile) + LONG *lng; + int nmbr, bitsize; + FILE *packfile; +#endif +/* Packs 'nmbr' LONGs starting at 'lng[0]' into a packed array of 'bitsize' + sized elements. If the internal buffer in which the array is packed is full, + it is flushed to 'file', making room for more of the packed array. If + ('lng == NULL'), the buffer is flushed aswell. This is a new function + included in version 2, but not existing in version 1! */ + +{ static LONG bitsize_encode[33] = {0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15}; + LONG descriptor[2], i, j; + static BYTE *buffer = NULL; + static BYTE *buffree = NULL; + static int bitmark; +#if !defined (PROTOTYPE) + void pack_longs(); +#endif + + if (buffer == NULL) + { buffree = buffer = (BYTE *) malloc(PACKBUFSIZ); + bitmark = 0;} + if (lng != NULL) + { for (i = nmbr, j = 0; i > 1; i /= 2, ++j); + descriptor[0] = j; + descriptor[1] = bitsize_encode[bitsize]; + if ((buffree - buffer) > (PACKBUFSIZ - (130 * 4))) + { fwrite(buffer, sizeof(BYTE), buffree - buffer, packfile); + buffer[0] = buffree[0]; + buffree = buffer;} + pack_longs(descriptor, 1, &buffree, &bitmark, 3); + pack_longs(descriptor + 1, 1, &buffree, &bitmark, 4); + pack_longs(lng, nmbr, &buffree, &bitmark, bitsize);} + else + { int len=buffree-buffer; + if (bitmark!=0) len++; + fwrite(buffer, sizeof(BYTE), len, packfile); + free((void *) buffer); + buffer = NULL;}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void pack_longs(LONG *lng, int n, BYTE **target, int *bit, int size) +#else + void pack_longs(lng, n, target, bit, size) + LONG *lng; + int n, *bit, size; + BYTE **target; +#endif +/* Pack 'n' WORDS, starting with 'lng[0]' into the packed array 'target'. The + elements of such a packed array do not obey BYTE-boundaries, but are put one + behind the other without any spacing. Only the 'bitsiz' number of least + significant bits are used. The starting bit of 'target' is 'bit' (bits range + from 0 to 7). After completion of 'pack_words()', both '**target' and '*bit' + are updated and define the next position in 'target' from which packing + could continue. */ + +{ LONG mask, window; + int valids, i, temp; + int temp_bit = *bit; + BYTE *temp_target = *target; + + if (size > 0) + { mask = setbits[size]; + for (i = 0; i < n; ++i) + { window = lng[i] & mask; + valids = size; + if (temp_bit == 0) + *temp_target = (BYTE) window; + else + { temp = shift_left(window, temp_bit); + *temp_target |= temp;} + window = shift_right(window, 8 - temp_bit); + valids = valids - (8 - temp_bit); + if (valids < 0) + temp_bit += size; + else + { while (valids > 0) + { *++temp_target = (BYTE) window; + window = shift_right(window, 8); + valids -= 8;} + temp_bit = 8 + valids;} + if (valids == 0) + { temp_bit = 0; + ++temp_target;}} + *target = temp_target; + *bit = (*bit + (size * n)) % 8;}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void readpack_word_f(WORD *img, LONG *filename) +#else + void readpack_word_f(img, filename) + WORD *img; + LONG *filename; +#endif +/* Fortran frontend of readpack_word_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +{ char c_filename[1024]; +#if !defined (PROTOTYPE) + void readpack_word_c(); + char *long_to_char(); +#endif + + readpack_word_c(img, long_to_char(filename, c_filename));} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void readpack_long_f(LONG *img, LONG *filename) +#else + void readpack_long_f(img, filename) + LONG *img, *filename; +#endif +/* Fortran frontend of readpack_long_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +{ char c_filename[1024]; +#if !defined (PROTOTYPE) + void readpack_long_c(); + char *long_to_char(); +#endif + + readpack_long_c(img, long_to_char(filename, c_filename));} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void readpack_word_c(WORD *img, char *filename) +#else + void readpack_word_c(img, filename) + WORD *img; + char *filename; +#endif +/* Unpacks packed image from 'filename' into the WORD-array 'img'. Scans the + file defined by 'filename' until the PACKIDENTIFIER is found, then unpacks + starting from there. */ + +{ FILE *packfile; + int x = 0, y = 0, i = 0, c = 0, version = 0; + char header[BUFSIZ]; +#if !defined (PROTOTYPE) + void unpack_word(); + void v2unpack_word(); +#endif + + packfile = fopen(filename, "r"); + if (packfile == NULL) + printf("%s does not exist.\n", filename); + else + { header[0] = '\n'; + header[1] = 0; + while ((c != EOF) && ((x == 0) || (y == 0))) + { c = i = x = y = 0; + while ((++i < BUFSIZ) && (c != EOF) && (c != '\n') && (x==0) && (y==0)) + if ((header[i] = c = getc(packfile)) == '\n') + { if (sscanf(header, PACKIDENTIFIER, &x, &y) == 2) + version = 1; + else if (sscanf(header, V2IDENTIFIER, &x, &y) == 2) + version = 2;}} + if (version == 1) + unpack_word(packfile, x, y, img); + else if (version == 2) + v2unpack_word(packfile, x, y, img); + fclose(packfile);}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void readpack_long_c(LONG *img, char *filename) +#else + void readpack_long_c(img, filename) + LONG *img; + char *filename; +#endif +/* Unpacks packed image from 'filename' into the LONG-array 'img'. Scans the + file defined by 'filename' until the PACKIDENTIFIER is found, then unpacks + starting from there. */ + +{ FILE *packfile; + int x = 0, y = 0, i = 0, c = 0, version = 0; + char header[BUFSIZ]; +#if !defined (PROTOTYPE) + void unpack_long(); + void v2unpack_long(); +#endif + + packfile = fopen(filename, "r"); + if (packfile == NULL) + printf("%s does not exist.", filename); + else + { header[0] = '\n'; + header[1] = 0; + while ((c != EOF) && ((x == 0) || (y == 0))) + { c = i = x = y = 0; + while ((++i < BUFSIZ) && (c != EOF) && (c != '\n') && (x==0) && (y==0)) + if ((header[i] = c = getc(packfile)) == '\n') + { if (sscanf(header, PACKIDENTIFIER, &x, &y) == 2) + version = 1; + else if (sscanf(header, V2IDENTIFIER, &x, &y) == 2) + version = 2;}} + if (version == 1) + unpack_long(packfile, x, y, img); + else if (version == 2) + v2unpack_long(packfile, x, y, img); + fclose(packfile);}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void unpack_word(FILE *packfile, int x, int y, WORD *img) +#else + void unpack_word(packfile, x, y, img) + FILE *packfile; + int x, y; + WORD *img; +#endif +/* Unpacks a packed image into the WORD-array 'img'. The image is stored + in 'packfile'. The file should be properly positioned: the first BYTE + read is assumed to be the first BYTE of the packed image. */ + +{ int valids = 0, spillbits = 0, usedbits, total = x * y; + LONG window = 0L, spill = 0, pixel = 0, nextint, bitnum, pixnum; + static int bitdecode[8] = {0, 4, 5, 6, 7, 8, 16, 32}; + + while (pixel < total) + { if (valids < 6) + { if (spillbits > 0) + { window |= shift_left(spill, valids); + valids += spillbits; + spillbits = 0;} + else + { spill = (LONG) getc(packfile); + spillbits = 8;}} + else + { pixnum = 1 << (window & setbits[3]); + window = shift_right(window, 3); + bitnum = bitdecode[window & setbits[3]]; + window = shift_right(window, 3); + valids -= 6; + while ((pixnum > 0) && (pixel < total)) + { if (valids < bitnum) + { if (spillbits > 0) + { window |= shift_left(spill, valids); + if ((32 - valids) > spillbits) + { valids += spillbits; + spillbits = 0;} + else + { usedbits = 32 - valids; + spill = shift_right(spill, usedbits); + spillbits -= usedbits; + valids = 32;}} + else + { spill = (LONG) getc(packfile); + spillbits = 8;}} + else + { --pixnum; + if (bitnum == 0) + nextint = 0; + else + { nextint = window & setbits[bitnum]; + valids -= bitnum; + window = shift_right(window, bitnum); + if ((nextint & (1 << (bitnum - 1))) != 0) + nextint |= ~setbits[bitnum];} + if (pixel > x) + { img[pixel] = (WORD) (nextint + + (img[pixel-1] + img[pixel-x+1] + + img[pixel-x] + img[pixel-x-1] + 2) / 4); + ++pixel;} + else if (pixel != 0) + { img[pixel] = (WORD) (img[pixel - 1] + nextint); + ++pixel;} + else + img[pixel++] = (WORD) nextint;}}}}} + + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void v2unpack_word(FILE *packfile, int x, int y, WORD *img) +#else + void v2unpack_word(packfile, x, y, img) + FILE *packfile; + int x, y; + WORD *img; +#endif +/* Unpacks a packed image into the WORD-array 'img'. The image is stored + in 'packfile'. The file should be properly positioned: the first BYTE + read is assumed to be the first BYTE of the packed image. */ + +{ int valids = 0, spillbits = 0, usedbits, total = x * y; + LONG window = 0L, spill = 0, pixel = 0, nextint, bitnum, pixnum; + static int bitdecode[16] = {0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 32}; + + while (pixel < total) + { if (valids < 7) + { if (spillbits > 0) + { window |= shift_left(spill, valids); + valids += spillbits; + spillbits = 0;} + else + { spill = (LONG) getc(packfile); + spillbits = 8;}} + else + { pixnum = 1 << (window & setbits[3]); + window = shift_right(window, 3); + bitnum = bitdecode[window & setbits[4]]; + window = shift_right(window, 4); + valids -= 7; + while ((pixnum > 0) && (pixel < total)) + { if (valids < bitnum) + { if (spillbits > 0) + { window |= shift_left(spill, valids); + if ((32 - valids) > spillbits) + { valids += spillbits; + spillbits = 0;} + else + { usedbits = 32 - valids; + spill = shift_right(spill, usedbits); + spillbits -= usedbits; + valids = 32;}} + else + { spill = (LONG) getc(packfile); + spillbits = 8;}} + else + { --pixnum; + if (bitnum == 0) + nextint = 0; + else + { nextint = window & setbits[bitnum]; + valids -= bitnum; + window = shift_right(window, bitnum); + if ((nextint & (1 << (bitnum - 1))) != 0) + nextint |= ~setbits[bitnum];} + if (pixel > x) + { img[pixel] = (WORD) (nextint + + (img[pixel-1] + img[pixel-x+1] + + img[pixel-x] + img[pixel-x-1] + 2) / 4); + ++pixel;} + else if (pixel != 0) + { img[pixel] = (WORD) (img[pixel - 1] + nextint); + ++pixel;} + else + img[pixel++] = (WORD) nextint;}}}}} + + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void unpack_long(FILE *packfile, int x, int y, LONG *img) +#else + void unpack_long(packfile, x, y, img) + FILE *packfile; + int x, y; + LONG *img; +#endif +/* Unpacks a packed image into the LONG-array 'img'. The image is stored + in 'packfile'. The file should be properly positioned: the first BYTE + read is assumed to be the first BYTE of the packed image. */ + +{ int valids = 0, spillbits = 0, usedbits, total = x * y; + LONG window = 0L, spill = 0, pixel = 0, nextint, bitnum, pixnum; + static int bitdecode[8] = {0, 4, 5, 6, 7, 8, 16, 32}; + + while (pixel < total) + { if (valids < 6) + { if (spillbits > 0) + { window |= shift_left(spill, valids); + valids += spillbits; + spillbits = 0;} + else + { spill = (LONG) getc(packfile); + spillbits = 8;}} + else + { pixnum = 1 << (window & setbits[3]); + window = shift_right(window, 3); + bitnum = bitdecode[window & setbits[3]]; + window = shift_right(window, 3); + valids -= 6; + while ((pixnum > 0) && (pixel < total)) + { if (valids < bitnum) + { if (spillbits > 0) + { window |= shift_left(spill, valids); + if ((32 - valids) > spillbits) + { valids += spillbits; + spillbits = 0;} + else + { usedbits = 32 - valids; + spill = shift_right(spill, usedbits); + spillbits -= usedbits; + valids = 32;}} + else + { spill = (LONG) getc(packfile); + spillbits = 8;}} + else + { --pixnum; + if (bitnum == 0) + nextint = 0; + else + { nextint = window & setbits[bitnum]; + valids -= bitnum; + window = shift_right(window, bitnum); + if ((nextint & (1 << (bitnum - 1))) != 0) + nextint |= ~setbits[bitnum];} + if (pixel > x) + { img[pixel] = (LONG) (nextint + + (img[pixel-1] + img[pixel-x+1] + + img[pixel-x] + img[pixel-x-1] + 2) / 4); + ++pixel;} + else if (pixel != 0) + { img[pixel] = (LONG) (img[pixel - 1] + nextint); + ++pixel;} + else + img[pixel++] = (LONG) nextint;}}}}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void v2unpack_long(FILE *packfile, int x, int y, LONG *img) +#else + void v2unpack_long(packfile, x, y, img) + FILE *packfile; + int x, y; + LONG *img; +#endif +/* Unpacks a packed image into the LONG-array 'img'. The image is stored + in 'packfile'. The file should be properly positioned: the first BYTE + read is assumed to be the first BYTE of the packed image. */ + +{ int valids = 0, spillbits = 0, usedbits, total = x * y; + LONG window = 0L, spill = 0, pixel = 0, nextint, bitnum, pixnum; + static int bitdecode[16] = {0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 32}; + + while (pixel < total) + { if (valids < 7) + { if (spillbits > 0) + { window |= shift_left(spill, valids); + valids += spillbits; + spillbits = 0;} + else + { spill = (LONG) getc(packfile); + spillbits = 8;}} + else + { pixnum = 1 << (window & setbits[3]); + window = shift_right(window, 3); + bitnum = bitdecode[window & setbits[4]]; + window = shift_right(window, 4); + valids -= 7; + while ((pixnum > 0) && (pixel < total)) + { if (valids < bitnum) + { if (spillbits > 0) + { window |= shift_left(spill, valids); + if ((32 - valids) > spillbits) + { valids += spillbits; + spillbits = 0;} + else + { usedbits = 32 - valids; + spill = shift_right(spill, usedbits); + spillbits -= usedbits; + valids = 32;}} + else + { spill = (LONG) getc(packfile); + spillbits = 8;}} + else + { --pixnum; + if (bitnum == 0) + nextint = 0; + else + { nextint = window & setbits[bitnum]; + valids -= bitnum; + window = shift_right(window, bitnum); + if ((nextint & (1 << (bitnum - 1))) != 0) + nextint |= ~setbits[bitnum];} + if (pixel > x) + { img[pixel] = (LONG) (nextint + + (img[pixel-1] + img[pixel-x+1] + + img[pixel-x] + img[pixel-x-1] + 2) / 4); + ++pixel;} + else if (pixel != 0) + { img[pixel] = (LONG) (img[pixel - 1] + nextint); + ++pixel;} + else + img[pixel++] = (LONG) nextint;}}}}} + + + +/******************************************************************************/ + +#if defined (PROTOTYPES) + char *long_to_char(LONG *lng, char *string) +#else + char *long_to_char(lng, string) + LONG *lng; + char *string; +#endif +/* Shrinks an array of LONGs into an array of chars, used in order to translate + an encoded string array passed by fortran into a c-type string. Returns + 'string'. */ + +{ char *s = string; + + do + *(s++) = (char) *lng; + while (*(lng++) != 0); + return(string);} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void imsiz_c(char *filename, LONG *x, LONG *y) +#else + void imsiz_c(filename, x, y) + char *filename; + LONG *x, *y; +#endif +/* Determines the size of the the packed image "filename" after unpacking. The + dimensions are returned in x and y. */ + +{ FILE *packfile; + int i = 0, c = 0; + char header[BUFSIZ]; + + packfile = fopen(filename, "r"); + header[0] = '\n'; + header[1] = 0; + *x = *y = 0; + if (packfile != NULL) + { while ((c != EOF) && ((*x == 0) || (*y == 0))) + { c = i = *x = *y = 0; + while ((++i < BUFSIZ) && (c != EOF) && (c != '\n') && (*x==0) && (*y==0)) + { if ((header[i] = c = getc(packfile)) == '\n') + { if (sscanf(header, PACKIDENTIFIER, x, y) == 2) { +/* version = 1; */ + } + else if (sscanf(header, V2IDENTIFIER, x, y) == 2) { +/* version = 2; */ + } + } + } + } + } + fclose(packfile); +} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void imsiz_f(LONG *filename, LONG *x, LONG *y) +#else + void imsiz_f(filename, x, y) + LONG *filename, *x, *y; +#endif +/* Fortran frontend of imsiz_c. Because the way in which fortran + passes strings is not defined, it passes the filename in which the + packed image should be stored as an array of LONGs. */ + +{ char c_filename[1024]; +#if !defined (PROTOTYPE) + void imsiz_c(); + char *long_to_char(); +#endif + + imsiz_c(long_to_char(filename, c_filename), x, y);} + + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void mirror_wordimg(WORD *img, LONG *x, LONG *y) +#else + void mirror_wordimg(img, x, y) + WORD *img; + LONG *x, *y; +#endif +/* Replaces img with its mirror by interchanging rows. 'x' is the fast index, + 'y' is the slow index. */ + +{ WORD *buff; + int i, j; + + buff = (WORD *)malloc(sizeof(WORD) * *x); + for (i = 0, j = *y - 1; i < j; ++i, --j) + { memcpy(buff, img + (i * *x), sizeof(WORD) * *x); + memcpy(img + (i * *x), img + (j * *x), sizeof(WORD) * *x); + memcpy(img + (j * *x), buff, sizeof(WORD) * *x);} + free((void *) buff);} + + + +/******************************************************************************/ + +#if defined (PROTOTYPE) + void mirror_longimg(LONG *img, LONG *x, LONG *y) +#else + void mirror_longimg(img, x, y) + LONG *img, *x, *y; +#endif +/* Replaces img with its mirror by interchanging rows. 'x' is the fast index, + 'y' is the slow index. */ + +{ LONG *buff; + int i, j; + + buff = (LONG *)malloc(sizeof(LONG) * *x); + for (i = 0, j = *y - 1; i < j; ++i, --j) + { memcpy(buff, img + (i * *x), sizeof(LONG) * *x); + memcpy(img + (i * *x), img + (j * *x), sizeof(LONG) * *x); + memcpy(img + (j * *x), buff, sizeof(LONG) * *x);} + free((void *) buff);} + + + +/******************************************************************************/ + + + diff --git a/ccp4c/ccp4/pack_c.h b/ccp4c/ccp4/pack_c.h new file mode 100644 index 00000000..e05664be --- /dev/null +++ b/ccp4c/ccp4/pack_c.h @@ -0,0 +1,129 @@ +/* Some general defines: */ + + +#define PACKIDENTIFIER "\nCCP4 packed image, X: %04d, Y: %04d\n" +/* This string defines the start of a packed image. An image file is scanned + until this string is encountered, the size of the unpacked image is + determined from the values of X and Y (which are written out as formatted + ascii numbers), and the packed image is expected to start immediately after + the null-character ending the string. */ + +#define V2IDENTIFIER "\nCCP4 packed image V2, X: %04d, Y: %04d\n" +/* This string defines the start of a packed image. An image file is scanned + until this string is encountered, the size of the unpacked image is + determined from the values of X and Y (which are written out as formatted + ascii numbers), and the packed image is expected to start immediately after + the null-character ending the string. */ + +#define PACKBUFSIZ BUFSIZ +/* Size of internal buffer in which the packed array is stored during transit + form an unpacked image to a packed image on disk. It is set to the size + used by the buffered io-routines given in , but it could be + anything. */ + +#define DIFFBUFSIZ 16384L +/* Size of the internal buffer in which the differences between neighbouring + pixels are stored prior to compression. The image is therefore compressed + in DIFFBUFSIZ chunks. Decompression does not need to know what DIFFBUFSIZ + was when the image was compressed. By increasing this value, the image + can be compressed into a packed image which is a few bytes smaller. Do + not decrease the value of DIFFBUFSIZ below 128L. */ + +#define BYTE char +/* BYTE is a one byte integer. */ + +#define WORD short int +/* WORD is a two-byte integer. */ + +#define LONG int +/* LONG is a four byte integer. */ +/* Dave Love 5/7/94: using `int' gets you 4 bytes on the 32-bit Unix + (and VAX) systems I know of and also on (64-bit) OSF/1 Alphas which + have 64-bit longs. (This definition previously used `long'.) */ + + + +/******************************************************************************/ + +/* Some usefull macros used in the code of this sourcefile: */ + + +#define max(x, y) (((x) > (y)) ? (x) : (y)) +/* Returns maximum of x and y. */ + +#define min(x, y) (((x) < (y)) ? (x) : (y)) +/* Returns minimum of x and y. */ + +#undef abs /* avoid complaint from DEC C, at least */ +#define abs(x) (((x) < 0) ? (-(x)) : (x)) +/* Returns the absolute value of x. */ + +/* Used to be 'static const LONG' but const declaration gives trouble on HPs */ +#ifndef SKIP_SETBITS +static LONG setbits[33] = + {0x00000000L, 0x00000001L, 0x00000003L, 0x00000007L, + 0x0000000FL, 0x0000001FL, 0x0000003FL, 0x0000007FL, + 0x000000FFL, 0x000001FFL, 0x000003FFL, 0x000007FFL, + 0x00000FFFL, 0x00001FFFL, 0x00003FFFL, 0x00007FFFL, + 0x0000FFFFL, 0x0001FFFFL, 0x0003FFFFL, 0x0007FFFFL, + 0x000FFFFFL, 0x001FFFFFL, 0x003FFFFFL, 0x007FFFFFL, + 0x00FFFFFFL, 0x01FFFFFFL, 0x03FFFFFFL, 0x07FFFFFFL, + 0x0FFFFFFFL, 0x1FFFFFFFL, 0x3FFFFFFFL, 0x7FFFFFFFL, + 0xFFFFFFFFL}; +/* This is not a macro really, but I've included it here anyway. Upon indexing, + it returns a LONG with the lower (index) number of bits set. It is equivalent + to the following macro: + #define setbits(n) (((n) == 32) : ((1L << (n)) - 1) : (-1L)) + Indexing the const array should usually be slightly faster. */ +#endif + +#define shift_left(x, n) (((x) & setbits[32 - (n)]) << (n)) +/* This macro is included because the C standard does not properly define a + left shift: on some machines the bits which are pushed out at the left are + popped back in at the right. By masking, the macro prevents this behaviour. + If you are sure that your machine does not pops bits back in, you can speed + up the code insignificantly by taking out the masking. */ + +#define shift_right(x, n) (((x) >> (n)) & setbits[32 - (n)]) +/* See comment on left shift. */ + + + +/******************************************************************************/ + + +#if __STDC__ && !defined(PROTOTYPE) +#define PROTOTYPE 1 +#endif + +/* Functions required for packing: */ + +#if defined (PROTOTYPE) +void v2pack_wordimage_c(WORD *img, int x, int y, char *filename); +/* Pack image 'img', containing 'x * y' WORD-sized pixels into 'filename'. + This function generates Version 2 images! */ + +void v2pack_longimage_c(LONG *img, int x, int y, char *filename); +/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. + This function generates Version 2 images! */ + + +/* Functions required for unpacking: */ + + +void readpack_word_c(WORD *img, char *filename); +/* Unpacks packed image from 'filename' into the WORD-array 'img'. Scans the + file defined by 'filename' until the PACKIDENTIFIER is found, then unpacks + starting from there. */ + +void readpack_long_c(LONG *img, char *filename); +/* Unpacks packed image from 'filename' into the LONG-array 'img'. Scans the + file defined by 'filename' until the PACKIDENTIFIER is found, then unpacks + starting from there. */ + +void imsiz_c(char *filename, LONG *x, LONG *y); +/* Determines the size of the the packed image "filename" after unpacking. The + dimensions are returned in x and y. */ + +#endif /* (PROTOTYPE) */ + diff --git a/ccp4c/ccp4/vmslibrary.c b/ccp4c/ccp4/vmslibrary.c new file mode 100644 index 00000000..91e02728 --- /dev/null +++ b/ccp4c/ccp4/vmslibrary.c @@ -0,0 +1,99 @@ +/* + vmslibrary.c + Copyright (C) 1999 Martyn Winn + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MAXFLEN 500 /* the maximum length of a filename in CCP4 */ + +/* prototype definitions */ +void HGETLIMITS (int *IValueNotDet, float *ValueNotDet); +static size_t flength (char *s, int len); +void CMKDIR (struct dsc$descriptor_s *path, struct dsc$descriptor_s *cmode, + int *result); +void CCHMOD (struct dsc$descriptor_s *path, struct dsc$descriptor_s *cmode, + int *result); + +void HGETLIMITS (int *IValueNotDet, float *ValueNotDet) +{ + *IValueNotDet = INT_MAX; + *ValueNotDet = FLT_MAX; +} + +static size_t flength (char *s, int len) +{ + while (s[--len] == ' '); + return (++len); +} + +/* Wrap-around for mkdir function. Returns 0 if successful, 1 if directory already exists, */ +/* and -1 if other error. */ +void CMKDIR (struct dsc$descriptor_s *path, struct dsc$descriptor_s *cmode, + int *result) +{ size_t Length; + char name[MAXFLEN]; + mode_t mode; + + /* truncate path to MAXFLEN - 1 characters, MAXFLEN defined in library.h */ + Length = flength (path->dsc$a_pointer, path->dsc$w_length); + if (Length > (size_t) MAXFLEN) Length = (size_t) MAXFLEN - 1; + (void) strncpy (name, path->dsc$a_pointer, Length); + name[Length] = '\0'; + +/* Possible modes (see stat.h) + Currently pass 3-character string and interpret as octal. + Try also S_IRWXU, S_IRWXG, etc. */ + sscanf(cmode->dsc$a_pointer,"%o",&mode); + + *result = mkdir(name,mode); + + if (*result == -1) { +/* Distinguish directory-exists error from others, since usually not a problem. */ + if (errno == EEXIST) { + *result = 1; + } + } + +} + +void CCHMOD (struct dsc$descriptor_s *path, struct dsc$descriptor_s *cmode, + int *result) +{ size_t Length; + char name[MAXFLEN]; + mode_t mode; + + /* truncate path to MAXFLEN - 1 characters, MAXFLEN defined in library.h */ + Length = flength (path->dsc$a_pointer, path->dsc$w_length); + if (Length > (size_t) MAXFLEN) Length = (size_t) MAXFLEN - 1; + (void) strncpy (name, path->dsc$a_pointer, Length); + name[Length] = '\0'; + +/* Possible modes (see stat.h) + Currently pass 3-character string and interpret as octal. + Try also S_IRWXU, S_IRWXG, etc. */ + sscanf(cmode->dsc$a_pointer,"%o",&mode); + + *result = chmod(name,mode); +} diff --git a/ccp4c/ccp4/w32mvs.c b/ccp4c/ccp4/w32mvs.c new file mode 100644 index 00000000..9d8f2f96 --- /dev/null +++ b/ccp4c/ccp4/w32mvs.c @@ -0,0 +1,265 @@ +/* + w32mvs.c: functions required by MVS + Copyright (C) 2003 Alun Ashton + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +#ifdef _MSC_VER + +#include "w32mvs.h" + + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg = 0; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +int optind = 0; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + UNSPECIFIED means the caller did not specify anything; + the default is then REQUIRE_ORDER if the environment variable + _OPTIONS_FIRST is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options. + Stop option processing when the first non-option is seen. + This is what Unix does. + + PERMUTE is the default. We permute the contents of `argv' as we scan, + so that eventually all the options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code zero. + Using `-' as the first character of the list of option characters + requests this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return EOF with `optind' != ARGC. */ + +static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; + +static void exchange (char **argv) +{ + int nonopts_size + = (last_nonopt - first_nonopt) * sizeof (char *); + char **temp = (char **) alloca (nonopts_size); + + /* Interchange the two blocks of data in argv. */ + + bcopy (&argv[first_nonopt], temp, nonopts_size); + bcopy (&argv[last_nonopt], &argv[first_nonopt], + (optind - last_nonopt) * sizeof (char *)); + bcopy (temp, &argv[first_nonopt + optind - last_nonopt], + nonopts_size); + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +int getopt (int argc,char **argv,char *optstring) +{ + /* Initialize the internal data when the first call is made. + Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + if (optind == 0) + { + first_nonopt = last_nonopt = optind = 1; + + nextchar = 0; + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + ordering = RETURN_IN_ORDER; + else if (getenv ("_POSIX_OPTION_ORDER") != 0) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + } + + if (nextchar == 0 || *nextchar == 0) + { + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange (argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Now skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc + && (argv[optind][0] != '-' + || argv[optind][1] == 0)) + optind++; + last_nonopt = optind; + } + + /* Special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange (argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return EOF; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (argv[optind][0] != '-' || argv[optind][1] == 0) + { + if (ordering == REQUIRE_ORDER) + return EOF; + optarg = argv[optind++]; + return 0; + } + + /* We have found another option-ARGV-element. + Start decoding its characters. */ + + nextchar = argv[optind] + 1; + } + + /* Look at and handle the next option-character. */ + + { + char c = *nextchar++; + char *temp = (char *) strchr (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == 0) + optind++; + + if (temp == 0 || c == ':') + { + if (opterr != 0) + { + if (c < 040 || c >= 0177) + fprintf (stderr, "%s: unrecognized option, character code 0%o\n", + argv[0], c); + else + fprintf (stderr, "%s: unrecognized option `-%c'\n", + argv[0], c); + } + return '?'; + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != 0) + { + optarg = nextchar; + optind++; + } + else + optarg = 0; + nextchar = 0; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != 0) + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr != 0) + fprintf (stderr, "%s: no argument for `-%c' option\n", + argv[0], c); + optarg = 0; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = 0; + } + } + return c; + } +} +#endif diff --git a/ccp4c/ccp4/w32mvs.h b/ccp4c/ccp4/w32mvs.h new file mode 100644 index 00000000..549c26e0 --- /dev/null +++ b/ccp4c/ccp4/w32mvs.h @@ -0,0 +1,200 @@ +/* + w32mvs.h: function prototypes for w32mvs.c functions + Copyright (C) 2003 Alun Ashton + + This library is free software: you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 3, modified in accordance with the provisions of the + license to address the requirements of UK law. + + You should have received a copy of the modified GNU Lesser General + Public License along with this library. If not, copies may be + downloaded from http://www.ccp4.ac.uk/ccp4license.php + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. +*/ + +#ifdef _MSC_VER +#define WIN32_LEAN_AND_MEAN +#include +#include +#include + +/* Getopt for GNU. + Copyright (C) 1987 Free Software Foundation, Inc. + + NO WARRANTY + + BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY +NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT +WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, +RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS" +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY +AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. +STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY +WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR +OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR +DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR +A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS +PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. + + GENERAL PUBLIC LICENSE TO COPY + + 1. You may copy and distribute verbatim copies of this source file +as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy a valid copyright notice "Copyright + (C) 1987 Free Software Foundation, Inc."; and include following the +copyright notice a verbatim copy of the above disclaimer of warranty +and of this License. You may charge a distribution fee for the +physical act of transferring a copy. + + 2. You may modify your copy or copies of this source file or +any portion of it, and copy and distribute such modifications under +the terms of Paragraph 1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating + that you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, + that in whole or in part contains or is a derivative of this + program or any part thereof, to be licensed at no charge to all + third parties on terms identical to those contained in this + License Agreement (except that you may choose to grant more + extensive warranty protection to third parties, at your option). + + c) You may charge a distribution fee for the physical act of + transferring a copy, and you may at your option offer warranty + protection in exchange for a fee. + + 3. You may copy and distribute this program or any portion of it in +compiled, executable or object code form under the terms of Paragraphs +1 and 2 above provided that you do the following: + + a) cause each such copy to be accompanied by the + corresponding machine-readable source code, which must + be distributed under the terms of Paragraphs 1 and 2 above; or, + + b) cause each such copy to be accompanied by a + written offer, with no time limit, to give any third party + free (except for a nominal shipping charge) a machine readable + copy of the corresponding source code, to be distributed + under the terms of Paragraphs 1 and 2 above; or, + + c) in the case of a recipient of this program in compiled, executable + or object code form (without the corresponding source code) you + shall cause copies you distribute to be accompanied by a copy + of the written offer of source code which you received along + with the copy you received. + + 4. You may not copy, sublicense, distribute or transfer this program +except as expressly provided under this License Agreement. Any attempt +otherwise to copy, sublicense, distribute or transfer this program is void and +your rights to use the program under this License agreement shall be +automatically terminated. However, parties who have received computer +software programs from you with this License Agreement will not have +their licenses terminated so long as such parties remain in full compliance. + + 5. If you wish to incorporate parts of this program into other free +programs whose distribution conditions are different, write to the Free +Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet +worked out a simple rule that can be stated here, but we will often permit +this. We will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software. + + +In other words, you are welcome to use, share and improve this program. +You are forbidden to forbid anyone else to use, share and improve +what you give them. Help stamp out software-hoarding! */ + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of `argv' so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable _POSIX_OPTION_ORDER disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include +#include +#include +#define bcopy memmove + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +static void exchange (char **argv); + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of theoption characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns `EOF'. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + A colon in OPTSTRING means that the previous character is an option + that wants an argument. The argument is taken from the rest of the + current ARGV-element, or from the following ARGV-element, + and returned in `optarg'. + + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg'. + + If OPTSTRING starts with `-', it requests a different method of handling the + non-option ARGV-elements. See the comments about RETURN_IN_ORDER, above. */ + +int getopt (int argc,char **argv,char *optstring); + +#endif diff --git a/ccp4c/data/README b/ccp4c/data/README new file mode 100644 index 00000000..d1b01c92 --- /dev/null +++ b/ccp4c/data/README @@ -0,0 +1,39 @@ + +* symop.lib: symmetry operators -- see symlib code. Contains symmetry + operators for the 230 spacegroups listed in (and following the conventions + of) the International Tables Vol A and non-standard settings used by various + CCP4 programs. Each space group has a header line comprising + space-separated values of: + * SG number + * number of lines of symmetry equivalents (`positions' in Int Tab) (N) + * number of lines of primitive equivalents (P) + * SG `short' name; subscripts are typed as-is and a prefix `-' represents + an overbar e.g. P21/m, P-1 + * point group name; the Int. Tab. name is prefixed by `PG'; contrary to the + SG name, an overbar is represented by a trailing `bar' e.g. PG4bar3m + * crystal system + * possible comments about non-standard settings + Following are N lines of symmetry equivalents, of which the first P are the + primitive ones. + + * Layout: + * The symmetry operator lines are limited to 80 characters + * The elements of operator triplets are separated by commas, and triplets + are separated by `*' or newline; the translations may be before or + after the coordinate e.g. `1/2+X' or `X+1/2' + * The header lines should start in the first column and the other lines be + indented (for ease of locating the headers) + +* font84.ascii: Used directly by plot84lib.f. Previously: data for creating + the binary plot84 font file in $CCP4/lib with fontpack. + +* atomsf.lib, atomsf_neutron.lib: formfactors for every known atom (for SFALL, + MLPHARE, VECREF). The format of the atomsf.lib file is as follows. + 1) atom type + 2) atomic number, number of electrons, `c' constant for the scattering + factor + 3) a(1) ... a(4) + 4) b(1) ... b(4) + 5) f'(Cu) f"(Cu) f'(Mo) f"(Mo) + See the sfall documentation for the equations containing the as, bs and c. + diff --git a/ccp4c/data/atomsf.lib b/ccp4c/data/atomsf.lib new file mode 100644 index 00000000..b5a8f139 --- /dev/null +++ b/ccp4c/data/atomsf.lib @@ -0,0 +1,1121 @@ +AD - This file contains the following information: +AD - BEWARE: This file has a FIXED FORMAT! +AD This contains for each element: +AD ID +AD IWT IELEC C +AD A(4) +AD B(4) +AD CU(2) MO(2) +AD +AD +AD Formfactor: a1*exp(-b1*s*s) + a2*exp(-b2*s*s) + a3*exp(-b3*s*s) +AD + a4*exp(-b4*s*s) + c +AD This is applicable at CuKa wavelength. +AD +AD This is the 5 Gaussian approximation +AD Ref: Int.Tab. vol 4 pp. 99-101 (Table 2.2B) for values a1-a4, b1-b4,c +AD +AD ID atom identifier +AD IWT atomic weight +AD IELEC number of electrons +AD C coefficient for structure factor calculation +AD A(4) coefficient for structure factor calculation +AD B(4) coefficient for structure factor calculation +AD CU(2) delta F' and delta F'' for Cu +AD MO(2) delta F' and delta F'' for Mo +AD Example: +AD U+6 +AD 92 86 13.166500 +AD 34.850899 22.758400 14.009900 1.214570 +AD 0.507079 2.890300 13.176700 25.201700 +AD -5.359000 13.409000 -10.673000 9.653999 +H + 1 1 0.003038 + 0.493002 0.322912 0.140191 0.040810 + 10.510900 26.125700 3.142360 57.799698 + 0.000000 0.000000 0.000000 0.000000 +D + 1 1 0.003038 + 0.493002 0.322912 0.140191 0.040810 + 10.510900 26.125700 3.142360 57.799698 + 0.000000 0.000000 0.000000 0.000000 +H-1 + 1 2 0.002389 + 0.897661 0.565616 0.415815 0.116973 + 53.136799 15.187000 186.575989 3.567090 + 0.000000 0.000000 0.000000 0.000000 +He + 2 2 0.006400 + 0.873400 0.630900 0.311200 0.178000 + 9.103700 3.356800 22.927601 0.982100 + 0.000000 0.000000 0.000000 0.000000 +Li + 3 3 0.037700 + 1.128200 0.750800 0.617500 0.465300 + 3.954600 1.052400 85.390503 168.261002 + 0.001000 0.000000 0.000000 0.000000 +Li+1 + 3 2 0.016700 + 0.696800 0.788800 0.341400 0.156300 + 4.623700 1.955700 0.631600 10.095300 + 0.001000 0.000000 0.000000 0.000000 +Be + 4 4 0.038500 + 1.591900 1.127800 0.539100 0.702900 + 43.642700 1.862300 103.483002 0.542000 + 0.003000 0.001000 0.000000 0.000000 +Be+2 + 4 2 -6.109200 + 6.260300 0.884900 0.799300 0.164700 + 0.002700 0.831300 2.275800 5.114600 + 0.003000 0.001000 0.000000 0.000000 +B + 5 5 -0.193200 + 2.054500 1.332600 1.097900 0.706800 + 23.218500 1.021000 60.349800 0.140300 + 0.008000 0.004000 0.000000 0.001000 +C + 6 6 0.215600 + 2.310000 1.020000 1.588600 0.865000 + 20.843899 10.207500 0.568700 51.651199 + 0.017000 0.009000 0.002000 0.002000 +Cv + 6 6 0.286977 + 2.260690 1.561650 1.050750 0.839259 + 22.690701 0.656665 9.756180 55.594898 + 0.017000 0.009000 0.002000 0.002000 +N + 7 7 -11.528999 + 12.212600 3.132200 2.012500 1.166300 + 0.005700 9.893300 28.997499 0.582600 + 0.029000 0.018000 0.004000 0.003000 +O + 8 8 0.250800 + 3.048500 2.286800 1.546300 0.867000 + 13.277100 5.701100 0.323900 32.908897 + 0.047000 0.032000 0.008000 0.006000 +O-1 + 8 9 21.941200 + 4.191600 1.639690 1.526730 -20.306999 + 12.857300 4.172360 47.017899 -0.014040 + 0.047000 0.032000 0.008000 0.006000 +F + 9 9 0.277600 + 3.539200 2.641200 1.517000 1.024300 + 10.282499 4.294400 0.261500 26.147600 + 0.069000 0.053000 0.014000 0.010000 +F-1 + 9 10 0.653396 + 3.632200 3.510570 1.260640 0.940706 + 5.277560 14.735300 0.442258 47.343700 + 0.069000 0.053000 0.014000 0.010000 +Ne + 10 10 0.351500 + 3.955300 3.112500 1.454600 1.125100 + 8.404200 3.426200 0.230600 21.718399 + 0.097000 0.083000 0.021000 0.016000 +Na + 11 11 0.676000 + 4.762600 3.173600 1.267400 1.112800 + 3.285000 8.842199 0.313600 129.423996 + 0.129000 0.124000 0.030000 0.025000 +Na+1 + 11 10 0.404000 + 3.256500 3.936200 1.399800 1.003200 + 2.667100 6.115300 0.200100 14.039000 + 0.129000 0.124000 0.030000 0.025000 +Mg + 12 12 0.858400 + 5.420400 2.173500 1.226900 2.307300 + 2.827500 79.261101 0.380800 7.193700 + 0.165000 0.177000 0.042000 0.036000 +Mg+2 + 12 10 0.485300 + 3.498800 3.837800 1.328400 0.849700 + 2.167600 4.754200 0.185000 10.141100 + 0.165000 0.177000 0.042000 0.036000 +Al + 13 13 1.115100 + 6.420200 1.900200 1.593600 1.964600 + 3.038700 0.742600 31.547199 85.088600 + 0.204000 0.246000 0.056000 0.052000 +Al+3 + 13 10 0.706786 + 4.174480 3.387600 1.202960 0.528137 + 1.938160 4.145530 0.228753 8.285240 + 0.204000 0.246000 0.056000 0.052000 +Si + 14 14 1.140700 + 6.291500 3.035300 1.989100 1.541000 + 2.438600 32.333698 0.678500 81.693695 + 0.244000 0.330000 0.072000 0.071000 +Siv + 14 14 1.247070 + 5.662690 3.071640 2.624460 1.393200 + 2.665200 38.663399 0.916946 93.545799 + 0.244000 0.330000 0.072000 0.071000 +Si+4 + 14 10 0.746297 + 4.439180 3.203450 1.194530 0.416530 + 1.641670 3.437570 0.214900 6.653650 + 0.244000 0.330000 0.072000 0.071000 +P + 15 15 1.114900 + 6.434500 4.179100 1.780000 1.490800 + 1.906700 27.157000 0.526000 68.164497 + 0.283000 0.434000 0.090000 0.095000 +S + 16 16 0.866900 + 6.905300 5.203400 1.437900 1.586300 + 1.467900 22.215099 0.253600 56.172001 + 0.319000 0.557000 0.110000 0.124000 +Cl + 17 17 -9.557400 + 11.460400 7.196400 6.255600 1.645500 + 0.010400 1.166200 18.519400 47.778400 + 0.348000 0.702000 0.132000 0.159000 +Cl-1 + 17 18 -16.378000 + 18.291500 7.208400 6.533700 2.338600 + 0.006600 1.171700 19.542400 60.448601 + 0.348000 0.702000 0.132000 0.159000 +Ar + 18 18 1.444500 + 7.484500 6.772300 0.653900 1.644200 + 0.907200 14.840700 43.898300 33.392899 + 0.366000 0.872000 0.155000 0.201000 +K + 19 19 1.422800 + 8.218599 7.439800 1.051900 0.865900 + 12.794900 0.774800 213.186996 41.684097 + 0.365000 1.066000 0.179000 0.250000 +K+1 + 19 18 -4.997800 + 7.957800 7.491700 6.359000 1.191500 + 12.633100 0.767400 -0.002000 31.912800 + 0.365000 1.066000 0.179000 0.250000 +Ca + 20 20 1.375100 + 8.626600 7.387300 1.589900 1.021100 + 10.442100 0.659900 85.748398 178.436996 + 0.341000 1.286000 0.203000 0.306000 +Ca+2 + 20 18 -14.875000 + 15.634800 7.951800 8.437200 0.853700 + -0.007400 0.608900 10.311600 25.990499 + 0.341000 1.286000 0.203000 0.306000 +Sc + 21 21 1.332900 + 9.189000 7.367900 1.640900 1.468000 + 9.021299 0.572900 136.108002 51.353100 + 0.285000 1.533000 0.226000 0.372000 +Sc+3 + 21 18 -6.666700 + 13.400800 8.027300 1.659430 1.579360 + 0.298540 7.962900 -0.286040 16.066200 + 0.285000 1.533000 0.226000 0.372000 +Ti + 22 22 1.280700 + 9.759500 7.355800 1.699100 1.902100 + 7.850800 0.500000 35.633801 116.104996 + 0.189000 1.807000 0.248000 0.446000 +Ti+2 + 22 20 0.897155 + 9.114230 7.621740 2.279300 0.087899 + 7.524300 0.457585 19.536100 61.655800 + 0.189000 1.807000 0.248000 0.446000 +Ti+3 + 22 19 -14.652000 + 17.734400 8.738160 5.256910 1.921340 + 0.220610 7.047160 -0.157620 15.976800 + 0.189000 1.807000 0.248000 0.446000 +Ti+4 + 22 18 -13.280000 + 19.511400 8.234730 2.013410 1.520800 + 0.178847 6.670180 -0.292630 12.946400 + 0.189000 1.807000 0.248000 0.446000 +V + 23 23 1.219900 + 10.297100 7.351100 2.070300 2.057100 + 6.865700 0.438500 26.893799 102.477997 + 0.035000 2.110000 0.267000 0.530000 +V+2 + 23 21 1.229800 + 10.106000 7.354100 2.288400 0.022300 + 6.881800 0.440900 20.300400 115.122002 + 0.035000 2.110000 0.267000 0.530000 +V+3 + 23 20 0.656565 + 9.431410 7.741900 2.153430 0.016865 + 6.395350 0.383349 15.190800 63.969002 + 0.035000 2.110000 0.267000 0.530000 +V+5 + 23 18 1.714300 + 15.688700 8.142080 2.030810 -9.576000 + 0.679003 5.401350 9.972780 0.940464 + 0.035000 2.110000 0.267000 0.530000 +Cr + 24 24 1.183200 + 10.640600 7.353700 3.324000 1.492200 + 6.103800 0.392000 20.262600 98.739899 + -0.198000 2.443000 0.284000 0.624000 +Cr+2 + 24 22 0.616898 + 9.540340 7.750900 3.582740 0.509107 + 5.660780 0.344261 13.307500 32.422401 + -0.198000 2.443000 0.284000 0.624000 +Cr+3 + 24 21 0.518275 + 9.680900 7.811360 2.876030 0.113575 + 5.594630 0.334393 12.828800 32.876099 + -0.198000 2.443000 0.284000 0.624000 +Mn + 25 25 1.089600 + 11.281900 7.357300 3.019300 2.244100 + 5.340900 0.343200 17.867399 83.754303 + -0.568000 2.808000 0.295000 0.729000 +Mn+2 + 25 23 1.087400 + 10.806100 7.362000 3.526800 0.218400 + 5.279600 0.343500 14.343000 41.323502 + -0.568000 2.808000 0.295000 0.729000 +Mn+3 + 25 22 0.393974 + 9.845210 7.871940 3.565310 0.323613 + 4.917970 0.294393 10.817100 24.128099 + -0.568000 2.808000 0.295000 0.729000 +Mn+4 + 25 21 0.251877 + 9.962530 7.970570 2.760670 0.054447 + 4.848500 0.283303 10.485200 27.573000 + -0.568000 2.808000 0.295000 0.729000 +Fe + 26 26 1.036900 + 11.769500 7.357300 3.522200 2.304500 + 4.761100 0.307200 15.353500 76.880501 + -1.179000 3.204000 0.301000 0.845000 +Fe+2 + 26 24 1.009700 + 11.042400 7.374000 4.134600 0.439900 + 4.653800 0.305300 12.054600 31.280899 + -1.179000 3.204000 0.301000 0.845000 +Fe+3 + 26 23 0.970700 + 11.176400 7.386300 3.394800 0.072400 + 4.614700 0.300500 11.672900 38.556599 + -1.179000 3.204000 0.301000 0.845000 +Co + 27 27 1.011800 + 12.284100 7.340900 4.003400 2.348800 + 4.279100 0.278400 13.535900 71.169197 + -2.464000 3.608000 0.299000 0.973000 +Co+2 + 27 25 0.932400 + 11.229600 7.388300 4.739300 0.710800 + 4.123100 0.272600 10.244300 25.646599 + -2.464000 3.608000 0.299000 0.973000 +Co+3 + 27 24 0.286667 + 10.337999 7.881730 4.767950 0.725591 + 3.909690 0.238668 8.355830 18.349100 + -2.464000 3.608000 0.299000 0.973000 +Ni + 28 28 1.034100 + 12.837600 7.292000 4.443800 2.380000 + 3.878500 0.256500 12.176300 66.342102 + -2.956000 0.509000 0.285000 1.113000 +Ni+2 + 28 26 0.861400 + 11.416600 7.400500 5.344200 0.977300 + 3.676600 0.244900 8.873000 22.162600 + -2.956000 0.509000 0.285000 1.113000 +Ni+3 + 28 25 0.386044 + 10.780600 7.758680 5.227460 0.847114 + 3.547700 0.223140 7.644680 16.967300 + -2.956000 0.509000 0.285000 1.113000 +Cu + 29 29 1.191000 + 13.337999 7.167600 5.615800 1.673500 + 3.582800 0.247000 11.396600 64.812599 + -2.019000 0.589000 0.263000 1.266000 +Cu+1 + 29 28 0.890000 + 11.947500 7.357300 6.245500 1.557800 + 3.366900 0.227400 8.662500 25.848700 + -2.019000 0.589000 0.263000 1.266000 +Cu+2 + 29 27 1.144310 + 11.816800 7.111810 5.781350 1.145230 + 3.374840 0.244078 7.987600 19.896999 + -2.019000 0.589000 0.263000 1.266000 +Zn + 30 30 1.304100 + 14.074300 7.031800 5.165200 2.410000 + 3.265500 0.233300 10.316299 58.709702 + -1.612000 0.678000 0.222000 1.431000 +Zn+2 + 30 28 0.780700 + 11.971900 7.386200 6.466800 1.394000 + 2.994600 0.203100 7.082600 18.099499 + -1.612000 0.678000 0.222000 1.431000 +Ga + 31 31 1.718900 + 15.235400 6.700600 4.359100 2.962300 + 3.066900 0.241200 10.780500 61.413498 + -1.354000 0.777000 0.163000 1.609000 +Ga+3 + 31 28 1.535450 + 12.691999 6.698830 6.066920 1.006600 + 2.812620 0.227890 6.364410 14.412200 + -1.354000 0.777000 0.163000 1.609000 +Ge + 32 32 2.131300 + 16.081600 6.374700 3.706800 3.683000 + 2.850900 0.251600 11.446800 54.762501 + -1.163000 0.886000 0.081000 1.801000 +Ge+4 + 32 28 1.455720 + 12.917200 6.700030 6.067910 0.859041 + 2.537180 0.205855 5.479130 11.603000 + -1.163000 0.886000 0.081000 1.801000 +As + 33 33 2.531000 + 16.672300 6.070100 3.431300 4.277900 + 2.634500 0.264700 12.947900 47.797199 + -1.011000 1.006000 -0.030000 2.007000 +Se + 34 34 2.840900 + 17.000599 5.819600 3.973100 4.354300 + 2.409800 0.272600 15.237200 43.816299 + -0.879000 1.139000 -0.178000 2.223000 +Br + 35 35 2.955700 + 17.178900 5.235800 5.637700 3.985100 + 2.172300 16.579599 0.260900 41.432800 + -0.767000 1.283000 -0.374000 2.456000 +Br-1 + 35 36 3.177600 + 17.171799 6.333800 5.575400 3.727200 + 2.205900 19.334499 0.287100 58.153500 + -0.767000 1.283000 -0.374000 2.456000 +Kr + 36 36 2.825000 + 17.355499 6.728600 5.549300 3.537500 + 1.938400 16.562300 0.226100 39.397202 + -0.665000 1.439000 -0.652000 2.713000 +Rb + 37 37 3.487300 + 17.178400 9.643499 5.139900 1.529200 + 1.788800 17.315100 0.274800 164.933990 + -0.574000 1.608000 -1.044000 2.973000 +Rb+1 + 37 36 2.078200 + 17.581600 7.659800 5.898100 2.781700 + 1.713900 14.795700 0.160300 31.208700 + -0.574000 1.608000 -1.044000 2.973000 +Sr + 38 38 2.506400 + 17.566299 9.818399 5.422000 2.669400 + 1.556400 14.098800 0.166400 132.376007 + -0.465000 1.820000 -1.657000 3.264000 +Sr+2 + 38 36 41.402500 + 18.087400 8.137300 2.565400 -34.193001 + 1.490700 12.696300 24.565100 -0.013800 + -0.465000 1.820000 -1.657000 3.264000 +Y + 39 39 1.912130 + 17.775999 10.294600 5.726290 3.265880 + 1.402900 12.800600 0.125599 104.353996 + -0.386000 2.025000 -2.951000 3.542000 +Y+3 + 39 36 40.260201 + 17.926800 9.153100 1.767950 -33.108002 + 1.354170 11.214500 22.659901 -0.013190 + -0.386000 2.025000 -2.951000 3.542000 +Zr + 40 40 2.069290 + 17.876499 10.948000 5.417320 3.657210 + 1.276180 11.916000 0.117622 87.662697 + -0.314000 2.245000 -2.965000 0.560000 +Zr+4 + 40 36 9.414539 + 18.166800 10.056200 1.011180 -2.647900 + 1.214800 10.148300 21.605400 -0.102760 + -0.314000 2.245000 -2.965000 0.560000 +Nb + 41 41 3.755910 + 17.614201 12.014400 4.041830 3.533460 + 1.188650 11.766000 0.204785 69.795700 + -0.248000 2.482000 -2.197000 0.621000 +Nb+3 + 41 38 -12.912000 + 19.881199 18.065300 11.017700 1.947150 + 0.019175 1.133050 10.162100 28.338900 + -0.248000 2.482000 -2.197000 0.621000 +Nb+5 + 41 36 -6.393400 + 17.916300 13.341700 10.799000 0.337905 + 1.124460 0.028781 9.282060 25.722799 + -0.248000 2.482000 -2.197000 0.621000 +Mo + 42 42 4.387500 + 3.702500 17.235600 12.887600 3.742900 + 0.277200 1.095800 11.004000 61.658401 + -0.191000 2.735000 -1.825000 0.688000 +Mo+3 + 42 39 -14.421000 + 21.166401 18.201700 11.742300 2.309510 + 0.014734 1.030310 9.536590 26.630699 + -0.191000 2.735000 -1.825000 0.688000 +Mo+5 + 42 37 -14.316000 + 21.014900 18.099199 11.463200 0.740625 + 0.014345 1.022380 8.788090 23.345200 + -0.191000 2.735000 -1.825000 0.688000 +Mo+6 + 42 36 0.344941 + 17.887100 11.175000 6.578910 0.000000 + 1.036490 8.480610 0.058881 0.000000 + -0.191000 2.735000 -1.825000 0.688000 +Tc + 43 43 5.404280 + 19.130100 11.094800 4.649010 2.712630 + 0.864132 8.144870 21.570700 86.847198 + -0.145000 3.005000 -0.590000 0.759000 +Ru + 44 44 5.378740 + 19.267399 12.918200 4.863370 1.567560 + 0.808520 8.434669 24.799700 94.292801 + -0.105000 3.296000 -1.420000 0.836000 +Ru+3 + 44 41 -3.189200 + 18.563801 13.288500 9.326019 3.009640 + 0.847329 8.371640 0.017662 22.886999 + -0.105000 3.296000 -1.420000 0.836000 +Ru+4 + 44 40 1.423570 + 18.500299 13.178699 4.713040 2.185350 + 0.844582 8.125340 0.364950 20.850399 + -0.105000 3.296000 -1.420000 0.836000 +Rh + 45 45 5.328000 + 19.295700 14.350100 4.734250 1.289180 + 0.751536 8.217580 25.874901 98.606201 + -0.077000 3.605000 -1.287000 0.919000 +Rh+3 + 45 42 11.867800 + 18.878500 14.125900 3.325150 -6.198900 + 0.764252 7.844380 21.248699 -0.010360 + -0.077000 3.605000 -1.287000 0.919000 +Rh+4 + 45 41 11.283500 + 18.854500 13.980600 2.534640 -5.652600 + 0.760825 7.624360 19.331699 -0.010200 + -0.077000 3.605000 -1.287000 0.919000 +Pd + 46 46 5.265930 + 19.331900 15.501699 5.295370 0.605844 + 0.698655 7.989290 25.205200 76.898598 + -0.059000 3.934000 -1.177000 1.007000 +Pd+2 + 46 44 5.291600 + 19.170099 15.209600 4.322340 0.000000 + 0.696219 7.555730 22.505699 0.000000 + -0.059000 3.934000 -1.177000 1.007000 +Pd+4 + 46 42 13.017400 + 19.249300 14.790000 2.892890 -7.949200 + 0.683839 7.148330 17.914400 0.005127 + -0.059000 3.934000 -1.177000 1.007000 +Ag + 47 47 5.179000 + 19.280800 16.688499 4.804500 1.046300 + 0.644600 7.472600 24.660500 99.815598 + -0.060000 4.282000 -1.085000 1.101000 +Ag+1 + 47 46 5.215720 + 19.181200 15.971900 5.274750 0.357534 + 0.646179 7.191230 21.732599 66.114700 + -0.060000 4.282000 -1.085000 1.101000 +Ag+2 + 47 45 5.214040 + 19.164299 16.245600 4.370900 0.000000 + 0.645643 7.185440 21.407200 0.000000 + -0.060000 4.282000 -1.085000 1.101000 +Cd + 48 48 5.069400 + 19.221399 17.644400 4.461000 1.602900 + 0.594600 6.908900 24.700800 87.482498 + -0.079000 4.653000 -1.005000 1.202000 +Cd+2 + 48 46 5.119370 + 19.151400 17.253500 4.471280 0.000000 + 0.597922 6.806390 20.252100 0.000000 + -0.079000 4.653000 -1.005000 1.202000 +In + 49 49 4.939100 + 19.162399 18.559601 4.294800 2.039600 + 0.547600 6.377600 25.849899 92.802902 + -0.126000 5.045000 -0.936000 1.310000 +In+3 + 49 46 4.996350 + 19.104500 18.110800 3.788970 0.000000 + 0.551522 6.324700 17.359501 0.000000 + -0.126000 5.045000 -0.936000 1.310000 +Sn + 50 50 4.782100 + 19.188900 19.100500 4.458500 2.466300 + 5.830300 0.503100 26.890900 83.957100 + -0.194000 5.459000 -0.873000 1.424000 +Sn+2 + 50 48 4.786100 + 19.109400 19.054800 4.564800 0.487000 + 0.503600 5.837800 23.375200 62.206100 + -0.194000 5.459000 -0.873000 1.424000 +Sn+4 + 50 46 3.918200 + 18.933300 19.713100 3.418200 0.019300 + 5.764000 0.465500 14.004900 -0.758300 + -0.194000 5.459000 -0.873000 1.424000 +Sb + 51 51 4.590900 + 19.641800 19.045500 5.037100 2.682700 + 5.303400 0.460700 27.907400 75.282501 + -0.287000 5.894000 -0.816000 1.546000 +Sb+3 + 51 48 4.696260 + 18.975500 18.932999 5.107890 0.288753 + 0.467196 5.221260 19.590200 55.511299 + -0.287000 5.894000 -0.816000 1.546000 +Sb+5 + 51 46 4.692630 + 19.868500 19.030199 2.412530 0.000000 + 5.448530 0.467973 14.125900 0.000000 + -0.287000 5.894000 -0.816000 1.546000 +Te + 52 52 4.352000 + 19.964399 19.013800 6.144870 2.523900 + 4.817420 0.420885 28.528400 70.840302 + -0.418000 6.352000 -0.772000 1.675000 +I + 53 53 4.071200 + 20.147200 18.994900 7.513800 2.273500 + 4.347000 0.381400 27.765999 66.877602 + -0.579000 6.835000 -0.726000 1.812000 +I-1 + 53 54 4.071400 + 20.233200 18.997000 7.806900 2.886800 + 4.357900 0.381500 29.525900 84.930397 + -0.579000 6.835000 -0.726000 1.812000 +Xe + 54 54 3.711800 + 20.293301 19.029800 8.976700 1.990000 + 3.928200 0.344000 26.465900 64.265800 + -0.783000 7.348000 -0.684000 1.958000 +Cs + 55 55 3.335200 + 20.389200 19.106199 10.662000 1.495300 + 3.569000 0.310700 24.387899 213.903992 + -1.022000 7.904000 -0.644000 2.119000 +Cs+1 + 55 54 3.279100 + 20.352400 19.127800 10.282100 0.961500 + 3.552000 0.308600 23.712799 59.456497 + -1.022000 7.904000 -0.644000 2.119000 +Ba + 56 56 2.773100 + 20.336100 19.297001 10.888000 2.695900 + 3.216000 0.275600 20.207300 167.201996 + -1.334000 8.460000 -0.613000 2.282000 +Ba+2 + 56 54 3.029020 + 20.180700 19.113600 10.905399 0.776340 + 3.213670 0.283310 20.055799 51.745998 + -1.334000 8.460000 -0.613000 2.282000 +La + 57 57 2.146780 + 20.577999 19.598999 11.372700 3.287190 + 2.948170 0.244475 18.772600 133.123993 + -1.716000 9.035999 -0.588000 2.452000 +La+3 + 57 54 2.408600 + 20.248899 19.376301 11.632299 0.336048 + 2.920700 0.250698 17.821100 54.945297 + -1.716000 9.035999 -0.588000 2.452000 +Ce + 58 58 1.862640 + 21.167099 19.769501 11.851299 3.330490 + 2.812190 0.226836 17.608299 127.112999 + -2.170000 9.648000 -0.564000 2.632000 +Ce+3 + 58 55 2.090130 + 20.803600 19.559000 11.936900 0.612376 + 2.776910 0.231540 16.540800 43.169201 + -2.170000 9.648000 -0.564000 2.632000 +Ce+4 + 58 54 1.591800 + 20.323500 19.818600 12.123300 0.144583 + 2.659410 0.218850 15.799200 62.235500 + -2.170000 9.648000 -0.564000 2.632000 +Pr + 59 59 2.058300 + 22.043999 19.669701 12.385600 2.824280 + 2.773930 0.222087 16.766899 143.643997 + -2.939000 10.535000 -0.530000 2.845000 +Pr+3 + 59 56 1.771320 + 21.372700 19.749100 12.132900 0.975180 + 2.645200 0.214299 15.323000 36.406502 + -2.939000 10.535000 -0.530000 2.845000 +Pr+4 + 59 55 1.242850 + 20.941299 20.053900 12.466800 0.296689 + 2.544670 0.202481 14.813700 45.464298 + -2.939000 10.535000 -0.530000 2.845000 +Nd + 60 60 1.984860 + 22.684500 19.684700 12.774000 2.851370 + 2.662480 0.210628 15.885000 137.903000 + -3.431000 10.933000 -0.535000 3.018000 +Nd+3 + 60 57 1.475880 + 21.961000 19.933899 12.120000 1.510310 + 2.527220 0.199237 14.178300 30.871700 + -3.431000 10.933000 -0.535000 3.018000 +Pm + 61 61 2.028760 + 23.340500 19.609501 13.123500 2.875160 + 2.562700 0.202088 15.100900 132.720993 + -4.357000 11.614000 -0.530000 3.225000 +Pm+3 + 61 58 1.194990 + 22.552700 20.110800 12.067100 2.074920 + 2.417400 0.185769 13.127500 27.449100 + -4.357000 11.614000 -0.530000 3.225000 +Sm + 62 62 2.209630 + 24.004200 19.425800 13.439600 2.896040 + 2.472740 0.196451 14.399600 128.007004 + -5.696000 12.320000 -0.533000 3.442000 +Sm+3 + 62 59 0.954586 + 23.150400 20.259899 11.920200 2.714880 + 2.316410 0.174081 12.157100 24.824200 + -5.696000 12.320000 -0.533000 3.442000 +Eu + 63 63 2.574500 + 24.627399 19.088600 13.760300 2.922700 + 2.387900 0.194200 13.754600 123.173996 + -7.718000 11.276000 -0.542000 3.669000 +Eu+2 + 63 61 1.363890 + 24.006300 19.950399 11.803400 3.872430 + 2.277830 0.173530 11.609600 26.515600 + -7.718000 11.276000 -0.542000 3.669000 +Eu+3 + 63 60 0.759344 + 23.749699 20.374500 11.850900 3.265030 + 2.222580 0.163940 11.311000 22.996599 + -7.718000 11.276000 -0.542000 3.669000 +Gd + 64 64 2.419600 + 25.070900 19.079800 13.851800 3.545450 + 2.253410 0.181951 12.933100 101.397995 + -9.242000 11.946000 -0.564000 3.904000 +Gd+3 + 64 61 0.645089 + 24.346600 20.420799 11.870800 3.714900 + 2.135530 0.155525 10.578199 21.702900 + -9.242000 11.946000 -0.564000 3.904000 +Tb + 65 65 3.582240 + 25.897600 18.218500 14.316700 2.953540 + 2.242560 0.196143 12.664800 115.362000 + -9.498000 9.242000 -0.591000 4.151000 +Tb+3 + 65 62 0.691967 + 24.955900 20.327099 12.247100 3.773000 + 2.056010 0.149525 10.049900 21.277300 + -9.498000 9.242000 -0.591000 4.151000 +Dy + 66 66 4.297280 + 26.507000 17.638300 14.559600 2.965770 + 2.180200 0.202172 12.189899 111.874001 + -10.423000 9.748000 -0.619000 4.410000 +Dy+3 + 66 63 0.689690 + 25.539499 20.286100 11.981200 4.500730 + 1.980400 0.143384 9.349720 19.580999 + -10.423000 9.748000 -0.619000 4.410000 +Ho + 67 67 4.567960 + 26.904900 17.293999 14.558300 3.638370 + 2.070510 0.197940 11.440700 92.656601 + -12.255000 3.704000 -0.666000 4.678000 +Ho+3 + 67 64 0.852795 + 26.129601 20.099400 11.978800 4.936760 + 1.910720 0.139358 8.800180 18.590799 + -12.255000 3.704000 -0.666000 4.678000 +Er + 68 68 5.920460 + 27.656300 16.428499 14.977900 2.982330 + 2.073560 0.223545 11.360400 105.703003 + -9.733000 3.937000 -0.723000 4.958000 +Er+3 + 68 65 1.176130 + 26.722000 19.774799 12.150600 5.173790 + 1.846590 0.137290 8.362249 17.897400 + -9.733000 3.937000 -0.723000 4.958000 +Tm + 69 69 6.756210 + 28.181900 15.885099 15.154200 2.987060 + 2.028590 0.238849 10.997499 102.960999 + -8.488000 4.181000 -0.795000 5.248000 +Tm+3 + 69 66 1.639290 + 27.308300 19.332001 12.333900 5.383480 + 1.787110 0.136974 7.967780 17.292200 + -8.488000 4.181000 -0.795000 5.248000 +Yb + 70 70 7.566720 + 28.664101 15.434500 15.308700 2.989630 + 1.988900 0.257119 10.664700 100.417000 + -7.701000 4.432000 -0.884000 5.548000 +Yb+2 + 70 68 3.709830 + 28.120899 17.681700 13.333500 5.146570 + 1.785030 0.159970 8.183040 20.389999 + -7.701000 4.432000 -0.884000 5.548000 +Yb+3 + 70 67 2.260010 + 27.891700 18.761400 12.607200 5.476470 + 1.732720 0.138790 7.644120 16.815300 + -7.701000 4.432000 -0.884000 5.548000 +Lu + 71 71 7.976280 + 28.947599 15.220800 15.100000 3.716010 + 1.901820 9.985189 0.261033 84.329803 + -7.133000 4.693000 -0.988000 5.858000 +Lu+3 + 71 68 2.975730 + 28.462799 18.121000 12.842899 5.594150 + 1.682160 0.142292 7.337270 16.353500 + -7.133000 4.693000 -0.988000 5.858000 +Hf + 72 72 8.581540 + 29.143999 15.172600 14.758600 4.300130 + 1.832620 9.599899 0.275116 72.028999 + -6.715000 4.977000 -1.118000 6.185000 +Hf+4 + 72 68 2.396990 + 28.813099 18.460100 12.728500 5.599270 + 1.591360 0.128903 6.762320 14.036600 + -6.715000 4.977000 -1.118000 6.185000 +Ta + 73 73 9.243540 + 29.202400 15.229300 14.513500 4.764920 + 1.773330 9.370460 0.295977 63.364399 + -6.351000 5.271000 -1.258000 6.523000 +Ta+5 + 73 68 1.785550 + 29.158699 18.840700 12.826799 5.386950 + 1.507110 0.116741 6.315240 12.424400 + -6.351000 5.271000 -1.258000 6.523000 +W + 74 74 9.887500 + 29.081800 15.430000 14.432700 5.119820 + 1.720290 9.225900 0.321703 57.056000 + -6.048000 5.577000 -1.421000 6.872000 +W+6 + 74 68 1.010740 + 29.493599 19.376301 13.054399 5.064120 + 1.427550 0.104621 5.936670 11.197200 + -6.048000 5.577000 -1.421000 6.872000 +Re + 75 75 10.472000 + 28.762100 15.718900 14.556400 5.441740 + 1.671910 9.092270 0.350500 52.086098 + -5.790000 5.891000 -1.598000 7.232000 +Os + 76 76 11.000500 + 28.189400 16.154999 14.930500 5.675890 + 1.629030 8.979480 0.382661 48.164700 + -5.581000 6.221000 -1.816000 7.605000 +Os+4 + 76 72 6.498040 + 30.418999 15.263700 14.745800 5.067950 + 1.371130 6.847060 0.165191 18.003000 + -5.581000 6.221000 -1.816000 7.605000 +Ir + 77 77 11.472200 + 27.304899 16.729599 15.611500 5.833770 + 1.592790 8.865530 0.417916 45.001099 + -5.391000 6.566000 -2.066000 7.990000 +Ir+3 + 77 74 8.279030 + 30.415600 15.862000 13.614500 5.820080 + 1.343230 7.109090 0.204633 20.325399 + -5.391000 6.566000 -2.066000 7.990000 +Ir+4 + 77 73 6.968240 + 30.705799 15.551200 14.232600 5.536720 + 1.309230 6.719830 0.167252 17.491100 + -5.391000 6.566000 -2.066000 7.990000 +Pt + 78 78 11.688300 + 27.005899 17.763901 15.713100 5.783700 + 1.512930 8.811740 0.424593 38.610298 + -5.233000 6.925000 -2.352000 8.388000 +Pt+2 + 78 76 9.853290 + 29.842899 16.722401 13.215300 6.352340 + 1.329270 7.389790 0.263297 22.942600 + -5.233000 6.925000 -2.352000 8.388000 +Pt+4 + 78 74 7.395340 + 30.961201 15.982900 13.734800 5.920340 + 1.248130 6.608340 0.168640 16.939199 + -5.233000 6.925000 -2.352000 8.388000 +Au + 79 79 12.065800 + 16.881901 18.591299 25.558201 5.860000 + 0.461100 8.621600 1.482600 36.395599 + -5.096000 7.297000 -2.688000 8.798000 +Au+1 + 79 78 11.229900 + 28.010899 17.820400 14.335899 6.580770 + 1.353210 7.739500 0.356752 26.404301 + -5.096000 7.297000 -2.688000 8.798000 +Au+3 + 79 76 9.096800 + 30.688599 16.902901 12.780100 6.523540 + 1.219900 6.828720 0.212867 18.659000 + -5.096000 7.297000 -2.688000 8.798000 +Hg + 80 80 12.608900 + 20.680901 19.041700 21.657499 5.967600 + 0.545000 8.448400 1.572900 38.324600 + -4.990000 7.686000 -3.084000 9.223000 +Hg+1 + 80 79 12.020500 + 25.085300 18.497299 16.888300 6.482160 + 1.395070 7.651050 0.443378 28.226200 + -4.990000 7.686000 -3.084000 9.223000 +Hg+2 + 80 78 10.626800 + 29.564100 18.059999 12.837400 6.899120 + 1.211520 7.056390 0.284738 20.748199 + -4.990000 7.686000 -3.084000 9.223000 +Tl + 81 81 13.174600 + 27.544600 19.158400 15.538000 5.525930 + 0.655150 8.707510 1.963470 45.814899 + -4.883000 8.089000 -3.556000 9.659000 +Tl+1 + 81 80 12.525800 + 21.398500 20.472300 18.747799 6.828470 + 1.471100 0.517394 7.434630 28.848200 + -4.883000 8.089000 -3.556000 9.659000 +Tl+3 + 81 78 9.802700 + 30.869499 18.384100 11.932800 7.005740 + 1.100800 6.538520 0.219074 17.211399 + -4.883000 8.089000 -3.556000 9.659000 +Pb + 82 82 13.411800 + 31.061699 13.063700 18.441999 5.969600 + 0.690200 2.357600 8.618000 47.257900 + -4.818000 8.505000 -4.133000 10.102000 +Pb+2 + 82 80 12.473400 + 21.788601 19.568199 19.140600 7.011070 + 1.336600 0.488383 6.772700 23.813200 + -4.818000 8.505000 -4.133000 10.102000 +Pb+4 + 82 78 8.084280 + 32.124397 18.800301 12.017500 6.968860 + 1.005660 6.109260 0.147041 14.714000 + -4.818000 8.505000 -4.133000 10.102000 +Bi + 83 83 13.578199 + 33.368900 12.951000 16.587700 6.469200 + 0.704000 2.923800 8.793700 48.009300 + -4.776000 8.930000 -4.861000 10.559000 +Bi+3 + 83 80 12.471100 + 21.805300 19.502600 19.105301 7.102950 + 1.235600 6.241490 0.469999 20.318501 + -4.776000 8.930000 -4.861000 10.559000 +Bi+5 + 83 78 -6.799400 + 33.536400 25.094601 19.249699 6.915550 + 0.916540 0.390420 5.714140 12.828500 + -4.776000 8.930000 -4.861000 10.559000 +Po + 84 84 13.677000 + 34.672600 15.473300 13.113800 7.025880 + 0.700999 3.550780 9.556419 47.004501 + -4.756000 9.382999 -5.924000 11.042000 +At + 85 85 13.710800 + 35.316299 19.021099 9.498870 7.425180 + 0.685870 3.974580 11.382400 45.471500 + -4.772000 9.843000 -7.444000 9.961000 +Rn + 86 86 13.690500 + 35.563099 21.281601 8.003700 7.443300 + 0.663100 4.069100 14.042200 44.247299 + -4.787000 10.316999 -8.862000 10.403000 +Fr + 87 87 13.724700 + 35.929901 23.054699 12.143900 2.112530 + 0.646453 4.176190 23.105200 150.644989 + -4.833000 10.802999 -7.912000 7.754000 +Ra + 88 88 13.621099 + 35.763000 22.906399 12.473900 3.210970 + 0.616341 3.871350 19.988701 142.324997 + -4.898000 11.296000 -7.620000 8.105000 +Ra+2 + 88 86 13.543100 + 35.215000 21.670000 7.913420 7.650780 + 0.604909 3.576700 12.601000 29.843599 + -4.898000 11.296000 -7.620000 8.105000 +Ac + 89 89 13.526600 + 35.659698 23.103199 12.597700 4.086550 + 0.589092 3.651550 18.598999 117.019997 + -4.994000 11.799000 -7.725000 8.472000 +Ac+3 + 89 86 13.463699 + 35.173599 22.111200 8.192160 7.055450 + 0.579689 3.414370 12.918700 25.944300 + -4.994000 11.799000 -7.725000 8.472000 +Th + 90 90 13.431400 + 35.564499 23.421900 12.747300 4.807030 + 0.563359 3.462040 17.830900 99.172195 + -5.091000 12.330000 -8.127000 8.870000 +Th+4 + 90 86 13.375999 + 35.100700 22.441799 9.785540 5.294440 + 0.555054 3.244980 13.466100 23.953300 + -5.091000 12.330000 -8.127000 8.870000 +Pa + 91 91 13.428699 + 35.884701 23.294800 14.189100 4.172870 + 0.547751 3.415190 16.923500 105.250999 + -5.216000 12.868000 -8.960000 9.284000 +U + 92 92 13.396600 + 36.022800 23.412800 14.949100 4.188000 + 0.529300 3.325300 16.092699 100.612999 + -5.359000 13.409000 -10.673000 9.653999 +U+3 + 92 89 13.309200 + 35.574699 22.525900 12.216499 5.370730 + 0.520480 3.122930 12.714800 26.339399 + -5.359000 13.409000 -10.673000 9.653999 +U+4 + 92 88 13.267099 + 35.371498 22.532600 12.029100 4.798400 + 0.516598 3.050530 12.572300 23.458200 + -5.359000 13.409000 -10.673000 9.653999 +U+6 + 92 86 13.166500 + 34.850899 22.758400 14.009900 1.214570 + 0.507079 2.890300 13.176700 25.201700 + -5.359000 13.409000 -10.673000 9.653999 +Np + 93 93 13.357300 + 36.187401 23.596399 15.640200 4.185500 + 0.511929 3.253960 15.362200 97.490799 + -5.529000 13.967000 -11.158000 4.148000 +Np+3 + 93 90 13.254400 + 35.707397 22.612999 12.989799 5.432270 + 0.502322 3.038070 12.144899 25.492800 + -5.529000 13.967000 -11.158000 4.148000 +Np+4 + 93 89 13.211599 + 35.510300 22.578699 12.776600 4.921590 + 0.498626 2.966270 11.948400 22.750200 + -5.529000 13.967000 -11.158000 4.148000 +Np+6 + 93 87 13.113000 + 35.013599 22.728600 14.388400 1.756690 + 0.489810 2.810990 12.330000 22.658100 + -5.529000 13.967000 -11.158000 4.148000 +Pu + 94 94 13.381200 + 36.525398 23.808300 16.770700 3.479470 + 0.499384 3.263710 14.945499 105.979996 + -5.712000 14.535999 -9.725000 4.330000 +Pu+3 + 94 91 13.199100 + 35.840000 22.716900 13.580700 5.660160 + 0.484936 2.961180 11.533100 24.399200 + -5.712000 14.535999 -9.725000 4.330000 +Pu+4 + 94 90 13.155500 + 35.649300 22.646000 13.359500 5.188310 + 0.481422 2.890200 11.316000 21.830099 + -5.712000 14.535999 -9.725000 4.330000 +Pu+6 + 94 88 13.058200 + 35.173599 22.718100 14.763500 2.286780 + 0.473204 2.738480 11.552999 20.930300 + -5.712000 14.535999 -9.725000 4.330000 +Am + 95 95 13.359200 + 36.670601 24.099199 17.341499 3.493310 + 0.483629 3.206470 14.313600 102.272995 + -5.930000 15.087000 -8.926000 4.511000 +Cm + 96 96 13.288700 + 36.648800 24.409599 17.399000 4.216650 + 0.465154 3.089970 13.434600 88.483398 + -6.176000 15.634000 -8.416000 4.697000 +Bk + 97 97 13.275400 + 36.788101 24.773600 17.891899 4.232840 + 0.451018 3.046190 12.894600 86.002998 + -6.498000 16.316999 -7.990000 4.908000 +Cf + 98 98 13.267400 + 36.918499 25.199499 18.331699 4.243910 + 0.437533 3.007750 12.404400 83.788101 + -6.798000 16.930000 -7.683000 5.107000 +H 2 + 1 1 0.000000 + 0.793200 0.194900 0.000000 0.000000 + 24.215700 2.108900 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +C 2 + 6 6 0.000000 + 2.997200 2.979100 0.000000 0.000000 + 30.016701 2.888600 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +N 2 + 7 7 0.000000 + 2.992400 3.998600 0.000000 0.000000 + 25.376600 3.500400 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +O 2 + 8 8 0.000000 + 2.448500 5.558900 0.000000 0.000000 + 24.756199 4.137200 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +S 2 + 16 16 0.000000 + 5.548000 10.424100 0.000000 0.000000 + 33.710800 1.903400 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ano 2 + 1 1 0.000000 + 1.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 1.000000 0.000000 1.000000 diff --git a/ccp4c/data/atomsf_electron.lib b/ccp4c/data/atomsf_electron.lib new file mode 100644 index 00000000..77bb9241 --- /dev/null +++ b/ccp4c/data/atomsf_electron.lib @@ -0,0 +1,514 @@ +AD - This file contains the following information: +AD - BEWARE: This file has a FIXED FORMAT! +AD This contains for each element: +AD ID +AD IWT IELEC C +AD A(5) +AD B(5) +AD CU(2) MO(2) +AD +AD +AD Formfactor: a1*exp(-b1*s*s) + a2*exp(-b2*s*s) + a3*exp(-b3*s*s) +AD + a4*exp(-b4*s*s) + a5*exp(-b4*s*s) +AD +AD This is the 5 Gaussian approximation +AD Ref: Int.Tab. vol C pp. 282-283 (Table 4.3.2.2) for values a1-a5, b1-b5 +AD +AD ID atom identifier +AD IWT atomic weight +AD IELEC number of electrons +AD C it is 0 +AD A(5) coefficient for structure factor calculation +AD B(5) coefficient for structure factor calculation +AD CU(2) these are 0-s +AD MO(2) these are 0-s +H + 1 1 0.000000 + 0.034900 0.120100 0.197000 0.057300 0.119500 + 0.534700 3.586700 12.347100 18.952499 38.626900 + 0.000000 0.000000 0.000000 0.000000 +He + 2 2 0.000000 + 0.031700 0.083800 0.152600 0.133400 0.016400 + 0.250700 1.475100 4.493800 12.664600 31.165300 + 0.000000 0.000000 0.000000 0.000000 +Li + 3 3 0.000000 + 0.075000 0.224900 0.554800 1.495400 0.935400 + 0.386400 2.938300 15.382900 53.554501 138.733704 + 0.000000 0.000000 0.000000 0.000000 +Be + 4 4 0.000000 + 0.078000 0.221000 0.674000 1.386700 0.692500 + 0.313100 2.238100 10.151700 30.906099 78.327301 + 0.000000 0.000000 0.000000 0.000000 +B + 5 5 0.000000 + 0.090900 0.255100 0.773800 1.213600 0.460600 + 0.299500 2.115500 8.381600 24.129200 63.131401 + 0.000000 0.000000 0.000000 0.000000 +C + 6 6 0.000000 + 0.089300 0.256300 0.757000 1.048700 0.357500 + 0.246500 1.710000 6.409400 18.611300 50.252300 + 0.000000 0.000000 0.000000 0.000000 +N + 7 7 0.000000 + 0.102200 0.321900 0.798200 0.819700 0.171500 + 0.245100 1.748100 6.192500 17.389400 48.143101 + 0.000000 0.000000 0.000000 0.000000 +O + 8 8 0.000000 + 0.097400 0.292100 0.691000 0.699000 0.203900 + 0.206700 1.381500 4.694300 12.710500 32.472599 + 0.000000 0.000000 0.000000 0.000000 +F + 9 9 0.000000 + 0.108300 0.317500 0.648700 0.584600 0.142100 + 0.205700 1.343900 4.278800 11.393200 28.788099 + 0.000000 0.000000 0.000000 0.000000 +Ne + 10 10 0.000000 + 0.126900 0.353500 0.558200 0.467400 0.146000 + 0.220000 1.377900 4.020300 9.493400 23.127800 + 0.000000 0.000000 0.000000 0.000000 +Na + 11 11 0.000000 + 0.214200 0.685300 0.769200 1.658900 1.448200 + 0.333400 2.344600 10.083000 48.303699 138.270004 + 0.000000 0.000000 0.000000 0.000000 +Mg + 12 12 0.000000 + 0.231400 0.686600 0.967700 2.188200 1.133900 + 0.327800 2.272000 10.924100 39.289799 101.974800 + 0.000000 0.000000 0.000000 0.000000 +Al + 13 13 0.000000 + 0.239000 0.657300 1.201100 2.558600 1.231200 + 0.313800 2.106300 10.416300 34.455200 98.534401 + 0.000000 0.000000 0.000000 0.000000 +Si + 14 14 0.000000 + 0.251900 0.637200 1.379500 2.508200 1.050000 + 0.307500 2.017400 9.674600 29.374399 80.473198 + 0.000000 0.000000 0.000000 0.000000 +P + 15 15 0.000000 + 0.254800 0.610600 1.454100 2.320400 0.847700 + 0.290800 1.874000 8.517600 24.343399 63.299599 + 0.000000 0.000000 0.000000 0.000000 +S + 16 16 0.000000 + 0.249700 0.562800 1.389900 2.186500 0.771500 + 0.268100 1.671100 7.026700 19.537701 50.388802 + 0.000000 0.000000 0.000000 0.000000 +Cl + 17 17 0.000000 + 0.244300 0.539700 1.391900 2.019700 0.662100 + 0.246800 1.524200 6.153700 16.668699 42.308601 + 0.000000 0.000000 0.000000 0.000000 +Ar + 18 18 0.000000 + 0.238500 0.501700 1.342800 1.889900 0.607900 + 0.228900 1.369400 5.256100 14.092800 35.536098 + 0.000000 0.000000 0.000000 0.000000 +K + 19 19 0.000000 + 0.411500 1.403100 2.278400 2.674200 2.216200 + 0.370300 3.387400 13.102900 68.959198 194.432907 + 0.000000 0.000000 0.000000 0.000000 +Ca + 20 20 0.000000 + 0.405400 1.388000 2.160200 3.753200 2.206300 + 0.349900 3.099100 11.960800 53.935299 142.389206 + 0.000000 0.000000 0.000000 0.000000 +Sc + 21 21 0.000000 + 0.378700 1.218100 2.059400 3.261800 2.387000 + 0.313300 2.585600 9.581300 41.768799 116.728203 + 0.000000 0.000000 0.000000 0.000000 +Ti + 22 22 0.000000 + 0.382500 1.259800 2.000800 3.061700 2.069400 + 0.304000 2.486300 9.278300 39.075100 109.458298 + 0.000000 0.000000 0.000000 0.000000 +V + 23 23 0.000000 + 0.387600 1.275000 1.910900 2.831400 1.897900 + 0.296700 2.378000 8.798100 35.952801 101.720100 + 0.000000 0.000000 0.000000 0.000000 +Cr + 24 24 0.000000 + 0.404600 1.369600 1.894100 2.080000 1.219600 + 0.298600 2.395800 9.140600 37.470100 113.712097 + 0.000000 0.000000 0.000000 0.000000 +Mn + 25 25 0.000000 + 0.379600 1.209400 1.781500 2.542000 1.593700 + 0.269900 2.045500 7.472600 31.060400 91.562202 + 0.000000 0.000000 0.000000 0.000000 +Fe + 26 26 0.000000 + 0.394600 1.272500 1.703100 2.314000 1.479500 + 0.271700 2.044300 7.600700 29.971399 86.226501 + 0.000000 0.000000 0.000000 0.000000 +Co + 27 27 0.000000 + 0.411800 1.316100 1.649300 2.193000 1.283000 + 0.274200 2.037200 7.720500 29.968000 84.938301 + 0.000000 0.000000 0.000000 0.000000 +Ni + 28 28 0.000000 + 0.386000 1.176500 1.545100 2.073000 1.381400 + 0.247800 1.766000 6.310700 25.220400 74.314598 + 0.000000 0.000000 0.000000 0.000000 +Cu + 29 29 0.000000 + 0.431400 1.320800 1.523600 1.467100 0.856200 + 0.269400 1.922300 7.347400 28.989201 90.624603 + 0.000000 0.000000 0.000000 0.000000 +Zn + 30 30 0.000000 + 0.428800 1.264600 1.447200 1.829400 1.093400 + 0.259300 1.799800 6.750000 25.586000 73.528397 + 0.000000 0.000000 0.000000 0.000000 +Ga + 31 31 0.000000 + 0.481800 1.403200 1.656100 2.460500 1.105400 + 0.282500 1.978500 8.754600 32.523800 98.552299 + 0.000000 0.000000 0.000000 0.000000 +Ge + 32 32 0.000000 + 0.465500 1.301400 1.608800 2.699800 1.300300 + 0.264700 1.792600 7.607100 26.554100 77.523804 + 0.000000 0.000000 0.000000 0.000000 +As + 33 33 0.000000 + 0.451700 1.222900 1.585200 2.795800 1.263800 + 0.249300 1.643600 6.815400 22.368099 62.039001 + 0.000000 0.000000 0.000000 0.000000 +Se + 34 34 0.000000 + 0.447700 1.167800 1.584300 2.808700 1.195600 + 0.240500 1.544200 6.323100 19.461000 52.023300 + 0.000000 0.000000 0.000000 0.000000 +Br + 35 35 0.000000 + 0.479800 1.194800 1.869500 2.695300 0.820300 + 0.250400 1.596300 6.965300 19.849199 50.323299 + 0.000000 0.000000 0.000000 0.000000 +Kr + 36 36 0.000000 + 0.454600 1.099300 1.769600 2.706800 0.867200 + 0.230900 1.427900 5.944900 16.675200 42.224300 + 0.000000 0.000000 0.000000 0.000000 +Rb + 37 37 0.000000 + 1.016000 2.852800 3.546600 -7.780400 12.114800 + 0.485300 5.092500 25.785101 130.451508 138.677505 + 0.000000 0.000000 0.000000 0.000000 +Sr + 38 38 0.000000 + 0.670300 1.492600 3.336800 4.460000 3.150100 + 0.319000 2.228700 10.350400 52.329102 151.221603 + 0.000000 0.000000 0.000000 0.000000 +Y + 39 39 0.000000 + 0.689400 1.547400 3.245000 4.212600 2.976400 + 0.318900 2.290400 10.006200 44.077099 125.012001 + 0.000000 0.000000 0.000000 0.000000 +Zr + 40 40 0.000000 + 0.671900 1.468400 3.166800 3.955700 2.892000 + 0.303600 2.124900 8.923600 36.845798 108.204903 + 0.000000 0.000000 0.000000 0.000000 +Nb + 41 41 0.000000 + 0.612300 1.267700 3.034800 3.384100 2.368300 + 0.270900 1.768300 7.248900 27.946501 98.562401 + 0.000000 0.000000 0.000000 0.000000 +Mo + 42 42 0.000000 + 0.677300 1.479800 3.178800 3.082400 1.838400 + 0.292000 2.060600 8.112900 30.533600 100.065804 + 0.000000 0.000000 0.000000 0.000000 +Tc + 43 43 0.000000 + 0.708200 1.639200 3.199300 3.432700 1.871100 + 0.297600 2.210600 8.524600 33.145599 96.637703 + 0.000000 0.000000 0.000000 0.000000 +Ru + 44 44 0.000000 + 0.673500 1.493400 3.096600 2.725400 1.559700 + 0.277300 1.971600 7.324900 26.689100 90.558098 + 0.000000 0.000000 0.000000 0.000000 +Rh + 45 45 0.000000 + 0.641300 1.369000 2.985400 2.695200 1.543300 + 0.258000 1.772100 6.385400 23.254900 85.151703 + 0.000000 0.000000 0.000000 0.000000 +Pd + 46 46 0.000000 + 0.590400 1.177500 2.651900 2.287500 0.868900 + 0.232400 1.501900 5.159100 15.542800 46.821301 + 0.000000 0.000000 0.000000 0.000000 +Ag + 47 47 0.000000 + 0.637700 1.379000 2.829400 2.363100 1.455300 + 0.246600 1.697400 5.765600 20.094299 76.737198 + 0.000000 0.000000 0.000000 0.000000 +Cd + 48 48 0.000000 + 0.636400 1.424700 2.780200 2.597300 1.788600 + 0.240700 1.682300 5.658800 20.721901 69.110901 + 0.000000 0.000000 0.000000 0.000000 +In + 49 49 0.000000 + 0.676800 1.658900 2.774000 3.183500 2.132600 + 0.252200 1.854500 6.293600 25.145700 84.544800 + 0.000000 0.000000 0.000000 0.000000 +Sn + 50 50 0.000000 + 0.722400 1.961000 2.716100 3.560300 1.897200 + 0.265100 2.060400 7.301100 27.549299 81.334900 + 0.000000 0.000000 0.000000 0.000000 +Sb + 51 51 0.000000 + 0.710600 1.924700 2.614900 3.832200 1.889900 + 0.256200 1.964600 6.885200 24.764799 68.916801 + 0.000000 0.000000 0.000000 0.000000 +Te + 52 52 0.000000 + 0.694700 1.869000 2.535600 4.001300 1.895500 + 0.245900 1.854200 6.441100 22.173000 59.220600 + 0.000000 0.000000 0.000000 0.000000 +I + 53 53 0.000000 + 0.704700 1.948400 2.594000 4.152600 1.505700 + 0.245500 1.863800 6.763900 21.800699 56.439499 + 0.000000 0.000000 0.000000 0.000000 +Xe + 54 54 0.000000 + 0.673700 1.790800 2.412900 4.210000 1.705800 + 0.230500 1.689000 5.821800 18.392799 47.249599 + 0.000000 0.000000 0.000000 0.000000 +Cs + 55 55 0.000000 + 1.270400 3.801800 5.661800 0.920500 4.810500 + 0.435600 4.205800 23.434200 136.778305 171.756104 + 0.000000 0.000000 0.000000 0.000000 +Ba + 56 56 0.000000 + 0.904900 2.607600 4.849800 5.160300 4.738800 + 0.306600 2.436300 12.182100 54.613499 161.997803 + 0.000000 0.000000 0.000000 0.000000 +La + 57 57 0.000000 + 0.840500 2.386300 4.613900 5.151400 4.794900 + 0.279100 2.141000 10.340000 41.914799 132.020401 + 0.000000 0.000000 0.000000 0.000000 +Ce + 58 58 0.000000 + 0.855100 2.391500 4.577200 5.027800 4.511800 + 0.280500 2.120000 10.180800 42.063301 130.989304 + 0.000000 0.000000 0.000000 0.000000 +Pr + 59 59 0.000000 + 0.909600 2.531300 4.526600 4.637600 4.369000 + 0.293900 2.247100 10.826600 48.884201 147.602005 + 0.000000 0.000000 0.000000 0.000000 +Nd + 60 60 0.000000 + 0.880700 2.418300 4.444800 4.685800 4.172500 + 0.280200 2.083600 10.035700 47.450600 146.997604 + 0.000000 0.000000 0.000000 0.000000 +Pm + 61 61 0.000000 + 0.947100 2.546300 4.352300 4.478900 3.908000 + 0.297700 2.227600 10.576200 49.361900 145.358002 + 0.000000 0.000000 0.000000 0.000000 +Sm + 62 62 0.000000 + 0.969900 2.583700 4.277800 4.457500 3.598500 + 0.300300 2.244700 10.648700 50.799400 146.417892 + 0.000000 0.000000 0.000000 0.000000 +Eu + 63 63 0.000000 + 0.869400 2.241300 3.919600 3.969400 4.549800 + 0.265300 1.859000 8.399800 36.739700 125.708900 + 0.000000 0.000000 0.000000 0.000000 +Gd + 64 64 0.000000 + 0.967300 2.470200 4.114800 4.497200 3.209900 + 0.290900 2.101400 9.706700 43.426998 125.947403 + 0.000000 0.000000 0.000000 0.000000 +Tb + 65 65 0.000000 + 0.932500 2.367300 3.879100 3.967400 3.799600 + 0.276100 1.951100 8.929600 41.593700 131.012207 + 0.000000 0.000000 0.000000 0.000000 +Dy + 66 66 0.000000 + 0.950500 2.370500 3.821800 4.047100 3.445100 + 0.277300 1.946900 8.886200 43.093800 133.139603 + 0.000000 0.000000 0.000000 0.000000 +Ho + 67 67 0.000000 + 0.924800 2.242800 3.618200 3.791000 3.791200 + 0.266000 1.818300 7.965500 33.112900 101.813904 + 0.000000 0.000000 0.000000 0.000000 +Er + 68 68 0.000000 + 1.037300 2.482400 3.655800 3.892500 3.005600 + 0.294400 2.079700 9.415600 45.805599 132.772003 + 0.000000 0.000000 0.000000 0.000000 +Tm + 69 69 0.000000 + 1.007500 2.378700 3.544000 3.693200 3.175900 + 0.281600 1.948600 8.716200 41.841999 125.031998 + 0.000000 0.000000 0.000000 0.000000 +Yb + 70 70 0.000000 + 1.034700 2.391100 3.461900 3.655600 3.005200 + 0.285500 1.967900 8.761900 42.330399 125.649902 + 0.000000 0.000000 0.000000 0.000000 +Lu + 71 71 0.000000 + 0.992700 2.243600 3.355400 3.781300 3.099400 + 0.270100 1.807300 7.811200 34.484901 103.352600 + 0.000000 0.000000 0.000000 0.000000 +Hf + 72 72 0.000000 + 1.029500 2.291100 3.411000 3.949700 2.492500 + 0.276100 1.862500 8.096100 34.271198 98.529503 + 0.000000 0.000000 0.000000 0.000000 +Ta + 73 73 0.000000 + 1.019000 2.229100 3.409700 3.925200 2.267900 + 0.269400 1.796200 7.694400 31.094200 91.108902 + 0.000000 0.000000 0.000000 0.000000 +W + 74 74 0.000000 + 0.985300 2.116700 3.357000 3.798100 2.279800 + 0.256900 1.674500 7.009800 26.923401 81.390999 + 0.000000 0.000000 0.000000 0.000000 +Re + 75 75 0.000000 + 0.991400 2.085800 3.453100 3.881200 1.852600 + 0.254800 1.651800 6.884500 26.723400 81.721497 + 0.000000 0.000000 0.000000 0.000000 +Os + 76 76 0.000000 + 0.981300 2.032200 3.366500 3.623500 1.974100 + 0.248700 1.597300 6.473700 23.281700 70.925400 + 0.000000 0.000000 0.000000 0.000000 +Ir + 77 77 0.000000 + 1.019400 2.064500 3.442500 3.491400 1.697600 + 0.255400 1.647500 6.596600 23.226900 70.027199 + 0.000000 0.000000 0.000000 0.000000 +Pt + 78 78 0.000000 + 0.914800 1.809600 3.213400 3.295300 1.575400 + 0.226300 1.381300 5.324300 17.598700 60.017101 + 0.000000 0.000000 0.000000 0.000000 +Au + 79 79 0.000000 + 0.967400 1.891600 3.399300 3.052400 1.260700 + 0.235800 1.471200 5.675800 18.711901 61.528599 + 0.000000 0.000000 0.000000 0.000000 +Hg + 80 80 0.000000 + 1.003300 1.946900 3.439600 3.154800 1.418000 + 0.241300 1.529800 5.800900 19.452000 60.575298 + 0.000000 0.000000 0.000000 0.000000 +Tl + 81 81 0.000000 + 1.068900 2.103800 3.603900 3.492700 1.828300 + 0.254000 1.671500 6.350900 23.153099 78.709900 + 0.000000 0.000000 0.000000 0.000000 +Pb + 82 82 0.000000 + 1.089100 2.186700 3.616000 3.803100 1.899400 + 0.255200 1.717400 6.513100 23.917000 74.703903 + 0.000000 0.000000 0.000000 0.000000 +Bi + 83 83 0.000000 + 1.100700 2.230600 3.568900 4.154900 2.038200 + 0.254600 1.735100 6.494800 23.646400 70.377998 + 0.000000 0.000000 0.000000 0.000000 +Po + 84 84 0.000000 + 1.156800 2.435300 3.645900 4.406400 1.717900 + 0.264800 1.878600 7.174900 25.176600 69.282097 + 0.000000 0.000000 0.000000 0.000000 +At + 85 85 0.000000 + 1.090900 2.197600 3.383100 4.670000 2.127700 + 0.246600 1.670700 6.019700 20.765699 57.266300 + 0.000000 0.000000 0.000000 0.000000 +Rn + 86 86 0.000000 + 1.075600 2.163000 3.317800 4.885200 2.048900 + 0.240200 1.616900 5.764400 19.456800 52.500900 + 0.000000 0.000000 0.000000 0.000000 +Fr + 87 87 0.000000 + 1.428200 3.508100 5.676700 4.196400 3.894600 + 0.318300 2.688900 13.481600 54.386600 200.832108 + 0.000000 0.000000 0.000000 0.000000 +Ra + 88 88 0.000000 + 1.312700 3.124300 5.298800 5.389100 5.413300 + 0.288700 2.289700 10.827600 43.538898 145.610901 + 0.000000 0.000000 0.000000 0.000000 +Ac + 89 89 0.000000 + 1.312800 3.102100 5.338500 5.961100 4.756200 + 0.286100 2.250900 10.528700 41.779598 128.297302 + 0.000000 0.000000 0.000000 0.000000 +Th + 90 90 0.000000 + 1.255300 2.917800 5.086200 6.120600 4.712200 + 0.270100 2.063600 9.305100 34.597698 107.919998 + 0.000000 0.000000 0.000000 0.000000 +Pa + 91 91 0.000000 + 1.321800 3.144400 5.437100 5.644400 4.010700 + 0.282700 2.225000 10.245400 41.116199 124.444901 + 0.000000 0.000000 0.000000 0.000000 +U + 92 92 0.000000 + 1.338200 3.204300 5.455800 5.483900 3.634200 + 0.283800 2.245200 10.251900 41.725101 124.902298 + 0.000000 0.000000 0.000000 0.000000 +Np + 93 93 0.000000 + 1.519300 4.005300 6.532700 -0.140200 6.748900 + 0.321300 2.820600 14.887800 68.910301 81.725700 + 0.000000 0.000000 0.000000 0.000000 +Pu + 94 94 0.000000 + 1.351700 3.293700 5.321300 4.646600 3.571400 + 0.281300 2.241800 9.995200 42.793900 132.173904 + 0.000000 0.000000 0.000000 0.000000 +Am + 95 95 0.000000 + 1.213500 2.796200 4.754500 4.573100 4.478600 + 0.248300 1.843700 7.542100 29.384100 112.457901 + 0.000000 0.000000 0.000000 0.000000 +Cm + 96 96 0.000000 + 1.293700 3.110000 5.039300 4.754600 3.503100 + 0.263800 2.034100 8.710100 35.299198 109.497200 + 0.000000 0.000000 0.000000 0.000000 +Bk + 97 97 0.000000 + 1.291500 3.102300 4.930900 4.600900 3.466100 + 0.261100 2.002300 8.437700 34.155899 105.891098 + 0.000000 0.000000 0.000000 0.000000 +Cf + 98 98 0.000000 + 1.208900 2.739100 4.348200 4.004700 4.649700 + 0.242100 1.748700 6.726200 23.215300 80.310799 + 0.000000 0.000000 0.000000 0.000000 diff --git a/ccp4c/data/atomsf_neutron.lib b/ccp4c/data/atomsf_neutron.lib new file mode 100644 index 00000000..5817edb1 --- /dev/null +++ b/ccp4c/data/atomsf_neutron.lib @@ -0,0 +1,1002 @@ +AD +AD Form factors for neutron diffraction. These are also known as +AD "bound coherent scattering length" +AD These values have been taken from the website: +AD https://www.ncnr.nist.gov/resources/n-lengths/list.html +AD +AD Varley F. Sears, Neutron scattering lengths and cross sections (1992) +AD Vol. 3, No. 3, pp. 29-37 +AD +AD Note: not all atoms have formfactors. Hopefully they will not be needed +AD in macromolecular crystallography +AD +H + 1 1 0.000000 + -0.374000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +D + 1 1 0.000000 + 0.667000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +H-1 + 1 1 0.000000 + -0.374000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +He + 2 2 0.000000 + 0.326000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Li + 3 3 0.000000 + -0.190000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Li+1 + 3 2 0.000000 + -0.190000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Be + 4 4 0.00000 + 0.779000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Be+2 + 4 2 0.0000 + 0.779000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +B + 5 5 0.0000 + 0.530000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.021300 0.000000 0.000000 +C + 6 6 0.000000 + 0.665000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cv + 6 6 0.000000 + 0.665000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +N + 7 7 0.000000 + 0.936000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +O + 8 8 0.000000 + 0.581000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +O-1 + 8 9 0.000000 + 0.581000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +F + 9 9 0.0000 + 0.565400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +F-1 + 9 10 0.0000 + 0.565400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ne + 10 10 0.000 + 0.456600 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Na + 11 11 0.00000 + 0.363000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Na+1 + 11 10 0.0000 + 0.363000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mg + 12 12 0.0000 + 0.537500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mg+2 + 12 10 0.0000 + 0.537500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Al + 13 13 0.00000 + 0.344900 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Al+3 + 13 10 0.00000 + 0.344900 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Si + 14 14 0.0000 + 0.414910 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Siv + 14 14 0.00000 + 0.414910 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Si+4 + 14 10 0.00000 + 0.414910 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +P + 15 15 0.000000 + 0.513000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +S + 16 16 0.000000 + 0.284700 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cl + 17 17 0.0000 + 0.957700 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cl-1 + 17 18 0.0000 + 0.957700 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ar + 18 18 0.0000 + 0.190900 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +K + 19 19 0.0000 + 0.367000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +K+1 + 19 18 0.0000 + 0.367000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ca + 20 20 0.0000 + 0.470000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ca+2 + 20 18 0.00000 + 0.470000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sc + 21 21 0.00000 + 1.229000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sc+3 + 21 18 0.0000 + 1.229000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ti + 22 22 0.0000 + -0.343800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ti+2 + 22 20 0.00000 + -0.343800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ti+3 + 22 19 0.0000 + -0.343800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ti+4 + 22 18 0.0000 + -0.343800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +V + 23 23 0.0000 + -0.382400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +V+2 + 23 21 0.0000 + -0.382400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +V+3 + 23 19 0.00000 + -0.382400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +V+5 + 23 18 0.0000 + -0.382400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cr + 24 24 0.0000 + 0.363500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cr+2 + 24 22 0.00000 + 0.363500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cr+3 + 24 21 0.000000 + 0.363500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mn + 25 25 0.00000 + -0.373000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mn+2 + 25 23 0.00000 + -0.373000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mn+3 + 25 22 0.00000 + -0.373000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mn+4 + 25 21 0.00000 + -0.373000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Fe + 26 26 0.00000 + 0.945000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Fe+2 + 26 24 0.00000 + 0.945000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Fe+3 + 26 23 0.00000 + 0.945000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Co + 27 27 0.000000 + 0.249000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Co+2 + 27 25 0.000000 + 0.249000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Co+3 + 27 24 0.000000 + 0.249000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ni + 28 28 0.000000 + 1.030000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ni+2 + 28 26 0.000000 + 1.030000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ni+3 + 28 25 0.000000 + 1.030000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cu + 29 29 0.0000 + 0.771800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cu+1 + 29 28 0.0000 + 0.771800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cu+2 + 29 27 0.0000 + 0.771800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Zn + 30 30 0.0000 + 0.578000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Zn+2 + 30 28 0.0000 + 0.578000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ga + 31 31 0.0000 + 0.728800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ga+3 + 31 28 0.0000 + 0.728800 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ge + 32 32 0.0000 + 0.818500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ge+4 + 32 28 0.0000 + 0.818500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +As + 33 33 0.0000 + 0.658000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Se + 34 34 0.0000 + 0.797000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Br + 35 35 0.0000 + 0.679500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Br-1 + 35 36 0.0000 + 0.679500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Rb + 37 37 0.0000 + 0.709000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Rb+1 + 37 36 0.0000 + 0.709000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sr + 38 38 0.0000 + 0.702000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sr+2 + 38 36 0.0000 + 0.702000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Y + 39 39 0.0000 + 0.775000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Y+3 + 39 36 0.0000 + 0.775000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Zr + 40 40 0.0000 + 0.716000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Zr+4 + 40 36 0.0000 + 0.716000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Nb + 41 41 0.0000 + 0.795400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Nb+3 + 41 38 0.0000 + 0.795400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Nb+5 + 41 36 0.0000 + 0.795400 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mo + 42 42 0.0000 + 0.671500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mo+3 + 42 39 0.0000 + 0.671500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mo+5 + 42 37 0.0000 + 0.671500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Mo+6 + 42 36 0.0000 + 0.671500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Tc + 43 43 0.0000 + 0.680000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ru + 44 44 0.0000 + 0.703000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ru+3 + 44 41 0.0000 + 0.703000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ru+4 + 44 40 0.0000 + 0.703000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Rh + 45 45 0.0000 + 0.588000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Rh+3 + 45 42 0.0000 + 0.588000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Rh+4 + 45 41 0.0000 + 0.588000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pd + 46 46 0.0000 + 0.591000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pd+2 + 46 44 0.0000 + 0.591000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pd+4 + 46 42 0.0000 + 0.592200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ag + 47 47 0.0000 + 0.591000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ag+1 + 47 46 0.0000 + 0.592200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ag+2 + 47 45 0.0000 + 0.592200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cd + 48 48 0.0000 + 0.487000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.070000 0.000000 0.000000 +Cd+2 + 48 46 0.0000 + 0.487000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.070000 0.000000 0.000000 +In + 49 49 0.0000 + 0.406500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.005390 0.000000 0.000000 +In+3 + 49 46 0.0000 + 0.406500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.005390 0.000000 0.000000 +Sn + 50 50 0.0000 + 0.622500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sn+2 + 50 48 0.0000 + 0.622500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sn+4 + 50 46 0.0000 + 0.622500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sb + 51 51 0.0000 + 0.557000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sb+3 + 51 48 0.0000 + 0.557000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sb+5 + 51 46 0.0000 + 0.557000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Te + 52 52 0.0000 + 0.580000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +I + 53 53 0.0000 + 0.528000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +I-1 + 53 54 0.0000 + 0.528000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Xe + 54 54 0.0000 + 0.492000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cs + 55 55 0.0000 + 0.542000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Cs+1 + 55 54 0.0000 + 0.542000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ba + 56 56 0.0000 + 0.507000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ba+2 + 56 54 0.0000 + 0.507000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +La + 57 57 0.0000 + 0.824000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +La+3 + 57 54 0.0000 + 0.824000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ce + 58 58 0.0000 + 0.484000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ce+3 + 58 55 0.0000 + 0.484000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ce+4 + 58 54 0.0000 + 0.484000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pr + 59 59 0.0000 + 0.458000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pr+3 + 59 56 0.0000 + 0.458000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pr+4 + 59 55 0.0000 + 0.458000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Nd + 60 60 0.0000 + 0.769000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Nd+3 + 60 57 0.0000 + 0.769000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pm + 61 61 0.0000 + 1.260000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pm+3 + 61 58 0.0000 + 1.260000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Sm + 62 62 0.0000 + 0.08000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.165000 0.000000 0.000000 +Sm+3 + 62 58 0.0000 + 0.080000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.165000 0.000000 0.000000 +Eu + 63 63 0.0000 + 0.722000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.126000 0.000000 0.000000 +Eu+2 + 63 61 0.0000 + 0.722000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.126000 0.000000 0.000000 +Eu+3 + 63 60 0.0000 + 0.722000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.126000 0.000000 0.000000 +Gd + 64 64 0.0000 + 0.650000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -1.382000 0.000000 0.000000 +Gd+3 + 64 61 0.0000 + 0.650000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -1.382000 0.000000 0.000000 +Tb + 65 65 0.0000 + 0.738000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Tb+3 + 65 62 0.0000 + 0.738000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Dy + 66 66 0.0000 + 1.690000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.027600 0.000000 0.000000 +Dy+3 + 66 63 0.0000 + 1.690000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 -0.027600 0.000000 0.000000 +Ho + 67 67 0.0000 + 0.801000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ho+3 + 67 64 0.0000 + 0.801000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Er + 68 68 0.0000 + 0.779000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Er+3 + 68 65 0.0000 + 0.779000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Tm + 69 69 0.0000 + 0.707000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Tm+3 + 69 66 0.0000 + 0.707000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Yb + 70 70 0.0000 + 1.243000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Yb+2 + 70 68 0.0000 + 1.243000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Yb+3 + 70 67 0.0000 + 1.243000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Lu + 71 71 0.0000 + 0.721000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Lu+3 + 71 68 0.0000 + 0.721000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Hf + 72 72 0.0000 + 0.770000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Hf+4 + 72 68 0.0000 + 0.770000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ta + 73 73 0.0000 + 0.691000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ta+5 + 73 68 0.0000 + 0.691000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +W + 74 74 0.0000 + 0.486000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +W+6 + 74 68 0.0000 + 0.486000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Re + 75 75 0.0000 + 0.920000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Os + 76 76 0.0000 + 1.070000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Os+4 + 76 72 0.0000 + 1.070000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ir + 77 77 0.0000 + 1.060000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ir+3 + 77 74 0.0000 + 1.060000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ir+4 + 77 73 0.0000 + 1.060000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pt + 78 78 0.0000 + 0.960000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pt+2 + 78 76 0.0000 + 0.960000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pt+4 + 78 74 0.0000 + 0.960000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Au + 79 79 0.0000 + 0.763000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Au+1 + 79 78 0.0000 + 0.763000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Au+3 + 79 76 0.0000 + 0.763000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Hg + 80 80 0.0000 + 1.269200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Hg+1 + 80 79 0.0000 + 1.269200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Hg+2 + 80 78 0.0000 + 1.269200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Tl + 81 81 0.0000 + 0.877600 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Tl+1 + 81 80 0.0000 + 0.877600 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Tl+3 + 81 78 0.0000 + 0.877600 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pb + 82 82 0.0000 + 0.940500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pb+2 + 82 80 0.0000 + 0.940500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pb+4 + 82 78 0.0000 + 0.940500 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Bi + 83 83 0.0000 + 0.853200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Bi+3 + 83 80 0.0000 + 0.853200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Bi+5 + 83 78 0.0000 + 0.853200 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ra + 88 88 0.0000 + 1.00000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Ra+2 + 88 86 0.0000 + 1.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Th + 90 90 0.0000 + 1.031000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Th+4 + 90 86 0.0000 + 1.031000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Pa + 91 91 0.0000 + 0.910000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +U + 92 92 0.0000 + 1.010000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +U+3 + 92 89 0.0000 + 1.010000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +U+4 + 92 88 0.0000 + 1.010000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +U+6 + 92 86 0.0000 + 1.010000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Np + 93 93 0.0000 + 1.055000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Np+3 + 93 90 0.0000 + 1.055000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Np+4 + 93 89 0.0000 + 1.055000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Np+6 + 93 87 0.0000 + 1.055000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 +Am + 95 95 0.0000 + 0.830000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 diff --git a/ccp4c/data/font84.ascii b/ccp4c/data/font84.ascii new file mode 100644 index 00000000..0b2e9dd0 --- /dev/null +++ b/ccp4c/data/font84.ascii @@ -0,0 +1,5160 @@ + 0 1222 1259 1867 1833 1716 1742 1257 1279 1295 + 1275 1363 1198 1362 1194 1278 889 923 928 965 + 1004 1009 1038 1080 1101 1152 1204 1212 1394 1386 + 1396 1231 1785 1 7 40 68 90 100 108 + 138 147 151 165 174 180 190 197 235 254 + 308 339 369 377 392 397 405 412 420 1311 + 2132 1315 1445 2133 1475 428 459 482 506 530 + 555 569 617 631 639 656 665 669 693 707 + 737 761 784 797 825 835 849 854 862 869 + 881 1319 1359 1337 1425 0 1263 1355 1357 1360 + 1365 1371 1373 1377 1388 1391 1398 1402 1406 1449 + 1452 1455 1469 1475 1481 1487 1493 1497 1508 1519 + 1530 1541 1553 1558 1563 1568 1573 1611 1616 1620 + 1648 1692 1871 1909 1927 1961 1965 1993 2022 2041 + 2060 2094 2128 0 0 0 0 0 0 0 + 0 2033 2334 0 2194 0 2134 2329 2240 2264 + 2288 2313 1965 2309 1953 2236 1564 1612 1622 1662 + 1714 1721 1756 1807 1832 1902 1981 2005 0 2321 + 0 2055 0 1 15 59 94 129 159 185 + 230 257 270 299 323 340 364 379 425 455 + 517 559 597 615 641 654 677 695 714 0 + 0 0 0 2368 0 727 765 803 831 873 + 900 937 982 1007 1030 1063 1094 1110 1153 1183 + 1219 1263 1298 1320 1357 1372 1402 1425 1461 1502 + 1539 0 0 0 0 0 2344 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 2102 2118 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 1873 2047 0 1971 0 1922 2045 2005 2021 + 2037 2041 1850 2040 1846 2004 1543 1579 1586 1620 + 1662 1666 1695 1735 1755 1806 1856 1863 0 2043 + 0 1882 0 1 31 89 126 165 206 244 + 289 336 365 395 442 478 515 545 575 620 + 659 712 744 776 807 839 868 914 948 0 + 0 0 0 0 0 986 1011 1028 1046 1071 + 1090 1113 1143 1163 1176 1194 1213 1224 1257 1281 + 1306 1326 1353 1369 1385 1397 1416 1433 1459 1489 + 1513 0 0 0 0 0 2051 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1910 1916 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 256 0 0 0 + 0 477 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 305 1 4 145 24 27 128 22 + 34 58 0 59 62 64 68 74 94 37 + 97 107 111 113 147 161 71 0 31 0 + 0 0 0 0 0 176 196 496 234 541 + 572 221 290 330 0 337 350 355 370 403 + 419 553 426 589 459 463 506 522 380 0 + 271 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 9 4 4 34 26 43 2 16 16 + 3 2 6 1 4 1 34 5 37 39 + 5 29 42 21 51 42 8 10 2 2 + 2 26 48 6 33 28 22 10 8 30 + 9 4 14 9 6 10 7 38 19 54 + 31 30 8 15 5 8 7 8 8 4 + 1 4 4 1 6 31 23 24 24 25 + 14 48 14 8 17 9 4 24 14 30 + 24 23 13 28 10 14 5 8 7 12 + 8 18 1 18 20 0 12 2 2 2 + 3 2 4 9 3 3 4 4 19 3 + 3 14 6 6 6 6 4 11 11 11 + 11 12 5 5 5 5 38 5 4 28 + 44 24 38 18 34 4 28 29 19 19 + 34 34 4 0 0 0 0 0 0 0 + 0 22 10 0 42 0 60 5 24 24 + 21 8 16 4 12 4 48 10 40 52 + 7 35 51 25 70 51 24 28 0 8 + 0 47 0 14 44 35 35 30 26 45 + 27 13 29 24 17 24 15 46 30 62 + 42 38 18 26 13 23 18 19 13 0 + 0 0 0 1 0 38 38 28 42 27 + 37 45 25 23 33 31 16 43 30 36 + 44 35 22 37 15 30 23 36 41 37 + 25 0 0 0 0 0 24 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 16 16 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 9 4 0 33 0 49 2 16 16 + 3 2 6 1 4 1 36 7 34 42 + 4 29 40 20 51 40 7 10 0 2 + 0 28 0 30 58 37 39 41 38 45 + 47 29 30 47 36 37 30 30 45 39 + 53 32 32 31 32 29 46 34 38 0 + 0 0 0 0 0 25 17 18 25 19 + 23 30 20 13 18 19 11 33 24 25 + 20 27 16 16 12 19 17 26 30 24 + 30 0 0 0 0 0 12 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 6 6 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 15 0 0 0 + 0 19 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 25 3 18 2 3 4 17 2 + 3 1 0 3 2 4 3 20 3 21 + 10 4 2 15 14 15 3 0 3 0 + 0 0 0 0 0 20 25 10 22 12 + 17 13 15 7 0 13 5 15 10 16 + 7 19 17 14 4 14 16 19 23 0 + 19 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 4 3 3 3 3 3 3 4 3 + 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 10 20 21 19 21 19 + 13 19 22 11 11 21 11 33 22 20 + 21 20 17 17 15 22 18 24 20 19 + 18 14 8 14 24 0 14 14 14 14 + 24 22 10 26 26 26 24 24 25 12 + 12 20 10 10 10 10 22 24 24 24 + 24 24 26 16 26 16 19 20 33 24 + 24 25 16 16 16 19 20 23 22 22 + 33 33 11 0 0 0 0 0 0 0 + 0 11 20 0 21 0 26 10 16 16 + 17 25 11 25 11 23 21 21 21 21 + 21 21 21 21 21 21 11 11 0 25 + 0 21 0 20 24 21 23 23 22 22 + 26 14 19 23 20 28 25 22 23 22 + 24 23 22 25 20 26 22 22 22 0 + 0 0 0 21 0 22 19 18 22 18 + 16 21 22 13 13 22 12 35 24 20 + 22 21 18 17 14 24 20 30 22 22 + 20 0 0 0 0 0 15 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 11 11 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 11 18 0 21 0 26 9 15 15 + 17 26 11 26 11 22 21 21 21 21 + 21 21 21 21 21 21 11 11 0 26 + 0 21 0 23 24 21 23 19 21 22 + 24 16 17 24 18 28 23 21 23 21 + 24 20 18 22 21 23 20 22 21 0 + 0 0 0 0 0 16 14 12 16 12 + 9 16 15 8 8 14 8 25 18 14 + 15 16 14 12 8 16 15 21 16 16 + 13 0 0 0 0 0 15 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 11 11 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 16 0 0 0 + 0 22 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 21 18 21 20 18 19 20 17 + 22 8 0 21 18 24 22 22 22 22 + 21 18 16 18 22 20 18 0 20 0 + 0 0 0 0 0 21 19 18 18 16 + 20 19 20 11 0 18 16 21 18 17 + 22 17 18 18 20 20 23 23 16 0 + 15 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 12 12 12 16 12 12 12 16 16 + 12 9 -7 0 -7 16 12 12 12 12 + 12 12 12 12 12 12 5 5 9 3 + 9 12 12 12 12 12 12 12 12 12 + 12 12 12 12 12 12 12 12 12 12 + 12 12 12 12 12 12 12 12 12 16 + 16 16 3 -13 12 5 12 5 12 5 + 12 5 12 12 12 12 12 5 5 5 + 5 5 5 5 12 5 5 5 5 5 + 5 16 16 16 3 0 12 16 16 16 + 8 7 1 9 9 5 12 12 5 12 + 12 12 12 12 12 12 16 8 8 8 + 8 8 5 9 5 9 12 12 24 16 + 16 4 12 12 12 12 9 12 12 12 + 12 12 5 0 0 0 0 0 0 0 + 0 12 12 0 16 0 12 12 16 16 + 12 9 -6 1 -6 16 12 12 12 12 + 12 12 12 12 12 12 5 5 0 5 + 0 12 0 12 12 12 12 12 12 12 + 12 12 12 12 12 12 12 12 12 12 + 12 12 12 12 12 12 12 12 12 0 + 0 0 0 -13 0 5 12 5 12 5 + 12 5 12 12 12 12 12 5 5 5 + 5 5 5 5 12 5 5 5 5 5 + 5 0 0 0 0 0 12 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 12 12 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 12 12 0 16 0 12 12 16 16 + 12 9 -7 0 -7 16 12 12 12 12 + 12 12 12 12 12 12 5 5 0 3 + 0 12 0 12 12 12 12 12 12 12 + 12 12 12 12 12 12 12 12 12 12 + 12 12 12 12 12 12 12 12 12 0 + 0 0 0 0 0 0 12 0 12 0 + 12 0 12 6 6 12 12 0 0 0 + 6 0 0 1 12 0 0 0 0 0 + 0 0 0 0 0 0 12 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 12 12 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 5 0 0 0 + 0 5 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 12 12 12 12 12 12 12 12 + 12 12 0 12 12 12 12 12 12 12 + 12 12 12 12 12 12 12 0 12 0 + 0 0 0 0 0 5 12 5 12 5 + 12 5 5 5 0 5 12 5 5 5 + 5 12 5 5 5 5 12 5 12 0 + 12 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 10 22 3 1 10 22 17 1 10 19 + 16 1 5 7 14 7 1 1 7 1 + 13 1 19 1 4 22 4 1 5 22 + 5 1 1 22 13 22 13 22 16 21 + 16 21 17 20 17 20 18 18 18 18 + 18 16 18 16 17 14 17 14 16 13 + 16 13 13 12 13 22 15 21 15 21 + 16 20 16 20 17 18 17 18 17 16 + 17 16 16 14 16 14 15 13 15 13 + 13 12 5 12 13 12 13 12 16 11 + 16 11 17 10 17 10 18 8 18 8 + 18 5 18 5 17 3 17 3 16 2 + 16 2 13 1 13 1 1 1 13 12 + 15 11 15 11 16 10 16 10 17 8 + 17 8 17 5 17 5 16 3 16 3 + 15 2 15 2 13 1 15 19 16 16 + 16 16 16 22 16 22 15 19 15 19 + 13 21 13 21 10 22 10 22 8 22 + 8 22 5 21 5 21 3 19 3 19 + 2 17 2 17 1 14 1 14 1 9 + 1 9 2 6 2 6 3 4 3 4 + 5 2 5 2 8 1 8 1 10 1 + 10 1 13 2 13 2 15 4 15 4 + 16 6 8 22 6 21 6 21 4 19 + 4 19 3 17 3 17 2 14 2 14 + 2 9 2 9 3 6 3 6 4 4 + 4 4 6 2 6 2 8 1 4 22 + 4 1 5 22 5 1 1 22 11 22 + 11 22 14 21 14 21 16 19 16 19 + 17 17 17 17 18 14 18 14 18 9 + 18 9 17 6 17 6 16 4 16 4 + 14 2 14 2 11 1 11 1 1 1 + 11 22 13 21 13 21 15 19 15 19 + 16 17 16 17 17 14 17 14 17 9 + 17 9 16 6 16 6 15 4 15 4 + 13 2 13 2 11 1 4 22 4 1 + 5 22 5 1 11 16 11 8 1 22 + 17 22 17 22 17 16 17 16 16 22 + 5 12 11 12 1 1 17 1 17 1 + 17 7 17 7 16 1 4 22 4 1 + 5 22 5 1 11 16 11 8 1 22 + 17 22 17 22 17 16 17 16 16 22 + 5 12 11 12 1 1 8 1 15 19 + 16 16 16 16 16 22 16 22 15 19 + 15 19 13 21 13 21 10 22 10 22 + 8 22 8 22 5 21 5 21 3 19 + 3 19 2 17 2 17 1 14 1 14 + 1 9 1 9 2 6 2 6 3 4 + 3 4 5 2 5 2 8 1 8 1 + 10 1 10 1 13 2 13 2 15 4 + 8 22 6 21 6 21 4 19 4 19 + 3 17 3 17 2 14 2 14 2 9 + 2 9 3 6 3 6 4 4 4 4 + 6 2 6 2 8 1 15 9 15 1 + 16 9 16 1 12 9 19 9 4 22 + 4 1 5 22 5 1 17 22 17 1 + 18 22 18 1 1 22 8 22 14 22 + 21 22 5 12 17 12 1 1 8 1 + 14 1 21 1 4 22 4 1 5 22 + 5 1 1 22 8 22 1 1 8 1 + 9 22 9 5 9 5 8 2 8 2 + 6 1 6 1 4 1 4 1 2 2 + 2 2 1 4 1 4 1 6 1 6 + 2 7 2 7 3 6 3 6 2 5 + 8 22 8 5 8 5 7 2 7 2 + 6 1 5 22 12 22 4 22 4 1 + 5 22 5 1 18 22 5 9 10 13 + 18 1 9 13 17 1 1 22 8 22 + 14 22 20 22 1 1 8 1 14 1 + 20 1 4 22 4 1 5 22 5 1 + 1 22 8 22 1 1 16 1 16 1 + 16 7 16 7 15 1 4 22 4 1 + 5 22 11 4 4 22 11 1 18 22 + 11 1 18 22 18 1 19 22 19 1 + 1 22 5 22 18 22 22 22 1 1 + 7 1 15 1 22 1 4 22 4 1 + 5 22 17 3 5 20 17 1 17 22 + 17 1 1 22 5 22 14 22 20 22 + 1 1 7 1 8 22 5 21 5 21 + 3 19 3 19 2 17 2 17 1 13 + 1 13 1 10 1 10 2 6 2 6 + 3 4 3 4 5 2 5 2 8 1 + 8 1 10 1 10 1 13 2 13 2 + 15 4 15 4 16 6 16 6 17 10 + 17 10 17 13 17 13 16 17 16 17 + 15 19 15 19 13 21 13 21 10 22 + 10 22 8 22 8 22 6 21 6 21 + 4 19 4 19 3 17 3 17 2 13 + 2 13 2 10 2 10 3 6 3 6 + 4 4 4 4 6 2 6 2 8 1 + 10 1 12 2 12 2 14 4 14 4 + 15 6 15 6 16 10 16 10 16 13 + 16 13 15 17 15 17 14 19 14 19 + 12 21 12 21 10 22 4 22 4 1 + 5 22 5 1 1 22 13 22 13 22 + 16 21 16 21 17 20 17 20 18 18 + 18 18 18 15 18 15 17 13 17 13 + 16 12 16 12 13 11 13 11 5 11 + 13 22 15 21 15 21 16 20 16 20 + 17 18 17 18 17 15 17 15 16 13 + 16 13 15 12 15 12 13 11 1 1 + 8 1 8 27 5 26 5 26 3 24 + 3 24 2 22 2 22 1 18 1 18 + 1 15 1 15 2 11 2 11 3 9 + 3 9 5 7 5 7 8 6 8 6 + 10 6 10 6 13 7 13 7 15 9 + 15 9 16 11 16 11 17 15 17 15 + 17 18 17 18 16 22 16 22 15 24 + 15 24 13 26 13 26 10 27 10 27 + 8 27 8 27 6 26 6 26 4 24 + 4 24 3 22 3 22 2 18 2 18 + 2 15 2 15 3 11 3 11 4 9 + 4 9 6 7 6 7 8 6 10 6 + 12 7 12 7 14 9 14 9 15 11 + 15 11 16 15 16 15 16 18 16 18 + 15 22 15 22 14 24 14 24 12 26 + 12 26 10 27 5 8 5 9 5 9 + 6 11 6 11 8 12 8 12 9 12 + 9 12 11 11 11 11 12 9 12 9 + 13 2 13 2 14 1 14 1 16 1 + 16 1 17 3 17 3 17 4 12 9 + 13 5 13 5 14 3 14 3 15 2 + 15 2 16 2 16 2 17 3 4 22 + 4 1 5 22 5 1 1 22 13 22 + 13 22 16 21 16 21 17 20 17 20 + 18 18 18 18 18 16 18 16 17 14 + 17 14 16 13 16 13 13 12 13 12 + 5 12 13 22 15 21 15 21 16 20 + 16 20 17 18 17 18 17 16 17 16 + 16 14 16 14 15 13 15 13 13 12 + 1 1 8 1 10 12 12 11 12 11 + 13 10 13 10 16 3 16 3 17 2 + 17 2 18 2 18 2 19 3 12 11 + 13 9 13 9 15 2 15 2 16 1 + 16 1 18 1 18 1 19 3 19 3 + 19 4 14 19 15 22 15 22 15 16 + 15 16 14 19 14 19 12 21 12 21 + 9 22 9 22 6 22 6 22 3 21 + 3 21 1 19 1 19 1 17 1 17 + 2 15 2 15 3 14 3 14 5 13 + 5 13 11 11 11 11 13 10 13 10 + 15 8 1 17 3 15 3 15 5 14 + 5 14 11 12 11 12 13 11 13 11 + 14 10 14 10 15 8 15 8 15 4 + 15 4 13 2 13 2 10 1 10 1 + 7 1 7 1 4 2 4 2 2 4 + 2 4 1 7 1 7 1 1 1 1 + 2 4 8 22 8 1 9 22 9 1 + 2 22 1 16 1 16 1 22 1 22 + 16 22 16 22 16 16 16 16 15 22 + 5 1 12 1 4 22 4 7 4 7 + 5 4 5 4 7 2 7 2 10 1 + 10 1 12 1 12 1 15 2 15 2 + 17 4 17 4 18 7 18 7 18 22 + 5 22 5 7 5 7 6 4 6 4 + 8 2 8 2 10 1 1 22 8 22 + 15 22 21 22 3 22 10 1 4 22 + 10 4 17 22 10 1 1 22 7 22 + 13 22 19 22 4 22 8 1 5 22 + 8 6 12 22 8 1 12 22 16 1 + 13 22 16 6 20 22 16 1 1 22 + 8 22 17 22 23 22 3 22 16 1 + 4 22 17 1 17 22 3 1 1 22 + 7 22 13 22 19 22 1 1 7 1 + 13 1 19 1 3 22 10 11 10 11 + 10 1 4 22 11 11 11 11 11 1 + 18 22 11 11 1 22 7 22 14 22 + 20 22 7 1 14 1 14 22 1 1 + 15 22 2 1 2 22 1 16 1 16 + 1 22 1 22 15 22 1 1 15 1 + 15 1 15 7 15 7 14 1 3 13 + 3 12 3 12 2 12 2 12 2 13 + 2 13 3 14 3 14 5 15 5 15 + 9 15 9 15 11 14 11 14 12 13 + 12 13 13 11 13 11 13 4 13 4 + 14 2 14 2 15 1 12 13 12 4 + 12 4 13 2 13 2 15 1 15 1 + 16 1 12 11 11 10 11 10 5 9 + 5 9 2 8 2 8 1 6 1 6 + 1 4 1 4 2 2 2 2 5 1 + 5 1 8 1 8 1 10 2 10 2 + 12 4 5 9 3 8 3 8 2 6 + 2 6 2 4 2 4 3 2 3 2 + 5 1 4 22 4 1 5 22 5 1 + 5 12 7 14 7 14 9 15 9 15 + 11 15 11 15 14 14 14 14 16 12 + 16 12 17 9 17 9 17 7 17 7 + 16 4 16 4 14 2 14 2 11 1 + 11 1 9 1 9 1 7 2 7 2 + 5 4 11 15 13 14 13 14 15 12 + 15 12 16 9 16 9 16 7 16 7 + 15 4 15 4 13 2 13 2 11 1 + 1 22 5 22 13 12 12 11 12 11 + 13 10 13 10 14 11 14 11 14 12 + 14 12 12 14 12 14 10 15 10 15 + 7 15 7 15 4 14 4 14 2 12 + 2 12 1 9 1 9 1 7 1 7 + 2 4 2 4 4 2 4 2 7 1 + 7 1 9 1 9 1 12 2 12 2 + 14 4 7 15 5 14 5 14 3 12 + 3 12 2 9 2 9 2 7 2 7 + 3 4 3 4 5 2 5 2 7 1 + 13 22 13 1 14 22 14 1 13 12 + 11 14 11 14 9 15 9 15 7 15 + 7 15 4 14 4 14 2 12 2 12 + 1 9 1 9 1 7 1 7 2 4 + 2 4 4 2 4 2 7 1 7 1 + 9 1 9 1 11 2 11 2 13 4 + 7 15 5 14 5 14 3 12 3 12 + 2 9 2 9 2 7 2 7 3 4 + 3 4 5 2 5 2 7 1 10 22 + 14 22 13 1 17 1 2 9 14 9 + 14 9 14 11 14 11 13 13 13 13 + 12 14 12 14 10 15 10 15 7 15 + 7 15 4 14 4 14 2 12 2 12 + 1 9 1 9 1 7 1 7 2 4 + 2 4 4 2 4 2 7 1 7 1 + 9 1 9 1 12 2 12 2 14 4 + 13 9 13 12 13 12 12 14 7 15 + 5 14 5 14 3 12 3 12 2 9 + 2 9 2 7 2 7 3 4 3 4 + 5 2 5 2 7 1 9 21 8 20 + 8 20 9 19 9 19 10 20 10 20 + 10 21 10 21 9 22 9 22 7 22 + 7 22 5 21 5 21 4 19 4 19 + 4 1 7 22 6 21 6 21 5 19 + 5 19 5 1 1 15 9 15 1 1 + 8 1 7 22 5 21 5 21 4 20 + 4 20 3 18 3 18 3 16 3 16 + 4 14 4 14 5 13 5 13 7 12 + 7 12 9 12 9 12 11 13 11 13 + 12 14 12 14 13 16 13 16 13 18 + 13 18 12 20 12 20 11 21 11 21 + 9 22 9 22 7 22 5 21 4 19 + 4 19 4 15 4 15 5 13 11 13 + 12 15 12 15 12 19 12 19 11 21 + 12 20 13 21 13 21 15 22 15 22 + 15 21 15 21 13 21 4 14 3 13 + 3 13 2 11 2 11 2 10 2 10 + 3 8 3 8 6 7 6 7 11 7 + 11 7 14 6 14 6 15 5 2 10 + 3 9 3 9 6 8 6 8 11 8 + 11 8 14 7 14 7 15 5 15 5 + 15 4 15 4 14 2 14 2 11 1 + 11 1 5 1 5 1 2 2 2 2 + 1 4 1 4 1 5 1 5 2 7 + 2 7 5 8 4 22 4 1 5 22 + 5 1 5 12 7 14 7 14 10 15 + 10 15 12 15 12 15 15 14 15 14 + 16 12 16 12 16 1 12 15 14 14 + 14 14 15 12 15 12 15 1 1 22 + 5 22 1 1 8 1 12 1 19 1 + 4 22 3 21 3 21 4 20 4 20 + 5 21 5 21 4 22 4 15 4 1 + 5 15 5 1 1 15 5 15 1 1 + 8 1 6 29 5 28 5 28 6 27 + 6 27 7 28 7 28 6 29 7 22 + 7 4 7 4 6 2 6 2 4 1 + 4 1 2 1 2 1 1 2 1 2 + 1 3 1 3 2 4 2 4 3 3 + 3 3 2 2 6 22 6 4 6 4 + 5 2 5 2 4 1 3 22 7 22 + 4 22 4 1 5 22 5 1 15 15 + 5 5 10 9 16 1 9 9 15 1 + 1 22 5 22 12 15 18 15 1 1 + 8 1 12 1 18 1 4 22 4 1 + 5 22 5 1 1 22 5 22 1 1 + 8 1 4 15 4 1 5 15 5 1 + 5 12 7 14 7 14 10 15 10 15 + 12 15 12 15 15 14 15 14 16 12 + 16 12 16 1 12 15 14 14 14 14 + 15 12 15 12 15 1 16 12 18 14 + 18 14 21 15 21 15 23 15 23 15 + 26 14 26 14 27 12 27 12 27 1 + 23 15 25 14 25 14 26 12 26 12 + 26 1 1 15 5 15 1 1 8 1 + 12 1 19 1 23 1 30 1 4 15 + 4 1 5 15 5 1 5 12 7 14 + 7 14 10 15 10 15 12 15 12 15 + 15 14 15 14 16 12 16 12 16 1 + 12 15 14 14 14 14 15 12 15 12 + 15 1 1 15 5 15 1 1 8 1 + 12 1 19 1 7 15 4 14 4 14 + 2 12 2 12 1 9 1 9 1 7 + 1 7 2 4 2 4 4 2 4 2 + 7 1 7 1 9 1 9 1 12 2 + 12 2 14 4 14 4 15 7 15 7 + 15 9 15 9 14 12 14 12 12 14 + 12 14 9 15 9 15 7 15 7 15 + 5 14 5 14 3 12 3 12 2 9 + 2 9 2 7 2 7 3 4 3 4 + 5 2 5 2 7 1 9 1 11 2 + 11 2 13 4 13 4 14 7 14 7 + 14 9 14 9 13 12 13 12 11 14 + 11 14 9 15 4 22 4 1 5 22 + 5 1 5 19 7 21 7 21 9 22 + 9 22 11 22 11 22 14 21 14 21 + 16 19 16 19 17 16 17 16 17 14 + 17 14 16 11 16 11 14 9 14 9 + 11 8 11 8 9 8 9 8 7 9 + 7 9 5 11 11 22 13 21 13 21 + 15 19 15 19 16 16 16 16 16 14 + 16 14 15 11 15 11 13 9 13 9 + 11 8 1 22 5 22 1 1 8 1 + 13 22 13 1 14 22 14 1 13 19 + 11 21 11 21 9 22 9 22 7 22 + 7 22 4 21 4 21 2 19 2 19 + 1 16 1 16 1 14 1 14 2 11 + 2 11 4 9 4 9 7 8 7 8 + 9 8 9 8 11 9 11 9 13 11 + 7 22 5 21 5 21 3 19 3 19 + 2 16 2 16 2 14 2 14 3 11 + 3 11 5 9 5 9 7 8 10 1 + 17 1 4 15 4 1 5 15 5 1 + 5 9 6 12 6 12 8 14 8 14 + 10 15 10 15 13 15 13 15 14 14 + 14 14 14 13 14 13 13 12 13 12 + 12 13 12 13 13 14 1 15 5 15 + 1 1 8 1 11 13 12 15 12 15 + 12 11 12 11 11 13 11 13 10 14 + 10 14 8 15 8 15 4 15 4 15 + 2 14 2 14 1 13 1 13 1 11 + 1 11 2 10 2 10 4 9 4 9 + 9 7 9 7 11 6 11 6 12 5 + 1 12 2 11 2 11 4 10 4 10 + 9 8 9 8 11 7 11 7 12 6 + 12 6 12 3 12 3 11 2 11 2 + 9 1 9 1 5 1 5 1 3 2 + 3 2 2 3 2 3 1 5 1 5 + 1 1 1 1 2 3 4 22 4 5 + 4 5 5 2 5 2 7 1 7 1 + 9 1 9 1 11 2 11 2 12 4 + 5 22 5 5 5 5 6 2 6 2 + 7 1 1 15 9 15 4 15 4 4 + 4 4 5 2 5 2 8 1 8 1 + 10 1 10 1 13 2 13 2 15 4 + 5 15 5 4 5 4 6 2 6 2 + 8 1 15 15 15 1 16 15 16 1 + 1 15 5 15 12 15 16 15 15 1 + 19 1 3 15 9 1 4 15 9 3 + 15 15 9 1 1 15 7 15 11 15 + 17 15 4 15 8 1 5 15 8 4 + 12 15 8 1 12 15 16 1 13 15 + 16 4 20 15 16 1 1 15 8 15 + 17 15 23 15 3 15 14 1 4 15 + 15 1 15 15 3 1 1 15 7 15 + 11 15 17 15 1 1 7 1 11 1 + 17 1 3 22 9 8 4 22 9 10 + 15 22 9 8 9 8 7 4 7 4 + 5 2 5 2 3 1 3 1 2 1 + 2 1 1 2 1 2 2 3 2 3 + 3 2 1 22 7 22 11 22 17 22 + 12 15 1 1 13 15 2 1 2 15 + 1 11 1 11 1 15 1 15 13 15 + 1 1 13 1 13 1 13 5 13 5 + 12 1 7 22 4 21 4 21 2 18 + 2 18 1 13 1 13 1 10 1 10 + 2 5 2 5 4 2 4 2 7 1 + 7 1 9 1 9 1 12 2 12 2 + 14 5 14 5 15 10 15 10 15 13 + 15 13 14 18 14 18 12 21 12 21 + 9 22 9 22 7 22 7 22 5 21 + 5 21 4 20 4 20 3 18 3 18 + 2 13 2 13 2 10 2 10 3 5 + 3 5 4 3 4 3 5 2 5 2 + 7 1 9 1 11 2 11 2 12 3 + 12 3 13 5 13 5 14 10 14 10 + 14 13 14 13 13 18 13 18 12 20 + 12 20 11 21 11 21 9 22 1 18 + 3 19 3 19 6 22 6 22 6 1 + 5 21 5 1 1 1 10 1 2 18 + 3 17 3 17 2 16 2 16 1 17 + 1 17 1 18 1 18 2 20 2 20 + 3 21 3 21 6 22 6 22 10 22 + 10 22 13 21 13 21 14 20 14 20 + 15 18 15 18 15 16 15 16 14 14 + 14 14 11 12 11 12 6 10 6 10 + 4 9 4 9 2 7 2 7 1 4 + 1 4 1 1 10 22 12 21 12 21 + 13 20 13 20 14 18 14 18 14 16 + 14 16 13 14 13 14 10 12 10 12 + 6 10 1 3 2 4 2 4 4 4 + 4 4 9 2 9 2 12 2 12 2 + 14 3 14 3 15 4 4 4 9 1 + 9 1 13 1 13 1 14 2 14 2 + 15 4 15 4 15 6 2 18 3 17 + 3 17 2 16 2 16 1 17 1 17 + 1 18 1 18 2 20 2 20 3 21 + 3 21 6 22 6 22 10 22 10 22 + 13 21 13 21 14 19 14 19 14 16 + 14 16 13 14 13 14 10 13 10 13 + 7 13 10 22 12 21 12 21 13 19 + 13 19 13 16 13 16 12 14 12 14 + 10 13 10 13 12 12 12 12 14 10 + 14 10 15 8 15 8 15 5 15 5 + 14 3 14 3 13 2 13 2 10 1 + 10 1 6 1 6 1 3 2 3 2 + 2 3 2 3 1 5 1 5 1 6 + 1 6 2 7 2 7 3 6 3 6 + 2 5 13 11 14 8 14 8 14 5 + 14 5 13 3 13 3 12 2 12 2 + 10 1 11 20 11 1 12 22 12 1 + 12 22 1 7 1 7 17 7 8 1 + 15 1 3 22 1 12 1 12 3 14 + 3 14 6 15 6 15 9 15 9 15 + 12 14 12 14 14 12 14 12 15 9 + 15 9 15 7 15 7 14 4 14 4 + 12 2 12 2 9 1 9 1 6 1 + 6 1 3 2 3 2 2 3 2 3 + 1 5 1 5 1 6 1 6 2 7 + 2 7 3 6 3 6 2 5 9 15 + 11 14 11 14 13 12 13 12 14 9 + 14 9 14 7 14 7 13 4 13 4 + 11 2 11 2 9 1 3 22 13 22 + 3 21 8 21 8 21 13 22 13 19 + 12 18 12 18 13 17 13 17 14 18 + 14 18 14 19 14 19 13 21 13 21 + 11 22 11 22 8 22 8 22 5 21 + 5 21 3 19 3 19 2 17 2 17 + 1 13 1 13 1 7 1 7 2 4 + 2 4 4 2 4 2 7 1 7 1 + 9 1 9 1 12 2 12 2 14 4 + 14 4 15 7 15 7 15 8 15 8 + 14 11 14 11 12 13 12 13 9 14 + 9 14 8 14 8 14 5 13 5 13 + 3 11 3 11 2 8 8 22 6 21 + 6 21 4 19 4 19 3 17 3 17 + 2 13 2 13 2 7 2 7 3 4 + 3 4 5 2 5 2 7 1 9 1 + 11 2 11 2 13 4 13 4 14 7 + 14 7 14 8 14 8 13 11 13 11 + 11 13 11 13 9 14 1 22 1 16 + 1 18 2 20 2 20 4 22 4 22 + 6 22 6 22 11 19 11 19 13 19 + 13 19 14 20 14 20 15 22 2 20 + 4 21 4 21 6 21 6 21 11 19 + 15 22 15 19 15 19 14 16 14 16 + 10 11 10 11 9 9 9 9 8 6 + 8 6 8 1 14 16 9 11 9 11 + 8 9 8 9 7 6 7 6 7 1 + 6 22 3 21 3 21 2 19 2 19 + 2 16 2 16 3 14 3 14 6 13 + 6 13 10 13 10 13 13 14 13 14 + 14 16 14 16 14 19 14 19 13 21 + 13 21 10 22 10 22 6 22 6 22 + 4 21 4 21 3 19 3 19 3 16 + 3 16 4 14 4 14 6 13 10 13 + 12 14 12 14 13 16 13 16 13 19 + 13 19 12 21 12 21 10 22 6 13 + 3 12 3 12 2 11 2 11 1 9 + 1 9 1 5 1 5 2 3 2 3 + 3 2 3 2 6 1 6 1 10 1 + 10 1 13 2 13 2 14 3 14 3 + 15 5 15 5 15 9 15 9 14 11 + 14 11 13 12 13 12 10 13 6 13 + 4 12 4 12 3 11 3 11 2 9 + 2 9 2 5 2 5 3 3 3 3 + 4 2 4 2 6 1 10 1 12 2 + 12 2 13 3 13 3 14 5 14 5 + 14 9 14 9 13 11 13 11 12 12 + 12 12 10 13 14 15 13 12 13 12 + 11 10 11 10 8 9 8 9 7 9 + 7 9 4 10 4 10 2 12 2 12 + 1 15 1 15 1 16 1 16 2 19 + 2 19 4 21 4 21 7 22 7 22 + 9 22 9 22 12 21 12 21 14 19 + 14 19 15 16 15 16 15 10 15 10 + 14 6 14 6 13 4 13 4 11 2 + 11 2 8 1 8 1 5 1 5 1 + 3 2 3 2 2 4 2 4 2 5 + 2 5 3 6 3 6 4 5 4 5 + 3 4 7 9 5 10 5 10 3 12 + 3 12 2 15 2 15 2 16 2 16 + 3 19 3 19 5 21 5 21 7 22 + 9 22 11 21 11 21 13 19 13 19 + 14 16 14 16 14 10 14 10 13 6 + 13 6 12 4 12 4 10 2 10 2 + 8 1 2 3 1 2 1 2 2 1 + 2 1 3 2 3 2 2 3 2 5 + 1 6 1 6 2 7 2 7 3 6 + 3 6 3 4 3 4 2 2 2 2 + 1 1 2 15 1 14 1 14 2 13 + 2 13 3 14 3 14 2 15 2 3 + 1 2 1 2 2 1 2 1 3 2 + 3 2 2 3 2 19 1 18 1 18 + 2 17 2 17 3 18 3 18 2 19 + 2 5 1 6 1 6 2 7 2 7 + 3 6 3 6 3 4 3 4 2 2 + 2 2 1 1 2 22 1 20 1 20 + 2 8 2 8 3 20 3 20 2 22 + 2 20 2 14 2 3 1 2 1 2 + 2 1 2 1 3 2 3 2 2 3 + 2 18 3 17 3 17 2 16 2 16 + 1 17 1 17 1 18 1 18 2 20 + 2 20 3 21 3 21 5 22 5 22 + 8 22 8 22 11 21 11 21 12 20 + 12 20 13 18 13 18 13 16 13 16 + 12 14 12 14 11 13 11 13 7 11 + 7 11 7 8 8 22 10 21 10 21 + 11 20 11 20 12 18 12 18 12 16 + 12 16 11 14 11 14 9 12 7 3 + 6 2 6 2 7 1 7 1 8 2 + 8 2 7 3 2 8 1 1 3 8 + 1 1 2 8 1 1 3 8 1 1 + 10 8 9 1 11 8 9 1 4 9 + 2 8 2 8 1 6 1 6 1 4 + 1 4 2 2 2 2 4 1 4 1 + 6 1 6 1 8 2 8 2 9 4 + 9 4 9 6 9 6 8 8 8 8 + 6 9 6 9 4 9 6 13 6 1 + 1 10 11 4 11 10 1 4 19 33 + 1 1 8 33 6 31 6 31 4 28 + 4 28 2 24 2 24 1 19 1 19 + 1 15 1 15 2 10 2 10 4 6 + 4 6 6 3 6 3 8 1 6 31 + 4 27 4 27 3 24 3 24 2 19 + 2 19 2 15 2 15 3 10 3 10 + 4 7 4 7 6 3 1 33 3 31 + 3 31 5 28 5 28 7 24 7 24 + 8 19 8 19 8 15 8 15 7 10 + 7 10 5 6 5 6 3 3 3 3 + 1 1 3 31 5 27 5 27 6 24 + 6 24 7 19 7 19 7 15 7 15 + 6 10 6 10 5 7 5 7 3 3 + 1 33 1 1 2 33 2 1 1 33 + 8 33 1 1 8 1 7 33 7 1 + 8 33 8 1 1 33 8 33 1 1 + 8 1 5 33 2 30 2 30 1 27 + 1 27 1 25 1 25 2 22 2 22 + 5 19 3 31 2 28 2 28 2 24 + 2 24 3 21 5 19 2 17 2 17 + 5 15 5 15 2 12 2 12 1 9 + 1 9 1 7 1 7 2 4 2 4 + 5 1 3 13 2 10 2 10 2 6 + 2 6 3 3 1 33 4 30 4 30 + 5 27 5 27 5 25 5 25 4 22 + 4 22 1 19 3 31 4 28 4 28 + 4 24 4 24 3 21 1 19 4 17 + 4 17 1 15 1 15 4 12 4 12 + 5 9 5 9 5 7 5 7 4 4 + 4 4 1 1 3 13 4 10 4 10 + 4 6 4 6 3 3 8 33 1 17 + 1 17 8 1 1 33 8 17 8 17 + 1 1 1 33 1 1 1 33 1 1 + 7 33 7 1 1 1 19 1 10 19 + 10 1 1 10 19 10 9 18 9 1 + 1 10 17 10 1 1 17 1 9 18 + 9 1 1 18 17 18 1 10 17 10 + 1 15 15 1 15 15 1 1 2 3 + 1 2 1 2 2 1 2 1 3 2 + 3 2 2 3 10 19 9 18 9 18 + 10 17 10 17 11 18 11 18 10 19 + 1 10 19 10 10 3 9 2 9 2 + 10 1 10 1 11 2 11 2 10 3 + 1 7 19 7 1 1 19 1 17 19 + 3 1 1 13 19 13 1 7 19 7 + 1 11 19 11 1 6 19 6 1 1 + 19 1 17 19 1 10 1 10 17 1 + 1 19 17 10 17 10 1 1 17 22 + 1 15 1 15 17 8 1 6 17 6 + 1 1 17 1 1 22 17 15 17 15 + 1 8 1 6 17 6 1 1 17 1 + 18 1 16 1 16 1 14 2 14 2 + 12 4 12 4 9 8 9 8 8 9 + 8 9 6 10 6 10 4 10 4 10 + 2 9 2 9 1 7 1 7 1 5 + 1 5 2 3 2 3 4 2 4 2 + 6 2 6 2 8 3 8 3 9 4 + 9 4 12 8 12 8 14 10 14 10 + 16 11 16 11 18 11 1 1 1 3 + 1 3 2 6 2 6 4 7 4 7 + 6 7 6 7 8 6 8 6 12 3 + 12 3 14 2 14 2 16 2 16 2 + 18 3 18 3 19 5 1 3 2 5 + 2 5 4 6 4 6 6 6 6 6 + 8 5 8 5 12 2 12 2 14 1 + 14 1 16 1 16 1 18 2 18 2 + 19 5 19 5 19 7 1 1 9 6 + 9 6 17 1 1 1 9 5 9 5 + 17 1 6 7 1 1 6 7 7 6 + 7 6 1 1 2 7 7 1 2 7 + 1 6 1 6 7 1 1 7 2 5 + 2 5 4 3 4 3 7 2 7 2 + 9 2 9 2 12 3 12 3 14 5 + 14 5 15 7 1 7 2 4 2 4 + 4 2 4 2 7 1 7 1 9 1 + 9 1 12 2 12 2 14 4 14 4 + 15 7 2 5 1 6 1 6 2 7 + 2 7 3 6 3 6 3 4 3 4 + 2 2 2 2 1 1 3 7 2 6 + 2 6 1 4 1 4 1 2 1 2 + 2 1 2 1 3 2 3 2 2 3 + 2 5 3 6 3 6 2 7 2 7 + 1 6 1 6 1 4 1 4 2 2 + 2 2 3 1 1 7 2 6 2 6 + 3 4 3 4 3 2 3 2 2 1 + 2 1 1 2 1 2 2 3 1 15 + 5 15 5 15 11 3 4 15 11 1 + 20 26 11 1 17 17 10 17 10 17 + 6 16 6 16 4 15 4 15 2 13 + 2 13 1 10 1 10 1 8 1 8 + 2 5 2 5 4 3 4 3 6 2 + 6 2 10 1 10 1 17 1 1 17 + 1 10 1 10 2 6 2 6 3 4 + 3 4 5 2 5 2 8 1 8 1 + 10 1 10 1 13 2 13 2 15 4 + 15 4 16 6 16 6 17 10 17 10 + 17 17 1 17 8 17 8 17 12 16 + 12 16 14 15 14 15 16 13 16 13 + 17 10 17 10 17 8 17 8 16 5 + 16 5 14 3 14 3 12 2 12 2 + 8 1 8 1 1 1 1 1 1 8 + 1 8 2 12 2 12 3 14 3 14 + 5 16 5 16 8 17 8 17 10 17 + 10 17 13 16 13 16 15 14 15 14 + 16 12 16 12 17 8 17 8 17 1 + 17 17 10 17 10 17 6 16 6 16 + 4 15 4 15 2 13 2 13 1 10 + 1 10 1 8 1 8 2 5 2 5 + 4 3 4 3 6 2 6 2 10 1 + 10 1 17 1 1 9 13 9 16 8 + 19 6 19 6 16 4 13 11 18 6 + 18 6 13 1 1 6 18 6 4 16 + 6 19 6 19 8 16 1 13 6 18 + 6 18 11 13 6 18 6 1 4 8 + 1 6 1 6 4 4 7 11 2 6 + 2 6 7 1 2 6 19 6 4 4 + 6 1 6 1 8 4 1 7 6 2 + 6 2 11 7 6 19 6 2 13 10 + 12 13 12 13 11 14 11 14 9 15 + 9 15 7 15 7 15 4 14 4 14 + 2 11 2 11 1 8 1 8 1 5 + 1 5 2 3 2 3 3 2 3 2 + 5 1 5 1 7 1 7 1 10 2 + 10 2 12 4 12 4 13 7 13 7 + 14 12 14 12 14 17 14 17 13 20 + 13 20 12 21 12 21 10 22 10 22 + 7 22 7 22 5 21 5 21 4 20 + 4 20 4 19 4 19 5 19 5 19 + 5 20 7 15 5 14 5 14 3 11 + 3 11 2 8 2 8 2 4 2 4 + 3 2 7 1 9 2 9 2 11 4 + 11 4 12 7 12 7 13 12 13 12 + 13 17 13 17 12 20 12 20 10 22 + 1 22 9 1 2 22 9 3 17 22 + 9 1 1 22 17 22 2 21 16 21 + 1 15 6 15 6 15 15 3 5 14 + 15 1 31 34 15 1 20 32 19 31 + 19 31 20 30 20 30 21 31 21 31 + 21 32 21 32 20 33 20 33 18 33 + 18 33 16 32 16 32 14 30 14 30 + 13 28 13 28 12 25 12 25 11 21 + 11 21 9 9 9 9 8 5 8 5 + 7 3 15 31 14 29 14 29 13 25 + 13 25 11 13 11 13 10 9 10 9 + 9 6 9 6 8 4 8 4 6 2 + 6 2 4 1 4 1 2 1 2 1 + 1 2 1 2 1 3 1 3 2 4 + 2 4 3 3 3 3 2 2 20 32 + 19 31 19 31 20 30 20 30 21 31 + 21 31 21 32 21 32 20 33 20 33 + 18 33 18 33 16 32 16 32 14 30 + 14 30 13 28 13 28 12 25 12 25 + 11 21 11 21 9 9 9 9 8 5 + 8 5 7 3 15 31 14 29 14 29 + 13 25 13 25 11 13 11 13 10 9 + 10 9 9 6 9 6 8 4 8 4 + 6 2 6 2 4 1 4 1 2 1 + 2 1 1 2 1 2 1 3 1 3 + 2 4 2 4 3 3 3 3 2 2 + 10 24 7 23 7 23 5 21 5 21 + 4 18 4 18 4 16 4 16 5 13 + 5 13 7 11 7 11 10 10 10 10 + 12 10 12 10 15 11 15 11 17 13 + 17 13 18 16 18 16 18 18 18 18 + 17 21 17 21 15 23 15 23 12 24 + 12 24 10 24 20 4 19 2 19 2 + 17 1 17 1 15 1 15 1 13 2 + 13 2 12 3 12 3 9 7 9 7 + 8 8 8 8 6 9 6 9 4 9 + 4 9 2 8 2 8 1 6 1 6 + 1 4 1 4 2 2 2 2 4 1 + 4 1 6 1 6 1 8 2 8 2 + 9 3 9 3 12 7 12 7 13 8 + 13 8 15 9 15 9 17 9 17 9 + 19 8 19 8 20 6 20 6 20 4 + 19 22 1 1 6 22 8 20 8 20 + 8 18 8 18 7 16 7 16 5 15 + 5 15 3 15 3 15 1 17 1 17 + 1 19 1 19 2 21 2 21 4 22 + 4 22 6 22 6 22 8 21 8 21 + 11 20 11 20 14 20 14 20 17 21 + 17 21 19 22 15 8 13 7 13 7 + 12 5 12 5 12 3 12 3 14 1 + 14 1 16 1 16 1 18 2 18 2 + 19 4 19 4 19 6 19 6 17 8 + 17 8 15 8 19 14 18 13 18 13 + 19 12 19 12 20 13 20 13 20 14 + 20 14 19 15 19 15 18 15 18 15 + 17 14 17 14 16 12 16 12 14 7 + 14 7 12 4 12 4 10 2 10 2 + 8 1 8 1 5 1 5 1 2 2 + 2 2 1 4 1 4 1 7 1 7 + 2 9 2 9 8 13 8 13 10 15 + 10 15 11 17 11 17 11 19 11 19 + 10 21 10 21 8 22 8 22 6 21 + 6 21 5 19 5 19 5 17 5 17 + 6 14 6 14 8 11 8 11 13 4 + 13 4 15 2 15 2 18 1 18 1 + 19 1 19 1 20 2 20 2 20 3 + 5 1 3 2 3 2 2 4 2 4 + 2 7 2 7 3 9 3 9 5 11 + 5 17 6 15 6 15 14 4 14 4 + 16 2 16 2 18 1 16 14 15 16 + 15 16 13 17 13 17 10 17 10 17 + 8 16 8 16 7 15 7 15 6 12 + 6 12 6 9 6 9 7 7 7 7 + 9 6 9 6 12 6 12 6 14 7 + 14 7 15 9 10 17 8 15 8 15 + 7 12 7 12 7 9 7 9 8 7 + 8 7 9 6 16 17 15 9 15 9 + 15 7 15 7 17 6 17 6 19 6 + 19 6 21 8 21 8 22 11 22 11 + 22 13 22 13 21 16 21 16 20 18 + 20 18 18 20 18 20 16 21 16 21 + 13 22 13 22 10 22 10 22 7 21 + 7 21 5 20 5 20 3 18 3 18 + 2 16 2 16 1 13 1 13 1 10 + 1 10 2 7 2 7 3 5 3 5 + 5 3 5 3 7 2 7 2 10 1 + 10 1 13 1 13 1 16 2 16 2 + 18 3 18 3 19 4 17 17 16 9 + 16 9 16 7 16 7 17 6 6 30 + 6 1 10 30 10 1 14 23 13 22 + 13 22 14 21 14 21 15 22 15 22 + 15 23 15 23 13 25 13 25 10 26 + 10 26 6 26 6 26 3 25 3 25 + 1 23 1 23 1 21 1 21 2 19 + 2 19 3 18 3 18 5 17 5 17 + 11 15 11 15 13 14 13 14 15 12 + 1 21 3 19 3 19 5 18 5 18 + 11 16 11 16 13 15 13 15 14 14 + 14 14 15 12 15 12 15 8 15 8 + 13 6 13 6 10 5 10 5 6 5 + 6 5 3 6 3 6 1 8 1 8 + 1 9 1 9 2 10 2 10 3 9 + 3 9 2 8 9 29 2 1 15 29 + 8 1 2 18 16 18 1 12 15 12 + 9 26 8 25 8 25 9 24 9 24 + 10 25 10 25 10 26 10 26 9 28 + 9 28 7 29 7 29 5 29 5 29 + 3 28 3 28 2 26 2 26 2 24 + 2 24 3 22 3 22 5 20 5 20 + 10 17 3 22 8 19 8 19 10 17 + 10 17 11 15 11 15 11 13 11 13 + 10 11 10 11 8 9 4 21 2 19 + 2 19 1 17 1 17 1 15 1 15 + 2 13 2 13 4 11 4 11 9 8 + 2 13 7 10 7 10 9 8 9 8 + 10 6 10 6 10 4 10 4 9 2 + 9 2 7 1 7 1 5 1 5 1 + 3 2 3 2 2 4 2 4 2 5 + 2 5 3 6 3 6 4 5 4 5 + 3 4 7 29 6 27 6 27 7 25 + 7 25 8 27 8 27 7 29 7 29 + 7 1 7 18 6 15 6 15 7 1 + 7 1 8 15 8 15 7 18 1 22 + 3 21 3 21 5 22 5 22 3 23 + 3 23 1 22 1 22 13 22 9 22 + 11 21 11 21 13 22 13 22 11 23 + 11 23 9 22 7 29 6 27 6 27 + 7 25 7 25 8 27 8 27 7 29 + 7 29 7 15 7 19 6 17 6 17 + 8 13 8 13 7 11 7 11 6 13 + 6 13 8 17 8 17 7 19 7 15 + 7 1 7 5 6 3 6 3 7 1 + 7 1 8 3 8 3 7 5 1 22 + 3 21 3 21 5 22 5 22 3 23 + 3 23 1 22 1 22 13 22 9 22 + 11 21 11 21 13 22 13 22 11 23 + 11 23 9 22 1 8 3 7 3 7 + 5 8 5 8 3 9 3 9 1 8 + 1 8 13 8 9 8 11 7 11 7 + 13 8 13 8 11 9 11 9 9 8 + 14 22 14 1 1 22 14 22 6 12 + 14 12 1 1 14 1 1 19 2 17 + 2 17 14 5 14 5 15 3 15 3 + 15 1 2 16 14 4 1 19 1 17 + 1 17 2 15 2 15 14 3 14 3 + 15 1 6 12 2 8 2 8 1 6 + 1 6 1 4 1 4 2 2 2 2 + 1 1 1 6 3 2 2 8 2 6 + 2 6 3 4 3 4 3 2 3 2 + 1 1 9 9 14 14 12 19 12 16 + 12 16 13 14 13 14 15 14 15 14 + 15 16 15 16 13 17 13 17 12 19 + 12 19 13 16 13 16 15 14 14 21 + 13 20 13 20 14 19 14 19 15 20 + 15 20 15 21 15 21 13 22 13 22 + 10 22 10 22 7 21 7 21 5 19 + 5 19 4 16 4 16 4 1 10 22 + 8 21 8 21 6 19 6 19 5 16 + 5 16 5 1 20 21 19 20 19 20 + 20 19 20 19 21 20 21 20 21 21 + 21 21 20 22 20 22 18 22 18 22 + 16 21 16 21 15 19 15 19 15 1 + 18 22 17 21 17 21 16 19 16 19 + 16 1 1 15 19 15 1 1 8 1 + 12 1 19 1 15 21 14 20 14 20 + 15 19 15 19 16 20 16 20 15 21 + 15 21 13 22 13 22 10 22 10 22 + 7 21 7 21 5 19 5 19 4 16 + 4 16 4 1 10 22 8 21 8 21 + 6 19 6 19 5 16 5 16 5 1 + 15 15 15 1 16 15 16 1 1 15 + 16 15 1 1 8 1 12 1 19 1 + 14 21 13 20 13 20 14 19 14 19 + 15 20 15 20 15 21 15 21 13 22 + 16 22 10 22 10 22 7 21 7 21 + 5 19 5 19 4 16 4 16 4 1 + 10 22 8 21 8 21 6 19 6 19 + 5 16 5 16 5 1 15 20 15 1 + 16 22 16 1 1 15 15 15 1 1 + 8 1 12 1 19 1 15 21 14 20 + 14 20 15 19 15 19 16 20 16 20 + 15 21 15 21 13 22 13 22 10 22 + 10 22 7 21 7 21 5 19 5 19 + 4 16 4 16 4 1 10 22 8 21 + 8 21 6 19 6 19 5 16 5 16 + 5 1 26 21 25 20 25 20 26 19 + 26 19 27 20 27 20 26 21 26 21 + 24 22 24 22 21 22 21 22 18 21 + 18 21 16 19 16 19 15 16 15 16 + 15 1 21 22 19 21 19 21 17 19 + 17 19 16 16 16 16 16 1 26 15 + 26 1 27 15 27 1 1 15 27 15 + 1 1 8 1 12 1 19 1 23 1 + 30 1 15 21 14 20 14 20 15 19 + 15 19 16 20 16 20 15 21 15 21 + 13 22 13 22 10 22 10 22 7 21 + 7 21 5 19 5 19 4 16 4 16 + 4 1 10 22 8 21 8 21 6 19 + 6 19 5 16 5 16 5 1 25 21 + 24 20 24 20 25 19 25 19 26 20 + 26 20 26 21 26 21 24 22 27 22 + 21 22 21 22 18 21 18 21 16 19 + 16 19 15 16 15 16 15 1 21 22 + 19 21 19 21 17 19 17 19 16 16 + 16 16 16 1 26 20 26 1 27 22 + 27 1 1 15 26 15 1 1 8 1 + 12 1 19 1 23 1 30 1 4 15 + 4 1 5 15 5 1 1 15 5 15 + 1 1 8 1 1 33 19 1 1 1 + 22 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0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 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 16 22 4 2 14 18 15 1 15 20 + 16 2 16 22 16 20 16 20 17 3 + 17 3 17 1 7 7 15 7 1 1 + 7 1 12 1 19 1 4 2 2 1 + 4 2 6 1 15 2 13 1 15 3 + 14 1 17 3 18 1 10 22 4 1 + 11 22 5 1 12 22 6 1 7 22 + 18 22 18 22 21 21 21 21 22 19 + 22 19 22 17 22 17 21 14 21 14 + 20 13 20 13 17 12 20 21 21 19 + 21 19 21 17 21 17 20 14 20 14 + 19 13 18 22 19 21 19 21 20 19 + 20 19 20 17 20 17 19 14 19 14 + 17 12 9 12 17 12 17 12 19 11 + 19 11 20 9 20 9 20 7 20 7 + 19 4 19 4 17 2 17 2 13 1 + 13 1 1 1 18 11 19 9 19 9 + 19 7 19 7 18 4 18 4 16 2 + 17 12 18 10 18 10 18 7 18 7 + 17 4 17 4 15 2 15 2 13 1 + 8 22 11 21 9 22 10 20 13 22 + 11 20 14 22 11 21 5 2 2 1 + 5 3 3 1 6 3 7 1 5 2 + 8 1 16 20 17 20 17 20 18 22 + 18 22 17 16 17 16 17 18 17 18 + 16 20 16 20 15 21 15 21 13 22 + 13 22 10 22 10 22 7 21 7 21 + 5 19 5 19 3 16 3 16 2 13 + 2 13 1 9 1 9 1 6 1 6 + 2 3 2 3 3 2 3 2 6 1 + 6 1 9 1 9 1 11 2 11 2 + 13 4 13 4 14 6 7 20 5 18 + 5 18 4 16 4 16 3 13 3 13 + 2 9 2 9 2 5 2 5 3 3 + 10 22 8 21 8 21 6 18 6 18 + 5 16 5 16 4 13 4 13 3 9 + 3 9 3 4 3 4 4 2 4 2 + 6 1 10 22 4 1 11 22 5 1 + 12 22 6 1 7 22 16 22 16 22 + 19 21 19 21 20 20 20 20 21 17 + 21 17 21 13 21 13 20 9 20 9 + 18 5 18 5 16 3 16 3 14 2 + 14 2 10 1 10 1 1 1 18 21 + 19 20 19 20 20 17 20 17 20 13 + 20 13 19 9 19 9 17 5 17 5 + 15 3 16 22 18 20 18 20 19 17 + 19 17 19 13 19 13 18 9 18 9 + 16 5 16 5 13 2 13 2 10 1 + 8 22 11 21 9 22 10 20 13 22 + 11 20 14 22 11 21 5 2 2 1 + 5 3 3 1 6 3 7 1 5 2 + 8 1 10 22 4 1 11 22 5 1 + 12 22 6 1 16 16 14 8 7 22 + 22 22 22 22 21 16 9 12 15 12 + 1 1 16 1 16 1 18 6 8 22 + 11 21 9 22 10 20 13 22 11 20 + 14 22 11 21 18 22 21 21 19 22 + 21 20 20 22 21 19 21 22 21 16 + 16 16 14 12 14 12 14 8 15 14 + 13 12 13 12 14 10 15 13 12 12 + 12 12 14 11 5 2 2 1 5 3 + 3 1 6 3 7 1 5 2 8 1 + 11 1 16 2 13 1 16 3 16 3 + 18 6 10 22 4 1 11 22 5 1 + 12 22 6 1 16 16 14 8 7 22 + 22 22 22 22 21 16 9 12 15 12 + 1 1 9 1 8 22 11 21 9 22 + 10 20 13 22 11 20 14 22 11 21 + 18 22 21 21 19 22 21 20 20 22 + 21 19 21 22 21 16 16 16 14 12 + 14 12 14 8 15 14 13 12 13 12 + 14 10 15 13 12 12 12 12 14 11 + 5 2 2 1 5 3 3 1 6 3 + 7 1 5 2 8 1 16 20 17 20 + 17 20 18 22 18 22 17 16 17 16 + 17 18 17 18 16 20 16 20 15 21 + 15 21 13 22 13 22 10 22 10 22 + 7 21 7 21 5 19 5 19 3 16 + 3 16 2 13 2 13 1 9 1 9 + 1 6 1 6 2 3 2 3 3 2 + 3 2 6 1 6 1 8 1 8 1 + 11 2 11 2 13 4 13 4 15 8 + 7 20 5 18 5 18 4 16 4 16 + 3 13 3 13 2 9 2 9 2 5 + 2 5 3 3 12 4 13 5 13 5 + 14 8 10 22 8 21 8 21 6 18 + 6 18 5 16 5 16 4 13 4 13 + 3 9 3 9 3 4 3 4 4 2 + 4 2 6 1 8 1 10 2 10 2 + 12 5 12 5 13 8 10 8 18 8 + 11 8 13 7 12 8 13 5 16 8 + 14 6 17 8 14 7 10 22 4 1 + 11 22 5 1 12 22 6 1 22 22 + 16 1 23 22 17 1 24 22 18 1 + 7 22 15 22 19 22 27 22 8 12 + 20 12 1 1 9 1 13 1 21 1 + 8 22 11 21 9 22 10 20 13 22 + 11 20 14 22 11 21 20 22 23 21 + 21 22 22 20 25 22 23 20 26 22 + 23 21 5 2 2 1 5 3 3 1 + 6 3 7 1 5 2 8 1 17 2 + 14 1 17 3 15 1 18 3 19 1 + 17 2 20 1 10 22 4 1 11 22 + 5 1 12 22 6 1 7 22 15 22 + 1 1 9 1 8 22 11 21 9 22 + 10 20 13 22 11 20 14 22 11 21 + 5 2 2 1 5 3 3 1 6 3 + 7 1 5 2 8 1 14 22 9 5 + 9 5 8 3 8 3 6 1 15 22 + 11 9 11 9 10 6 10 6 9 4 + 16 22 12 9 12 9 10 4 10 4 + 8 2 8 2 6 1 6 1 4 1 + 4 1 2 2 2 2 1 4 1 4 + 1 6 1 6 2 7 2 7 3 7 + 3 7 4 6 4 6 4 5 4 5 + 3 4 3 4 2 4 2 6 2 5 + 2 5 3 5 3 5 3 6 3 6 + 2 6 11 22 19 22 12 22 15 21 + 13 22 14 20 17 22 15 20 18 22 + 15 21 10 22 4 1 11 22 5 1 + 12 22 6 1 23 21 8 10 12 13 + 16 1 13 13 17 1 14 14 18 2 + 7 22 15 22 20 22 26 22 1 1 + 9 1 13 1 20 1 8 22 11 21 + 9 22 10 20 13 22 11 20 14 22 + 11 21 21 22 23 21 25 22 23 21 + 5 2 2 1 5 3 3 1 6 3 + 7 1 5 2 8 1 16 2 14 1 + 16 3 15 1 17 3 19 1 10 22 + 4 1 11 22 5 1 12 22 6 1 + 7 22 15 22 1 1 16 1 16 1 + 18 7 8 22 11 21 9 22 10 20 + 13 22 11 20 14 22 11 21 5 2 + 2 1 5 3 3 1 6 3 7 1 + 5 2 8 1 11 1 16 2 13 1 + 17 4 15 1 18 7 10 22 4 2 + 10 21 11 3 11 3 11 1 11 22 + 12 3 12 22 13 4 24 22 13 4 + 13 4 11 1 24 22 18 1 25 22 + 19 1 26 22 20 1 7 22 12 22 + 24 22 29 22 1 1 7 1 15 1 + 23 1 8 22 10 21 9 22 10 20 + 27 22 25 20 28 22 25 21 4 2 + 2 1 4 2 6 1 19 2 16 1 + 19 3 17 1 20 3 21 1 19 2 + 22 1 10 22 4 2 10 22 17 1 + 11 22 17 4 12 22 18 4 23 21 + 18 4 18 4 17 1 7 22 12 22 + 20 22 26 22 1 1 7 1 8 22 + 11 21 9 22 11 20 21 22 23 21 + 25 22 23 21 4 2 2 1 4 2 + 6 1 10 22 7 21 7 21 5 19 + 5 19 3 16 3 16 2 13 2 13 + 1 9 1 9 1 6 1 6 2 3 + 2 3 3 2 3 2 5 1 5 1 + 8 1 8 1 11 2 11 2 13 4 + 13 4 15 7 15 7 16 10 16 10 + 17 14 17 14 17 17 17 17 16 20 + 16 20 15 21 15 21 13 22 13 22 + 10 22 6 19 4 16 4 16 3 13 + 3 13 2 9 2 9 2 5 2 5 + 3 3 12 4 14 7 14 7 15 10 + 15 10 16 14 16 14 16 18 16 18 + 15 20 10 22 8 21 8 21 6 18 + 6 18 5 16 5 16 4 13 4 13 + 3 9 3 9 3 4 3 4 4 2 + 4 2 5 1 8 1 10 2 10 2 + 12 5 12 5 13 7 13 7 14 10 + 14 10 15 14 15 14 15 19 15 19 + 14 21 14 21 13 22 10 22 4 1 + 11 22 5 1 12 22 6 1 7 22 + 19 22 19 22 22 21 22 21 23 19 + 23 19 23 17 23 17 22 14 22 14 + 20 12 20 12 16 11 16 11 8 11 + 21 21 22 19 22 19 22 17 22 17 + 21 14 21 14 19 12 19 22 20 21 + 20 21 21 19 21 19 21 17 21 17 + 20 14 20 14 18 12 18 12 16 11 + 1 1 9 1 8 22 11 21 9 22 + 10 20 13 22 11 20 14 22 11 21 + 5 2 2 1 5 3 3 1 6 3 + 7 1 5 2 8 1 10 27 7 26 + 7 26 5 24 5 24 3 21 3 21 + 2 18 2 18 1 14 1 14 1 11 + 1 11 2 8 2 8 3 7 3 7 + 5 6 5 6 8 6 8 6 11 7 + 11 7 13 9 13 9 15 12 15 12 + 16 15 16 15 17 19 17 19 17 22 + 17 22 16 25 16 25 15 26 15 26 + 13 27 13 27 10 27 6 24 4 21 + 4 21 3 18 3 18 2 14 2 14 + 2 10 2 10 3 8 12 9 14 12 + 14 12 15 15 15 15 16 19 16 19 + 16 23 16 23 15 25 10 27 8 26 + 8 26 6 23 6 23 5 21 5 21 + 4 18 4 18 3 14 3 14 3 9 + 3 9 4 7 4 7 5 6 8 6 + 10 7 10 7 12 10 12 10 13 12 + 13 12 14 15 14 15 15 19 15 19 + 15 24 15 24 14 26 14 26 13 27 + 3 9 4 11 4 11 6 12 6 12 + 7 12 7 12 9 11 9 11 10 9 + 10 9 11 4 11 4 12 3 12 3 + 13 3 13 3 14 4 11 3 12 2 + 12 2 13 2 10 9 10 2 10 2 + 11 1 11 1 13 1 13 1 14 4 + 14 4 14 5 10 22 4 1 11 22 + 5 1 12 22 6 1 7 22 18 22 + 18 22 21 21 21 21 22 19 22 19 + 22 17 22 17 21 14 21 14 20 13 + 20 13 17 12 17 12 9 12 20 21 + 21 19 21 19 21 17 21 17 20 14 + 20 14 19 13 18 22 19 21 19 21 + 20 19 20 19 20 17 20 17 19 14 + 19 14 17 12 13 12 15 11 15 11 + 16 10 16 10 18 4 18 4 19 3 + 19 3 20 3 20 3 21 4 18 3 + 19 2 19 2 20 2 16 10 17 2 + 17 2 18 1 18 1 20 1 20 1 + 21 4 21 4 21 5 1 1 9 1 + 8 22 11 21 9 22 10 20 13 22 + 11 20 14 22 11 21 5 2 2 1 + 5 3 3 1 6 3 7 1 5 2 + 8 1 18 20 19 20 19 20 20 22 + 20 22 19 16 19 16 19 18 19 18 + 18 20 18 20 17 21 17 21 14 22 + 14 22 10 22 10 22 7 21 7 21 + 5 19 5 19 5 16 5 16 6 14 + 6 14 8 12 8 12 14 9 14 9 + 15 7 15 7 15 4 15 4 14 2 + 6 16 7 14 7 14 14 10 14 10 + 15 8 7 21 6 19 6 19 6 17 + 6 17 7 15 7 15 13 12 13 12 + 15 10 15 10 16 8 16 8 16 5 + 16 5 15 3 15 3 14 2 14 2 + 11 1 11 1 7 1 7 1 4 2 + 4 2 3 3 3 3 2 5 2 5 + 2 7 2 7 1 1 1 1 2 3 + 2 3 3 3 10 22 4 1 11 22 + 5 1 12 22 6 1 3 22 1 16 + 19 22 18 16 3 22 19 22 1 1 + 9 1 4 22 1 16 6 22 2 19 + 8 22 3 21 15 22 18 21 16 22 + 18 20 17 22 18 19 18 22 18 16 + 5 2 2 1 5 3 3 1 6 3 + 7 1 5 2 8 1 5 22 2 11 + 2 11 1 7 1 7 1 4 1 4 + 2 2 2 2 5 1 5 1 9 1 + 9 1 12 2 12 2 14 4 14 4 + 15 7 15 7 19 21 6 22 3 11 + 3 11 2 7 2 7 2 3 2 3 + 3 2 7 22 4 11 4 11 3 7 + 3 7 3 3 3 3 5 1 2 22 + 10 22 16 22 22 22 3 22 6 21 + 4 22 5 20 8 22 6 20 9 22 + 6 21 17 22 19 21 21 22 19 21 + 3 22 3 20 3 20 4 3 4 3 + 4 1 4 21 5 4 5 22 6 5 + 16 21 4 1 1 22 8 22 13 22 + 19 22 2 22 3 20 6 22 5 20 + 7 22 4 21 14 22 16 21 18 22 + 16 21 4 22 4 20 4 20 2 3 + 2 3 2 1 5 21 3 4 6 22 + 4 5 12 22 4 5 4 5 2 1 + 12 22 12 20 12 20 10 3 10 3 + 10 1 13 21 11 4 14 22 12 5 + 20 21 12 5 12 5 10 1 1 22 + 9 22 12 22 14 22 17 22 23 22 + 2 22 5 21 3 22 4 20 7 22 + 5 19 8 22 5 21 18 22 20 21 + 22 22 20 21 9 22 15 1 10 22 + 16 1 11 22 17 1 22 21 4 2 + 7 22 14 22 19 22 25 22 1 1 + 7 1 12 1 19 1 8 22 10 20 + 12 22 11 20 13 22 11 21 20 22 + 22 21 24 22 22 21 4 2 2 1 + 4 2 6 1 15 2 13 1 15 3 + 14 1 16 3 18 1 3 22 7 12 + 7 12 4 1 4 22 8 12 8 12 + 5 1 5 22 9 12 9 12 6 1 + 18 21 9 12 1 22 8 22 15 22 + 21 22 1 1 9 1 2 22 4 21 + 6 22 5 20 7 22 4 21 16 22 + 18 21 20 22 18 21 5 2 2 1 + 5 3 3 1 6 3 7 1 5 2 + 8 1 19 22 1 1 20 22 2 1 + 21 22 3 1 21 22 7 22 7 22 + 5 16 1 1 15 1 15 1 17 7 + 8 22 5 16 9 22 6 19 11 22 + 7 21 11 1 15 2 13 1 16 4 + 14 1 17 7 14 15 12 8 12 8 + 12 4 12 4 13 2 13 2 14 1 + 14 1 16 1 16 1 18 3 18 3 + 19 5 15 15 13 8 13 8 13 2 + 14 15 16 15 16 15 14 8 14 8 + 13 4 12 8 12 11 12 11 11 14 + 11 14 9 15 9 15 7 15 7 15 + 4 14 4 14 2 11 2 11 1 8 + 1 8 1 6 1 6 2 3 2 3 + 3 2 3 2 5 1 5 1 7 1 + 7 1 9 2 9 2 10 3 10 3 + 11 5 11 5 12 8 5 14 3 11 + 3 11 2 8 2 8 2 5 2 5 + 3 3 7 15 5 13 5 13 4 11 + 4 11 3 8 3 8 3 5 3 5 + 4 2 4 2 5 1 4 22 2 15 + 2 15 1 9 1 9 1 5 1 5 + 2 3 2 3 3 2 3 2 5 1 + 5 1 7 1 7 1 10 2 10 2 + 12 5 12 5 13 8 13 8 13 10 + 13 10 12 13 12 13 11 14 11 14 + 9 15 9 15 7 15 7 15 5 14 + 5 14 4 13 4 13 3 11 3 11 + 2 8 5 22 3 15 3 15 2 11 + 2 11 2 5 2 5 3 2 10 3 + 11 5 11 5 12 8 12 8 12 11 + 12 11 11 13 1 22 6 22 6 22 + 4 15 4 15 2 8 7 1 9 3 + 9 3 10 5 10 5 11 8 11 8 + 11 11 11 11 10 14 10 14 9 15 + 2 22 5 21 3 22 4 20 12 11 + 12 12 12 12 11 12 11 12 11 10 + 11 10 13 10 13 10 13 12 13 12 + 12 14 12 14 10 15 10 15 7 15 + 7 15 4 14 4 14 2 11 2 11 + 1 8 1 8 1 6 1 6 2 3 + 2 3 3 2 3 2 5 1 5 1 + 7 1 7 1 10 2 10 2 12 5 + 4 13 3 11 3 11 2 8 2 8 + 2 5 2 5 3 3 7 15 5 13 + 5 13 4 11 4 11 3 8 3 8 + 3 5 3 5 4 2 4 2 5 1 + 16 22 13 11 13 11 12 7 12 7 + 12 4 12 4 13 2 13 2 14 1 + 14 1 16 1 16 1 18 3 18 3 + 19 5 17 22 14 11 14 11 13 7 + 13 7 13 2 13 22 18 22 18 22 + 14 8 14 8 13 4 12 8 12 11 + 12 11 11 14 11 14 9 15 9 15 + 7 15 7 15 4 14 4 14 2 11 + 2 11 1 8 1 8 1 6 1 6 + 2 3 2 3 3 2 3 2 5 1 + 5 1 7 1 7 1 9 2 9 2 + 10 3 10 3 11 5 11 5 12 8 + 4 13 3 11 3 11 2 8 2 8 + 2 5 2 5 3 3 7 15 5 13 + 5 13 4 11 4 11 3 8 3 8 + 3 5 3 5 4 2 4 2 5 1 + 14 22 17 21 15 22 16 20 2 6 + 6 7 6 7 9 8 9 8 12 10 + 12 10 13 12 13 12 12 14 12 14 + 10 15 10 15 7 15 7 15 4 14 + 4 14 2 11 2 11 1 8 1 8 + 1 6 1 6 2 3 2 3 3 2 + 3 2 5 1 5 1 7 1 7 1 + 10 2 10 2 12 4 4 13 3 11 + 3 11 2 8 2 8 2 5 2 5 + 3 3 7 15 5 13 5 13 4 11 + 4 11 3 8 3 8 3 5 3 5 + 4 2 4 2 5 1 19 27 19 28 + 19 28 18 28 18 28 18 26 18 26 + 20 26 20 26 20 28 20 28 19 29 + 19 29 17 29 17 29 15 28 15 28 + 13 26 13 26 12 24 12 24 11 21 + 11 21 10 17 10 17 8 8 8 8 + 7 5 7 5 6 3 6 3 4 1 + 13 25 12 22 12 22 11 17 11 17 + 9 8 9 8 8 5 17 29 15 27 + 15 27 14 25 14 25 13 22 13 22 + 12 17 12 17 10 9 10 9 9 6 + 9 6 8 4 8 4 6 2 6 2 + 4 1 4 1 2 1 2 1 1 2 + 1 2 1 4 1 4 3 4 3 4 + 3 2 3 2 2 2 2 2 2 3 + 7 22 18 22 16 22 12 8 12 8 + 11 5 11 5 9 2 9 2 7 1 + 17 22 13 8 13 8 11 4 16 22 + 18 22 18 22 14 8 14 8 12 4 + 12 4 10 2 10 2 7 1 7 1 + 4 1 4 1 2 2 2 2 1 3 + 1 3 1 5 1 5 3 5 3 5 + 3 3 3 3 2 3 2 3 2 4 + 14 15 14 18 14 18 13 21 13 21 + 11 22 11 22 9 22 9 22 6 21 + 6 21 4 18 4 18 3 15 3 15 + 3 13 3 13 4 10 4 10 5 9 + 5 9 7 8 7 8 9 8 9 8 + 11 9 11 9 12 10 12 10 13 12 + 13 12 14 15 6 20 5 18 5 18 + 4 15 4 15 4 12 4 12 5 10 + 9 22 7 20 7 20 6 18 6 18 + 5 15 5 15 5 12 5 12 6 9 + 6 9 7 8 7 22 1 1 1 1 + 3 1 8 22 2 1 4 22 9 22 + 9 22 3 1 5 8 7 12 7 12 + 9 14 9 14 11 15 11 15 13 15 + 13 15 15 14 15 14 16 12 16 12 + 16 9 16 9 14 4 15 14 15 10 + 15 10 14 6 14 6 14 2 15 12 + 13 7 13 7 13 4 13 4 14 2 + 14 2 15 1 15 1 17 1 17 1 + 19 3 19 3 20 5 5 22 8 21 + 6 22 7 20 8 22 8 20 8 20 + 10 20 10 20 10 22 10 22 8 22 + 9 22 9 20 8 21 10 21 1 11 + 2 13 2 13 4 15 4 15 6 15 + 6 15 7 14 7 14 8 12 8 12 + 8 9 8 9 6 4 7 14 7 10 + 7 10 6 6 6 6 6 2 7 12 + 5 7 5 7 5 4 5 4 6 2 + 6 2 7 1 7 1 9 1 9 1 + 11 3 11 3 12 5 13 29 13 27 + 13 27 15 27 15 27 15 29 15 29 + 13 29 14 29 14 27 13 28 15 28 + 5 18 6 20 6 20 8 22 8 22 + 10 22 10 22 11 21 11 21 12 19 + 12 19 12 16 12 16 10 9 10 9 + 9 6 9 6 8 4 8 4 6 2 + 6 2 4 1 4 1 2 1 2 1 + 1 2 1 2 1 4 1 4 3 4 + 3 4 3 2 3 2 2 2 2 2 + 2 3 11 21 11 16 11 16 9 9 + 9 9 8 6 8 6 7 4 11 19 + 10 15 10 15 8 8 8 8 7 5 + 7 5 6 3 6 3 4 1 7 22 + 1 1 1 1 3 1 8 22 2 1 + 4 22 9 22 9 22 3 1 17 13 + 17 14 17 14 16 14 16 14 16 12 + 16 12 18 12 18 12 18 14 18 14 + 17 15 17 15 15 15 15 15 13 14 + 13 14 9 10 9 10 7 9 5 9 + 7 9 7 9 9 8 9 8 10 7 + 10 7 12 3 12 3 13 2 13 2 + 15 2 9 7 11 3 11 3 12 2 + 7 9 8 8 8 8 10 2 10 2 + 11 1 11 1 13 1 13 1 15 2 + 15 2 17 5 5 22 8 21 6 22 + 7 20 5 22 2 11 2 11 1 7 + 1 7 1 4 1 4 2 2 2 2 + 3 1 3 1 5 1 5 1 7 3 + 7 3 8 5 6 22 3 11 3 11 + 2 7 2 7 2 2 2 22 7 22 + 7 22 3 8 3 8 2 4 3 22 + 6 21 4 22 5 20 1 11 2 13 + 2 13 4 15 4 15 6 15 6 15 + 7 14 7 14 8 12 8 12 8 9 + 8 9 6 1 7 14 7 9 7 9 + 5 1 7 12 6 8 6 8 4 1 + 4 1 6 1 8 9 10 12 10 12 + 12 14 12 14 14 15 14 15 16 15 + 16 15 18 14 18 14 19 12 19 12 + 19 9 19 9 17 1 18 14 18 9 + 18 9 16 1 18 12 17 8 17 8 + 15 1 15 1 17 1 19 9 21 12 + 21 12 23 14 23 14 25 15 25 15 + 27 15 27 15 29 14 29 14 30 12 + 30 12 30 9 30 9 28 4 29 14 + 29 10 29 10 28 6 28 6 28 2 + 29 12 27 7 27 7 27 4 27 4 + 28 2 28 2 29 1 29 1 31 1 + 31 1 33 3 33 3 34 5 1 11 + 2 13 2 13 4 15 4 15 6 15 + 6 15 7 14 7 14 8 12 8 12 + 8 9 8 9 6 1 7 14 7 9 + 7 9 5 1 7 12 6 8 6 8 + 4 1 4 1 6 1 8 9 10 12 + 10 12 12 14 12 14 14 15 14 15 + 16 15 16 15 18 14 18 14 19 12 + 19 12 19 9 19 9 17 4 18 14 + 18 10 18 10 17 6 17 6 17 2 + 18 12 16 7 16 7 16 4 16 4 + 17 2 17 2 18 1 18 1 20 1 + 20 1 22 3 22 3 23 5 7 15 + 4 14 4 14 2 11 2 11 1 8 + 1 8 1 6 1 6 2 3 2 3 + 3 2 3 2 6 1 6 1 9 1 + 9 1 12 2 12 2 14 5 14 5 + 15 8 15 8 15 10 15 10 14 13 + 14 13 13 14 13 14 10 15 10 15 + 7 15 4 13 3 11 3 11 2 8 + 2 8 2 5 2 5 3 3 12 3 + 13 5 13 5 14 8 14 8 14 11 + 14 11 13 13 7 15 5 13 5 13 + 4 11 4 11 3 8 3 8 3 5 + 3 5 4 2 4 2 6 1 9 1 + 11 3 11 3 12 5 12 5 13 8 + 13 8 13 11 13 11 12 14 12 14 + 10 15 3 18 4 20 4 20 6 22 + 6 22 8 22 8 22 9 21 9 21 + 10 19 10 19 10 16 10 16 9 12 + 9 12 6 1 9 21 9 16 9 16 + 8 12 8 12 5 1 9 19 8 15 + 8 15 4 1 10 15 11 18 11 18 + 12 20 12 20 13 21 13 21 15 22 + 15 22 17 22 17 22 19 21 19 21 + 20 20 20 20 21 17 21 17 21 15 + 21 15 20 12 20 12 18 9 18 9 + 15 8 15 8 13 8 13 8 11 9 + 11 9 10 12 10 12 10 15 19 20 + 20 18 20 18 20 15 20 15 19 12 + 19 12 18 10 17 22 18 21 18 21 + 19 18 19 18 19 15 19 15 18 12 + 18 12 17 10 17 10 15 8 1 1 + 9 1 5 2 2 1 5 3 3 1 + 6 3 7 1 5 2 8 1 14 22 + 8 1 15 22 9 1 14 22 16 22 + 16 22 10 1 12 15 12 18 12 18 + 11 21 11 21 9 22 9 22 7 22 + 7 22 4 21 4 21 2 18 2 18 + 1 15 1 15 1 13 1 13 2 10 + 2 10 3 9 3 9 5 8 5 8 + 7 8 7 8 9 9 9 9 10 10 + 10 10 11 12 11 12 12 15 4 20 + 3 18 3 18 2 15 2 15 2 12 + 2 12 3 10 7 22 5 20 5 20 + 4 18 4 18 3 15 3 15 3 12 + 3 12 4 9 4 9 5 8 5 1 + 13 1 9 2 6 1 9 3 7 1 + 10 3 11 1 9 2 12 1 1 11 + 2 13 2 13 4 15 4 15 6 15 + 6 15 7 14 7 14 8 12 8 12 + 8 8 8 8 6 1 7 14 7 8 + 7 8 5 1 7 12 6 8 6 8 + 4 1 4 1 6 1 16 13 16 14 + 16 14 15 14 15 14 15 12 15 12 + 17 12 17 12 17 14 17 14 16 15 + 16 15 14 15 14 15 12 14 12 14 + 10 12 10 12 8 8 13 12 13 13 + 13 13 12 13 12 13 12 11 12 11 + 14 11 14 11 14 13 14 13 13 14 + 13 14 10 15 10 15 7 15 7 15 + 4 14 4 14 3 13 3 13 3 11 + 3 11 4 9 4 9 6 8 6 8 + 9 7 9 7 11 6 11 6 12 4 + 4 14 3 11 4 10 6 9 6 9 + 9 8 9 8 11 7 12 6 11 2 + 3 13 4 11 4 11 6 10 6 10 + 9 9 9 9 11 8 11 8 12 6 + 12 6 12 4 12 4 11 2 11 2 + 8 1 8 1 5 1 5 1 2 2 + 2 2 1 3 1 3 1 5 1 5 + 3 5 3 5 3 3 3 3 2 3 + 2 3 2 4 7 22 4 11 4 11 + 3 7 3 7 3 4 3 4 4 2 + 4 2 5 1 5 1 7 1 7 1 + 9 3 9 3 10 5 8 22 5 11 + 5 11 4 7 4 7 4 2 7 22 + 9 22 9 22 5 8 5 8 4 4 + 1 15 11 15 1 11 2 13 2 13 + 4 15 4 15 6 15 6 15 7 14 + 7 14 8 12 8 12 8 9 8 9 + 6 4 7 14 7 10 7 10 6 6 + 6 6 6 2 7 12 5 7 5 7 + 5 4 5 4 6 2 6 2 8 1 + 8 1 10 1 10 1 12 2 12 2 + 14 4 14 4 16 7 18 15 16 7 + 16 7 16 4 16 4 17 2 17 2 + 18 1 18 1 20 1 20 1 22 3 + 22 3 23 5 19 15 17 7 17 7 + 17 2 18 15 20 15 20 15 18 8 + 18 8 17 4 1 11 2 13 2 13 + 4 15 4 15 6 15 6 15 7 14 + 7 14 8 12 8 12 8 9 8 9 + 6 4 7 14 7 10 7 10 6 6 + 6 6 6 2 7 12 5 7 5 7 + 5 4 5 4 6 2 6 2 8 1 + 8 1 10 1 10 1 12 2 12 2 + 14 4 14 4 16 7 16 7 17 11 + 17 11 17 15 17 15 16 15 16 15 + 16 14 16 14 17 12 1 11 2 13 + 2 13 4 15 4 15 6 15 6 15 + 7 14 7 14 8 12 8 12 8 9 + 8 9 6 4 7 14 7 10 7 10 + 6 6 6 6 6 2 7 12 5 7 + 5 7 5 4 5 4 6 2 6 2 + 8 1 8 1 10 1 10 1 12 2 + 12 2 14 4 14 4 15 7 17 15 + 15 7 15 7 15 4 15 4 16 2 + 16 2 18 1 18 1 20 1 20 1 + 22 2 22 2 24 4 24 4 26 7 + 26 7 27 11 27 11 27 15 27 15 + 26 15 26 15 26 14 26 14 27 12 + 18 15 16 7 16 7 16 2 17 15 + 19 15 19 15 17 8 17 8 16 4 + 3 11 5 14 5 14 7 15 7 15 + 9 15 9 15 11 14 11 14 12 12 + 12 12 12 10 9 15 10 14 10 14 + 10 10 10 10 9 6 9 6 8 4 + 8 4 6 2 6 2 4 1 4 1 + 2 1 2 1 1 2 1 2 1 4 + 1 4 3 4 3 4 3 2 3 2 + 2 2 2 2 2 3 11 13 11 10 + 11 10 10 6 10 6 10 3 19 13 + 19 14 19 14 18 14 18 14 18 12 + 18 12 20 12 20 12 20 14 20 14 + 19 15 19 15 17 15 17 15 15 14 + 15 14 13 12 13 12 12 10 12 10 + 11 6 11 6 11 2 11 2 12 1 + 9 6 9 4 9 4 10 2 10 2 + 12 1 12 1 14 1 14 1 16 2 + 16 2 18 5 1 18 2 20 2 20 + 4 22 4 22 6 22 6 22 7 21 + 7 21 8 19 8 19 8 16 8 16 + 6 11 7 21 7 17 7 17 6 13 + 6 13 6 9 7 19 5 14 5 14 + 5 11 5 11 6 9 6 9 8 8 + 8 8 10 8 10 8 12 9 12 9 + 14 11 14 11 16 15 18 22 14 8 + 14 8 13 5 13 5 11 2 11 2 + 9 1 19 22 15 8 15 8 13 4 + 18 22 20 22 20 22 16 8 16 8 + 14 4 14 4 12 2 12 2 9 1 + 9 1 6 1 6 1 4 2 4 2 + 3 3 3 3 3 5 3 5 5 5 + 5 5 5 3 5 3 4 3 4 3 + 4 4 15 15 14 13 14 13 12 11 + 12 11 4 5 4 5 2 3 2 3 + 1 1 14 13 5 13 5 13 3 12 + 3 12 2 10 12 13 8 14 8 14 + 5 14 5 14 4 13 12 13 8 15 + 8 15 5 15 5 15 3 13 3 13 + 2 10 2 3 11 3 11 3 13 4 + 13 4 14 6 4 3 8 2 8 2 + 11 2 11 2 12 3 4 3 8 1 + 8 1 11 1 11 1 13 3 13 3 + 14 6 10 22 7 21 7 21 5 19 + 5 19 3 16 3 16 2 13 2 13 + 1 9 1 9 1 6 1 6 2 3 + 2 3 3 2 3 2 5 1 5 1 + 7 1 7 1 10 2 10 2 12 4 + 12 4 14 7 14 7 15 10 15 10 + 16 14 16 14 16 17 16 17 15 20 + 15 20 14 21 14 21 12 22 12 22 + 10 22 7 20 5 18 5 18 4 16 + 4 16 3 13 3 13 2 9 2 9 + 2 5 2 5 3 3 10 3 12 5 + 12 5 13 7 13 7 14 10 14 10 + 15 14 15 14 15 18 15 18 14 20 + 10 22 8 21 8 21 6 18 6 18 + 5 16 5 16 4 13 4 13 3 9 + 3 9 3 4 3 4 4 2 4 2 + 5 1 7 1 9 2 9 2 11 5 + 11 5 12 7 12 7 13 10 13 10 + 14 14 14 14 14 19 14 19 13 21 + 13 21 12 22 6 18 1 1 1 1 + 3 1 9 22 7 18 7 18 2 1 + 9 22 3 1 9 22 6 19 6 19 + 3 17 3 17 1 16 6 18 4 17 + 4 17 1 16 7 17 7 18 7 18 + 8 18 8 18 8 16 8 16 6 16 + 6 16 6 18 6 18 7 20 7 20 + 8 21 8 21 11 22 11 22 14 22 + 14 22 17 21 17 21 18 19 18 19 + 18 17 18 17 17 15 17 15 15 13 + 15 13 5 7 5 7 3 5 3 5 + 1 1 16 21 17 19 17 19 17 17 + 17 17 16 15 16 15 14 13 14 13 + 11 11 14 22 15 21 15 21 16 19 + 16 19 16 17 16 17 15 15 15 15 + 13 13 13 13 5 7 2 3 3 4 + 3 4 5 4 5 4 10 3 10 3 + 15 3 15 3 16 4 5 4 10 2 + 10 2 15 2 5 4 10 1 10 1 + 13 1 13 1 15 2 15 2 16 4 + 16 4 16 5 6 17 6 18 6 18 + 7 18 7 18 7 16 7 16 5 16 + 5 16 5 18 5 18 6 20 6 20 + 7 21 7 21 10 22 10 22 13 22 + 13 22 16 21 16 21 17 19 17 19 + 17 17 17 17 16 15 16 15 15 14 + 15 14 13 13 13 13 10 12 15 21 + 16 19 16 19 16 17 16 17 15 15 + 15 15 14 14 13 22 14 21 14 21 + 15 19 15 19 15 17 15 17 14 15 + 14 15 12 13 12 13 10 12 8 12 + 10 12 10 12 13 11 13 11 14 10 + 14 10 15 8 15 8 15 5 15 5 + 14 3 14 3 12 2 12 2 9 1 + 9 1 6 1 6 1 3 2 3 2 + 2 3 2 3 1 5 1 5 1 7 + 1 7 3 7 3 7 3 5 3 5 + 2 5 2 5 2 6 13 10 14 8 + 14 8 14 5 14 5 13 3 10 12 + 12 11 12 11 13 9 13 9 13 5 + 13 5 12 3 12 3 11 2 11 2 + 9 1 14 18 9 1 9 1 11 1 + 17 22 15 18 15 18 10 1 17 22 + 11 1 17 22 1 7 1 7 17 7 + 8 22 3 12 8 22 18 22 8 21 + 16 21 7 20 12 20 12 20 16 21 + 16 21 18 22 3 12 4 13 4 13 + 7 14 7 14 10 14 10 14 13 13 + 13 13 14 12 14 12 15 10 15 10 + 15 7 15 7 14 4 14 4 12 2 + 12 2 8 1 8 1 5 1 5 1 + 3 2 3 2 2 3 2 3 1 5 + 1 5 1 7 1 7 3 7 3 7 + 3 5 3 5 2 5 2 5 2 6 + 13 12 14 10 14 10 14 7 14 7 + 13 4 13 4 11 2 10 14 12 13 + 12 13 13 11 13 11 13 7 13 7 + 12 4 12 4 10 2 10 2 8 1 + 15 18 15 19 15 19 14 19 14 19 + 14 17 14 17 16 17 16 17 16 19 + 16 19 15 21 15 21 13 22 13 22 + 10 22 10 22 7 21 7 21 5 19 + 5 19 3 16 3 16 2 13 2 13 + 1 9 1 9 1 6 1 6 2 3 + 2 3 3 2 3 2 5 1 5 1 + 8 1 8 1 11 2 11 2 13 4 + 13 4 14 6 14 6 14 9 14 9 + 13 11 13 11 12 12 12 12 10 13 + 10 13 7 13 7 13 5 12 5 12 + 4 11 4 11 3 9 6 19 4 16 + 4 16 3 13 3 13 2 9 2 9 + 2 5 2 5 3 3 12 4 13 6 + 13 6 13 9 13 9 12 11 10 22 + 8 21 8 21 6 18 6 18 5 16 + 5 16 4 13 4 13 3 9 3 9 + 3 4 3 4 4 2 4 2 5 1 + 8 1 10 2 10 2 11 3 11 3 + 12 6 12 6 12 10 12 10 11 12 + 11 12 10 13 3 22 1 16 16 22 + 15 19 15 19 13 16 13 16 9 11 + 9 11 7 8 7 8 6 5 6 5 + 5 1 7 9 5 5 5 5 4 1 + 13 16 7 10 7 10 5 7 5 7 + 4 5 4 5 3 1 3 1 5 1 + 2 19 5 22 5 22 7 22 7 22 + 12 19 4 21 7 21 7 21 12 19 + 2 19 4 20 4 20 7 20 7 20 + 12 19 12 19 14 19 14 19 15 20 + 15 20 16 22 10 22 7 21 7 21 + 6 20 6 20 5 18 5 18 5 15 + 5 15 6 13 6 13 8 12 8 12 + 11 12 11 12 14 13 14 13 16 14 + 16 14 17 16 17 16 17 19 17 19 + 16 21 16 21 14 22 14 22 10 22 + 12 22 7 21 7 20 6 18 6 18 + 6 14 6 14 7 13 6 13 9 12 + 10 12 14 13 15 14 16 16 16 16 + 16 19 16 19 15 21 16 21 12 22 + 10 22 8 20 8 20 7 18 7 18 + 7 14 7 14 8 12 11 12 13 13 + 13 13 14 14 14 14 15 16 15 16 + 15 20 15 20 14 22 8 12 4 11 + 4 11 2 9 2 9 1 7 1 7 + 1 4 1 4 2 2 2 2 5 1 + 5 1 9 1 9 1 13 2 13 2 + 14 3 14 3 15 5 15 5 15 8 + 15 8 14 10 14 10 13 11 13 11 + 11 12 9 12 4 11 5 11 3 9 + 3 9 2 7 2 7 2 4 2 4 + 3 2 2 2 7 1 7 1 13 2 + 13 3 14 5 14 5 14 8 14 8 + 13 10 13 11 10 12 8 12 6 11 + 6 11 4 9 4 9 3 7 3 7 + 3 4 3 4 4 2 4 2 5 1 + 9 1 11 2 11 2 12 3 12 3 + 13 5 13 5 13 9 13 9 12 11 + 12 11 11 12 14 14 13 12 13 12 + 12 11 12 11 10 10 10 10 7 10 + 7 10 5 11 5 11 4 12 4 12 + 3 14 3 14 3 17 3 17 4 19 + 4 19 6 21 6 21 9 22 9 22 + 12 22 12 22 14 21 14 21 15 20 + 15 20 16 17 16 17 16 14 16 14 + 15 10 15 10 14 7 14 7 12 4 + 12 4 10 2 10 2 7 1 7 1 + 4 1 4 1 2 2 2 2 1 4 + 1 4 1 6 1 6 3 6 3 6 + 3 4 3 4 2 4 2 4 2 5 + 5 12 4 14 4 14 4 17 4 17 + 5 19 14 20 15 18 15 18 15 14 + 15 14 14 10 14 10 13 7 13 7 + 11 4 7 10 6 11 6 11 5 13 + 5 13 5 17 5 17 6 20 6 20 + 7 21 7 21 9 22 12 22 13 21 + 13 21 14 19 14 19 14 14 14 14 + 13 10 13 10 12 7 12 7 11 5 + 11 5 9 2 9 2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 14 12 14 10 13 10 13 6 12 + 6 12 4 11 4 11 4 9 4 9 + 6 8 6 8 7 8 8 22 13 21 + 12 21 13 19 13 19 13 17 13 17 + 12 15 12 15 11 14 11 14 9 13 + 10 22 11 21 11 21 12 19 12 19 + 12 17 12 17 11 15 11 15 10 14 + 10 14 6 12 6 12 5 11 5 11 + 5 9 5 9 6 8 3 4 2 3 + 2 3 2 2 2 2 3 1 3 1 + 4 1 4 1 5 2 5 2 5 3 + 5 3 4 4 4 4 3 4 3 3 + 3 2 3 2 4 2 4 2 4 3 + 4 3 3 3 5 8 3 7 3 7 + 2 6 2 6 1 4 1 4 1 2 + 1 2 2 1 2 1 3 1 3 1 + 4 2 4 2 4 3 4 3 3 4 + 3 4 2 4 3 7 2 5 2 5 + 2 4 2 3 2 2 2 2 3 2 + 3 2 3 3 3 3 2 3 4 5 + 3 5 3 5 2 6 2 6 2 7 + 2 7 3 8 3 8 4 8 4 8 + 5 7 5 7 5 5 5 5 4 3 + 4 3 3 2 3 2 1 1 3 7 + 3 6 3 6 4 6 4 6 4 7 + 4 7 3 7 4 5 4 4 4 4 + 3 2 22 13 22 14 22 14 21 14 + 21 14 21 12 21 12 23 12 23 12 + 23 14 23 14 22 15 22 15 21 15 + 21 15 19 14 19 14 17 12 17 12 + 12 4 12 4 10 2 10 2 8 1 + 8 1 5 1 5 1 2 2 2 2 + 1 4 1 4 1 6 1 6 2 8 + 2 8 3 9 3 9 5 10 5 10 + 10 12 10 12 12 13 12 13 14 15 + 14 15 15 17 15 17 15 19 15 19 + 14 21 14 21 12 22 12 22 10 21 + 10 21 9 19 9 19 9 16 9 16 + 10 10 10 10 11 7 11 7 12 5 + 12 5 14 2 14 2 16 1 16 1 + 18 1 18 1 19 3 19 3 19 4 + 6 1 2 2 3 2 2 4 2 4 + 2 6 2 6 3 8 3 8 4 9 + 4 9 6 10 10 12 11 9 11 9 + 14 3 14 3 16 2 5 1 4 2 + 4 2 3 4 3 4 3 6 3 6 + 4 8 4 8 5 9 5 9 7 10 + 7 10 12 13 9 16 10 13 10 13 + 11 10 11 10 13 6 13 6 15 3 + 15 3 17 2 17 2 18 2 18 2 + 19 3 11 30 3 1 16 30 8 1 + 17 21 17 22 17 22 16 22 16 22 + 16 20 16 20 18 20 18 20 18 22 + 18 22 17 24 17 24 16 25 16 25 + 13 26 13 26 9 26 9 26 6 25 + 6 25 4 23 4 23 4 20 4 20 + 5 18 5 18 7 16 7 16 13 13 + 13 13 14 11 14 11 14 8 14 8 + 13 6 5 20 6 18 6 18 13 14 + 13 14 14 12 6 25 5 23 5 23 + 5 21 5 21 6 19 6 19 12 16 + 12 16 14 14 14 14 15 12 15 12 + 15 9 15 9 14 7 14 7 13 6 + 13 6 10 5 10 5 6 5 6 5 + 3 6 3 6 2 7 2 7 1 9 + 1 9 1 11 1 11 3 11 3 11 + 3 9 3 9 2 9 2 9 2 10 + 27 33 1 1 1 1 2 1 27 33 + 28 33 28 33 2 1 14 33 12 32 + 12 32 9 30 9 30 6 27 6 27 + 4 24 4 24 2 20 2 20 1 16 + 1 16 1 11 1 11 2 7 2 7 + 3 4 3 4 5 1 7 27 5 24 + 5 24 3 20 3 20 2 15 2 15 + 2 7 14 33 11 31 11 31 8 28 + 8 28 6 25 6 25 5 23 5 23 + 4 20 4 20 3 16 3 16 2 7 + 2 15 3 6 3 6 4 3 4 3 + 5 1 10 33 12 30 12 30 13 27 + 13 27 14 23 14 23 14 18 14 18 + 13 14 13 14 11 10 11 10 9 7 + 9 7 6 4 6 4 3 2 3 2 + 1 1 13 27 13 19 13 19 12 14 + 12 14 10 10 10 10 8 7 10 33 + 11 31 11 31 12 28 12 28 13 19 + 13 27 12 18 12 18 11 14 11 14 + 10 11 10 11 9 9 9 9 7 6 + 7 6 4 3 4 3 1 1 6 13 + 5 12 5 12 7 2 7 2 6 1 + 6 13 6 1 6 13 7 12 7 12 + 5 2 5 2 6 1 1 10 2 10 + 2 10 10 4 10 4 11 4 1 10 + 11 4 1 10 1 9 1 9 11 5 + 11 5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 0 0 0 0 0 + 21 22 19 20 19 20 17 17 17 17 + 14 12 14 12 12 9 12 9 9 5 + 9 5 6 2 6 2 4 1 4 1 + 2 1 2 1 1 2 1 2 1 4 + 1 4 2 5 2 5 3 4 3 4 + 2 3 21 22 20 18 20 18 18 8 + 18 8 17 1 21 22 18 1 17 1 + 17 3 17 3 16 6 16 6 15 8 + 15 8 13 10 13 10 11 11 11 11 + 9 11 9 11 8 10 8 10 8 8 + 8 8 9 5 9 5 12 2 12 2 + 15 1 15 1 19 1 19 1 21 2 + 15 21 14 20 14 20 13 18 13 18 + 11 13 11 13 9 7 9 7 8 5 + 8 5 6 2 6 2 4 1 14 20 + 13 17 13 17 11 9 11 9 10 6 + 10 6 9 4 9 4 7 2 7 2 + 4 1 4 1 2 1 2 1 1 2 + 1 2 1 4 1 4 2 5 2 5 + 3 4 3 4 2 3 9 16 8 14 + 8 14 7 13 7 13 5 13 5 13 + 4 14 4 14 4 16 4 16 5 18 + 5 18 7 20 7 20 9 21 9 21 + 12 22 12 22 18 22 18 22 20 21 + 20 21 21 19 21 19 21 17 21 17 + 20 15 20 15 18 14 18 14 14 13 + 14 13 12 13 18 22 19 21 19 21 + 20 19 20 19 20 17 20 17 19 15 + 19 15 18 14 14 13 17 12 17 12 + 18 11 18 11 19 9 19 9 19 6 + 19 6 18 3 18 3 17 2 17 2 + 15 1 15 1 13 1 13 1 12 2 + 12 2 12 4 12 4 13 7 14 13 + 16 12 16 12 17 11 17 11 18 9 + 18 9 18 6 18 6 17 3 17 3 + 15 1 2 20 1 18 1 18 1 16 + 1 16 2 14 2 14 5 13 5 13 + 8 13 8 13 12 14 12 14 14 15 + 14 15 16 17 16 17 17 19 17 19 + 17 21 17 21 16 22 16 22 14 22 + 14 22 11 21 11 21 8 18 8 18 + 6 15 6 15 4 11 4 11 3 7 + 3 7 3 4 3 4 4 2 4 2 + 7 1 7 1 9 1 9 1 12 2 + 12 2 14 4 14 4 15 6 15 6 + 15 8 15 8 14 10 14 10 12 10 + 12 10 10 9 10 9 9 7 14 22 + 12 21 12 21 9 18 9 18 7 15 + 7 15 5 11 5 11 4 7 4 7 + 4 4 4 4 5 2 5 2 7 1 + 15 21 14 20 14 20 13 18 13 18 + 11 13 11 13 9 7 9 7 8 5 + 8 5 6 2 6 2 4 1 14 20 + 13 17 13 17 11 9 11 9 10 6 + 10 6 9 4 9 4 7 2 7 2 + 4 1 4 1 2 1 2 1 1 2 + 1 2 1 4 1 4 2 5 2 5 + 4 5 4 5 6 4 6 4 8 2 + 8 2 10 1 10 1 13 1 13 1 + 15 2 15 2 17 4 17 4 19 8 + 19 8 20 13 20 13 20 16 20 16 + 19 19 19 19 17 21 17 21 15 22 + 15 22 10 22 10 22 7 21 7 21 + 5 19 5 19 4 17 4 17 4 15 + 4 15 5 14 5 14 7 14 7 14 + 8 15 8 15 9 17 13 19 12 18 + 12 18 12 16 12 16 13 15 13 15 + 15 15 15 15 16 17 16 17 16 19 + 16 19 15 21 15 21 13 22 13 22 + 10 22 10 22 8 21 8 21 7 20 + 7 20 6 18 6 18 6 16 6 16 + 7 14 7 14 9 13 10 22 8 20 + 8 20 7 18 7 18 7 15 7 15 + 9 13 9 13 7 13 7 13 4 12 + 4 12 2 10 2 10 1 8 1 8 + 1 5 1 5 2 3 2 3 3 2 + 3 2 5 1 5 1 8 1 8 1 + 11 2 11 2 13 4 13 4 14 6 + 14 6 14 8 14 8 13 10 13 10 + 11 10 11 10 9 9 9 9 8 7 + 7 13 5 12 5 12 3 10 3 10 + 2 8 2 8 2 4 2 4 3 2 + 16 20 15 18 15 18 13 13 13 13 + 11 7 11 7 10 5 10 5 8 2 + 8 2 6 1 10 16 9 14 9 14 + 7 13 7 13 5 13 5 13 4 15 + 4 15 4 17 4 17 5 19 5 19 + 7 21 7 21 10 22 10 22 20 22 + 20 22 17 21 17 21 16 20 16 20 + 15 17 15 17 13 9 13 9 12 6 + 12 6 11 4 11 4 9 2 9 2 + 6 1 6 1 4 1 4 1 2 2 + 2 2 1 3 1 3 1 4 1 4 + 2 5 2 5 3 4 3 4 2 3 + 12 22 16 21 16 21 17 21 8 9 + 9 10 9 10 11 11 11 11 15 11 + 15 11 17 12 17 12 19 15 19 15 + 17 8 2 19 1 17 1 17 1 15 + 1 15 2 13 2 13 4 12 4 12 + 7 12 7 12 10 13 10 13 12 14 + 12 14 15 17 15 17 16 20 16 20 + 16 21 16 21 15 22 15 22 14 22 + 14 22 12 21 12 21 10 19 10 19 + 9 17 9 17 8 14 8 14 8 11 + 8 11 9 9 9 9 11 8 11 8 + 13 8 13 8 15 9 15 9 17 11 + 17 11 18 13 15 22 13 21 13 21 + 11 19 11 19 10 17 10 17 9 14 + 9 14 9 10 9 10 11 8 18 13 + 17 9 17 9 15 5 15 5 13 3 + 13 3 11 2 11 2 7 1 7 1 + 4 1 4 1 2 2 2 2 1 4 + 1 4 1 5 1 5 2 6 2 6 + 3 5 3 5 2 4 17 9 15 6 + 15 6 13 4 13 4 10 2 10 2 + 7 1 7 16 6 17 6 17 6 19 + 6 19 7 21 7 21 10 22 10 22 + 13 22 13 22 10 11 10 11 8 5 + 8 5 7 3 7 3 6 2 6 2 + 4 1 4 1 2 1 2 1 1 2 + 1 2 1 4 1 4 2 5 2 5 + 3 4 3 4 2 3 13 22 10 13 + 10 13 9 10 9 10 7 5 7 5 + 6 3 6 3 4 1 5 8 6 9 + 6 9 8 10 8 10 17 13 17 13 + 19 14 19 14 22 16 22 16 24 18 + 24 18 25 20 25 20 25 21 25 21 + 24 22 24 22 23 22 23 22 21 21 + 21 21 19 18 19 18 18 16 18 16 + 16 10 16 10 15 6 15 6 15 3 + 15 3 17 1 17 1 18 1 18 1 + 20 2 20 2 22 4 23 22 21 20 + 21 20 19 16 19 16 17 10 17 10 + 16 6 16 6 16 3 16 3 17 1 + 15 20 13 17 13 17 11 12 11 12 + 9 7 9 7 8 5 8 5 6 2 + 6 2 4 1 17 16 15 14 15 14 + 12 13 12 13 9 13 9 13 7 14 + 7 14 6 16 6 16 6 18 6 18 + 7 20 7 20 9 21 9 21 13 22 + 13 22 17 22 17 22 15 20 15 20 + 14 18 14 18 12 12 12 12 10 6 + 10 6 9 4 9 4 7 2 7 2 + 4 1 4 1 2 1 2 1 1 2 + 1 2 1 4 1 4 2 5 2 5 + 3 4 3 4 2 3 16 26 14 24 + 14 24 12 21 12 21 10 16 10 16 + 7 7 7 7 5 3 16 19 14 17 + 14 17 11 16 11 16 8 16 8 16 + 6 17 6 17 5 19 5 19 5 21 + 5 21 6 23 6 23 8 25 8 25 + 12 26 12 26 16 26 16 26 14 23 + 14 23 13 21 13 21 10 12 10 12 + 8 8 8 8 7 6 7 6 5 3 + 5 3 4 2 4 2 2 1 2 1 + 1 2 1 2 1 4 1 4 2 6 + 2 6 4 8 4 8 6 9 6 9 + 9 10 9 10 13 11 7 16 6 17 + 6 17 6 19 6 19 8 21 8 21 + 11 22 11 22 13 22 13 22 10 11 + 10 11 8 5 8 5 7 3 7 3 + 6 2 6 2 4 1 4 1 2 1 + 2 1 1 2 1 2 1 4 1 4 + 2 5 2 5 3 4 3 4 2 3 + 13 22 10 13 10 13 9 10 9 10 + 7 5 7 5 6 3 6 3 4 1 + 21 21 18 17 18 17 16 15 16 15 + 14 14 14 14 11 13 24 21 23 20 + 23 20 24 19 24 19 25 20 25 20 + 25 21 25 21 24 22 24 22 23 22 + 23 22 21 21 21 21 18 16 18 16 + 17 15 17 15 15 14 15 14 11 13 + 11 13 14 12 14 12 15 10 15 10 + 16 3 16 3 17 1 11 13 13 12 + 13 12 14 10 14 10 15 3 15 3 + 17 1 17 1 18 1 18 1 20 2 + 20 2 22 4 6 19 5 17 5 17 + 5 15 5 15 6 13 6 13 8 12 + 8 12 11 12 11 12 14 13 14 13 + 16 14 16 14 19 17 19 17 20 20 + 20 20 20 21 20 21 19 22 19 22 + 18 22 18 22 16 21 16 21 15 20 + 15 20 13 17 13 17 9 7 9 7 + 8 5 8 5 6 2 6 2 4 1 + 15 20 13 16 13 16 11 9 11 9 + 10 6 10 6 9 4 9 4 7 2 + 7 2 4 1 4 1 2 1 2 1 + 1 2 1 2 1 4 1 4 2 5 + 2 5 4 5 4 5 6 4 6 4 + 9 2 9 2 11 1 11 1 14 1 + 14 1 16 2 16 2 18 4 17 22 + 13 13 13 13 10 7 10 7 8 4 + 8 4 6 2 6 2 4 1 4 1 + 2 1 2 1 1 2 1 2 1 4 + 1 4 2 5 2 5 3 4 3 4 + 2 3 17 22 15 15 15 15 14 11 + 14 11 13 6 13 6 13 2 13 2 + 15 1 17 22 16 18 16 18 15 13 + 15 13 14 6 14 6 14 2 14 2 + 15 1 26 22 22 13 22 13 17 4 + 17 4 15 1 26 22 24 15 24 15 + 23 11 23 11 22 6 22 6 22 2 + 22 2 24 1 24 1 25 1 25 1 + 27 2 27 2 29 4 26 22 25 18 + 25 18 24 13 24 13 23 6 23 6 + 23 2 23 2 24 1 14 22 13 18 + 13 18 11 12 11 12 9 7 9 7 + 8 5 8 5 6 2 6 2 4 1 + 4 1 2 1 2 1 1 2 1 2 + 1 4 1 4 2 5 2 5 3 4 + 3 4 2 3 14 22 14 17 14 17 + 15 6 15 6 16 1 14 22 15 17 + 15 17 16 6 16 6 16 1 28 21 + 27 20 27 20 28 19 28 19 29 20 + 29 20 29 21 29 21 28 22 28 22 + 26 22 26 22 24 21 24 21 22 18 + 22 18 21 16 21 16 19 11 19 11 + 17 5 17 5 16 1 9 22 7 21 + 7 21 5 19 5 19 3 16 3 16 + 2 14 2 14 1 10 1 10 1 6 + 1 6 2 3 2 3 3 2 3 2 + 5 1 5 1 7 1 7 1 10 2 + 10 2 12 4 12 4 14 7 14 7 + 15 9 15 9 16 13 16 13 16 17 + 16 17 15 20 15 20 14 21 14 21 + 13 21 13 21 11 20 11 20 9 18 + 9 18 7 14 7 14 6 9 6 9 + 6 6 7 21 5 18 5 18 3 14 + 3 14 2 10 2 10 2 6 2 6 + 3 3 3 3 5 1 15 21 14 20 + 14 20 13 18 13 18 11 13 11 13 + 9 7 9 7 8 5 8 5 6 2 + 6 2 4 1 14 20 13 17 13 17 + 11 9 11 9 10 6 10 6 9 4 + 9 4 7 2 7 2 4 1 4 1 + 2 1 2 1 1 2 1 2 1 4 + 1 4 2 5 2 5 3 4 3 4 + 2 3 9 16 8 14 8 14 7 13 + 7 13 5 13 5 13 4 14 4 14 + 4 16 4 16 5 18 5 18 7 20 + 7 20 9 21 9 21 12 22 12 22 + 16 22 16 22 19 21 19 21 20 20 + 20 20 21 18 21 18 21 15 21 15 + 20 13 20 13 19 12 19 12 16 11 + 16 11 14 11 14 11 12 12 16 22 + 18 21 18 21 19 20 19 20 20 18 + 20 18 20 15 20 15 19 13 19 13 + 18 12 18 12 16 11 14 18 14 16 + 14 16 13 14 13 14 12 13 12 13 + 10 12 10 12 8 12 8 12 7 14 + 7 14 7 16 7 16 8 19 8 19 + 10 21 10 21 13 22 13 22 16 22 + 16 22 18 21 18 21 19 19 19 19 + 19 15 19 15 18 12 18 12 16 9 + 16 9 12 5 12 5 9 3 9 3 + 7 2 7 2 4 1 4 1 2 1 + 2 1 1 2 1 2 1 4 1 4 + 2 5 2 5 4 5 4 5 6 4 + 6 4 9 2 9 2 12 1 12 1 + 15 1 15 1 17 2 17 2 19 4 + 16 22 17 21 17 21 18 19 18 19 + 18 15 18 15 17 12 17 12 15 9 + 15 9 12 6 12 6 8 3 8 3 + 4 1 15 21 14 20 14 20 13 18 + 13 18 11 13 11 13 9 7 9 7 + 8 5 8 5 6 2 6 2 4 1 + 14 20 13 17 13 17 11 9 11 9 + 10 6 10 6 9 4 9 4 7 2 + 7 2 4 1 4 1 2 1 2 1 + 1 2 1 2 1 4 1 4 2 5 + 2 5 3 4 3 4 2 3 9 16 + 8 14 8 14 7 13 7 13 5 13 + 5 13 4 14 4 14 4 16 4 16 + 5 18 5 18 7 20 7 20 9 21 + 9 21 12 22 12 22 17 22 17 22 + 20 21 20 21 21 19 21 19 21 17 + 21 17 20 15 20 15 19 14 19 14 + 16 13 16 13 12 13 17 22 19 21 + 19 21 20 19 20 19 20 17 20 17 + 19 15 19 15 18 14 18 14 16 13 + 12 13 15 12 15 12 16 10 16 10 + 17 3 17 3 18 1 12 13 14 12 + 14 12 15 10 15 10 16 3 16 3 + 18 1 18 1 19 1 19 1 21 2 + 21 2 23 4 7 19 6 17 6 17 + 6 15 6 15 7 13 7 13 9 12 + 9 12 12 12 12 12 15 13 15 13 + 17 14 17 14 20 17 20 17 21 20 + 21 20 21 21 21 21 20 22 20 22 + 19 22 19 22 17 21 17 21 16 20 + 16 20 15 18 15 18 14 15 14 15 + 12 8 12 8 11 5 11 5 9 2 + 9 2 7 1 15 18 14 14 14 14 + 13 7 13 7 12 4 12 4 10 2 + 10 2 7 1 7 1 4 1 4 1 + 2 2 2 2 1 4 1 4 1 5 + 1 5 2 6 2 6 3 5 3 5 + 2 4 16 20 15 18 15 18 13 13 + 13 13 11 7 11 7 10 5 10 5 + 8 2 8 2 6 1 10 16 9 14 + 9 14 7 13 7 13 5 13 5 13 + 4 15 4 15 4 17 4 17 5 19 + 5 19 7 21 7 21 10 22 10 22 + 19 22 19 22 17 21 17 21 16 20 + 16 20 15 17 15 17 13 9 13 9 + 12 6 12 6 11 4 11 4 9 2 + 9 2 6 1 6 1 4 1 4 1 + 2 2 2 2 1 3 1 3 1 4 + 1 4 2 5 2 5 3 4 3 4 + 2 3 12 22 16 21 16 21 17 21 + 1 18 3 21 3 21 5 22 5 22 + 6 22 6 22 8 20 8 20 8 17 + 8 17 7 14 7 14 4 6 4 6 + 4 3 4 3 5 1 6 22 7 20 + 7 20 7 17 7 17 4 9 4 9 + 3 6 3 6 3 3 3 3 5 1 + 5 1 7 1 7 1 9 2 9 2 + 12 5 12 5 14 8 14 8 15 10 + 19 22 15 10 15 10 14 6 14 6 + 14 3 14 3 16 1 16 1 17 1 + 17 1 19 2 19 2 21 4 20 22 + 16 10 16 10 15 6 15 6 15 3 + 15 3 16 1 1 18 3 21 3 21 + 5 22 5 22 6 22 6 22 8 20 + 8 20 8 17 8 17 7 13 7 13 + 5 6 5 6 5 3 5 3 6 1 + 6 22 7 20 7 20 7 17 7 17 + 5 10 5 10 4 6 4 6 4 3 + 4 3 6 1 6 1 7 1 7 1 + 10 2 10 2 13 5 13 5 15 8 + 15 8 17 12 17 12 18 15 18 15 + 19 19 19 19 19 21 19 21 18 22 + 18 22 17 22 17 22 16 21 16 21 + 15 19 15 19 15 16 15 16 16 14 + 16 14 18 12 18 12 20 11 20 11 + 22 11 3 16 2 16 2 16 1 17 + 1 17 1 19 1 19 2 21 2 21 + 4 22 4 22 8 22 8 22 7 20 + 7 20 6 16 6 16 5 7 5 7 + 4 1 6 16 6 7 6 7 5 1 + 16 22 14 20 14 20 12 16 12 16 + 9 7 9 7 7 3 7 3 5 1 + 16 22 15 20 15 20 14 16 14 16 + 13 7 13 7 12 1 14 16 14 7 + 14 7 13 1 26 22 24 21 24 21 + 22 19 22 19 20 16 20 16 17 7 + 17 7 15 3 15 3 13 1 10 17 + 9 16 9 16 7 16 7 16 6 17 + 6 17 6 19 6 19 7 21 7 21 + 9 22 9 22 11 22 11 22 13 21 + 13 21 14 19 14 19 14 16 14 16 + 13 12 13 12 11 7 11 7 9 4 + 9 4 7 2 7 2 4 1 4 1 + 2 1 2 1 1 2 1 2 1 4 + 1 4 2 5 2 5 3 4 3 4 + 2 3 11 22 12 21 12 21 13 19 + 13 19 13 16 13 16 12 12 12 12 + 10 7 10 7 8 4 8 4 6 2 + 6 2 4 1 23 21 22 20 22 20 + 23 19 23 19 24 20 24 20 24 21 + 24 21 23 22 23 22 21 22 21 22 + 19 21 19 21 17 19 17 19 15 16 + 15 16 13 12 13 12 12 7 12 7 + 12 4 12 4 13 2 13 2 14 1 + 14 1 15 1 15 1 17 2 17 2 + 19 4 2 18 4 21 4 21 6 22 + 6 22 7 22 7 22 9 21 9 21 + 9 19 9 19 7 13 7 13 7 10 + 7 10 8 8 7 22 8 21 8 21 + 8 19 8 19 6 13 6 13 6 10 + 6 10 8 8 8 8 10 8 10 8 + 13 9 13 9 15 11 15 11 17 14 + 17 14 18 16 20 22 18 16 18 16 + 15 8 15 8 13 4 21 22 19 16 + 19 16 17 11 17 11 15 7 15 7 + 13 4 13 4 11 2 11 2 8 1 + 8 1 4 1 4 1 2 2 2 2 + 1 4 1 4 1 5 1 5 2 6 + 2 6 3 5 3 5 2 4 20 20 + 19 18 19 18 17 13 17 13 16 10 + 16 10 15 8 15 8 13 5 13 5 + 11 3 11 3 9 2 9 2 6 1 + 13 16 12 14 12 14 10 13 10 13 + 8 13 8 13 7 15 7 15 7 17 + 7 17 8 19 8 19 10 21 10 21 + 13 22 13 22 23 22 23 22 21 21 + 21 21 20 20 20 20 19 17 19 17 + 18 13 18 13 16 7 16 7 14 4 + 14 4 11 2 11 2 6 1 6 1 + 2 1 2 1 1 2 1 2 1 4 + 1 4 2 5 2 5 4 5 4 5 + 6 4 6 4 9 2 9 2 11 1 + 11 1 14 1 14 1 17 2 17 2 + 19 4 16 22 20 21 20 21 21 21 + 10 7 9 9 9 9 7 10 7 10 + 5 10 5 10 3 9 3 9 2 8 + 2 8 1 6 1 6 1 4 1 4 + 2 2 2 2 4 1 4 1 6 1 + 6 1 8 2 8 2 9 4 5 10 + 3 8 3 8 2 6 2 6 2 3 + 2 3 4 1 11 10 9 4 9 4 + 9 2 9 2 11 1 11 1 13 2 + 13 2 14 3 14 3 16 6 12 10 + 10 4 10 4 10 2 10 2 11 1 + 1 6 3 9 3 9 5 13 8 22 + 2 4 2 4 2 2 2 2 4 1 + 4 1 5 1 5 1 7 2 7 2 + 9 4 9 4 10 7 10 7 10 10 + 10 10 11 6 11 6 12 5 12 5 + 13 5 13 5 15 6 9 22 3 4 + 3 4 3 2 3 2 4 1 8 9 + 7 8 7 8 8 8 8 8 8 9 + 8 9 7 10 7 10 5 10 5 10 + 3 9 3 9 2 8 2 8 1 6 + 1 6 1 4 1 4 2 2 2 2 + 4 1 4 1 7 1 7 1 10 3 + 10 3 12 6 5 10 3 8 3 8 + 2 6 2 6 2 3 2 3 4 1 + 10 7 9 9 9 9 7 10 7 10 + 5 10 5 10 3 9 3 9 2 8 + 2 8 1 6 1 6 1 4 1 4 + 2 2 2 2 4 1 4 1 6 1 + 6 1 8 2 8 2 9 4 5 10 + 3 8 3 8 2 6 2 6 2 3 + 2 3 4 1 15 22 9 4 9 4 + 9 2 9 2 11 1 11 1 13 2 + 13 2 14 3 14 3 16 6 16 22 + 10 4 10 4 10 2 10 2 11 1 + 3 3 5 4 5 4 6 5 6 5 + 7 7 7 7 7 9 7 9 6 10 + 6 10 5 10 5 10 3 9 3 9 + 2 8 2 8 1 6 1 6 1 4 + 1 4 2 2 2 2 4 1 4 1 + 7 1 7 1 10 3 10 3 12 6 + 5 10 3 8 3 8 2 6 2 6 + 2 3 2 3 4 1 8 22 11 25 + 11 25 13 28 13 28 14 31 14 31 + 14 33 14 33 13 34 13 34 11 33 + 11 33 10 31 10 31 1 4 1 4 + 1 2 1 2 2 1 2 1 4 2 + 4 2 5 5 5 5 6 14 6 14 + 7 13 7 13 9 13 9 13 11 14 + 11 14 12 15 12 15 14 18 10 31 + 9 26 9 26 8 22 8 22 5 13 + 5 13 3 8 3 8 1 4 10 19 + 9 21 9 21 7 22 7 22 5 22 + 5 22 3 21 3 21 2 20 2 20 + 1 18 1 18 1 16 1 16 2 14 + 2 14 4 13 4 13 6 13 6 13 + 8 14 8 14 9 16 5 22 3 20 + 3 20 2 18 2 18 2 15 2 15 + 4 13 11 22 5 4 12 22 9 13 + 9 13 7 8 7 8 5 4 5 4 + 4 2 4 2 2 1 2 1 1 2 + 1 2 1 4 1 4 2 7 2 7 + 4 9 4 9 7 11 7 11 11 13 + 11 13 14 15 14 15 16 18 1 6 + 3 9 3 9 5 13 8 22 1 1 + 9 22 2 1 4 7 6 9 6 9 + 8 10 8 10 9 10 9 10 11 9 + 11 9 11 7 11 7 10 4 10 4 + 10 2 10 2 11 1 9 10 10 9 + 10 9 10 7 10 7 9 4 9 4 + 9 2 9 2 11 1 11 1 13 2 + 13 2 14 3 14 3 16 6 5 16 + 4 15 4 15 5 14 5 14 6 15 + 6 15 5 16 3 10 1 4 1 4 + 1 2 1 2 3 1 3 1 5 2 + 5 2 6 3 6 3 8 6 4 10 + 2 4 2 4 2 2 2 2 3 1 + 13 28 12 27 12 27 13 26 13 26 + 14 27 14 27 13 28 11 22 5 4 + 12 22 9 13 9 13 7 8 7 8 + 5 4 5 4 4 2 4 2 2 1 + 2 1 1 2 1 2 1 4 1 4 + 2 7 2 7 4 9 4 9 7 11 + 7 11 11 13 11 13 14 15 14 15 + 16 18 1 6 3 9 3 9 5 13 + 8 22 1 1 9 22 2 1 10 10 + 10 9 10 9 11 9 11 9 10 10 + 10 10 9 10 9 10 7 8 7 8 + 4 7 4 7 7 6 7 6 8 2 + 8 2 9 1 4 7 6 6 6 6 + 7 2 7 2 9 1 9 1 10 1 + 10 1 13 3 13 3 15 6 1 6 + 3 9 3 9 5 13 8 22 2 4 + 2 4 2 2 2 2 4 1 4 1 + 6 2 6 2 7 3 7 3 9 6 + 9 22 3 4 3 4 3 2 3 2 + 4 1 1 6 3 9 3 9 5 10 + 5 10 7 9 7 9 7 7 7 7 + 5 1 5 10 6 9 6 9 6 7 + 6 7 4 1 7 7 9 9 9 9 + 11 10 11 10 12 10 12 10 14 9 + 14 9 14 7 14 7 12 1 12 10 + 13 9 13 9 13 7 13 7 11 1 + 14 7 16 9 16 9 18 10 18 10 + 19 10 19 10 21 9 21 9 21 7 + 21 7 20 4 20 4 20 2 20 2 + 21 1 19 10 20 9 20 9 20 7 + 20 7 19 4 19 4 19 2 19 2 + 21 1 21 1 23 2 23 2 24 3 + 24 3 26 6 1 6 3 9 3 9 + 5 10 5 10 7 9 7 9 7 7 + 7 7 5 1 5 10 6 9 6 9 + 6 7 6 7 4 1 7 7 9 9 + 9 9 11 10 11 10 12 10 12 10 + 14 9 14 9 14 7 14 7 13 4 + 13 4 13 2 13 2 14 1 12 10 + 13 9 13 9 13 7 13 7 12 4 + 12 4 12 2 12 2 14 1 14 1 + 16 2 16 2 17 3 17 3 19 6 + 7 10 5 10 5 10 3 9 3 9 + 2 8 2 8 1 6 1 6 1 4 + 1 4 2 2 2 2 4 1 4 1 + 6 1 6 1 8 2 8 2 9 3 + 9 3 10 5 10 5 10 7 10 7 + 9 9 9 9 7 10 7 10 6 9 + 6 9 6 7 6 7 7 5 7 5 + 9 4 9 4 11 4 11 4 13 5 + 13 5 14 6 5 10 3 8 3 8 + 2 6 2 6 2 3 2 3 4 1 + 5 18 7 21 7 21 9 25 10 28 + 1 1 11 28 2 1 8 19 10 21 + 10 21 12 22 12 22 13 22 13 22 + 15 21 15 21 15 19 15 19 14 16 + 14 16 14 14 14 14 15 13 13 22 + 14 21 14 21 14 19 14 19 13 16 + 13 16 13 14 13 14 15 13 15 13 + 17 14 17 14 18 15 18 15 20 18 + 10 19 9 21 9 21 7 22 7 22 + 5 22 5 22 3 21 3 21 2 20 + 2 20 1 18 1 18 1 16 1 16 + 2 14 2 14 4 13 4 13 6 13 + 6 13 8 14 5 22 3 20 3 20 + 2 18 2 18 2 15 2 15 4 13 + 11 22 5 4 5 4 5 2 5 2 + 6 1 6 1 8 2 8 2 9 5 + 9 5 9 13 9 13 11 13 11 13 + 14 15 14 15 16 18 12 22 9 13 + 9 13 7 8 7 8 5 4 1 6 + 3 9 3 9 5 10 5 10 7 9 + 7 9 7 7 7 7 5 1 5 10 + 6 9 6 9 6 7 6 7 4 1 + 7 7 9 9 9 9 11 10 11 10 + 12 10 12 10 11 7 11 10 11 7 + 11 7 12 5 12 5 13 5 13 5 + 15 6 1 6 3 9 3 9 4 11 + 4 11 4 9 4 9 7 7 7 7 + 8 5 8 5 8 3 8 3 7 2 + 7 2 5 1 4 9 6 7 6 7 + 7 5 7 5 7 3 7 3 5 1 + 1 2 3 1 3 1 8 1 8 1 + 11 3 11 3 13 6 1 6 3 9 + 3 9 5 13 8 22 2 4 2 4 + 2 2 2 2 4 1 4 1 6 2 + 6 2 7 3 7 3 9 6 9 22 + 3 4 3 4 3 2 3 2 4 1 + 3 14 9 14 3 10 1 4 1 4 + 1 2 1 2 3 1 3 1 4 1 + 4 1 6 2 6 2 8 4 8 4 + 10 7 4 10 2 4 2 4 2 2 + 2 2 3 1 11 10 9 4 9 4 + 9 2 9 2 11 1 11 1 13 2 + 13 2 14 3 14 3 16 6 12 10 + 10 4 10 4 10 2 10 2 11 1 + 3 10 2 8 2 8 1 5 1 5 + 1 2 1 2 3 1 3 1 4 1 + 4 1 7 2 7 2 9 4 9 4 + 10 7 10 7 10 10 4 10 3 8 + 3 8 2 5 2 5 2 2 2 2 + 3 1 10 10 11 6 11 6 12 5 + 12 5 13 5 13 5 15 6 4 10 + 2 8 2 8 1 5 1 5 1 2 + 1 2 3 1 3 1 4 1 4 1 + 6 2 6 2 8 4 5 10 3 8 + 3 8 2 5 2 5 2 2 2 2 + 3 1 10 10 8 4 8 4 8 2 + 8 2 10 1 10 1 11 1 11 1 + 13 2 13 2 15 4 15 4 16 7 + 16 7 16 10 11 10 9 4 9 4 + 9 2 9 2 10 1 16 10 17 6 + 17 6 18 5 18 5 19 5 19 5 + 21 6 1 6 3 9 3 9 5 10 + 5 10 7 10 7 10 8 9 8 9 + 8 7 8 7 7 4 7 4 6 2 + 6 2 4 1 4 1 3 1 3 1 + 2 2 2 2 2 3 2 3 3 3 + 3 3 2 2 14 9 13 8 13 8 + 14 8 14 8 14 9 14 9 13 10 + 13 10 12 10 12 10 10 9 10 9 + 9 7 9 7 8 4 8 4 8 2 + 8 2 9 1 9 1 12 1 12 1 + 15 3 15 3 17 6 8 9 9 7 + 10 9 8 7 7 4 8 2 8 4 + 6 2 3 22 1 16 1 16 1 14 + 1 14 3 13 3 13 4 13 4 13 + 6 14 6 14 8 16 8 16 10 19 + 4 22 2 16 2 16 2 14 2 14 + 3 13 11 22 5 4 12 22 9 13 + 9 13 7 8 7 8 5 4 5 4 + 4 2 4 2 2 1 2 1 1 2 + 1 2 1 4 1 4 2 7 2 7 + 4 9 4 9 7 11 7 11 11 13 + 11 13 14 15 14 15 16 18 2 18 + 4 21 4 21 6 22 6 22 8 22 + 8 22 10 21 10 21 10 18 10 18 + 9 16 9 16 6 14 6 14 4 13 + 8 22 9 21 9 21 9 18 9 18 + 8 16 8 16 6 14 4 13 6 12 + 6 12 7 10 7 10 7 7 7 7 + 6 4 6 4 4 2 4 2 2 1 + 2 1 1 2 1 2 1 4 1 4 + 2 7 2 7 5 10 5 10 8 12 + 8 12 12 15 12 15 15 18 4 13 + 5 12 5 12 6 10 6 10 6 7 + 6 7 5 4 5 4 4 2 10 22 + 7 21 7 21 5 19 5 19 3 16 + 3 16 2 13 2 13 1 9 1 9 + 1 6 1 6 2 3 2 3 3 2 + 3 2 5 1 5 1 7 1 7 1 + 10 2 10 2 12 4 12 4 14 7 + 14 7 15 10 15 10 16 14 16 14 + 16 17 16 17 15 20 15 20 14 21 + 14 21 12 22 12 22 10 22 10 22 + 8 21 8 21 6 19 6 19 4 16 + 4 16 3 13 3 13 2 9 2 9 + 2 6 2 6 3 3 3 3 5 1 + 7 1 9 2 9 2 11 4 11 4 + 13 7 13 7 14 10 14 10 15 14 + 15 14 15 17 15 17 14 20 14 20 + 12 22 7 18 2 1 9 22 3 1 + 9 22 6 19 6 19 3 17 3 17 + 1 16 8 19 4 17 4 17 1 16 + 7 18 8 17 8 17 7 16 7 16 + 6 17 6 17 6 18 6 18 7 20 + 7 20 8 21 8 21 11 22 11 22 + 14 22 14 22 17 21 17 21 18 19 + 18 19 18 17 18 17 17 15 17 15 + 15 13 15 13 12 11 12 11 8 9 + 8 9 5 7 5 7 3 5 3 5 + 1 1 14 22 16 21 16 21 17 19 + 17 19 17 17 17 17 16 15 16 15 + 14 13 14 13 8 9 2 3 3 4 + 3 4 5 4 5 4 10 2 10 2 + 13 2 13 2 15 3 15 3 16 5 + 5 4 10 1 10 1 13 1 13 1 + 15 2 15 2 16 5 6 18 7 17 + 7 17 6 16 6 16 5 17 5 17 + 5 18 5 18 6 20 6 20 7 21 + 7 21 10 22 10 22 13 22 13 22 + 16 21 16 21 17 19 17 19 17 17 + 17 17 16 15 16 15 13 13 13 13 + 10 12 13 22 15 21 15 21 16 19 + 16 19 16 17 16 17 15 15 15 15 + 13 13 8 12 10 12 10 12 13 11 + 13 11 14 10 14 10 15 8 15 8 + 15 5 15 5 14 3 14 3 13 2 + 13 2 10 1 10 1 6 1 6 1 + 3 2 3 2 2 3 2 3 1 5 + 1 5 1 6 1 6 2 7 2 7 + 3 6 3 6 2 5 10 12 12 11 + 12 11 13 10 13 10 14 8 14 8 + 14 5 14 5 13 3 13 3 12 2 + 12 2 10 1 15 21 9 1 16 22 + 10 1 16 22 1 7 1 7 17 7 + 8 22 3 12 8 22 18 22 8 21 + 13 21 13 21 18 22 3 12 4 13 + 4 13 7 14 7 14 10 14 10 14 + 13 13 13 13 14 12 14 12 15 10 + 15 10 15 7 15 7 14 4 14 4 + 12 2 12 2 9 1 9 1 6 1 + 6 1 3 2 3 2 2 3 2 3 + 1 5 1 5 1 6 1 6 2 7 + 2 7 3 6 3 6 2 5 10 14 + 12 13 12 13 13 12 13 12 14 10 + 14 10 14 7 14 7 13 4 13 4 + 11 2 11 2 9 1 15 19 14 18 + 14 18 15 17 15 17 16 18 16 18 + 16 19 16 19 15 21 15 21 13 22 + 13 22 10 22 10 22 7 21 7 21 + 5 19 5 19 3 16 3 16 2 13 + 2 13 1 9 1 9 1 5 1 5 + 2 3 2 3 3 2 3 2 5 1 + 5 1 8 1 8 1 11 2 11 2 + 13 4 13 4 14 6 14 6 14 9 + 14 9 13 11 13 11 12 12 12 12 + 10 13 10 13 7 13 7 13 5 12 + 5 12 3 10 3 10 2 8 10 22 + 8 21 8 21 6 19 6 19 4 16 + 4 16 3 13 3 13 2 9 2 9 + 2 4 2 4 3 2 8 1 10 2 + 10 2 12 4 12 4 13 6 13 6 + 13 10 13 10 12 12 3 22 1 16 + 16 22 15 19 15 19 13 16 13 16 + 8 10 8 10 6 7 6 7 5 5 + 5 5 4 1 13 16 7 10 7 10 + 5 7 5 7 4 5 4 5 3 1 + 2 19 5 22 5 22 7 22 7 22 + 12 19 3 20 5 21 5 21 7 21 + 7 21 12 19 12 19 14 19 14 19 + 15 20 15 20 16 22 10 22 7 21 + 7 21 6 20 6 20 5 18 5 18 + 5 15 5 15 6 13 6 13 8 12 + 8 12 11 12 11 12 15 13 15 13 + 16 14 16 14 17 16 17 16 17 19 + 17 19 16 21 16 21 13 22 13 22 + 10 22 10 22 8 21 8 21 7 20 + 7 20 6 18 6 18 6 15 6 15 + 7 13 7 13 8 12 11 12 14 13 + 14 13 15 14 15 14 16 16 16 16 + 16 19 16 19 15 21 15 21 13 22 + 8 12 4 11 4 11 2 9 2 9 + 1 7 1 7 1 4 1 4 2 2 + 2 2 5 1 5 1 9 1 9 1 + 13 2 13 2 14 3 14 3 15 5 + 15 5 15 8 15 8 14 10 14 10 + 13 11 13 11 11 12 8 12 5 11 + 5 11 3 9 3 9 2 7 2 7 + 2 4 2 4 3 2 3 2 5 1 + 9 1 12 2 12 2 13 3 13 3 + 14 5 14 5 14 9 14 9 13 11 + 15 15 14 13 14 13 12 11 12 11 + 10 10 10 10 7 10 7 10 5 11 + 5 11 4 12 4 12 3 14 3 14 + 3 17 3 17 4 19 4 19 6 21 + 6 21 9 22 9 22 12 22 12 22 + 14 21 14 21 15 20 15 20 16 18 + 16 18 16 14 16 14 15 10 15 10 + 14 7 14 7 12 4 12 4 10 2 + 10 2 7 1 7 1 4 1 4 1 + 2 2 2 2 1 4 1 4 1 5 + 1 5 2 6 2 6 3 5 3 5 + 2 4 5 11 4 13 4 13 4 17 + 4 17 5 19 5 19 7 21 7 21 + 9 22 14 21 15 19 15 19 15 14 + 15 14 14 10 14 10 13 7 13 7 + 11 4 11 4 9 2 9 2 7 1 + 2 3 1 2 1 2 2 1 2 1 + 3 2 3 2 2 3 3 5 2 6 + 2 6 3 7 3 7 4 6 4 6 + 4 5 4 5 3 3 3 3 1 1 + 5 15 4 14 4 14 5 13 5 13 + 6 14 6 14 5 15 2 3 1 2 + 1 2 2 1 2 1 3 2 6 19 + 5 18 5 18 6 17 6 17 7 18 + 7 18 6 19 3 5 2 6 2 6 + 3 7 3 7 4 6 4 6 4 5 + 4 5 3 3 3 3 1 1 7 22 + 6 21 6 21 4 9 7 21 4 9 + 7 22 8 21 8 21 4 9 2 3 + 1 2 1 2 2 1 2 1 3 2 + 3 2 2 3 2 18 3 17 3 17 + 2 16 2 16 1 17 1 17 1 18 + 1 18 2 20 2 20 3 21 3 21 + 6 22 6 22 10 22 10 22 13 21 + 13 21 14 19 14 19 14 17 14 17 + 13 15 13 15 12 14 12 14 6 12 + 6 12 4 11 4 11 4 9 4 9 + 5 8 5 8 7 8 10 22 12 21 + 12 21 13 19 13 19 13 17 13 17 + 12 15 12 15 11 14 11 14 9 13 + 3 3 2 2 2 2 3 1 3 1 + 4 2 4 2 3 3 4 7 2 5 + 2 5 1 3 1 3 1 2 1 2 + 2 1 2 1 3 2 3 2 2 3 + 3 5 2 6 2 6 3 7 3 7 + 4 6 4 6 4 5 4 5 3 3 + 3 3 1 1 22 14 21 13 21 13 + 22 12 22 12 23 13 23 13 23 14 + 23 14 22 15 22 15 21 15 21 15 + 19 14 19 14 17 12 17 12 12 4 + 12 4 10 2 10 2 8 1 8 1 + 5 1 5 1 2 2 2 2 1 4 + 1 4 1 6 1 6 2 8 2 8 + 3 9 3 9 5 10 5 10 10 12 + 10 12 12 13 12 13 14 15 14 15 + 15 17 15 17 15 19 15 19 14 21 + 14 21 12 22 12 22 10 21 10 21 + 9 19 9 19 9 16 9 16 10 10 + 10 10 11 7 11 7 13 4 13 4 + 15 2 15 2 17 1 17 1 19 1 + 19 1 20 3 20 3 20 4 5 1 + 3 2 3 2 2 4 2 4 2 6 + 2 6 3 8 3 8 4 9 4 9 + 10 12 9 16 10 11 10 11 11 8 + 11 8 13 5 13 5 15 3 15 3 + 17 2 17 2 19 2 19 2 20 3 + 11 30 3 1 16 30 8 1 17 22 + 16 21 16 21 17 20 17 20 18 21 + 18 21 18 22 18 22 17 24 17 24 + 16 25 16 25 13 26 13 26 9 26 + 9 26 6 25 6 25 4 23 4 23 + 4 21 4 21 5 19 5 19 6 18 + 6 18 13 14 13 14 15 12 4 21 + 6 19 6 19 13 15 13 15 14 14 + 14 14 15 12 15 12 15 9 15 9 + 14 7 14 7 13 6 13 6 10 5 + 10 5 6 5 6 5 3 6 3 6 + 2 7 2 7 1 9 1 9 1 10 + 1 10 2 11 2 11 3 10 3 10 + 2 9 27 33 1 1 13 33 9 30 + 9 30 6 27 6 27 4 24 4 24 + 2 20 2 20 1 15 1 15 1 11 + 1 11 2 6 2 6 3 3 3 3 + 4 1 9 30 6 26 6 26 4 22 + 4 22 3 19 3 19 2 14 2 14 + 2 9 2 9 3 4 3 4 4 1 + 10 33 11 31 11 31 12 28 12 28 + 13 23 13 23 13 19 13 19 12 14 + 12 14 10 10 10 10 8 7 8 7 + 5 4 5 4 1 1 10 33 11 30 + 11 30 12 25 12 25 12 20 12 20 + 11 15 11 15 10 12 10 12 8 8 + 8 8 5 4 6 13 6 1 1 10 + 11 4 11 10 1 4 1 1 19 1 + 10 19 10 1 1 10 19 10 1 7 + 19 7 1 1 19 1 3 8 1 1 + 4 8 1 1 3 8 1 1 4 8 + 1 1 12 8 10 1 13 8 10 1 + 4 9 2 8 2 8 1 6 1 6 + 1 4 1 4 2 2 2 2 4 1 + 4 1 6 1 6 1 8 2 8 2 + 9 4 9 4 9 6 9 6 8 8 + 8 8 6 9 6 9 4 9 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0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 22 17 1 + 1 1 17 1 1 22 1 1 1 22 + 14 22 1 12 9 12 1 1 14 1 + 15 22 1 1 1 22 15 22 1 1 + 15 1 1 22 1 1 15 22 15 1 + 1 12 15 12 7 22 5 21 5 21 + 3 19 3 19 2 17 2 17 1 14 + 1 14 1 9 1 9 2 6 2 6 + 3 4 3 4 5 2 5 2 7 1 + 7 1 11 1 11 1 13 2 13 2 + 15 4 15 4 16 6 16 6 17 9 + 17 9 17 14 17 14 16 17 16 17 + 15 19 15 19 13 21 13 21 11 22 + 11 22 7 22 6 12 12 12 1 22 + 1 1 1 22 1 1 15 22 1 8 + 6 13 15 1 9 22 1 1 9 22 + 17 1 1 22 1 1 1 22 9 1 + 17 22 9 1 17 22 17 1 1 22 + 1 1 1 22 15 1 15 22 15 1 + 1 22 15 22 5 12 11 12 1 1 + 15 1 7 22 5 21 5 21 3 19 + 3 19 2 17 2 17 1 14 1 14 + 1 9 1 9 2 6 2 6 3 4 + 3 4 5 2 5 2 7 1 7 1 + 11 1 11 1 13 2 13 2 15 4 + 15 4 16 6 16 6 17 9 17 9 + 17 14 17 14 16 17 16 17 15 19 + 15 19 13 21 13 21 11 22 11 22 + 7 22 1 22 1 1 15 22 15 1 + 1 22 15 22 1 22 1 1 1 22 + 10 22 10 22 13 21 13 21 14 20 + 14 20 15 18 15 18 15 15 15 15 + 14 13 14 13 13 12 13 12 10 11 + 10 11 1 11 1 22 8 12 8 12 + 1 1 1 22 15 22 1 1 15 1 + 8 22 8 1 1 22 15 22 1 17 + 1 19 1 19 2 21 2 21 3 22 + 3 22 5 22 5 22 6 21 6 21 + 7 19 7 19 8 15 8 15 8 1 + 15 17 15 19 15 19 14 21 14 21 + 13 22 13 22 11 22 11 22 10 21 + 10 21 9 19 9 19 8 15 8 22 + 8 1 6 17 3 16 3 16 2 15 + 2 15 1 13 1 13 1 10 1 10 + 2 8 2 8 3 7 3 7 6 6 + 6 6 10 6 10 6 13 7 13 7 + 14 8 14 8 15 10 15 10 15 13 + 15 13 14 15 14 15 13 16 13 16 + 10 17 10 17 6 17 1 22 15 1 + 1 1 15 22 10 22 10 1 1 16 + 2 16 2 16 3 15 3 15 4 11 + 4 11 5 9 5 9 6 8 6 8 + 9 7 9 7 11 7 11 7 14 8 + 14 8 15 9 15 9 16 11 16 11 + 17 15 17 15 18 16 18 16 19 16 + 1 1 5 1 5 1 2 8 2 8 + 1 12 1 12 1 16 1 16 2 19 + 2 19 4 21 4 21 7 22 7 22 + 9 22 9 22 12 21 12 21 14 19 + 14 19 15 16 15 16 15 12 15 12 + 14 8 14 8 11 1 11 1 15 1 + 7 15 5 14 5 14 3 12 3 12 + 2 10 2 10 1 7 1 7 1 4 + 1 4 2 2 2 2 4 1 4 1 + 6 1 6 1 8 2 8 2 11 5 + 11 5 13 8 13 8 15 12 15 12 + 16 15 7 15 9 15 9 15 10 14 + 10 14 11 12 11 12 13 4 13 4 + 14 2 14 2 15 1 15 1 16 1 + 16 29 14 28 14 28 12 26 12 26 + 10 22 10 22 9 19 9 19 8 15 + 8 15 7 9 7 9 6 1 16 29 + 18 29 18 29 20 27 20 27 20 24 + 20 24 19 22 19 22 18 21 18 21 + 16 20 16 20 13 20 13 20 15 19 + 15 19 17 17 17 17 18 15 18 15 + 18 12 18 12 17 10 17 10 16 9 + 16 9 14 4 14 4 5 4 5 4 + 3 5 3 5 2 6 2 6 1 9 + 1 19 3 21 3 21 5 22 5 22 + 6 22 6 22 8 21 8 21 9 20 + 9 20 10 17 10 17 10 13 10 13 + 9 8 17 22 16 19 16 19 15 17 + 15 17 9 8 9 8 7 4 7 4 + 6 1 9 15 6 15 6 15 4 14 + 4 14 2 12 2 12 1 9 1 9 + 1 6 1 6 2 3 2 3 3 2 + 3 2 5 1 5 1 7 1 7 1 + 9 2 9 2 11 4 11 4 12 7 + 12 7 12 10 12 10 11 13 11 13 + 9 15 9 15 7 17 7 17 6 19 + 6 19 6 21 6 21 7 22 7 22 + 9 22 9 22 11 21 11 21 13 19 + 11 13 10 14 10 14 8 15 8 15 + 5 15 5 15 3 14 3 14 3 12 + 3 12 4 10 4 10 7 9 7 9 + 3 8 3 8 1 6 1 6 1 4 + 1 4 2 2 2 2 4 1 4 1 + 7 1 7 1 9 2 9 2 11 4 + 8 29 6 28 6 28 5 27 5 27 + 5 26 5 26 6 25 6 25 9 24 + 9 24 12 24 12 24 8 22 8 22 + 5 20 5 20 2 17 2 17 1 14 + 1 14 1 12 1 12 2 10 2 10 + 4 8 4 8 7 6 7 6 8 4 + 8 4 8 2 8 2 7 1 7 1 + 5 1 5 1 4 3 1 18 2 20 + 2 20 4 22 4 22 6 22 6 22 + 7 21 7 21 7 19 7 19 6 15 + 6 15 4 8 6 15 8 19 8 19 + 10 21 10 21 12 22 12 22 14 22 + 14 22 16 20 16 20 16 17 16 17 + 15 12 15 12 12 1 1 11 2 13 + 2 13 4 15 4 15 6 15 6 15 + 7 14 7 14 7 12 7 12 6 7 + 6 7 6 4 6 4 7 2 7 2 + 8 1 8 1 10 1 10 1 12 2 + 12 2 14 5 14 5 15 7 15 7 + 16 10 16 10 17 15 17 15 17 18 + 17 18 16 21 16 21 14 22 14 22 + 12 22 12 22 11 20 11 20 11 18 + 11 18 12 15 12 15 14 12 14 12 + 16 10 16 10 19 8 4 15 2 8 + 2 8 1 4 1 4 1 2 1 2 + 2 1 2 1 4 1 4 1 6 3 + 6 3 7 5 5 15 1 1 15 14 + 14 15 14 15 13 15 13 15 11 14 + 11 14 7 10 7 10 5 9 5 9 + 4 9 4 9 6 8 6 8 7 7 + 7 7 9 2 9 2 10 1 10 1 + 11 1 11 1 12 2 1 22 3 22 + 3 22 5 21 5 21 6 20 6 20 + 14 1 8 15 2 1 7 22 1 1 + 6 18 5 13 5 13 5 10 5 10 + 7 8 7 8 9 8 9 8 11 9 + 11 9 13 11 13 11 15 15 17 22 + 15 15 15 15 14 11 14 11 14 9 + 14 9 15 8 15 8 17 8 17 8 + 19 10 19 10 20 12 1 15 4 15 + 4 15 3 9 3 9 2 4 2 4 + 1 1 14 15 13 12 13 12 12 10 + 12 10 10 7 10 7 7 4 7 4 + 4 2 4 2 1 1 8 29 6 28 + 6 28 5 27 5 27 5 26 5 26 + 6 25 6 25 9 24 9 24 12 24 + 9 24 6 23 6 23 4 22 4 22 + 3 20 3 20 3 18 3 18 5 16 + 5 16 8 15 8 15 10 15 8 15 + 4 14 4 14 2 13 2 13 1 11 + 1 11 1 9 1 9 3 7 3 7 + 7 5 7 5 8 4 8 4 8 2 + 8 2 6 1 6 1 4 1 6 15 + 4 14 4 14 2 12 2 12 1 9 + 1 9 1 6 1 6 2 3 2 3 + 3 2 3 2 5 1 5 1 7 1 + 7 1 9 2 9 2 11 4 11 4 + 12 7 12 7 12 10 12 10 11 13 + 11 13 10 14 10 14 8 15 8 15 + 6 15 8 15 4 1 13 15 14 9 + 14 9 15 4 15 4 16 1 1 12 + 3 14 3 14 6 15 6 15 19 15 + 5 16 5 13 5 13 6 10 6 10 + 7 9 7 9 9 8 9 8 11 8 + 11 8 13 9 13 9 15 11 15 11 + 16 14 16 14 16 17 16 17 15 20 + 15 20 14 21 14 21 12 22 12 22 + 10 22 10 22 8 21 8 21 6 19 + 6 19 5 16 5 16 1 1 16 15 + 6 15 6 15 4 14 4 14 2 12 + 2 12 1 9 1 9 1 6 1 6 + 2 3 2 3 3 2 3 2 5 1 + 5 1 7 1 7 1 9 2 9 2 + 11 4 11 4 12 7 12 7 12 10 + 12 10 11 13 11 13 10 14 10 14 + 8 15 10 15 7 1 1 12 3 14 + 3 14 6 15 6 15 17 15 1 11 + 2 13 2 13 4 15 4 15 6 15 + 6 15 7 14 7 14 7 12 7 12 + 5 6 5 6 5 3 5 3 7 1 + 7 1 9 1 9 1 12 2 12 2 + 14 4 14 4 16 8 16 8 17 12 + 17 12 17 15 6 21 4 20 4 20 + 2 18 2 18 1 15 1 15 1 12 + 1 12 2 10 2 10 3 9 3 9 + 5 8 5 8 8 8 8 8 11 9 + 11 9 14 11 14 11 16 14 16 14 + 17 17 17 17 17 20 17 20 15 22 + 15 22 13 22 13 22 11 20 11 20 + 9 16 9 16 7 11 7 11 4 1 + 2 22 4 22 4 22 6 20 6 20 + 12 3 12 3 14 1 14 1 16 1 + 17 22 16 20 16 20 14 17 14 17 + 4 6 4 6 2 3 2 3 1 1 + 16 29 8 1 1 18 2 20 2 20 + 4 22 4 22 6 22 6 22 7 21 + 7 21 7 19 7 19 6 14 6 14 + 6 11 6 11 7 9 7 9 9 8 + 9 8 11 8 11 8 14 9 14 9 + 16 11 16 11 18 14 18 14 20 19 + 20 19 21 22 6 15 4 14 4 14 + 2 11 2 11 1 8 1 8 1 5 + 1 5 2 2 2 2 3 1 3 1 + 5 1 5 1 7 2 7 2 9 5 + 10 9 9 5 9 5 10 2 10 2 + 11 1 11 1 13 1 13 1 15 2 + 15 2 17 5 17 5 18 8 18 8 + 18 11 18 11 17 14 17 14 16 15 + 11 14 9 15 9 15 6 15 6 15 + 4 14 4 14 2 12 2 12 1 9 + 1 9 1 6 1 6 2 3 2 3 + 3 2 3 2 5 1 5 1 8 1 + 8 1 10 2 1 8 9 8 8 22 + 6 21 6 21 4 18 4 18 3 16 + 3 16 2 13 2 13 1 8 1 8 + 1 4 1 4 2 2 2 2 3 1 + 3 1 5 1 5 1 7 2 7 2 + 9 5 9 5 10 7 10 7 11 10 + 11 10 12 15 12 15 12 19 12 19 + 11 21 11 21 10 22 10 22 8 22 + 2 12 11 12 12 29 4 1 7 22 + 4 21 4 21 2 19 2 19 1 16 + 1 16 1 13 1 13 2 11 2 11 + 4 9 4 9 7 8 7 8 9 8 + 9 8 12 9 12 9 14 11 14 11 + 15 14 15 14 15 17 15 17 14 19 + 14 19 12 21 12 21 9 22 9 22 + 7 22 13 17 12 18 12 18 9 19 + 9 19 6 19 6 19 3 18 3 18 + 2 17 2 17 1 15 1 15 1 13 + 1 13 2 11 2 11 4 9 4 9 + 8 6 8 6 9 4 9 4 9 2 + 9 2 8 1 8 1 6 1 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0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 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 diff --git a/ccp4c/data/fontpack.f b/ccp4c/data/fontpack.f new file mode 100644 index 00000000..45b3ab65 --- /dev/null +++ b/ccp4c/data/fontpack.f @@ -0,0 +1,16 @@ + INTEGER*2 IFHT(150,4),IFSTRT(150,4),IFWID(150,4),IFX0(150,4), + + IFY0(150,4),LENGF(150,4) + INTEGER*1 NFONTS(4,3000,4) + INTEGER IUNITF + DATA IUNITF/11/ +C +C + IFAIL = 0 + ITEROP = -IUNITF + CALL CCPDPN (-10,'font84.ascii','OLD','F',0,IFAIL) + CALL CCPDPN (ITEROP,'font84.dat','NEW','U',80,IFAIL) + READ(10,2000) IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT,NFONTS + 2000 FORMAT(10I5) + WRITE (IUNITF) IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT,NFONTS + CLOSE (UNIT=IUNITF) + END diff --git a/ccp4c/data/fontunpack.for b/ccp4c/data/fontunpack.for new file mode 100644 index 00000000..648f5454 --- /dev/null +++ b/ccp4c/data/fontunpack.for @@ -0,0 +1,23 @@ + INTEGER*2 IFHT,IFSTRT,IFWID,IFX0,IFY0,LENGF + BYTE NFONTS + INTEGER IUNITF + COMMON /PINOUT/LUNIN,LUNOUT + COMMON /PLT$FNT/IFSTRT(150,4),LENGF(150,4),IFX0(150,4), + + IFY0(150,4),IFWID(150,4),IFHT(150,4),NFONTS(4,3000,4) + DATA IUNITF/89/ +C +C + IFAIL = 0 + ITEROP = -IUNITF + OPEN(UNIT=10,FILE='font84.ascii',STATUS='NEW') + CALL CCPDPN (ITEROP,'font84.dat','OLD','U',80,IFAIL) + IF (IFAIL.NE.0) THEN + WRITE (6,FMT=6000) + 6000 FORMAT (' Unable to read fonts - FILE=PUBLIC_FONT84') + ELSE + READ (IUNITF) IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT,NFONTS + WRITE(10,2000) IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT,NFONTS +2000 FORMAT(10I10) + CLOSE (UNIT=IUNITF) + ENDIF + END diff --git a/ccp4c/data/syminfo.lib b/ccp4c/data/syminfo.lib new file mode 100644 index 00000000..c8ea619a --- /dev/null +++ b/ccp4c/data/syminfo.lib @@ -0,0 +1,14552 @@ +# This file contains a list of spacegroups, each in a +# number of settings. Each setting is delimited by +# begin_spacegroup / end_spacegroup records. For each +# spacegroup setting, the following are listed: +# number = standard spacegroup number +# basisop = change of basis operator +# symbol ccp4 = CCP4 spacegroup number e.g. 1003 +# (0 if not a CCP4 group) +# symbol Hall = Hall symbol +# symbol xHM = extended Hermann Mauguin symbol +# symbol old = CCP4 spacegroup name +# (blank if not a CCP4 group) +# symbol laue = Laue group symbol +# symbol patt = Patterson group symbol +# symbol pgrp = Point group symbol +# hklasu ccp4 = reciprocal space asymmetric unit +# (with respect to standard setting) +# mapasu ccp4 = CCP4 real space asymmetric unit +# (with respect to standard setting) +# (negative ranges if not a CCP4 group) +# mapasu zero = origin based real space asymmetric unit +# (with respect to current setting) +# mapasu nonz = non-origin based real space asymmetric unit +# (with respect to current setting) +# cheshire = Cheshire cell +# (with respect to standard setting) +# symop = list of primitive symmetry operators +# cenop = list of centering operators +# +begin_spacegroup +number 1 +basisop x,y,z +symbol ccp4 1 +symbol Hall ' P 1' +symbol xHM 'P 1' +symbol old 'P 1' +symbol laue '-P 1' '-1' +symbol patt '-P 1' '-1' +symbol pgrp ' P 1' '1' +hklasu ccp4 'l>0 or (l==0 and (h>0 or (h==0 and k>=0)))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=0; 0<=z<=0 +symop x,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 2 +basisop x,y,z +symbol ccp4 2 +symbol Hall '-P 1' +symbol xHM 'P -1' +symbol old 'P -1' +symbol laue '-P 1' '-1' +symbol patt '-P 1' '-1' +symbol pgrp '-P 1' '-1' +hklasu ccp4 'l>0 or (l==0 and (h>0 or (h==0 and k>=0)))' +mapasu ccp4 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 3 +basisop x,y,z +symbol ccp4 3 +symbol Hall ' P 2y' +symbol xHM 'P 1 2 1' +symbol old 'P 1 2 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp ' P 2y' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 3 +basisop z,x,y +symbol ccp4 1003 +symbol Hall ' P 2y (z,x,y)' +symbol xHM 'P 1 1 2' +symbol old 'P 1 1 2' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp ' P 2' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 3 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2y (y,z,x)' +symbol xHM 'P 2 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp ' P 2x' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 4 +basisop x,y,z +symbol ccp4 4 +symbol Hall ' P 2yb' +symbol xHM 'P 1 21 1' +symbol old 'P 1 21 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp ' P 2y' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<1; 0<=y<1/2; 0<=z<1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 4 +basisop z,x,y +symbol ccp4 1004 +symbol Hall ' P 2yb (z,x,y)' +symbol xHM 'P 1 1 21' +symbol old 'P 1 1 21' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp ' P 2' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/2 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 4 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2yb (y,z,x)' +symbol xHM 'P 21 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp ' P 2x' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 5 +basisop x,y,z +symbol ccp4 5 +symbol Hall ' C 2y' +symbol xHM 'C 1 2 1' +symbol old 'C 1 2 1' +symbol laue '-P 2y' '2/m' +symbol patt '-C 2y' '2/m' +symbol pgrp ' P 2y' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 5 +basisop z,y,-x +symbol ccp4 2005 +symbol Hall ' C 2y (z,y,-x)' +symbol xHM 'A 1 2 1' +symbol old 'A 1 2 1' 'A 2' +symbol laue '-P 2y' '2/m' +symbol patt '-A 2y' '2/m' +symbol pgrp ' P 2y' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 5 +basisop x,y,-x+z +symbol ccp4 4005 +symbol Hall ' C 2y (x,y,-x+z)' +symbol xHM 'I 1 2 1' +symbol old 'I 1 2 1' 'I 2' +symbol laue '-P 2y' '2/m' +symbol patt '-I 2y' '2/m' +symbol pgrp ' P 2y' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 5 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' C 2y (z,x,y)' +symbol xHM 'A 1 1 2' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-A 2' '2/m' +symbol pgrp ' P 2' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 5 +basisop -x,z,y +symbol ccp4 1005 +symbol Hall ' C 2y (-x,z,y)' +symbol xHM 'B 1 1 2' +symbol old 'B 1 1 2' 'B 2' +symbol laue '-P 2' '2/m' +symbol patt '-B 2' '2/m' +symbol pgrp ' P 2' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<1; 0<=y<=1/2; 0<=z<1/2 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 5 +basisop -x+z,x,y +symbol ccp4 0 +symbol Hall ' C 2y (-x+z,x,y)' +symbol xHM 'I 1 1 2' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-I 2' '2/m' +symbol pgrp ' P 2' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 5 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' C 2y (y,z,x)' +symbol xHM 'B 2 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-B 2x' '2/m' +symbol pgrp ' P 2x' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 5 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' C 2y (y,-x,z)' +symbol xHM 'C 2 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-C 2x' '2/m' +symbol pgrp ' P 2x' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 5 +basisop y,-x+z,x +symbol ccp4 0 +symbol Hall ' C 2y (y,-x+z,x)' +symbol xHM 'I 2 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-I 2x' '2/m' +symbol pgrp ' P 2x' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 6 +basisop x,y,z +symbol ccp4 6 +symbol Hall ' P -2y' +symbol xHM 'P 1 m 1' +symbol old 'P 1 m 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 6 +basisop z,x,y +symbol ccp4 1006 +symbol Hall ' P -2y (z,x,y)' +symbol xHM 'P 1 1 m' +symbol old 'P 1 1 m' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<=1/2 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 6 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P -2y (y,z,x)' +symbol xHM 'P m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop x,y,z +symbol ccp4 7 +symbol Hall ' P -2yc' +symbol xHM 'P 1 c 1' +symbol old 'P 1 c 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop x-z,y,z +symbol ccp4 0 +symbol Hall ' P -2yc (x-z,y,z)' +symbol xHM 'P 1 n 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' P -2yc (z,y,-x)' +symbol xHM 'P 1 a 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P -2yc (z,x,y)' +symbol xHM 'P 1 1 a' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop z,x-z,y +symbol ccp4 0 +symbol Hall ' P -2yc (z,x-z,y)' +symbol xHM 'P 1 1 n' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop -x,z,y +symbol ccp4 1007 +symbol Hall ' P -2yc (-x,z,y)' +symbol xHM 'P 1 1 b' +symbol old 'P 1 1 b' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P -2yc (y,z,x)' +symbol xHM 'P b 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop y,z,x-z +symbol ccp4 0 +symbol Hall ' P -2yc (y,z,x-z)' +symbol xHM 'P n 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 7 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' P -2yc (y,-x,z)' +symbol xHM 'P c 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 8 +basisop x,y,z +symbol ccp4 8 +symbol Hall ' C -2y' +symbol xHM 'C 1 m 1' +symbol old 'C 1 m 1' +symbol laue '-P 2y' '2/m' +symbol patt '-C 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 8 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' C -2y (z,y,-x)' +symbol xHM 'A 1 m 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-A 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 8 +basisop x,y,-x+z +symbol ccp4 0 +symbol Hall ' C -2y (x,y,-x+z)' +symbol xHM 'I 1 m 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-I 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 8 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' C -2y (z,x,y)' +symbol xHM 'A 1 1 m' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-A 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 8 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' C -2y (-x,z,y)' +symbol xHM 'B 1 1 m' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-B 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1; 0<=z<=1/2 +mapasu nonz 0<=x<1/2; 0<=y<1; 0<=z<=1/2 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,y,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 8 +basisop -x+z,x,y +symbol ccp4 0 +symbol Hall ' C -2y (-x+z,x,y)' +symbol xHM 'I 1 1 m' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-I 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 8 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' C -2y (y,z,x)' +symbol xHM 'B m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-B 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 8 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' C -2y (y,-x,z)' +symbol xHM 'C m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-C 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 8 +basisop y,-x+z,x +symbol ccp4 0 +symbol Hall ' C -2y (y,-x+z,x)' +symbol xHM 'I m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-I 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop x,y,z +symbol ccp4 9 +symbol Hall ' C -2yc' +symbol xHM 'C 1 c 1' +symbol old 'C 1 c 1' +symbol laue '-P 2y' '2/m' +symbol patt '-C 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 9 +basisop z,y,-x+z +symbol ccp4 0 +symbol Hall ' C -2yc (z,y,-x+z)' +symbol xHM 'A 1 n 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-A 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop x+z,y,-x +symbol ccp4 0 +symbol Hall ' C -2yc (x+z,y,-x)' +symbol xHM 'I 1 a 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-I 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' C -2yc (z,y,-x)' +symbol xHM 'A 1 a 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-A 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop x+1/4,y+1/4,z +symbol ccp4 0 +symbol Hall ' C -2yc (x+1/4,y+1/4,z)' +symbol xHM 'C 1 n 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-C 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 9 +basisop x,y,-x+z +symbol ccp4 0 +symbol Hall ' C -2yc (x,y,-x+z)' +symbol xHM 'I 1 c 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-I 2y' '2/m' +symbol pgrp ' P -2y' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' C -2yc (z,x,y)' +symbol xHM 'A 1 1 a' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-A 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop -x+z,z,y +symbol ccp4 0 +symbol Hall ' C -2yc (-x+z,z,y)' +symbol xHM 'B 1 1 n' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-B 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop -x,x+z,y +symbol ccp4 0 +symbol Hall ' C -2yc (-x,x+z,y)' +symbol xHM 'I 1 1 b' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-I 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop -x,z,y +symbol ccp4 1009 +symbol Hall ' C -2yc (-x,z,y)' +symbol xHM 'B 1 1 b' +symbol old 'B 1 1 b' +symbol laue '-P 2' '2/m' +symbol patt '-B 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop z,x-z,y +symbol ccp4 0 +symbol Hall ' C -2yc (z,x-z,y)' +symbol xHM 'A 1 1 n' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-A 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop -x+z,x,y +symbol ccp4 0 +symbol Hall ' C -2yc (-x+z,x,y)' +symbol xHM 'I 1 1 a' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-I 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' C -2yc (y,z,x)' +symbol xHM 'B b 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-B 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop y,-x+z,z +symbol ccp4 0 +symbol Hall ' C -2yc (y,-x+z,z)' +symbol xHM 'C n 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-C 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 9 +basisop y,-x,x+z +symbol ccp4 0 +symbol Hall ' C -2yc (y,-x,x+z)' +symbol xHM 'I c 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-I 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' C -2yc (y,-x,z)' +symbol xHM 'C c 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-C 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 9 +basisop y,z,x-z +symbol ccp4 0 +symbol Hall ' C -2yc (y,z,x-z)' +symbol xHM 'B n 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-B 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 9 +basisop y,-x+z,x +symbol ccp4 0 +symbol Hall ' C -2yc (y,-x+z,x)' +symbol xHM 'I b 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-I 2x' '2/m' +symbol pgrp ' P -2x' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 10 +basisop x,y,z +symbol ccp4 10 +symbol Hall '-P 2y' +symbol xHM 'P 1 2/m 1' +symbol old 'P 1 2/m 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y,-z +symop x,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 10 +basisop z,x,y +symbol ccp4 1010 +symbol Hall '-P 2y (z,x,y)' +symbol xHM 'P 1 1 2/m' +symbol old 'P 1 1 2/m' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop -x,-y,-z +symop x,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 10 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2y (y,z,x)' +symbol xHM 'P 2/m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,-y,-z +symop -x,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 11 +basisop x,y,z +symbol ccp4 11 +symbol Hall '-P 2yb' +symbol xHM 'P 1 21/m 1' +symbol old 'P 1 21/m 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z +symop -x,-y,-z +symop x,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 11 +basisop z,x,y +symbol ccp4 1011 +symbol Hall '-P 2yb (z,x,y)' +symbol xHM 'P 1 1 21/m' +symbol old 'P 1 1 21/m' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z+1/2 +symop -x,-y,-z +symop x,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 11 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2yb (y,z,x)' +symbol xHM 'P 21/m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z +symop -x,-y,-z +symop -x+1/2,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 12 +basisop x,y,z +symbol ccp4 12 +symbol Hall '-C 2y' +symbol xHM 'C 1 2/m 1' +symbol old 'C 1 2/m 1' +symbol laue '-P 2y' '2/m' +symbol patt '-C 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y,-z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 12 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-C 2y (z,y,-x)' +symbol xHM 'A 1 2/m 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-A 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y,-z +symop x,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 12 +basisop x,y,-x+z +symbol ccp4 0 +symbol Hall '-C 2y (x,y,-x+z)' +symbol xHM 'I 1 2/m 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-I 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y,-z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 12 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-C 2y (z,x,y)' +symbol xHM 'A 1 1 2/m' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-A 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop -x,-y,-z +symop x,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 12 +basisop -x,z,y +symbol ccp4 1012 +symbol Hall '-C 2y (-x,z,y)' +symbol xHM 'B 1 1 2/m' +symbol old 'B 1 1 2/m' +symbol laue '-P 2' '2/m' +symbol patt '-B 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop -x,-y,-z +symop x,y,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 12 +basisop -x+z,x,y +symbol ccp4 0 +symbol Hall '-C 2y (-x+z,x,y)' +symbol xHM 'I 1 1 2/m' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-I 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop -x,-y,-z +symop x,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 12 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-C 2y (y,z,x)' +symbol xHM 'B 2/m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-B 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,-y,-z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 12 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-C 2y (y,-x,z)' +symbol xHM 'C 2/m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-C 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,-y,-z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 12 +basisop y,-x+z,x +symbol ccp4 0 +symbol Hall '-C 2y (y,-x+z,x)' +symbol xHM 'I 2/m 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-I 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,-y,-z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 13 +basisop x,y,z +symbol ccp4 13 +symbol Hall '-P 2yc' +symbol xHM 'P 1 2/c 1' +symbol old 'P 1 2/c 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 13 +basisop x-z,y,z +symbol ccp4 0 +symbol Hall '-P 2yc (x-z,y,z)' +symbol xHM 'P 1 2/n 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z+1/2 +symop -x,-y,-z +symop x+1/2,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 13 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2yc (z,y,-x)' +symbol xHM 'P 1 2/a 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop -x,-y,-z +symop x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 13 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2yc (z,x,y)' +symbol xHM 'P 1 1 2/a' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop -x,-y,-z +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 13 +basisop z,x-z,y +symbol ccp4 0 +symbol Hall '-P 2yc (z,x-z,y)' +symbol xHM 'P 1 1 2/n' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop -x,-y,-z +symop x+1/2,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 13 +basisop -x,z,y +symbol ccp4 1013 +symbol Hall '-P 2yc (-x,z,y)' +symbol xHM 'P 1 1 2/b' +symbol old 'P 1 1 2/b' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop -x,-y,-z +symop x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 13 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2yc (y,z,x)' +symbol xHM 'P 2/b 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x,-y,-z +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 13 +basisop y,z,x-z +symbol ccp4 0 +symbol Hall '-P 2yc (y,z,x-z)' +symbol xHM 'P 2/n 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z+1/2 +symop -x,-y,-z +symop -x,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 13 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2yc (y,-x,z)' +symbol xHM 'P 2/c 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x,-y,-z +symop -x,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop x,y,z +symbol ccp4 14 +symbol Hall '-P 2ybc' +symbol xHM 'P 1 21/c 1' +symbol old 'P 1 21/c 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z+1/2 +symop -x,-y,-z +symop x,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop x-z,y,z +symbol ccp4 2014 +symbol Hall '-P 2ybc (x-z,y,z)' +symbol xHM 'P 1 21/n 1' +symbol old 'P 1 21/n 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y+1/2,-z+1/2 +symop -x,-y,-z +symop x+1/2,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop z,y,-x +symbol ccp4 3014 +symbol Hall '-P 2ybc (z,y,-x)' +symbol xHM 'P 1 21/a 1' +symbol old 'P 1 21/a 1' +symbol laue '-P 2y' '2/m' +symbol patt '-P 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y+1/2,-z +symop -x,-y,-z +symop x+1/2,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2ybc (z,x,y)' +symbol xHM 'P 1 1 21/a' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop -x,-y,-z +symop x+1/2,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop z,x-z,y +symbol ccp4 0 +symbol Hall '-P 2ybc (z,x-z,y)' +symbol xHM 'P 1 1 21/n' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z+1/2 +symop -x,-y,-z +symop x+1/2,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop -x,z,y +symbol ccp4 1014 +symbol Hall '-P 2ybc (-x,z,y)' +symbol xHM 'P 1 1 21/b' +symbol old 'P 1 1 21/b' +symbol laue '-P 2' '2/m' +symbol patt '-P 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z+1/2 +symop -x,-y,-z +symop x,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2ybc (y,z,x)' +symbol xHM 'P 21/b 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y+1/2,-z +symop -x,-y,-z +symop -x+1/2,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop y,z,x-z +symbol ccp4 0 +symbol Hall '-P 2ybc (y,z,x-z)' +symbol xHM 'P 21/n 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y+1/2,-z+1/2 +symop -x,-y,-z +symop -x+1/2,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 14 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2ybc (y,-x,z)' +symbol xHM 'P 21/c 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-P 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z+1/2 +symop -x,-y,-z +symop -x+1/2,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 15 +basisop x,y,z +symbol ccp4 15 +symbol Hall '-C 2yc' +symbol xHM 'C 1 2/c 1' +symbol old 'C 1 2/c 1' +symbol laue '-P 2y' '2/m' +symbol patt '-C 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 15 +basisop z,y,-x+z +symbol ccp4 0 +symbol Hall '-C 2yc (z,y,-x+z)' +symbol xHM 'A 1 2/n 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-A 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z+1/2 +symop -x,-y,-z +symop x+1/2,-y,z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop x+z,y,-x +symbol ccp4 0 +symbol Hall '-C 2yc (x+z,y,-x)' +symbol xHM 'I 1 2/a 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-I 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop -x,-y,-z +symop x+1/2,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-C 2yc (z,y,-x)' +symbol xHM 'A 1 2/a 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-A 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop -x,-y,-z +symop x+1/2,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop x+1/4,y-1/4,z +symbol ccp4 0 +symbol Hall '-C 2yc (x+1/4,y-1/4,z)' +symbol xHM 'C 1 2/n 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-C 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z+1/2 +symop -x+1/2,-y+1/2,-z +symop x,-y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 15 +basisop x,y,-x+z +symbol ccp4 0 +symbol Hall '-C 2yc (x,y,-x+z)' +symbol xHM 'I 1 2/c 1' +symbol old '' +symbol laue '-P 2y' '2/m' +symbol patt '-I 2y' '2/m' +symbol pgrp '-P 2y' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-C 2yc (z,x,y)' +symbol xHM 'A 1 1 2/a' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-A 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop -x,-y,-z +symop x+1/2,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop -x+z,z,y +symbol ccp4 0 +symbol Hall '-C 2yc (-x+z,z,y)' +symbol xHM 'B 1 1 2/n' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-B 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop -x,-y,-z +symop x+1/2,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop -x,x+z,y +symbol ccp4 0 +symbol Hall '-C 2yc (-x,x+z,y)' +symbol xHM 'I 1 1 2/b' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-I 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop -x,-y,-z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop -x,z,y +symbol ccp4 1015 +symbol Hall '-C 2yc (-x,z,y)' +symbol xHM 'B 1 1 2/b' +symbol old 'B 1 1 2/b' +symbol laue '-P 2' '2/m' +symbol patt '-B 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop -x,-y,-z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop z,x-z,y +symbol ccp4 0 +symbol Hall '-C 2yc (z,x-z,y)' +symbol xHM 'A 1 1 2/n' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-A 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop -x,-y,-z +symop x+1/2,y+1/2,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop -x+z,x,y +symbol ccp4 0 +symbol Hall '-C 2yc (-x+z,x,y)' +symbol xHM 'I 1 1 2/a' +symbol old '' +symbol laue '-P 2' '2/m' +symbol patt '-I 2' '2/m' +symbol pgrp '-P 2' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop -x,-y,-z +symop x+1/2,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-C 2yc (y,z,x)' +symbol xHM 'B 2/b 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-B 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x,-y,-z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop y,-x+z,z +symbol ccp4 0 +symbol Hall '-C 2yc (y,-x+z,z)' +symbol xHM 'C 2/n 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-C 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z+1/2 +symop -x,-y,-z +symop -x,y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 15 +basisop y,-x,x+z +symbol ccp4 0 +symbol Hall '-C 2yc (y,-x,x+z)' +symbol xHM 'I 2/c 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-I 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x,-y,-z +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-C 2yc (y,-x,z)' +symbol xHM 'C 2/c 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-C 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x,-y,-z +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 15 +basisop y,z,x-z +symbol ccp4 0 +symbol Hall '-C 2yc (y,z,x-z)' +symbol xHM 'B 2/n 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-B 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z+1/2 +symop -x,-y,-z +symop -x,y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 15 +basisop y,-x+z,x +symbol ccp4 0 +symbol Hall '-C 2yc (y,-x+z,x)' +symbol xHM 'I 2/b 1 1' +symbol old '' +symbol laue '-P 2x' '2/m' +symbol patt '-I 2x' '2/m' +symbol pgrp '-P 2x' '2/m' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 1/4<=x<=3/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x,-y,-z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 16 +basisop x,y,z +symbol ccp4 16 +symbol Hall ' P 2 2' +symbol xHM 'P 2 2 2' +symbol old 'P 2 2 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 17 +basisop x,y,z +symbol ccp4 17 +symbol Hall ' P 2c 2' +symbol xHM 'P 2 2 21' +symbol old 'P 2 2 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z+1/2 +symop x,-y,-z +symop -x,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 17 +basisop z,x,y +symbol ccp4 1017 +symbol Hall ' P 2c 2 (z,x,y)' +symbol xHM 'P 21 2 2' +symbol old 'P 21 2 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z +symop -x,y,-z +symop -x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 17 +basisop y,z,x +symbol ccp4 2017 +symbol Hall ' P 2c 2 (y,z,x)' +symbol xHM 'P 2 21 2' +symbol old 'P 2 21 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/2 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z +symop -x,-y,z +symop x,-y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 18 +basisop x,y,z +symbol ccp4 18 +symbol Hall ' P 2 2ab' +symbol xHM 'P 21 21 2' +symbol old 'P 21 21 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x+1/2,-y+1/2,-z +symop -x+1/2,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 18 +basisop z,x,y +symbol ccp4 3018 +symbol Hall ' P 2 2ab (z,x,y)' +symbol xHM 'P 2 21 21' +symbol old 'P 2 21 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/4 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,y+1/2,-z+1/2 +symop -x,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 18 +basisop y,z,x +symbol ccp4 2018 +symbol Hall ' P 2 2ab (y,z,x)' +symbol xHM 'P 21 2 21' +symbol old 'P 21 2 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x+1/2,-y,z+1/2 +symop x+1/2,-y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 19 +basisop x,y,z +symbol ccp4 19 +symbol Hall ' P 2ac 2ab' +symbol xHM 'P 21 21 21' +symbol old 'P 21 21 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/4 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop x+1/2,-y+1/2,-z +symop -x,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 20 +basisop x,y,z +symbol ccp4 20 +symbol Hall ' C 2c 2' +symbol xHM 'C 2 2 21' +symbol old 'C 2 2 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z+1/2 +symop x,-y,-z +symop -x,y,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 20 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' C 2c 2 (z,x,y)' +symbol xHM 'A 21 2 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z +symop -x,y,-z +symop -x+1/2,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 20 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' C 2c 2 (y,z,x)' +symbol xHM 'B 2 21 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z +symop -x,-y,z +symop x,-y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 21 +basisop x,y,z +symbol ccp4 21 +symbol Hall ' C 2 2' +symbol xHM 'C 2 2 2' +symbol old 'C 2 2 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 21 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' C 2 2 (z,x,y)' +symbol xHM 'A 2 2 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,y,-z +symop -x,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 21 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' C 2 2 (y,z,x)' +symbol xHM 'B 2 2 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y,z +symop x,-y,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 22 +basisop x,y,z +symbol ccp4 22 +symbol Hall ' F 2 2' +symbol xHM 'F 2 2 2' +symbol old 'F 2 2 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 23 +basisop x,y,z +symbol ccp4 23 +symbol Hall ' I 2 2' +symbol xHM 'I 2 2 2' +symbol old 'I 2 2 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 24 +basisop x,y,z +symbol ccp4 24 +symbol Hall ' I 2b 2c' +symbol xHM 'I 21 21 21' +symbol old 'I 21 21 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop x,-y,-z+1/2 +symop -x,y+1/2,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 25 +basisop x,y,z +symbol ccp4 25 +symbol Hall ' P 2 -2' +symbol xHM 'P m m 2' +symbol old 'P m m 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y,z +symop x,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 25 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2 -2 (z,x,y)' +symbol xHM 'P 2 m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y,z +symop x,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 25 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2 -2 (y,z,x)' +symbol xHM 'P m 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y,-z +symop -x,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 26 +basisop x,y,z +symbol ccp4 26 +symbol Hall ' P 2c -2' +symbol xHM 'P m c 21' +symbol old 'P m c 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z+1/2 +symop -x,y,z +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 26 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' P 2c -2 (y,-x,z)' +symbol xHM 'P c m 21' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z+1/2 +symop x,-y,z +symop -x,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 26 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2c -2 (z,x,y)' +symbol xHM 'P 21 m a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z +symop x,-y,z +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 26 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' P 2c -2 (z,y,-x)' +symbol xHM 'P 21 a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z +symop x,y,-z +symop x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 26 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2c -2 (y,z,x)' +symbol xHM 'P b 21 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z +symop x,y,-z +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 26 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' P 2c -2 (-x,z,y)' +symbol xHM 'P m 21 b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z +symop -x,y,z +symop x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 27 +basisop x,y,z +symbol ccp4 27 +symbol Hall ' P 2 -2c' +symbol xHM 'P c c 2' +symbol old 'P c c 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 27 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2 -2c (z,x,y)' +symbol xHM 'P 2 a a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x+1/2,-y,z +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 27 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2 -2c (y,z,x)' +symbol xHM 'P b 2 b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y+1/2,-z +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 28 +basisop x,y,z +symbol ccp4 28 +symbol Hall ' P 2 -2a' +symbol xHM 'P m a 2' +symbol old 'P m a 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x+1/2,y,z +symop x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 28 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' P 2 -2a (y,-x,z)' +symbol xHM 'P b m 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop x,-y+1/2,z +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 28 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2 -2a (z,x,y)' +symbol xHM 'P 2 m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y+1/2,z +symop x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 28 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' P 2 -2a (z,y,-x)' +symbol xHM 'P 2 c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,y,-z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 28 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2 -2a (y,z,x)' +symbol xHM 'P c 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<1; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y,-z+1/2 +symop -x,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 28 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' P 2 -2a (-x,z,y)' +symbol xHM 'P m 2 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop -x+1/2,y,z +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 29 +basisop x,y,z +symbol ccp4 29 +symbol Hall ' P 2c -2ac' +symbol xHM 'P c a 21' +symbol old 'P c a 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z+1/2 +symop -x+1/2,y,z+1/2 +symop x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 29 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' P 2c -2ac (y,-x,z)' +symbol xHM 'P b c 21' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z+1/2 +symop x,-y+1/2,z+1/2 +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 29 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2c -2ac (z,x,y)' +symbol xHM 'P 21 a b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z +symop x+1/2,-y+1/2,z +symop x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 29 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' P 2c -2ac (z,y,-x)' +symbol xHM 'P 21 c a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z +symop x+1/2,y,-z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 29 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2c -2ac (y,z,x)' +symbol xHM 'P c 21 b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z +symop x,y+1/2,-z+1/2 +symop -x,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 29 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' P 2c -2ac (-x,z,y)' +symbol xHM 'P b 21 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z +symop -x+1/2,y+1/2,z +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 30 +basisop x,y,z +symbol ccp4 30 +symbol Hall ' P 2 -2bc' +symbol xHM 'P n c 2' +symbol old 'P n c 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y+1/2,z+1/2 +symop x,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 30 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' P 2 -2bc (y,-x,z)' +symbol xHM 'P c n 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop x+1/2,-y,z+1/2 +symop -x+1/2,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 30 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2 -2bc (z,x,y)' +symbol xHM 'P 2 n a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x+1/2,-y,z+1/2 +symop x+1/2,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 30 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' P 2 -2bc (z,y,-x)' +symbol xHM 'P 2 a n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x+1/2,y+1/2,-z +symop x+1/2,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 30 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2 -2bc (y,z,x)' +symbol xHM 'P b 2 n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x+1/2,y+1/2,-z +symop -x+1/2,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 30 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' P 2 -2bc (-x,z,y)' +symbol xHM 'P n 2 b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop -x,y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 31 +basisop x,y,z +symbol ccp4 31 +symbol Hall ' P 2ac -2' +symbol xHM 'P m n 21' +symbol old 'P m n 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop -x,y,z +symop x+1/2,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 31 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' P 2ac -2 (y,-x,z)' +symbol xHM 'P n m 21' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y+1/2,z+1/2 +symop x,-y,z +symop -x,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 31 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2ac -2 (z,x,y)' +symbol xHM 'P 21 m n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y+1/2,-z +symop x,-y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 31 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' P 2ac -2 (z,y,-x)' +symbol xHM 'P 21 n m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z+1/2 +symop x,y,-z +symop x+1/2,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 31 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2ac -2 (y,z,x)' +symbol xHM 'P n 21 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z+1/2 +symop x,y,-z +symop -x,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 31 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' P 2ac -2 (-x,z,y)' +symbol xHM 'P m 21 n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x+1/2,y+1/2,-z +symop -x,y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 32 +basisop x,y,z +symbol ccp4 32 +symbol Hall ' P 2 -2ab' +symbol xHM 'P b a 2' +symbol old 'P b a 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x+1/2,y+1/2,z +symop x+1/2,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 32 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2 -2ab (z,x,y)' +symbol xHM 'P 2 c b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 32 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2 -2ab (y,z,x)' +symbol xHM 'P c 2 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x+1/2,y,-z+1/2 +symop -x+1/2,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 33 +basisop x,y,z +symbol ccp4 33 +symbol Hall ' P 2c -2n' +symbol xHM 'P n a 21' +symbol old 'P n a 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z+1/2 +symop -x+1/2,y+1/2,z+1/2 +symop x+1/2,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 33 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' P 2c -2n (y,-x,z)' +symbol xHM 'P b n 21' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +symop -x+1/2,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 33 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2c -2n (z,x,y)' +symbol xHM 'P 21 n b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z +symop x+1/2,-y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 33 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' P 2c -2n (z,y,-x)' +symbol xHM 'P 21 c n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z +symop x+1/2,y+1/2,-z+1/2 +symop x,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 33 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2c -2n (y,z,x)' +symbol xHM 'P c 21 n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z +symop x+1/2,y+1/2,-z+1/2 +symop -x+1/2,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 33 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' P 2c -2n (-x,z,y)' +symbol xHM 'P n 21 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z +symop -x+1/2,y+1/2,z+1/2 +symop x+1/2,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 34 +basisop x,y,z +symbol ccp4 34 +symbol Hall ' P 2 -2n' +symbol xHM 'P n n 2' +symbol old 'P n n 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x+1/2,y+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 34 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' P 2 -2n (z,x,y)' +symbol xHM 'P 2 n n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x+1/2,-y+1/2,z+1/2 +symop x+1/2,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 34 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' P 2 -2n (y,z,x)' +symbol xHM 'P n 2 n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x+1/2,y+1/2,-z+1/2 +symop -x+1/2,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 35 +basisop x,y,z +symbol ccp4 35 +symbol Hall ' C 2 -2' +symbol xHM 'C m m 2' +symbol old 'C m m 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y,z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 35 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' C 2 -2 (z,x,y)' +symbol xHM 'A 2 m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y,z +symop x,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 35 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' C 2 -2 (y,z,x)' +symbol xHM 'B m 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y,-z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 36 +basisop x,y,z +symbol ccp4 36 +symbol Hall ' C 2c -2' +symbol xHM 'C m c 21' +symbol old 'C m c 21' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z+1/2 +symop -x,y,z +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 36 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' C 2c -2 (y,-x,z)' +symbol xHM 'C c m 21' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z+1/2 +symop x,-y,z +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 36 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' C 2c -2 (z,x,y)' +symbol xHM 'A 21 m a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z +symop x,-y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 36 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' C 2c -2 (z,y,-x)' +symbol xHM 'A 21 a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x+1/2,-y,-z +symop x,y,-z +symop x+1/2,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 36 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' C 2c -2 (y,z,x)' +symbol xHM 'B b 21 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z +symop x,y,-z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 36 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' C 2c -2 (-x,z,y)' +symbol xHM 'B m 21 b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y+1/2,-z +symop -x,y,z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 37 +basisop x,y,z +symbol ccp4 37 +symbol Hall ' C 2 -2c' +symbol xHM 'C c c 2' +symbol old 'C c c 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 37 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' C 2 -2c (z,x,y)' +symbol xHM 'A 2 a a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x+1/2,-y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 37 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' C 2 -2c (y,z,x)' +symbol xHM 'B b 2 b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y+1/2,-z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 38 +basisop x,y,z +symbol ccp4 38 +symbol Hall ' A 2 -2' +symbol xHM 'A m m 2' +symbol old 'A m m 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y,z +symop x,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 38 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' A 2 -2 (y,-x,z)' +symbol xHM 'B m m 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop x,-y,z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 38 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' A 2 -2 (z,x,y)' +symbol xHM 'B 2 m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y,z +symop x,y,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 38 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' A 2 -2 (z,y,-x)' +symbol xHM 'C 2 m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,y,-z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 38 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' A 2 -2 (y,z,x)' +symbol xHM 'C m 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y,-z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 38 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' A 2 -2 (-x,z,y)' +symbol xHM 'A m 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop -x,y,z +symop x,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 39 +basisop x,y,z +symbol ccp4 39 +symbol Hall ' A 2 -2b' +symbol xHM 'A b m 2' +symbol old 'A b m 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y+1/2,z +symop x,-y+1/2,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 39 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' A 2 -2b (y,-x,z)' +symbol xHM 'B m a 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop x+1/2,-y,z +symop -x+1/2,y,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 39 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' A 2 -2b (z,x,y)' +symbol xHM 'B 2 c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<1/2; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y,z+1/2 +symop x,y,-z+1/2 +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 39 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' A 2 -2b (z,y,-x)' +symbol xHM 'C 2 m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,y+1/2,-z +symop x,-y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 39 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' A 2 -2b (y,z,x)' +symbol xHM 'C m 2 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x+1/2,y,-z +symop -x+1/2,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 39 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' A 2 -2b (-x,z,y)' +symbol xHM 'A c 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop -x,y,z+1/2 +symop x,y,-z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 40 +basisop x,y,z +symbol ccp4 40 +symbol Hall ' A 2 -2a' +symbol xHM 'A m a 2' +symbol old 'A m a 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x+1/2,y,z +symop x+1/2,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 40 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' A 2 -2a (y,-x,z)' +symbol xHM 'B b m 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop x,-y+1/2,z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 40 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' A 2 -2a (z,x,y)' +symbol xHM 'B 2 m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y+1/2,z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 40 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' A 2 -2a (z,y,-x)' +symbol xHM 'C 2 c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,y,-z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 40 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' A 2 -2a (y,z,x)' +symbol xHM 'C c 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y,-z+1/2 +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 40 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' A 2 -2a (-x,z,y)' +symbol xHM 'A m 2 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop -x+1/2,y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 41 +basisop x,y,z +symbol ccp4 41 +symbol Hall ' A 2 -2ab' +symbol xHM 'A b a 2' +symbol old 'A b a 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x+1/2,y+1/2,z +symop x+1/2,-y+1/2,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 41 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' A 2 -2ab (y,-x,z)' +symbol xHM 'B b a 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop x+1/2,-y+1/2,z +symop -x+1/2,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 41 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' A 2 -2ab (z,x,y)' +symbol xHM 'B 2 c b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 41 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' A 2 -2ab (z,y,-x)' +symbol xHM 'C 2 c b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,y+1/2,-z+1/2 +symop x,-y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 41 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' A 2 -2ab (y,z,x)' +symbol xHM 'C c 2 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x+1/2,y,-z+1/2 +symop -x+1/2,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 41 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' A 2 -2ab (-x,z,y)' +symbol xHM 'A c 2 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop -x+1/2,y,z+1/2 +symop x+1/2,y,-z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 42 +basisop x,y,z +symbol ccp4 42 +symbol Hall ' F 2 -2' +symbol xHM 'F m m 2' +symbol old 'F m m 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y,z +symop x,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 42 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' F 2 -2 (z,x,y)' +symbol xHM 'F 2 m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y,z +symop x,y,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 42 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' F 2 -2 (y,z,x)' +symbol xHM 'F m 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y,-z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 43 +basisop x,y,z +symbol ccp4 43 +symbol Hall ' F 2 -2d' +symbol xHM 'F d d 2' +symbol old 'F d d 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x+1/4,y+1/4,z+1/4 +symop x+3/4,-y+3/4,z+1/4 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 43 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' F 2 -2d (z,x,y)' +symbol xHM 'F 2 d d' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x+1/4,-y+1/4,z+1/4 +symop x+1/4,y+3/4,-z+3/4 +cenop x,y,z +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 43 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' F 2 -2d (y,z,x)' +symbol xHM 'F d 2 d' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x+1/4,y+1/4,-z+1/4 +symop -x+3/4,y+1/4,z+3/4 +cenop x,y,z +cenop x+1/2,y+1/2,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 44 +basisop x,y,z +symbol ccp4 44 +symbol Hall ' I 2 -2' +symbol xHM 'I m m 2' +symbol old 'I m m 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y,z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 44 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' I 2 -2 (z,x,y)' +symbol xHM 'I 2 m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y,z +symop x,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 44 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' I 2 -2 (y,z,x)' +symbol xHM 'I m 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y,-z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 45 +basisop x,y,z +symbol ccp4 45 +symbol Hall ' I 2 -2c' +symbol xHM 'I b a 2' +symbol old 'I b a 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 45 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' I 2 -2c (z,x,y)' +symbol xHM 'I 2 c b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x+1/2,-y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 45 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' I 2 -2c (y,z,x)' +symbol xHM 'I c 2 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y+1/2,-z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 46 +basisop x,y,z +symbol ccp4 46 +symbol Hall ' I 2 -2a' +symbol xHM 'I m a 2' +symbol old 'I m a 2' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop -x+1/2,y,z +symop x+1/2,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 46 +basisop y,-x,z +symbol ccp4 0 +symbol Hall ' I 2 -2a (y,-x,z)' +symbol xHM 'I b m 2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P 2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,-y,z +symop x,-y+1/2,z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 46 +basisop z,x,y +symbol ccp4 0 +symbol Hall ' I 2 -2a (z,x,y)' +symbol xHM 'I 2 m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,-y+1/2,z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 46 +basisop z,y,-x +symbol ccp4 0 +symbol Hall ' I 2 -2a (z,y,-x)' +symbol xHM 'I 2 c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P -2 2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop x,-y,-z +symop x,y,-z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 46 +basisop y,z,x +symbol ccp4 0 +symbol Hall ' I 2 -2a (y,z,x)' +symbol xHM 'I c 2 m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop x,y,-z+1/2 +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 46 +basisop -x,z,y +symbol ccp4 0 +symbol Hall ' I 2 -2a (-x,z,y)' +symbol xHM 'I m 2 a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P -2 -2' 'mm2' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -x,y,-z +symop -x+1/2,y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 47 +basisop x,y,z +symbol ccp4 47 +symbol Hall '-P 2 2' +symbol xHM 'P m m m' +symbol old 'P 2/m 2/m 2/m' 'P m m m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop -x,-y,-z +symop x,y,-z +symop -x,y,z +symop x,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 48 +basisop x-1/4,y-1/4,z-1/4 +symbol ccp4 48 +symbol Hall '-P 2ab 2bc (x-1/4,y-1/4,z-1/4)' +symbol xHM 'P n n n :1' +symbol old 'P 2/n 2/n 2/n' 'P n n n' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop -x+1/2,-y+1/2,-z+1/2 +symop x+1/2,y+1/2,-z+1/2 +symop -x+1/2,y+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 48 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 2ab 2bc' +symbol xHM 'P n n n :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y,-z+1/2 +symop -x,-y,-z +symop x+1/2,y+1/2,-z +symop -x,y+1/2,z+1/2 +symop x+1/2,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 49 +basisop x,y,z +symbol ccp4 49 +symbol Hall '-P 2 2c' +symbol xHM 'P c c m' +symbol old 'P 2/c 2/c 2/m' 'P c c m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z+1/2 +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x,y,-z +symop -x,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 49 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2 2c (z,x,y)' +symbol xHM 'P m a a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x+1/2,y,-z +symop -x+1/2,-y,z +symop -x,-y,-z +symop -x,y,z +symop x+1/2,-y,z +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 49 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2 2c (y,z,x)' +symbol xHM 'P b m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y+1/2,z +symop x,-y+1/2,-z +symop -x,-y,-z +symop x,-y,z +symop x,y+1/2,-z +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 50 +basisop x-1/4,y-1/4,z +symbol ccp4 50 +symbol Hall '-P 2ab 2b (x-1/4,y-1/4,z)' +symbol xHM 'P b a n :1' +symbol old 'P 2/b 2/a 2/n' 'P b a n' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop -x+1/2,-y+1/2,-z +symop x+1/2,y+1/2,-z +symop -x+1/2,y+1/2,z +symop x+1/2,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 50 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 2ab 2b' +symbol xHM 'P b a n :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x,-y+1/2,-z +symop -x+1/2,y,-z +symop -x,-y,-z +symop x+1/2,y+1/2,-z +symop -x,y+1/2,z +symop x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 50 +basisop z,x-1/4,y-1/4 +symbol ccp4 0 +symbol Hall '-P 2ab 2b (z,x-1/4,y-1/4)' +symbol xHM 'P n c b :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,y,-z +symop -x,-y,z +symop -x,-y+1/2,-z+1/2 +symop -x,y+1/2,z+1/2 +symop x,-y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 50 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2ab 2b (z,x,y)' +symbol xHM 'P n c b :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z+1/2 +symop -x,y,-z+1/2 +symop -x,-y+1/2,z +symop -x,-y,-z +symop -x,y+1/2,z+1/2 +symop x,-y,z+1/2 +symop x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 50 +basisop y-1/4,z,x-1/4 +symbol ccp4 0 +symbol Hall '-P 2ab 2b (y-1/4,z,x-1/4)' +symbol xHM 'P c n a :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y,z +symop x,-y,-z +symop -x+1/2,-y,-z+1/2 +symop x+1/2,-y,z+1/2 +symop x+1/2,y,-z+1/2 +symop -x+1/2,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 50 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2ab 2b (y,z,x)' +symbol xHM 'P c n a :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z+1/2 +symop -x+1/2,-y,z +symop x,-y,-z+1/2 +symop -x,-y,-z +symop x+1/2,-y,z+1/2 +symop x+1/2,y,-z +symop -x,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 51 +basisop x,y,z +symbol ccp4 51 +symbol Hall '-P 2a 2a' +symbol xHM 'P m m a' +symbol old 'P 21/m 2/m 2/a' 'P m m a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop x+1/2,-y,-z +symop -x,y,-z +symop -x,-y,-z +symop x+1/2,y,-z +symop -x+1/2,y,z +symop x,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 51 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2a 2a (y,-x,z)' +symbol xHM 'P m m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop -x,y+1/2,-z +symop x,-y,-z +symop -x,-y,-z +symop x,y+1/2,-z +symop x,-y+1/2,z +symop -x,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 51 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2a 2a (z,x,y)' +symbol xHM 'P b m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x,y+1/2,-z +symop -x,-y,z +symop -x,-y,-z +symop -x,y+1/2,z +symop x,-y+1/2,z +symop x,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 51 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2a 2a (z,y,-x)' +symbol xHM 'P c m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x,-y,z+1/2 +symop -x,y,-z +symop -x,-y,-z +symop -x,y,z+1/2 +symop x,y,-z+1/2 +symop x,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 51 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2a 2a (y,z,x)' +symbol xHM 'P m c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop -x,-y,z+1/2 +symop x,-y,-z +symop -x,-y,-z +symop x,-y,z+1/2 +symop x,y,-z+1/2 +symop -x,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 51 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-P 2a 2a (-x,z,y)' +symbol xHM 'P m a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop x+1/2,-y,-z +symop -x,-y,z +symop -x,-y,-z +symop x+1/2,-y,z +symop -x+1/2,y,z +symop x,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 52 +basisop x,y,z +symbol ccp4 52 +symbol Hall '-P 2a 2bc' +symbol xHM 'P n n a' +symbol old 'P 2/n 21/n 2/a' 'P n n a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y+1/2,-z+1/2 +symop -x,-y,-z +symop x+1/2,y,-z +symop -x,y+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 52 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2a 2bc (y,-x,z)' +symbol xHM 'P n n b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop -x+1/2,y,-z+1/2 +symop x+1/2,-y+1/2,-z+1/2 +symop -x,-y,-z +symop x,y+1/2,-z +symop x+1/2,-y,z+1/2 +symop -x+1/2,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 52 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2a 2bc (z,x,y)' +symbol xHM 'P b n n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x+1/2,y,-z+1/2 +symop -x+1/2,-y+1/2,z+1/2 +symop -x,-y,-z +symop -x,y+1/2,z +symop x+1/2,-y,z+1/2 +symop x+1/2,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 52 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2a 2bc (z,y,-x)' +symbol xHM 'P c n n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x+1/2,-y+1/2,z +symop -x+1/2,y+1/2,-z+1/2 +symop -x,-y,-z +symop -x,y,z+1/2 +symop x+1/2,y+1/2,-z +symop x+1/2,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 52 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2a 2bc (y,z,x)' +symbol xHM 'P n c n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop -x+1/2,-y+1/2,z +symop x+1/2,-y+1/2,-z+1/2 +symop -x,-y,-z +symop x,-y,z+1/2 +symop x+1/2,y+1/2,-z +symop -x+1/2,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 52 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-P 2a 2bc (-x,z,y)' +symbol xHM 'P n a n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,-y+1/2,z+1/2 +symop -x,-y,-z +symop x+1/2,-y,z +symop -x,y+1/2,z+1/2 +symop x+1/2,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 53 +basisop x,y,z +symbol ccp4 53 +symbol Hall '-P 2ac 2' +symbol xHM 'P m n a' +symbol old 'P 2/m 2/n 21/a' 'P m n a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop x,-y,-z +symop -x+1/2,y,-z+1/2 +symop -x,-y,-z +symop x+1/2,y,-z+1/2 +symop -x,y,z +symop x+1/2,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 53 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2ac 2 (y,-x,z)' +symbol xHM 'P n m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z+1/2 +symop -x,y,-z +symop x,-y+1/2,-z+1/2 +symop -x,-y,-z +symop x,y+1/2,-z+1/2 +symop x,-y,z +symop -x,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 53 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2ac 2 (z,x,y)' +symbol xHM 'P b m n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y+1/2,-z +symop -x,y,-z +symop -x+1/2,-y+1/2,z +symop -x,-y,-z +symop -x+1/2,y+1/2,z +symop x,-y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 53 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2ac 2 (z,y,-x)' +symbol xHM 'P c n m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z+1/2 +symop -x,-y,z +symop -x+1/2,y,-z+1/2 +symop -x,-y,-z +symop -x+1/2,y,z+1/2 +symop x,y,-z +symop x+1/2,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 53 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2ac 2 (y,z,x)' +symbol xHM 'P n c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z+1/2 +symop -x,-y,z +symop x,-y+1/2,-z+1/2 +symop -x,-y,-z +symop x,-y+1/2,z+1/2 +symop x,y,-z +symop -x,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 53 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-P 2ac 2 (-x,z,y)' +symbol xHM 'P m a n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y+1/2,-z +symop x,-y,-z +symop -x+1/2,-y+1/2,z +symop -x,-y,-z +symop x+1/2,-y+1/2,z +symop -x,y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 54 +basisop x,y,z +symbol ccp4 54 +symbol Hall '-P 2a 2ac' +symbol xHM 'P c c a' +symbol old 'P 21/c 2/c 2/a' 'P c c a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop x+1/2,-y,-z+1/2 +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x+1/2,y,-z +symop -x+1/2,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 54 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2a 2ac (y,-x,z)' +symbol xHM 'P c c b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop -x,y+1/2,-z+1/2 +symop x,-y,-z+1/2 +symop -x,-y,-z +symop x,y+1/2,-z +symop x,-y+1/2,z+1/2 +symop -x,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 54 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2a 2ac (z,x,y)' +symbol xHM 'P b a a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x+1/2,y+1/2,-z +symop -x+1/2,-y,z +symop -x,-y,-z +symop -x,y+1/2,z +symop x+1/2,-y+1/2,z +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 54 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2a 2ac (z,y,-x)' +symbol xHM 'P c a a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x+1/2,-y,z+1/2 +symop -x+1/2,y,-z +symop -x,-y,-z +symop -x,y,z+1/2 +symop x+1/2,y,-z+1/2 +symop x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 54 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2a 2ac (y,z,x)' +symbol xHM 'P b c b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop -x,-y+1/2,z+1/2 +symop x,-y+1/2,-z +symop -x,-y,-z +symop x,-y,z+1/2 +symop x,y+1/2,-z+1/2 +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 54 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-P 2a 2ac (-x,z,y)' +symbol xHM 'P b a b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop x+1/2,-y+1/2,-z +symop -x,-y+1/2,z +symop -x,-y,-z +symop x+1/2,-y,z +symop -x+1/2,y+1/2,z +symop x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 55 +basisop x,y,z +symbol ccp4 55 +symbol Hall '-P 2 2ab' +symbol xHM 'P b a m' +symbol old 'P 21/b 21/a 2/m' 'P b a m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x+1/2,-y+1/2,-z +symop -x+1/2,y+1/2,-z +symop -x,-y,-z +symop x,y,-z +symop -x+1/2,y+1/2,z +symop x+1/2,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 55 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2 2ab (z,x,y)' +symbol xHM 'P m c b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,y+1/2,-z+1/2 +symop -x,-y+1/2,z+1/2 +symop -x,-y,-z +symop -x,y,z +symop x,-y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 55 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2 2ab (y,z,x)' +symbol xHM 'P c m a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x+1/2,-y,z+1/2 +symop x+1/2,-y,-z+1/2 +symop -x,-y,-z +symop x,-y,z +symop x+1/2,y,-z+1/2 +symop -x+1/2,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 56 +basisop x,y,z +symbol ccp4 56 +symbol Hall '-P 2ab 2ac' +symbol xHM 'P c c n' +symbol old 'P 21/c 21/c 2/n' 'P c c n' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x+1/2,-y,-z+1/2 +symop -x,y+1/2,-z+1/2 +symop -x,-y,-z +symop x+1/2,y+1/2,-z +symop -x+1/2,y,z+1/2 +symop x,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 56 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2ab 2ac (z,x,y)' +symbol xHM 'P n a a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y+1/2,-z +symop -x+1/2,-y,z+1/2 +symop -x,-y,-z +symop -x,y+1/2,z+1/2 +symop x+1/2,-y+1/2,z +symop x+1/2,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 56 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2ab 2ac (y,z,x)' +symbol xHM 'P b n b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z+1/2 +symop -x,-y+1/2,z+1/2 +symop x+1/2,-y+1/2,-z +symop -x,-y,-z +symop x+1/2,-y,z+1/2 +symop x,y+1/2,-z+1/2 +symop -x+1/2,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 57 +basisop x,y,z +symbol ccp4 57 +symbol Hall '-P 2c 2b' +symbol xHM 'P b c m' +symbol old 'P 2/b 21/c 21/m' 'P b c m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z+1/2 +symop x,-y+1/2,-z +symop -x,y+1/2,-z+1/2 +symop -x,-y,-z +symop x,y,-z+1/2 +symop -x,y+1/2,z +symop x,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 57 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2c 2b (y,-x,z)' +symbol xHM 'P c a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 0<=y<1; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z+1/2 +symop -x+1/2,y,-z +symop x+1/2,-y,-z+1/2 +symop -x,-y,-z +symop x,y,-z+1/2 +symop x+1/2,-y,z +symop -x+1/2,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 57 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2c 2b (z,x,y)' +symbol xHM 'P m c a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z +symop -x,y,-z+1/2 +symop -x+1/2,-y,z+1/2 +symop -x,-y,-z +symop -x+1/2,y,z +symop x,-y,z+1/2 +symop x+1/2,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 57 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2c 2b (z,y,-x)' +symbol xHM 'P m a b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z +symop -x,-y+1/2,z +symop -x+1/2,y+1/2,-z +symop -x,-y,-z +symop -x+1/2,y,z +symop x,y+1/2,-z +symop x+1/2,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 57 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2c 2b (y,z,x)' +symbol xHM 'P b m a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z +symop -x+1/2,-y,z +symop x+1/2,-y+1/2,-z +symop -x,-y,-z +symop x,-y+1/2,z +symop x+1/2,y,-z +symop -x+1/2,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 57 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-P 2c 2b (-x,z,y)' +symbol xHM 'P c m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z +symop x,-y,-z+1/2 +symop -x,-y+1/2,z+1/2 +symop -x,-y,-z +symop x,-y+1/2,z +symop -x,y,z+1/2 +symop x,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 58 +basisop x,y,z +symbol ccp4 58 +symbol Hall '-P 2 2n' +symbol xHM 'P n n m' +symbol old 'P 21/n 21/n 2/m' 'P n n m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x+1/2,-y+1/2,-z+1/2 +symop -x+1/2,y+1/2,-z+1/2 +symop -x,-y,-z +symop x,y,-z +symop -x+1/2,y+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 58 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2 2n (z,x,y)' +symbol xHM 'P m n n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x+1/2,y+1/2,-z+1/2 +symop -x+1/2,-y+1/2,z+1/2 +symop -x,-y,-z +symop -x,y,z +symop x+1/2,-y+1/2,z+1/2 +symop x+1/2,y+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 58 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2 2n (y,z,x)' +symbol xHM 'P n m n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x+1/2,-y+1/2,z+1/2 +symop x+1/2,-y+1/2,-z+1/2 +symop -x,-y,-z +symop x,-y,z +symop x+1/2,y+1/2,-z+1/2 +symop -x+1/2,y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 59 +basisop x-1/4,y-1/4,z +symbol ccp4 59 +symbol Hall '-P 2ab 2a (x-1/4,y-1/4,z)' +symbol xHM 'P m m n :1' +symbol old 'P 21/m 21/m 2/n' 'P m m n' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x+1/2,-y+1/2,-z +symop -x+1/2,y+1/2,-z +symop -x+1/2,-y+1/2,-z +symop x+1/2,y+1/2,-z +symop -x,y,z +symop x,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 59 +basisop x,y,z +symbol ccp4 1059 +symbol Hall '-P 2ab 2a' +symbol xHM 'P m m n :2' +symbol old 'P 21/m 21/m 2/n a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x+1/2,-y,-z +symop -x,y+1/2,-z +symop -x,-y,-z +symop x+1/2,y+1/2,-z +symop -x+1/2,y,z +symop x,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 59 +basisop z,x-1/4,y-1/4 +symbol ccp4 0 +symbol Hall '-P 2ab 2a (z,x-1/4,y-1/4)' +symbol xHM 'P n m m :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,y+1/2,-z+1/2 +symop -x,-y+1/2,z+1/2 +symop -x,-y+1/2,-z+1/2 +symop -x,y+1/2,z+1/2 +symop x,-y,z +symop x,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 59 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2ab 2a (z,x,y)' +symbol xHM 'P n m m :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z+1/2 +symop -x,y+1/2,-z +symop -x,-y,z+1/2 +symop -x,-y,-z +symop -x,y+1/2,z+1/2 +symop x,-y+1/2,z +symop x,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 59 +basisop y-1/4,z,x-1/4 +symbol ccp4 0 +symbol Hall '-P 2ab 2a (y-1/4,z,x-1/4)' +symbol xHM 'P m n m :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x+1/2,-y,z+1/2 +symop x+1/2,-y,-z+1/2 +symop -x+1/2,-y,-z+1/2 +symop x+1/2,-y,z+1/2 +symop x,y,-z +symop -x,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 59 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2ab 2a (y,z,x)' +symbol xHM 'P m n m :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z+1/2 +symop -x,-y,z+1/2 +symop x+1/2,-y,-z +symop -x,-y,-z +symop x+1/2,-y,z+1/2 +symop x,y,-z+1/2 +symop -x+1/2,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 60 +basisop x,y,z +symbol ccp4 60 +symbol Hall '-P 2n 2ab' +symbol xHM 'P b c n' +symbol old 'P 21/b 2/c 21/n' 'P b c n' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z+1/2 +symop x+1/2,-y+1/2,-z +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x+1/2,y+1/2,-z+1/2 +symop -x+1/2,y+1/2,z +symop x,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 60 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2n 2ab (y,-x,z)' +symbol xHM 'P c a n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z+1/2 +symop -x+1/2,y+1/2,-z +symop x,-y,-z+1/2 +symop -x,-y,-z +symop x+1/2,y+1/2,-z+1/2 +symop x+1/2,-y+1/2,z +symop -x,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 60 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2n 2ab (z,x,y)' +symbol xHM 'P n c a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y+1/2,-z+1/2 +symop -x,y+1/2,-z+1/2 +symop -x+1/2,-y,z +symop -x,-y,-z +symop -x+1/2,y+1/2,z+1/2 +symop x,-y+1/2,z+1/2 +symop x+1/2,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 60 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2n 2ab (z,y,-x)' +symbol xHM 'P n a b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y+1/2,-z+1/2 +symop -x,-y+1/2,z+1/2 +symop -x+1/2,y,-z +symop -x,-y,-z +symop -x+1/2,y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +symop x+1/2,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 60 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2n 2ab (y,z,x)' +symbol xHM 'P b n a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y+1/2,-z+1/2 +symop -x+1/2,-y,z+1/2 +symop x,-y+1/2,-z +symop -x,-y,-z +symop x+1/2,-y+1/2,z+1/2 +symop x+1/2,y,-z+1/2 +symop -x,y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 60 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-P 2n 2ab (-x,z,y)' +symbol xHM 'P c n b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y+1/2,-z+1/2 +symop x+1/2,-y,-z+1/2 +symop -x,-y+1/2,z +symop -x,-y,-z +symop x+1/2,-y+1/2,z+1/2 +symop -x+1/2,y,z+1/2 +symop x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 61 +basisop x,y,z +symbol ccp4 61 +symbol Hall '-P 2ac 2ab' +symbol xHM 'P b c a' +symbol old 'P 21/b 21/c 21/a' 'P b c a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop x+1/2,-y+1/2,-z +symop -x,y+1/2,-z+1/2 +symop -x,-y,-z +symop x+1/2,y,-z+1/2 +symop -x+1/2,y+1/2,z +symop x,-y+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 61 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2ac 2ab (z,y,-x)' +symbol xHM 'P c a b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z+1/2 +symop -x,-y+1/2,z+1/2 +symop -x+1/2,y+1/2,-z +symop -x,-y,-z +symop -x+1/2,y,z+1/2 +symop x,y+1/2,-z+1/2 +symop x+1/2,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 62 +basisop x,y,z +symbol ccp4 62 +symbol Hall '-P 2ac 2n' +symbol xHM 'P n m a' +symbol old 'P 21/n 21/m 21/a' 'P n m a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop x+1/2,-y+1/2,-z+1/2 +symop -x,y+1/2,-z +symop -x,-y,-z +symop x+1/2,y,-z+1/2 +symop -x+1/2,y+1/2,z+1/2 +symop x,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 62 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-P 2ac 2n (y,-x,z)' +symbol xHM 'P m n b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z+1/2 +symop -x+1/2,y+1/2,-z+1/2 +symop x+1/2,-y,-z +symop -x,-y,-z +symop x,y+1/2,-z+1/2 +symop x+1/2,-y+1/2,z+1/2 +symop -x+1/2,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 62 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-P 2ac 2n (z,x,y)' +symbol xHM 'P b n m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y+1/2,-z +symop -x+1/2,y+1/2,-z+1/2 +symop -x,-y,z+1/2 +symop -x,-y,-z +symop -x+1/2,y+1/2,z +symop x+1/2,-y+1/2,z+1/2 +symop x,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 62 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-P 2ac 2n (z,y,-x)' +symbol xHM 'P c m n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z+1/2 +symop -x+1/2,-y+1/2,z+1/2 +symop -x,y+1/2,-z +symop -x,-y,-z +symop -x+1/2,y,z+1/2 +symop x+1/2,y+1/2,-z+1/2 +symop x,-y+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 62 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-P 2ac 2n (y,z,x)' +symbol xHM 'P m c n' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z+1/2 +symop -x+1/2,-y+1/2,z+1/2 +symop x+1/2,-y,-z +symop -x,-y,-z +symop x,-y+1/2,z+1/2 +symop x+1/2,y+1/2,-z+1/2 +symop -x+1/2,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 62 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-P 2ac 2n (-x,z,y)' +symbol xHM 'P n a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y+1/2,-z +symop x+1/2,-y+1/2,-z+1/2 +symop -x,-y,z+1/2 +symop -x,-y,-z +symop x+1/2,-y+1/2,z +symop -x+1/2,y+1/2,z+1/2 +symop x,y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 63 +basisop x,y,z +symbol ccp4 63 +symbol Hall '-C 2c 2' +symbol xHM 'C m c m' +symbol old 'C 2/m 2/c 21/m' 'C m c m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z+1/2 +symop x,-y,-z +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x,y,-z+1/2 +symop -x,y,z +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 63 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-C 2c 2 (y,-x,z)' +symbol xHM 'C c m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z+1/2 +symop -x,y,-z +symop x,-y,-z+1/2 +symop -x,-y,-z +symop x,y,-z+1/2 +symop x,-y,z +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 63 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-C 2c 2 (z,x,y)' +symbol xHM 'A m m a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z +symop -x,y,-z +symop -x+1/2,-y,z +symop -x,-y,-z +symop -x+1/2,y,z +symop x,-y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 63 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-C 2c 2 (z,y,-x)' +symbol xHM 'A m a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z +symop -x,-y,z +symop -x+1/2,y,-z +symop -x,-y,-z +symop -x+1/2,y,z +symop x,y,-z +symop x+1/2,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 63 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-C 2c 2 (y,z,x)' +symbol xHM 'B b m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z +symop -x,-y,z +symop x,-y+1/2,-z +symop -x,-y,-z +symop x,-y+1/2,z +symop x,y,-z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 63 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-C 2c 2 (-x,z,y)' +symbol xHM 'B m m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z +symop x,-y,-z +symop -x,-y+1/2,z +symop -x,-y,-z +symop x,-y+1/2,z +symop -x,y,z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 64 +basisop x,y,z +symbol ccp4 64 +symbol Hall '-C 2ac 2' +symbol xHM 'C m c a' +symbol old 'C 2/m 2/c 21/a' 'C m c a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop x,-y,-z +symop -x+1/2,y,-z+1/2 +symop -x,-y,-z +symop x+1/2,y,-z+1/2 +symop -x,y,z +symop x+1/2,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 64 +basisop y,-x,z +symbol ccp4 0 +symbol Hall '-C 2ac 2 (y,-x,z)' +symbol xHM 'C c m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z+1/2 +symop -x,y,-z +symop x,-y+1/2,-z+1/2 +symop -x,-y,-z +symop x,y+1/2,-z+1/2 +symop x,-y,z +symop -x,y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 64 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-C 2ac 2 (z,x,y)' +symbol xHM 'A b m a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y+1/2,-z +symop -x,y,-z +symop -x+1/2,-y+1/2,z +symop -x,-y,-z +symop -x+1/2,y+1/2,z +symop x,-y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 64 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-C 2ac 2 (z,y,-x)' +symbol xHM 'A c a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x+1/2,-y,-z+1/2 +symop -x,-y,z +symop -x+1/2,y,-z+1/2 +symop -x,-y,-z +symop -x+1/2,y,z+1/2 +symop x,y,-z +symop x+1/2,-y,z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 64 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-C 2ac 2 (y,z,x)' +symbol xHM 'B b c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y+1/2,-z+1/2 +symop -x,-y,z +symop x,-y+1/2,-z+1/2 +symop -x,-y,-z +symop x,-y+1/2,z+1/2 +symop x,y,-z +symop -x,y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 64 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-C 2ac 2 (-x,z,y)' +symbol xHM 'B m a b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y+1/2,-z +symop x,-y,-z +symop -x+1/2,-y+1/2,z +symop -x,-y,-z +symop x+1/2,-y+1/2,z +symop -x,y,z +symop x+1/2,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 65 +basisop x,y,z +symbol ccp4 65 +symbol Hall '-C 2 2' +symbol xHM 'C m m m' +symbol old 'C 2/m 2/m 2/m' 'C m m m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop -x,-y,-z +symop x,y,-z +symop -x,y,z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 65 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-C 2 2 (z,x,y)' +symbol xHM 'A m m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x,y,-z +symop -x,-y,z +symop -x,-y,-z +symop -x,y,z +symop x,-y,z +symop x,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 65 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-C 2 2 (y,z,x)' +symbol xHM 'B m m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y,z +symop x,-y,-z +symop -x,-y,-z +symop x,-y,z +symop x,y,-z +symop -x,y,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 66 +basisop x,y,z +symbol ccp4 66 +symbol Hall '-C 2 2c' +symbol xHM 'C c c m' +symbol old 'C 2/c 2/c 2/m' 'C c c m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z+1/2 +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x,y,-z +symop -x,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 66 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-C 2 2c (z,x,y)' +symbol xHM 'A m a a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x+1/2,y,-z +symop -x+1/2,-y,z +symop -x,-y,-z +symop -x,y,z +symop x+1/2,-y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 66 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-C 2 2c (y,z,x)' +symbol xHM 'B b m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y+1/2,z +symop x,-y+1/2,-z +symop -x,-y,-z +symop x,-y,z +symop x,y+1/2,-z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 67 +basisop x,y,z +symbol ccp4 67 +symbol Hall '-C 2a 2' +symbol xHM 'C m m a' +symbol old 'C 2/m 2/m 2/a' 'C m m a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop x,-y,-z +symop -x+1/2,y,-z +symop -x,-y,-z +symop x+1/2,y,-z +symop -x,y,z +symop x+1/2,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 67 +basisop x+1/4,y+1/4,z +symbol ccp4 0 +symbol Hall '-C 2a 2 (x+1/4,y+1/4,z)' +symbol xHM 'C m m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop x,-y+1/2,-z +symop -x,y,-z +symop -x+1/2,-y+1/2,-z +symop x+1/2,y,-z +symop -x+1/2,y,z +symop x+1/2,-y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 67 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-C 2a 2 (z,x,y)' +symbol xHM 'A b m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x,y,-z +symop -x,-y+1/2,z +symop -x,-y,-z +symop -x,y+1/2,z +symop x,-y,z +symop x,y+1/2,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 67 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-C 2a 2 (z,y,-x)' +symbol xHM 'A c m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x,-y,z +symop -x,y,-z+1/2 +symop -x,-y,-z +symop -x,y,z+1/2 +symop x,y,-z +symop x,-y,z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 67 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-C 2a 2 (y,z,x)' +symbol xHM 'B m c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop -x,-y,z +symop x,-y,-z+1/2 +symop -x,-y,-z +symop x,-y,z+1/2 +symop x,y,-z +symop -x,y,z+1/2 +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 67 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-C 2a 2 (-x,z,y)' +symbol xHM 'B m a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop x,-y,-z +symop -x+1/2,-y,z +symop -x,-y,-z +symop x+1/2,-y,z +symop -x,y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 68 +basisop x-1/2,y-1/4,z+1/4 +symbol ccp4 68 +symbol Hall '-C 2a 2ac (x-1/2,y-1/4,z+1/4)' +symbol xHM 'C c c a :1' +symbol old 'C c c a' 'C 2/c 2/c 2/a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x+1/2,-y+1/2,-z +symop -x,y,-z +symop -x,-y+1/2,-z+1/2 +symop x+1/2,y,-z+1/2 +symop -x+1/2,y,z+1/2 +symop x,-y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 68 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-C 2a 2ac' +symbol xHM 'C c c a :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop x+1/2,-y,-z+1/2 +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x+1/2,y,-z +symop -x+1/2,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 68 +basisop x-1/2,y-1/4,z+1/4 +symbol ccp4 0 +symbol Hall '-C 2a 2ac (x-1/2,y-1/4,z+1/4)' +symbol xHM 'C c c b :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x+1/2,-y+1/2,-z +symop -x,y,-z +symop -x,-y+1/2,-z+1/2 +symop x+1/2,y,-z+1/2 +symop -x+1/2,y,z+1/2 +symop x,-y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 68 +basisop x-1/4,y-1/4,z +symbol ccp4 0 +symbol Hall '-C 2a 2ac (x-1/4,y-1/4,z)' +symbol xHM 'C c c b :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop x+1/2,-y+1/2,-z+1/2 +symop -x+1/2,y,-z+1/2 +symop -x+1/2,-y+1/2,-z +symop x+1/2,y,-z +symop -x,y,z+1/2 +symop x,-y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 68 +basisop z+1/4,x-1/2,y-1/4 +symbol ccp4 0 +symbol Hall '-C 2a 2ac (z+1/4,x-1/2,y-1/4)' +symbol xHM 'A b a a :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z+1/2 +symop -x,y+1/2,-z+1/2 +symop -x,-y,z +symop -x+1/2,-y,-z+1/2 +symop -x+1/2,y+1/2,z +symop x+1/2,-y+1/2,z +symop x+1/2,y,-z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 68 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-C 2a 2ac (z,x,y)' +symbol xHM 'A b a a :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x+1/2,y+1/2,-z +symop -x+1/2,-y,z +symop -x,-y,-z +symop -x,y+1/2,z +symop x+1/2,-y+1/2,z +symop x+1/2,y,-z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 68 +basisop z+1/4,x-1/2,y-1/4 +symbol ccp4 0 +symbol Hall '-C 2a 2ac (z+1/4,x-1/2,y-1/4)' +symbol xHM 'A c a a :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z+1/2 +symop -x,y+1/2,-z+1/2 +symop -x,-y,z +symop -x+1/2,-y,-z+1/2 +symop -x+1/2,y+1/2,z +symop x+1/2,-y+1/2,z +symop x+1/2,y,-z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 68 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-C 2a 2ac (z,y,-x)' +symbol xHM 'A c a a :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-A 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x+1/2,-y,z+1/2 +symop -x+1/2,y,-z +symop -x,-y,-z +symop -x,y,z+1/2 +symop x+1/2,y,-z+1/2 +symop x+1/2,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 68 +basisop y-1/4,z+1/4,x-1/2 +symbol ccp4 0 +symbol Hall '-C 2a 2ac (y-1/4,z+1/4,x-1/2)' +symbol xHM 'B b c b :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z+1/2 +symop -x+1/2,-y,z+1/2 +symop x,-y,-z +symop -x+1/2,-y+1/2,-z +symop x,-y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +symop -x+1/2,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 68 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-C 2a 2ac (y,z,x)' +symbol xHM 'B b c b :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop -x,-y+1/2,z+1/2 +symop x,-y+1/2,-z +symop -x,-y,-z +symop x,-y,z+1/2 +symop x,y+1/2,-z+1/2 +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 68 +basisop y-1/4,z+1/4,x-1/2 +symbol ccp4 0 +symbol Hall '-C 2a 2ac (y-1/4,z+1/4,x-1/2)' +symbol xHM 'B b a b :1' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z+1/2 +symop -x+1/2,-y,z+1/2 +symop x,-y,-z +symop -x+1/2,-y+1/2,-z +symop x,-y+1/2,z+1/2 +symop x,y+1/2,-z+1/2 +symop -x+1/2,y+1/2,z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 68 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-C 2a 2ac (-x,z,y)' +symbol xHM 'B b a b :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-B 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop x+1/2,-y+1/2,-z +symop -x,-y+1/2,z +symop -x,-y,-z +symop x+1/2,-y,z +symop -x+1/2,y+1/2,z +symop x,y+1/2,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 69 +basisop x,y,z +symbol ccp4 69 +symbol Hall '-F 2 2' +symbol xHM 'F m m m' +symbol old 'F 2/m 2/m 2/m' 'F m m m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop -x,-y,-z +symop x,y,-z +symop -x,y,z +symop x,-y,z +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 70 +basisop x+1/8,y+1/8,z+1/8 +symbol ccp4 70 +symbol Hall '-F 2uv 2vw (x+1/8,y+1/8,z+1/8)' +symbol xHM 'F d d d :1' +symbol old 'F 2/d 2/d 2/d' 'F d d d' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y,-z+1/2 +symop -x+1/4,-y+1/4,-z+1/4 +symop x+3/4,y+3/4,-z+1/4 +symop -x+1/4,y+3/4,z+3/4 +symop x+3/4,-y+1/4,z+3/4 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 70 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-F 2uv 2vw' +symbol xHM 'F d d d :2' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<=1/8; 1/8<=y<=3/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/4,-y+1/4,z +symop x,-y+1/4,-z+1/4 +symop -x+1/4,y,-z+1/4 +symop -x,-y,-z +symop x+3/4,y+3/4,-z +symop -x,y+3/4,z+3/4 +symop x+3/4,-y,z+3/4 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 71 +basisop x,y,z +symbol ccp4 71 +symbol Hall '-I 2 2' +symbol xHM 'I m m m' +symbol old 'I 2/m 2/m 2/m' 'I m m m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop -x,-y,-z +symop x,y,-z +symop -x,y,z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 72 +basisop x,y,z +symbol ccp4 72 +symbol Hall '-I 2 2c' +symbol xHM 'I b a m' +symbol old 'I 2/b 2/a 2/m' 'I b a m' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z+1/2 +symop -x,y,-z+1/2 +symop -x,-y,-z +symop x,y,-z +symop -x,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 72 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-I 2 2c (z,x,y)' +symbol xHM 'I m c b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z +symop -x+1/2,y,-z +symop -x+1/2,-y,z +symop -x,-y,-z +symop -x,y,z +symop x+1/2,-y,z +symop x+1/2,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 72 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-I 2 2c (y,z,x)' +symbol xHM 'I c m a' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z +symop -x,-y+1/2,z +symop x,-y+1/2,-z +symop -x,-y,-z +symop x,-y,z +symop x,y+1/2,-z +symop -x,y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 73 +basisop x,y,z +symbol ccp4 73 +symbol Hall '-I 2b 2c' +symbol xHM 'I b c a' +symbol old 'I 21/b 21/c 21/a' 'I b c a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop x,-y,-z+1/2 +symop -x,y+1/2,-z+1/2 +symop -x,-y,-z +symop x,y+1/2,-z +symop -x,y,z+1/2 +symop x,-y+1/2,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 73 +basisop x+1/4,y-1/4,z+1/4 +symbol ccp4 0 +symbol Hall '-I 2b 2c (x+1/4,y-1/4,z+1/4)' +symbol xHM 'I c a b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop x,-y+1/2,-z +symop -x+1/2,y+1/2,-z +symop -x+1/2,-y+1/2,-z+1/2 +symop x,y+1/2,-z+1/2 +symop -x+1/2,y,z+1/2 +symop x,-y,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 74 +basisop x,y,z +symbol ccp4 74 +symbol Hall '-I 2b 2' +symbol xHM 'I m m a' +symbol old 'I 21/m 21/m 21/a' 'I m m a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y+1/2,z +symop x,-y,-z +symop -x,y+1/2,-z +symop -x,-y,-z +symop x,y+1/2,-z +symop -x,y,z +symop x,-y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 74 +basisop x+1/4,y-1/4,z+1/4 +symbol ccp4 0 +symbol Hall '-I 2b 2 (x+1/4,y-1/4,z+1/4)' +symbol xHM 'I m m b' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y+1/2,-z+1/2 +symop -x+1/2,-y+1/2,-z+1/2 +symop x,y+1/2,-z+1/2 +symop -x+1/2,y,z +symop x,-y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 74 +basisop z,x,y +symbol ccp4 0 +symbol Hall '-I 2b 2 (z,x,y)' +symbol xHM 'I b m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y,-z+1/2 +symop -x,y,-z +symop -x,-y,z+1/2 +symop -x,-y,-z +symop -x,y,z+1/2 +symop x,-y,z +symop x,y,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 74 +basisop z,y,-x +symbol ccp4 0 +symbol Hall '-I 2b 2 (z,y,-x)' +symbol xHM 'I c m m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop x,-y+1/2,-z +symop -x,-y,z +symop -x,y+1/2,-z +symop -x,-y,-z +symop -x,y+1/2,z +symop x,y,-z +symop x,-y+1/2,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 74 +basisop y,z,x +symbol ccp4 0 +symbol Hall '-I 2b 2 (y,z,x)' +symbol xHM 'I m c m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,y,-z +symop -x,-y,z +symop x+1/2,-y,-z +symop -x,-y,-z +symop x+1/2,-y,z +symop x,y,-z +symop -x+1/2,y,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 74 +basisop -x,z,y +symbol ccp4 0 +symbol Hall '-I 2b 2 (-x,z,y)' +symbol xHM 'I m a m' +symbol old '' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp '-P 2 2' 'mmm' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,y,-z+1/2 +symop x,-y,-z +symop -x,-y,z+1/2 +symop -x,-y,-z +symop x,-y,z+1/2 +symop -x,y,z +symop x,y,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 75 +basisop x,y,z +symbol ccp4 75 +symbol Hall ' P 4' +symbol xHM 'P 4' +symbol old 'P 4' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp ' P 4' '4' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 76 +basisop x,y,z +symbol ccp4 76 +symbol Hall ' P 4w' +symbol xHM 'P 41' +symbol old 'P 41' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp ' P 4' '4' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/4 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z+1/4 +symop -x,-y,z+1/2 +symop y,-x,z+3/4 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 77 +basisop x,y,z +symbol ccp4 77 +symbol Hall ' P 4c' +symbol xHM 'P 42' +symbol old 'P 42' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp ' P 4' '4' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 78 +basisop x,y,z +symbol ccp4 78 +symbol Hall ' P 4cw' +symbol xHM 'P 43' +symbol old 'P 43' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp ' P 4' '4' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/4 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z+3/4 +symop -x,-y,z+1/2 +symop y,-x,z+1/4 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 79 +basisop x,y,z +symbol ccp4 79 +symbol Hall ' I 4' +symbol xHM 'I 4' +symbol old 'I 4' +symbol laue '-P 4' '4/m' +symbol patt '-I 4' '4/m' +symbol pgrp ' P 4' '4' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 80 +basisop x,y,z +symbol ccp4 80 +symbol Hall ' I 4bw' +symbol xHM 'I 41' +symbol old 'I 41' +symbol laue '-P 4' '4/m' +symbol patt '-I 4' '4/m' +symbol pgrp ' P 4' '4' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<1/4 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/4 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x+1/2,z+1/4 +symop -x+1/2,-y+1/2,z+1/2 +symop y+1/2,-x,z+3/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 81 +basisop x,y,z +symbol ccp4 81 +symbol Hall ' P -4' +symbol xHM 'P -4' +symbol old 'P -4' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp ' P -4' '-4' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 82 +basisop x,y,z +symbol ccp4 82 +symbol Hall ' I -4' +symbol xHM 'I -4' +symbol old 'I -4' +symbol laue '-P 4' '4/m' +symbol patt '-I 4' '4/m' +symbol pgrp ' P -4' '-4' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 83 +basisop x,y,z +symbol ccp4 83 +symbol Hall '-P 4' +symbol xHM 'P 4/m' +symbol old 'P 4/m' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 84 +basisop x,y,z +symbol ccp4 84 +symbol Hall '-P 4c' +symbol xHM 'P 42/m' +symbol old 'P 42/m' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +symop -x,-y,-z +symop y,-x,-z+1/2 +symop x,y,-z +symop -y,x,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 85 +basisop x-1/4,y+1/4,z +symbol ccp4 85 +symbol Hall '-P 4a (x-1/4,y+1/4,z)' +symbol xHM 'P 4/n :1' +symbol old 'P 4/n' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z +symop -x,-y,z +symop y+1/2,-x+1/2,z +symop -x+1/2,-y+1/2,-z +symop y,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 85 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4a' +symbol xHM 'P 4/n :2' +symbol old '' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z +symop -x,-y,-z +symop y+1/2,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 86 +basisop x+1/4,y+1/4,z+1/4 +symbol ccp4 86 +symbol Hall '-P 4bc (x+1/4,y+1/4,z+1/4)' +symbol xHM 'P 42/n :1' +symbol old 'P 42/n' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop -x+1/2,-y+1/2,-z+1/2 +symop y,-x,-z +symop x+1/2,y+1/2,-z+1/2 +symop -y,x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 86 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4bc' +symbol xHM 'P 42/n :2' +symbol old '' +symbol laue '-P 4' '4/m' +symbol patt '-P 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x+1/2,z+1/2 +symop -x+1/2,-y+1/2,z +symop y+1/2,-x,z+1/2 +symop -x,-y,-z +symop y,-x+1/2,-z+1/2 +symop x+1/2,y+1/2,-z +symop -y+1/2,x,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 87 +basisop x,y,z +symbol ccp4 87 +symbol Hall '-I 4' +symbol xHM 'I 4/m' +symbol old 'I 4/m' +symbol laue '-P 4' '4/m' +symbol patt '-I 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 88 +basisop x,y+1/4,z+1/8 +symbol ccp4 88 +symbol Hall '-I 4ad (x,y+1/4,z+1/8)' +symbol xHM 'I 41/a :1' +symbol old 'I 41/a' +symbol laue '-P 4' '4/m' +symbol patt '-I 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x+1/2,z+1/4 +symop -x+1/2,-y+1/2,z+1/2 +symop y+1/2,-x,z+3/4 +symop -x,-y+1/2,-z+1/4 +symop y,-x,-z +symop x+1/2,y,-z+3/4 +symop -y+1/2,x+1/2,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 88 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-I 4ad' +symbol xHM 'I 41/a :2' +symbol old '' +symbol laue '-P 4' '4/m' +symbol patt '-I 4' '4/m' +symbol pgrp '-P 4' '4/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+3/4,x+1/4,z+1/4 +symop -x+1/2,-y,z+1/2 +symop y+3/4,-x+3/4,z+3/4 +symop -x,-y,-z +symop y+1/4,-x+3/4,-z+3/4 +symop x+1/2,y,-z+1/2 +symop -y+1/4,x+1/4,-z+1/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 89 +basisop x,y,z +symbol ccp4 89 +symbol Hall ' P 4 2' +symbol xHM 'P 4 2 2' +symbol old 'P 4 2 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 90 +basisop x,y,z +symbol ccp4 90 +symbol Hall ' P 4ab 2ab' +symbol xHM 'P 4 21 2' +symbol old 'P 4 21 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z +symop -x,-y,z +symop y+1/2,-x+1/2,z +symop x+1/2,-y+1/2,-z +symop y,x,-z +symop -x+1/2,y+1/2,-z +symop -y,-x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 91 +basisop x,y,z +symbol ccp4 91 +symbol Hall ' P 4w 2c' +symbol xHM 'P 41 2 2' +symbol old 'P 41 2 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/8 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; -1/8<=z<=3/8 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z+1/4 +symop -x,-y,z+1/2 +symop y,-x,z+3/4 +symop x,-y,-z+1/2 +symop y,x,-z+3/4 +symop -x,y,-z +symop -y,-x,-z+1/4 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 92 +basisop x,y,z +symbol ccp4 92 +symbol Hall ' P 4abw 2nw' +symbol xHM 'P 41 21 2' +symbol old 'P 41 21 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+1/4 +symop -x,-y,z+1/2 +symop y+1/2,-x+1/2,z+3/4 +symop x+1/2,-y+1/2,-z+3/4 +symop y,x,-z +symop -x+1/2,y+1/2,-z+1/4 +symop -y,-x,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 93 +basisop x,y,z +symbol ccp4 93 +symbol Hall ' P 4c 2' +symbol xHM 'P 42 2 2' +symbol old 'P 42 2 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/4 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +symop x,-y,-z +symop y,x,-z+1/2 +symop -x,y,-z +symop -y,-x,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 94 +basisop x,y,z +symbol ccp4 94 +symbol Hall ' P 4n 2n' +symbol xHM 'P 42 21 2' +symbol old 'P 42 21 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,-z+1/2 +symop y,x,-z +symop -x+1/2,y+1/2,-z+1/2 +symop -y,-x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 95 +basisop x,y,z +symbol ccp4 95 +symbol Hall ' P 4cw 2c' +symbol xHM 'P 43 2 2' +symbol old 'P 43 2 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/8 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/8<=z<=5/8 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z+3/4 +symop -x,-y,z+1/2 +symop y,-x,z+1/4 +symop x,-y,-z+1/2 +symop y,x,-z+1/4 +symop -x,y,-z +symop -y,-x,-z+3/4 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 96 +basisop x,y,z +symbol ccp4 96 +symbol Hall ' P 4nw 2abw' +symbol xHM 'P 43 21 2' +symbol old 'P 43 21 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+3/4 +symop -x,-y,z+1/2 +symop y+1/2,-x+1/2,z+1/4 +symop x+1/2,-y+1/2,-z+1/4 +symop y,x,-z +symop -x+1/2,y+1/2,-z+3/4 +symop -y,-x,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 97 +basisop x,y,z +symbol ccp4 97 +symbol Hall ' I 4 2' +symbol xHM 'I 4 2 2' +symbol old 'I 4 2 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 98 +basisop x,y,z +symbol ccp4 98 +symbol Hall ' I 4bw 2bw' +symbol xHM 'I 41 2 2' +symbol old 'I 41 2 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; -1/4<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x+1/2,z+1/4 +symop -x+1/2,-y+1/2,z+1/2 +symop y+1/2,-x,z+3/4 +symop x,-y+1/2,-z+1/4 +symop y+1/2,x+1/2,-z+1/2 +symop -x+1/2,y,-z+3/4 +symop -y,-x,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 99 +basisop x,y,z +symbol ccp4 99 +symbol Hall ' P 4 -2' +symbol xHM 'P 4 m m' +symbol old 'P 4 m m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop -x,y,z +symop -y,-x,z +symop x,-y,z +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 100 +basisop x,y,z +symbol ccp4 100 +symbol Hall ' P 4 -2ab' +symbol xHM 'P 4 b m' +symbol old 'P 4 b m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop -x+1/2,y+1/2,z +symop -y+1/2,-x+1/2,z +symop x+1/2,-y+1/2,z +symop y+1/2,x+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 101 +basisop x,y,z +symbol ccp4 101 +symbol Hall ' P 4c -2c' +symbol xHM 'P 42 c m' +symbol old 'P 42 c m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +symop -x,y,z+1/2 +symop -y,-x,z +symop x,-y,z+1/2 +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 102 +basisop x,y,z +symbol ccp4 102 +symbol Hall ' P 4n -2n' +symbol xHM 'P 42 n m' +symbol old 'P 42 n m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<3/4; 1/4<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop -x+1/2,y+1/2,z+1/2 +symop -y,-x,z +symop x+1/2,-y+1/2,z+1/2 +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 103 +basisop x,y,z +symbol ccp4 103 +symbol Hall ' P 4 -2c' +symbol xHM 'P 4 c c' +symbol old 'P 4 c c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop -x,y,z+1/2 +symop -y,-x,z+1/2 +symop x,-y,z+1/2 +symop y,x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 104 +basisop x,y,z +symbol ccp4 104 +symbol Hall ' P 4 -2n' +symbol xHM 'P 4 n c' +symbol old 'P 4 n c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop -x+1/2,y+1/2,z+1/2 +symop -y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 105 +basisop x,y,z +symbol ccp4 105 +symbol Hall ' P 4c -2' +symbol xHM 'P 42 m c' +symbol old 'P 42 m c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +symop -x,y,z +symop -y,-x,z+1/2 +symop x,-y,z +symop y,x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 106 +basisop x,y,z +symbol ccp4 106 +symbol Hall ' P 4c -2ab' +symbol xHM 'P 42 b c' +symbol old 'P 42 b c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +symop -x+1/2,y+1/2,z +symop -y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,z +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 107 +basisop x,y,z +symbol ccp4 107 +symbol Hall ' I 4 -2' +symbol xHM 'I 4 m m' +symbol old 'I 4 m m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop -x,y,z +symop -y,-x,z +symop x,-y,z +symop y,x,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 108 +basisop x,y,z +symbol ccp4 108 +symbol Hall ' I 4 -2c' +symbol xHM 'I 4 c m' +symbol old 'I 4 c m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop -x,y,z+1/2 +symop -y,-x,z+1/2 +symop x,-y,z+1/2 +symop y,x,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 109 +basisop x,y,z +symbol ccp4 109 +symbol Hall ' I 4bw -2' +symbol xHM 'I 41 m d' +symbol old 'I 41 m d' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x+1/2,z+1/4 +symop -x+1/2,-y+1/2,z+1/2 +symop y+1/2,-x,z+3/4 +symop -x,y,z +symop -y,-x+1/2,z+1/4 +symop x+1/2,-y+1/2,z+1/2 +symop y+1/2,x,z+3/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 110 +basisop x,y,z +symbol ccp4 110 +symbol Hall ' I 4bw -2c' +symbol xHM 'I 41 c d' +symbol old 'I 41 c d' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P 4 -2' '4mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 +symop x,y,z +symop -y,x+1/2,z+1/4 +symop -x+1/2,-y+1/2,z+1/2 +symop y+1/2,-x,z+3/4 +symop -x,y,z+1/2 +symop -y,-x+1/2,z+3/4 +symop x+1/2,-y+1/2,z +symop y+1/2,x,z+1/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 111 +basisop x,y,z +symbol ccp4 111 +symbol Hall ' P -4 2' +symbol xHM 'P -4 2 m' +symbol old 'P -4 2 m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P -4 2' '-4m2' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x,-y,-z +symop -y,-x,z +symop -x,y,-z +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 112 +basisop x,y,z +symbol ccp4 112 +symbol Hall ' P -4 2c' +symbol xHM 'P -4 2 c' +symbol old 'P -4 2 c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P -4 2' '-4m2' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x,-y,-z+1/2 +symop -y,-x,z+1/2 +symop -x,y,-z+1/2 +symop y,x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 113 +basisop x,y,z +symbol ccp4 113 +symbol Hall ' P -4 2ab' +symbol xHM 'P -4 21 m' +symbol old 'P -4 21 m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P -4 2' '-4m2' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x+1/2,-y+1/2,-z +symop -y+1/2,-x+1/2,z +symop -x+1/2,y+1/2,-z +symop y+1/2,x+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 114 +basisop x,y,z +symbol ccp4 114 +symbol Hall ' P -4 2n' +symbol xHM 'P -4 21 c' +symbol old 'P -4 21 c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P -4 2' '-4m2' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x+1/2,-y+1/2,-z+1/2 +symop -y+1/2,-x+1/2,z+1/2 +symop -x+1/2,y+1/2,-z+1/2 +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 115 +basisop x,y,z +symbol ccp4 115 +symbol Hall ' P -4 -2' +symbol xHM 'P -4 m 2' +symbol old 'P -4 m 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P -4 -2' '-42m' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop -x,y,z +symop y,x,-z +symop x,-y,z +symop -y,-x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 116 +basisop x,y,z +symbol ccp4 116 +symbol Hall ' P -4 -2c' +symbol xHM 'P -4 c 2' +symbol old 'P -4 c 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P -4 -2' '-42m' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop -x,y,z+1/2 +symop y,x,-z+1/2 +symop x,-y,z+1/2 +symop -y,-x,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 117 +basisop x,y,z +symbol ccp4 117 +symbol Hall ' P -4 -2ab' +symbol xHM 'P -4 b 2' +symbol old 'P -4 b 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P -4 -2' '-42m' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop -x+1/2,y+1/2,z +symop y+1/2,x+1/2,-z +symop x+1/2,-y+1/2,z +symop -y+1/2,-x+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 118 +basisop x,y,z +symbol ccp4 118 +symbol Hall ' P -4 -2n' +symbol xHM 'P -4 n 2' +symbol old 'P -4 n 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P -4 -2' '-42m' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop -x+1/2,y+1/2,z+1/2 +symop y+1/2,x+1/2,-z+1/2 +symop x+1/2,-y+1/2,z+1/2 +symop -y+1/2,-x+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 119 +basisop x,y,z +symbol ccp4 119 +symbol Hall ' I -4 -2' +symbol xHM 'I -4 m 2' +symbol old 'I -4 m 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P -4 -2' '-42m' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop -x,y,z +symop y,x,-z +symop x,-y,z +symop -y,-x,-z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 120 +basisop x,y,z +symbol ccp4 120 +symbol Hall ' I -4 -2c' +symbol xHM 'I -4 c 2' +symbol old 'I -4 c 2' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P -4 -2' '-42m' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop -x,y,z+1/2 +symop y,x,-z+1/2 +symop x,-y,z+1/2 +symop -y,-x,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 121 +basisop x,y,z +symbol ccp4 121 +symbol Hall ' I -4 2' +symbol xHM 'I -4 2 m' +symbol old 'I -4 2 m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P -4 2' '-4m2' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<3/4; 1/4<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x,-y,-z +symop -y,-x,z +symop -x,y,-z +symop y,x,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 122 +basisop x,y,z +symbol ccp4 122 +symbol Hall ' I -4 2bw' +symbol xHM 'I -4 2 d' +symbol old 'I -4 2 d' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp ' P -4 2' '-4m2' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x,-y+1/2,-z+1/4 +symop -y+1/2,-x,z+3/4 +symop -x,y+1/2,-z+1/4 +symop y+1/2,x,z+3/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 123 +basisop x,y,z +symbol ccp4 123 +symbol Hall '-P 4 2' +symbol xHM 'P 4/m m m' +symbol old 'P 4/m 2/m 2/m' 'P4/m m m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x,y,z +symop -y,-x,z +symop x,-y,z +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 124 +basisop x,y,z +symbol ccp4 124 +symbol Hall '-P 4 2c' +symbol xHM 'P 4/m c c' +symbol old 'P 4/m 2/c 2/c' 'P4/m c c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z+1/2 +symop y,x,-z+1/2 +symop -x,y,-z+1/2 +symop -y,-x,-z+1/2 +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x,y,z+1/2 +symop -y,-x,z+1/2 +symop x,-y,z+1/2 +symop y,x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 125 +basisop x-1/4,y-1/4,z +symbol ccp4 125 +symbol Hall '-P 4a 2b (x-1/4,y-1/4,z)' +symbol xHM 'P 4/n b m :1' +symbol old 'P 4/n 2/b 2/m' 'P4/n b m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop -x+1/2,-y+1/2,-z +symop y+1/2,-x+1/2,-z +symop x+1/2,y+1/2,-z +symop -y+1/2,x+1/2,-z +symop -x+1/2,y+1/2,z +symop -y+1/2,-x+1/2,z +symop x+1/2,-y+1/2,z +symop y+1/2,x+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 125 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4a 2b' +symbol xHM 'P 4/n b m :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<1; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z +symop x,-y+1/2,-z +symop y,x,-z +symop -x+1/2,y,-z +symop -y+1/2,-x+1/2,-z +symop -x,-y,-z +symop y+1/2,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z +symop -x,y+1/2,z +symop -y,-x,z +symop x+1/2,-y,z +symop y+1/2,x+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 126 +basisop x-1/4,y-1/4,z-1/4 +symbol ccp4 126 +symbol Hall '-P 4a 2bc (x-1/4,y-1/4,z-1/4)' +symbol xHM 'P 4/n n c :1' +symbol old 'P 4/n 2/n 2/c' 'P4/n n c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop -x+1/2,-y+1/2,-z+1/2 +symop y+1/2,-x+1/2,-z+1/2 +symop x+1/2,y+1/2,-z+1/2 +symop -y+1/2,x+1/2,-z+1/2 +symop -x+1/2,y+1/2,z+1/2 +symop -y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 126 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4a 2bc' +symbol xHM 'P 4/n n c :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z +symop x,-y+1/2,-z+1/2 +symop y,x,-z+1/2 +symop -x+1/2,y,-z+1/2 +symop -y+1/2,-x+1/2,-z+1/2 +symop -x,-y,-z +symop y+1/2,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z +symop -x,y+1/2,z+1/2 +symop -y,-x,z+1/2 +symop x+1/2,-y,z+1/2 +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 127 +basisop x,y,z +symbol ccp4 127 +symbol Hall '-P 4 2ab' +symbol xHM 'P 4/m b m' +symbol old 'P 4/m 21/b 2/m' 'P4/m b m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x+1/2,-y+1/2,-z +symop y+1/2,x+1/2,-z +symop -x+1/2,y+1/2,-z +symop -y+1/2,-x+1/2,-z +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x+1/2,y+1/2,z +symop -y+1/2,-x+1/2,z +symop x+1/2,-y+1/2,z +symop y+1/2,x+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 128 +basisop x,y,z +symbol ccp4 128 +symbol Hall '-P 4 2n' +symbol xHM 'P 4/m n c' +symbol old 'P 4/m 21/n 2/c' 'P4/m n c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x+1/2,-y+1/2,-z+1/2 +symop y+1/2,x+1/2,-z+1/2 +symop -x+1/2,y+1/2,-z+1/2 +symop -y+1/2,-x+1/2,-z+1/2 +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x+1/2,y+1/2,z+1/2 +symop -y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 129 +basisop x-1/4,y+1/4,z +symbol ccp4 129 +symbol Hall '-P 4a 2a (x-1/4,y+1/4,z)' +symbol xHM 'P 4/n m m :1' +symbol old 'P 4/n 21/m 2/m' 'P4/n m m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z +symop -x,-y,z +symop y+1/2,-x+1/2,z +symop x+1/2,-y+1/2,-z +symop y,x,-z +symop -x+1/2,y+1/2,-z +symop -y,-x,-z +symop -x+1/2,-y+1/2,-z +symop y,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x,-z +symop -x,y,z +symop -y+1/2,-x+1/2,z +symop x,-y,z +symop y+1/2,x+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 129 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4a 2a' +symbol xHM 'P 4/n m m :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z +symop x+1/2,-y,-z +symop y+1/2,x+1/2,-z +symop -x,y+1/2,-z +symop -y,-x,-z +symop -x,-y,-z +symop y+1/2,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z +symop -x+1/2,y,z +symop -y+1/2,-x+1/2,z +symop x,-y+1/2,z +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 130 +basisop x-1/4,y+1/4,z +symbol ccp4 130 +symbol Hall '-P 4a 2ac (x-1/4,y+1/4,z)' +symbol xHM 'P 4/n c c :1' +symbol old 'P 4/n 2/c 2/c' 'P4/n c c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z +symop -x,-y,z +symop y+1/2,-x+1/2,z +symop x+1/2,-y+1/2,-z+1/2 +symop y,x,-z+1/2 +symop -x+1/2,y+1/2,-z+1/2 +symop -y,-x,-z+1/2 +symop -x+1/2,-y+1/2,-z +symop y,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x,-z +symop -x,y,z+1/2 +symop -y+1/2,-x+1/2,z+1/2 +symop x,-y,z+1/2 +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 130 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4a 2ac' +symbol xHM 'P 4/n c c :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z +symop x+1/2,-y,-z+1/2 +symop y+1/2,x+1/2,-z+1/2 +symop -x,y+1/2,-z+1/2 +symop -y,-x,-z+1/2 +symop -x,-y,-z +symop y+1/2,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z +symop -x+1/2,y,z+1/2 +symop -y+1/2,-x+1/2,z+1/2 +symop x,-y+1/2,z+1/2 +symop y,x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 131 +basisop x,y,z +symbol ccp4 131 +symbol Hall '-P 4c 2' +symbol xHM 'P 42/m m c' +symbol old 'P 42/m 2/m 2/c' 'P42/m m c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +symop x,-y,-z +symop y,x,-z+1/2 +symop -x,y,-z +symop -y,-x,-z+1/2 +symop -x,-y,-z +symop y,-x,-z+1/2 +symop x,y,-z +symop -y,x,-z+1/2 +symop -x,y,z +symop -y,-x,z+1/2 +symop x,-y,z +symop y,x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 132 +basisop x,y,z +symbol ccp4 132 +symbol Hall '-P 4c 2c' +symbol xHM 'P 42/m c m' +symbol old 'P 42/m 2/c 2/m' 'P42/m c m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +symop x,-y,-z+1/2 +symop y,x,-z +symop -x,y,-z+1/2 +symop -y,-x,-z +symop -x,-y,-z +symop y,-x,-z+1/2 +symop x,y,-z +symop -y,x,-z+1/2 +symop -x,y,z+1/2 +symop -y,-x,z +symop x,-y,z+1/2 +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 133 +basisop x-1/4,y+1/4,z+1/4 +symbol ccp4 133 +symbol Hall '-P 4ac 2b (x-1/4,y+1/4,z+1/4)' +symbol xHM 'P 42/n b c :1' +symbol old 'P 42/n 2/b 2/c' 'P42/n b c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x,-y,-z+1/2 +symop y+1/2,x+1/2,-z +symop -x,y,-z+1/2 +symop -y+1/2,-x+1/2,-z +symop -x+1/2,-y+1/2,-z+1/2 +symop y,-x,-z +symop x+1/2,y+1/2,-z+1/2 +symop -y,x,-z +symop -x+1/2,y+1/2,z +symop -y,-x,z+1/2 +symop x+1/2,-y+1/2,z +symop y,x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 133 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4ac 2b' +symbol xHM 'P 42/n b c :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z+1/2 +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z+1/2 +symop x,-y+1/2,-z +symop y,x,-z+1/2 +symop -x+1/2,y,-z +symop -y+1/2,-x+1/2,-z+1/2 +symop -x,-y,-z +symop y+1/2,-x,-z+1/2 +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z+1/2 +symop -x,y+1/2,z +symop -y,-x,z+1/2 +symop x+1/2,-y,z +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 134 +basisop x-1/4,y+1/4,z-1/4 +symbol ccp4 134 +symbol Hall '-P 4ac 2bc (x-1/4,y+1/4,z-1/4)' +symbol xHM 'P 42/n n m :1' +symbol old 'P 42/n 2/n 2/m' 'P42/n n m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x,-y,-z +symop y+1/2,x+1/2,-z+1/2 +symop -x,y,-z +symop -y+1/2,-x+1/2,-z+1/2 +symop -x+1/2,-y+1/2,-z+1/2 +symop y,-x,-z +symop x+1/2,y+1/2,-z+1/2 +symop -y,x,-z +symop -x+1/2,y+1/2,z+1/2 +symop -y,-x,z +symop x+1/2,-y+1/2,z+1/2 +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 134 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4ac 2bc' +symbol xHM 'P 42/n n m :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z+1/2 +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z+1/2 +symop x,-y+1/2,-z+1/2 +symop y,x,-z +symop -x+1/2,y,-z+1/2 +symop -y+1/2,-x+1/2,-z +symop -x,-y,-z +symop y+1/2,-x,-z+1/2 +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z+1/2 +symop -x,y+1/2,z+1/2 +symop -y,-x,z +symop x+1/2,-y,z+1/2 +symop y+1/2,x+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 135 +basisop x,y,z +symbol ccp4 135 +symbol Hall '-P 4c 2ab' +symbol xHM 'P 42/m b c' +symbol old 'P 42/m 21/b 2/c' 'P42/m b c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z+1/2 +symop -x,-y,z +symop y,-x,z+1/2 +symop x+1/2,-y+1/2,-z +symop y+1/2,x+1/2,-z+1/2 +symop -x+1/2,y+1/2,-z +symop -y+1/2,-x+1/2,-z+1/2 +symop -x,-y,-z +symop y,-x,-z+1/2 +symop x,y,-z +symop -y,x,-z+1/2 +symop -x+1/2,y+1/2,z +symop -y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,z +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 136 +basisop x,y,z +symbol ccp4 136 +symbol Hall '-P 4n 2n' +symbol xHM 'P 42/m n m' +symbol old 'P 42/m 21/n 2/m' 'P42/m n m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<3/4; 1/4<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,-z+1/2 +symop y,x,-z +symop -x+1/2,y+1/2,-z+1/2 +symop -y,-x,-z +symop -x,-y,-z +symop y+1/2,-x+1/2,-z+1/2 +symop x,y,-z +symop -y+1/2,x+1/2,-z+1/2 +symop -x+1/2,y+1/2,z+1/2 +symop -y,-x,z +symop x+1/2,-y+1/2,z+1/2 +symop y,x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 137 +basisop x-1/4,y+1/4,z+1/4 +symbol ccp4 137 +symbol Hall '-P 4ac 2a (x-1/4,y+1/4,z+1/4)' +symbol xHM 'P 42/n m c :1' +symbol old 'P 42/n 21/m 2/c' 'P42/n m c' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,-z+1/2 +symop y,x,-z +symop -x+1/2,y+1/2,-z+1/2 +symop -y,-x,-z +symop -x+1/2,-y+1/2,-z+1/2 +symop y,-x,-z +symop x+1/2,y+1/2,-z+1/2 +symop -y,x,-z +symop -x,y,z +symop -y+1/2,-x+1/2,z+1/2 +symop x,-y,z +symop y+1/2,x+1/2,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 137 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4ac 2a' +symbol xHM 'P 42/n m c :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z+1/2 +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z+1/2 +symop x+1/2,-y,-z +symop y+1/2,x+1/2,-z+1/2 +symop -x,y+1/2,-z +symop -y,-x,-z+1/2 +symop -x,-y,-z +symop y+1/2,-x,-z+1/2 +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z+1/2 +symop -x+1/2,y,z +symop -y+1/2,-x+1/2,z+1/2 +symop x,-y+1/2,z +symop y,x,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 138 +basisop x-1/4,y+1/4,z-1/4 +symbol ccp4 138 +symbol Hall '-P 4ac 2ac (x-1/4,y+1/4,z-1/4)' +symbol xHM 'P 42/n c m :1' +symbol old 'P 42/n 21/c 2/m' 'P42/n c m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<3/4; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,-z +symop y,x,-z+1/2 +symop -x+1/2,y+1/2,-z +symop -y,-x,-z+1/2 +symop -x+1/2,-y+1/2,-z+1/2 +symop y,-x,-z +symop x+1/2,y+1/2,-z+1/2 +symop -y,x,-z +symop -x,y,z+1/2 +symop -y+1/2,-x+1/2,z +symop x,-y,z+1/2 +symop y+1/2,x+1/2,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 138 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4ac 2ac' +symbol xHM 'P 42/n c m :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x,y,z +symop -y,-x,z +symop x,-y,z +symop y,x,z +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 140 +basisop x,y,z +symbol ccp4 140 +symbol Hall '-I 4 2c' +symbol xHM 'I 4/m c m' +symbol old 'I 4/m 2/c 2/m' 'I4/m c m' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z+1/2 +symop y,x,-z+1/2 +symop -x,y,-z+1/2 +symop -y,-x,-z+1/2 +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x,y,z+1/2 +symop -y,-x,z+1/2 +symop x,-y,z+1/2 +symop y,x,z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 141 +basisop x-1/2,y+1/4,z+1/8 +symbol ccp4 141 +symbol Hall '-I 4bd 2 (x-1/2,y+1/4,z+1/8)' +symbol xHM 'I 41/a m d :1' +symbol old 'I 41/a 2/m 2/d' 'I41/a m d' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x+1/2,z+1/4 +symop -x+1/2,-y+1/2,z+1/2 +symop y+1/2,-x,z+3/4 +symop x,-y+1/2,-z+1/4 +symop y+1/2,x+1/2,-z+1/2 +symop -x+1/2,y,-z+3/4 +symop -y,-x,-z +symop -x,-y+1/2,-z+1/4 +symop y,-x,-z +symop x+1/2,y,-z+3/4 +symop -y+1/2,x+1/2,-z+1/2 +symop -x,y,z +symop -y+1/2,-x,z+3/4 +symop x+1/2,-y+1/2,z+1/2 +symop y,x+1/2,z+1/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 141 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-I 4bd 2' +symbol xHM 'I 41/a m d :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; -1/8<=z<=3/8 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/4,x+3/4,z+1/4 +symop -x+1/2,-y,z+1/2 +symop y+1/4,-x+1/4,z+3/4 +symop x,-y,-z +symop y+1/4,x+3/4,-z+1/4 +symop -x+1/2,y,-z+1/2 +symop -y+1/4,-x+1/4,-z+3/4 +symop -x,-y,-z +symop y+3/4,-x+1/4,-z+3/4 +symop x+1/2,y,-z+1/2 +symop -y+3/4,x+3/4,-z+1/4 +symop -x,y,z +symop -y+3/4,-x+1/4,z+3/4 +symop x+1/2,-y,z+1/2 +symop y+3/4,x+3/4,z+1/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 142 +basisop x-1/2,y+1/4,z-3/8 +symbol ccp4 142 +symbol Hall '-I 4bd 2c (x-1/2,y+1/4,z-3/8)' +symbol xHM 'I 41/a c d :1' +symbol old 'I41/a c d' 'I 41/a 2/c 2/d' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/8 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x+1/2,z+1/4 +symop -x+1/2,-y+1/2,z+1/2 +symop y+1/2,-x,z+3/4 +symop x,-y+1/2,-z+3/4 +symop y+1/2,x+1/2,-z +symop -x+1/2,y,-z+1/4 +symop -y,-x,-z+1/2 +symop -x,-y+1/2,-z+1/4 +symop y,-x,-z +symop x+1/2,y,-z+3/4 +symop -y+1/2,x+1/2,-z+1/2 +symop -x,y,z+1/2 +symop -y+1/2,-x,z+1/4 +symop x+1/2,-y+1/2,z +symop y,x+1/2,z+3/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 142 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-I 4bd 2c' +symbol xHM 'I 41/a c d :2' +symbol old '' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-I 4 2' '4/mmm' +symbol pgrp '-P 4 2' '4/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/8 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 1/8<=z<=5/8 +cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/4,x+3/4,z+1/4 +symop -x+1/2,-y,z+1/2 +symop y+1/4,-x+1/4,z+3/4 +symop x,-y,-z+1/2 +symop y+1/4,x+3/4,-z+3/4 +symop -x+1/2,y,-z +symop -y+1/4,-x+1/4,-z+1/4 +symop -x,-y,-z +symop y+3/4,-x+1/4,-z+3/4 +symop x+1/2,y,-z+1/2 +symop -y+3/4,x+3/4,-z+1/4 +symop -x,y,z+1/2 +symop -y+3/4,-x+1/4,z+1/4 +symop x+1/2,-y,z +symop y+3/4,x+3/4,z+3/4 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 143 +basisop x,y,z +symbol ccp4 143 +symbol Hall ' P 3' +symbol xHM 'P 3' +symbol old 'P 3' +symbol laue '-P 3' '-3' +symbol patt '-P 3' '-3' +symbol pgrp ' P 3' '3' +hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 +mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 144 +basisop x,y,z +symbol ccp4 144 +symbol Hall ' P 31' +symbol xHM 'P 31' +symbol old 'P 31' +symbol laue '-P 3' '-3' +symbol patt '-P 3' '-3' +symbol pgrp ' P 3' '3' +hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/3 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/3 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1/3 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop -y,x-y,z+1/3 +symop -x+y,-x,z+2/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 145 +basisop x,y,z +symbol ccp4 145 +symbol Hall ' P 32' +symbol xHM 'P 32' +symbol old 'P 32' +symbol laue '-P 3' '-3' +symbol patt '-P 3' '-3' +symbol pgrp ' P 3' '3' +hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/3 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/3 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1/3 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop -y,x-y,z+2/3 +symop -x+y,-x,z+1/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 146 +basisop x,y,z +symbol ccp4 146 +symbol Hall ' R 3' +symbol xHM 'R 3 :H' +symbol old 'H 3' +symbol laue '-P 3' '-3' +symbol patt '-R 3' '-3' +symbol pgrp ' P 3' '3' +hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 +mapasu zero 0<=x<=1/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=1/3; 0<=y<=1/3; 0<=z<1 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +cenop x,y,z +cenop x+2/3,y+1/3,z+1/3 +cenop x+1/3,y+2/3,z+2/3 +end_spacegroup + +begin_spacegroup +number 146 +basisop -y+z,x+z,-x+y+z +symbol ccp4 1146 +symbol Hall ' R 3 (-y+z,x+z,-x+y+z)' +symbol xHM 'R 3 :R' +symbol old 'R 3' +symbol laue '-P 3*' '-3' +symbol patt '-P 3*' '-3' +symbol pgrp ' P 3*' '3' +hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop z,x,y +symop y,z,x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 147 +basisop x,y,z +symbol ccp4 147 +symbol Hall '-P 3' +symbol xHM 'P -3' +symbol old 'P -3' +symbol laue '-P 3' '-3' +symbol patt '-P 3' '-3' +symbol pgrp '-P 3' '-3' +hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -x,-y,-z +symop y,-x+y,-z +symop x-y,x,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 148 +basisop x,y,z +symbol ccp4 148 +symbol Hall '-R 3' +symbol xHM 'R -3 :H' +symbol old 'H -3' +symbol laue '-P 3' '-3' +symbol patt '-R 3' '-3' +symbol pgrp '-P 3' '-3' +hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/6 +mapasu zero 0<=x<=1/3; 0<=y<=1/3; 0<=z<=1/2 +mapasu nonz 0<=x<=1/3; -1/6<=y<=0; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -x,-y,-z +symop y,-x+y,-z +symop x-y,x,-z +cenop x,y,z +cenop x+2/3,y+1/3,z+1/3 +cenop x+1/3,y+2/3,z+2/3 +end_spacegroup + +begin_spacegroup +number 148 +basisop -y+z,x+z,-x+y+z +symbol ccp4 1148 +symbol Hall '-R 3 (-y+z,x+z,-x+y+z)' +symbol xHM 'R -3 :R' +symbol old 'R -3' +symbol laue '-P 3*' '-3' +symbol patt '-P 3*' '-3' +symbol pgrp '-P 3*' '-3' +hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop z,x,y +symop y,z,x +symop -x,-y,-z +symop -z,-x,-y +symop -y,-z,-x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 149 +basisop x,y,z +symbol ccp4 149 +symbol Hall ' P 3 2' +symbol xHM 'P 3 1 2' +symbol old 'P 3 1 2' +symbol laue '-P 3 2' '-31m' +symbol patt '-P 3 2' '-31m' +symbol pgrp ' P 3 2' '312' +hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -y,-x,-z +symop x,x-y,-z +symop -x+y,y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 150 +basisop x,y,z +symbol ccp4 150 +symbol Hall ' P 3 2"' +symbol xHM 'P 3 2 1' +symbol old 'P 3 2 1' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-P 3 2"' '-3m1' +symbol pgrp ' P 3 2"' '321' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop y,x,-z +symop -x,-x+y,-z +symop x-y,-y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 151 +basisop x,y,z +symbol ccp4 151 +symbol Hall ' P 31 2 (x,y,z+1/3)' +symbol xHM 'P 31 1 2' +symbol old 'P 31 1 2' +symbol laue '-P 3 2' '-31m' +symbol patt '-P 3 2' '-31m' +symbol pgrp ' P 3 2' '312' +hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/6 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<=1/6 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z+1/3 +symop -x+y,-x,z+2/3 +symop -y,-x,-z+2/3 +symop x,x-y,-z +symop -x+y,y,-z+1/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 152 +basisop x,y,z +symbol ccp4 152 +symbol Hall ' P 31 2"' +symbol xHM 'P 31 2 1' +symbol old 'P 31 2 1' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-P 3 2"' '-3m1' +symbol pgrp ' P 3 2"' '321' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 +mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<=1/3 +mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<=1/3 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z+1/3 +symop -x+y,-x,z+2/3 +symop y,x,-z +symop -x,-x+y,-z+1/3 +symop x-y,-y,-z+2/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 153 +basisop x,y,z +symbol ccp4 153 +symbol Hall ' P 32 2 (x,y,z+1/6)' +symbol xHM 'P 32 1 2' +symbol old 'P 32 1 2' +symbol laue '-P 3 2' '-31m' +symbol patt '-P 3 2' '-31m' +symbol pgrp ' P 3 2' '312' +hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/6 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<=1/6 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z+2/3 +symop -x+y,-x,z+1/3 +symop -y,-x,-z+1/3 +symop x,x-y,-z +symop -x+y,y,-z+2/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 154 +basisop x,y,z +symbol ccp4 154 +symbol Hall ' P 32 2"' +symbol xHM 'P 32 2 1' +symbol old 'P 32 2 1' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-P 3 2"' '-3m1' +symbol pgrp ' P 3 2"' '321' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/3 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/3 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z+2/3 +symop -x+y,-x,z+1/3 +symop y,x,-z +symop -x,-x+y,-z+2/3 +symop x-y,-y,-z+1/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 155 +basisop x,y,z +symbol ccp4 155 +symbol Hall ' R 3 2"' +symbol xHM 'R 3 2 :H' +symbol old 'H 3 2' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-R 3 2"' '-3m' +symbol pgrp ' P 3 2"' '321' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/6 +mapasu zero 0<=x<=1/3; 0<=y<=1/3; 0<=z<=1/2 +mapasu nonz 0<=x<=1/3; 0<=y<=1/3; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop y,x,-z +symop -x,-x+y,-z +symop x-y,-y,-z +cenop x,y,z +cenop x+2/3,y+1/3,z+1/3 +cenop x+1/3,y+2/3,z+2/3 +end_spacegroup + +begin_spacegroup +number 155 +basisop -y+z,x+z,-x+y+z +symbol ccp4 1155 +symbol Hall ' R 3 2" (-y+z,x+z,-x+y+z)' +symbol xHM 'R 3 2 :R' +symbol old 'R 3 2' +symbol laue '-P 3* 2' '-3m' +symbol patt '-P 3* 2' '-3m' +symbol pgrp ' P 3* 2' '32' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop z,x,y +symop y,z,x +symop -y,-x,-z +symop -z,-y,-x +symop -x,-z,-y +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 156 +basisop x,y,z +symbol ccp4 156 +symbol Hall ' P 3 -2"' +symbol xHM 'P 3 m 1' +symbol old 'P 3 m 1' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-P 3 2"' '-3m1' +symbol pgrp ' P 3 -2"' '3m1' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 +mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -y,-x,z +symop x,x-y,z +symop -x+y,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 157 +basisop x,y,z +symbol ccp4 157 +symbol Hall ' P 3 -2' +symbol xHM 'P 3 1 m' +symbol old 'P 3 1 m' +symbol laue '-P 3 2' '-31m' +symbol patt '-P 3 2' '-31m' +symbol pgrp ' P 3 -2' '31m' +hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop y,x,z +symop -x,-x+y,z +symop x-y,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 158 +basisop x,y,z +symbol ccp4 158 +symbol Hall ' P 3 -2"c' +symbol xHM 'P 3 c 1' +symbol old 'P 3 c 1' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-P 3 2"' '-3m1' +symbol pgrp ' P 3 -2"' '3m1' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/2 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -y,-x,z+1/2 +symop x,x-y,z+1/2 +symop -x+y,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 159 +basisop x,y,z +symbol ccp4 159 +symbol Hall ' P 3 -2c' +symbol xHM 'P 3 1 c' +symbol old 'P 3 1 c' +symbol laue '-P 3 2' '-31m' +symbol patt '-P 3 2' '-31m' +symbol pgrp ' P 3 -2' '31m' +hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop y,x,z+1/2 +symop -x,-x+y,z+1/2 +symop x-y,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 160 +basisop x,y,z +symbol ccp4 160 +symbol Hall ' R 3 -2"' +symbol xHM 'R 3 m :H' +symbol old 'H 3 m' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-R 3 2"' '-3m' +symbol pgrp ' P 3 -2"' '3m1' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/3; 0<=y<1/3; 0<=z<1 +mapasu nonz 0<=x<=5/12; 0<=y<1/4; 0<=z<1 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -y,-x,z +symop x,x-y,z +symop -x+y,y,z +cenop x,y,z +cenop x+2/3,y+1/3,z+1/3 +cenop x+1/3,y+2/3,z+2/3 +end_spacegroup + +begin_spacegroup +number 160 +basisop -y+z,x+z,-x+y+z +symbol ccp4 1160 +symbol Hall ' R 3 -2" (-y+z,x+z,-x+y+z)' +symbol xHM 'R 3 m :R' +symbol old 'R 3 m' +symbol laue '-P 3* 2' '-3m' +symbol patt '-P 3* 2' '-3m' +symbol pgrp ' P 3* -2' '3m' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop z,x,y +symop y,z,x +symop y,x,z +symop z,y,x +symop x,z,y +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 161 +basisop x,y,z +symbol ccp4 161 +symbol Hall ' R 3 -2"c' +symbol xHM 'R 3 c :H' +symbol old 'H 3 c' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-R 3 2"' '-3m' +symbol pgrp ' P 3 -2"' '3m1' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/3; 0<=y<1/3; 0<=z<1/2 +mapasu nonz 0<=x<=1/3; 0<=y<1/3; 0<=z<1/2 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -y,-x,z+1/2 +symop x,x-y,z+1/2 +symop -x+y,y,z+1/2 +cenop x,y,z +cenop x+2/3,y+1/3,z+1/3 +cenop x+1/3,y+2/3,z+2/3 +end_spacegroup + +begin_spacegroup +number 161 +basisop -y+z,x+z,-x+y+z +symbol ccp4 1161 +symbol Hall ' R 3 -2"c (-y+z,x+z,-x+y+z)' +symbol xHM 'R 3 c :R' +symbol old 'R 3 c' +symbol laue '-P 3* 2' '-3m' +symbol patt '-P 3* 2' '-3m' +symbol pgrp ' P 3* -2' '3m' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 +mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 +symop x,y,z +symop z,x,y +symop y,z,x +symop y+1/2,x+1/2,z+1/2 +symop z+1/2,y+1/2,x+1/2 +symop x+1/2,z+1/2,y+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 162 +basisop x,y,z +symbol ccp4 162 +symbol Hall '-P 3 2' +symbol xHM 'P -3 1 m' +symbol old 'P -3 1 2/m' 'P -3 1 m' +symbol laue '-P 3 2' '-31m' +symbol patt '-P 3 2' '-31m' +symbol pgrp '-P 3 2' '-31m' +hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -y,-x,-z +symop x,x-y,-z +symop -x+y,y,-z +symop -x,-y,-z +symop y,-x+y,-z +symop x-y,x,-z +symop y,x,z +symop -x,-x+y,z +symop x-y,-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 163 +basisop x,y,z +symbol ccp4 163 +symbol Hall '-P 3 2c' +symbol xHM 'P -3 1 c' +symbol old 'P -3 1 2/c' 'P -3 1 c' +symbol laue '-P 3 2' '-31m' +symbol patt '-P 3 2' '-31m' +symbol pgrp '-P 3 2' '-31m' +hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop -y,-x,-z+1/2 +symop x,x-y,-z+1/2 +symop -x+y,y,-z+1/2 +symop -x,-y,-z +symop y,-x+y,-z +symop x-y,x,-z +symop y,x,z+1/2 +symop -x,-x+y,z+1/2 +symop x-y,-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 164 +basisop x,y,z +symbol ccp4 164 +symbol Hall '-P 3 2"' +symbol xHM 'P -3 m 1' +symbol old 'P -3 2/m 1' 'P -3 m 1' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-P 3 2"' '-3m1' +symbol pgrp '-P 3 2"' '-3m1' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop y,x,-z +symop -x,-x+y,-z +symop x-y,-y,-z +symop -x,-y,-z +symop y,-x+y,-z +symop x-y,x,-z +symop -y,-x,z +symop x,x-y,z +symop -x+y,y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 165 +basisop x,y,z +symbol ccp4 165 +symbol Hall '-P 3 2"c' +symbol xHM 'P -3 c 1' +symbol old 'P -3 2/c 1' 'P -3 c 1' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-P 3 2"' '-3m1' +symbol pgrp '-P 3 2"' '-3m1' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop y,x,-z+1/2 +symop -x,-x+y,-z+1/2 +symop x-y,-y,-z+1/2 +symop -x,-y,-z +symop y,-x+y,-z +symop x-y,x,-z +symop -y,-x,z+1/2 +symop x,x-y,z+1/2 +symop -x+y,y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 166 +basisop x,y,z +symbol ccp4 166 +symbol Hall '-R 3 2"' +symbol xHM 'R -3 m :H' +symbol old 'H -3 2/m' 'H -3 m' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-R 3 2"' '-3m' +symbol pgrp '-P 3 2"' '-3m1' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/6 +mapasu zero 0<=x<=1/3; 0<=y<=1/6; 0<=z<1 +mapasu nonz 0<=x<=1/3; 0<=y<=1/6; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop y,x,-z +symop -x,-x+y,-z +symop x-y,-y,-z +symop -x,-y,-z +symop y,-x+y,-z +symop x-y,x,-z +symop -y,-x,z +symop x,x-y,z +symop -x+y,y,z +cenop x,y,z +cenop x+2/3,y+1/3,z+1/3 +cenop x+1/3,y+2/3,z+2/3 +end_spacegroup + +begin_spacegroup +number 166 +basisop -y+z,x+z,-x+y+z +symbol ccp4 1166 +symbol Hall '-R 3 2" (-y+z,x+z,-x+y+z)' +symbol xHM 'R -3 m :R' +symbol old 'R -3 2/m' 'R -3 m' +symbol laue '-P 3* 2' '-3m' +symbol patt '-P 3* 2' '-3m' +symbol pgrp '-P 3* 2' '-3m' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop z,x,y +symop y,z,x +symop -y,-x,-z +symop -z,-y,-x +symop -x,-z,-y +symop -x,-y,-z +symop -z,-x,-y +symop -y,-z,-x +symop y,x,z +symop z,y,x +symop x,z,y +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 167 +basisop x,y,z +symbol ccp4 167 +symbol Hall '-R 3 2"c' +symbol xHM 'R -3 c :H' +symbol old 'H -3 2/c' 'H -3 c' +symbol laue '-P 3 2"' '-3m1' +symbol patt '-R 3 2"' '-3m' +symbol pgrp '-P 3 2"' '-3m1' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/6; 0<=z<=1/3 +mapasu nonz 0<=x<=1/3; -1/6<=y<=0; 1/12<=z<=7/12 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop -y,x-y,z +symop -x+y,-x,z +symop y,x,-z+1/2 +symop -x,-x+y,-z+1/2 +symop x-y,-y,-z+1/2 +symop -x,-y,-z +symop y,-x+y,-z +symop x-y,x,-z +symop -y,-x,z+1/2 +symop x,x-y,z+1/2 +symop -x+y,y,z+1/2 +cenop x,y,z +cenop x+2/3,y+1/3,z+1/3 +cenop x+1/3,y+2/3,z+2/3 +end_spacegroup + +begin_spacegroup +number 167 +basisop -y+z,x+z,-x+y+z +symbol ccp4 1167 +symbol Hall '-R 3 2"c (-y+z,x+z,-x+y+z)' +symbol xHM 'R -3 c :R' +symbol old 'R -3 2/c' 'R -3 c' +symbol laue '-P 3* 2' '-3m' +symbol patt '-P 3* 2' '-3m' +symbol pgrp '-P 3* 2' '-3m' +hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; -1/4<=y<=1/4; 0<=z<3/4 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop z,x,y +symop y,z,x +symop -y+1/2,-x+1/2,-z+1/2 +symop -z+1/2,-y+1/2,-x+1/2 +symop -x+1/2,-z+1/2,-y+1/2 +symop -x,-y,-z +symop -z,-x,-y +symop -y,-z,-x +symop y+1/2,x+1/2,z+1/2 +symop z+1/2,y+1/2,x+1/2 +symop x+1/2,z+1/2,y+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 168 +basisop x,y,z +symbol ccp4 168 +symbol Hall ' P 6' +symbol xHM 'P 6' +symbol old 'P 6' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp ' P 6' '6' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=2/3; 0<=y<=1/2; 0<=z<1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z +symop -y,x-y,z +symop -x,-y,z +symop -x+y,-x,z +symop y,-x+y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 169 +basisop x,y,z +symbol ccp4 169 +symbol Hall ' P 61' +symbol xHM 'P 61' +symbol old 'P 61' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp ' P 6' '6' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/6 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/6 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1/6 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z+1/6 +symop -y,x-y,z+1/3 +symop -x,-y,z+1/2 +symop -x+y,-x,z+2/3 +symop y,-x+y,z+5/6 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 170 +basisop x,y,z +symbol ccp4 170 +symbol Hall ' P 65' +symbol xHM 'P 65' +symbol old 'P 65' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp ' P 6' '6' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/6 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/6 +mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1/6 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z+5/6 +symop -y,x-y,z+2/3 +symop -x,-y,z+1/2 +symop -x+y,-x,z+1/3 +symop y,-x+y,z+1/6 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 171 +basisop x,y,z +symbol ccp4 171 +symbol Hall ' P 62' +symbol xHM 'P 62' +symbol old 'P 62' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp ' P 6' '6' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/3 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/3 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1/3 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z+1/3 +symop -y,x-y,z+2/3 +symop -x,-y,z +symop -x+y,-x,z+1/3 +symop y,-x+y,z+2/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 172 +basisop x,y,z +symbol ccp4 172 +symbol Hall ' P 64' +symbol xHM 'P 64' +symbol old 'P 64' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp ' P 6' '6' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/3 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/3 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1/3 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z+2/3 +symop -y,x-y,z+1/3 +symop -x,-y,z +symop -x+y,-x,z+2/3 +symop y,-x+y,z+1/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 173 +basisop x,y,z +symbol ccp4 173 +symbol Hall ' P 6c' +symbol xHM 'P 63' +symbol old 'P 63' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp ' P 6' '6' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/2 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z+1/2 +symop -y,x-y,z +symop -x,-y,z+1/2 +symop -x+y,-x,z +symop y,-x+y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 174 +basisop x,y,z +symbol ccp4 174 +symbol Hall ' P -6' +symbol xHM 'P -6' +symbol old 'P -6' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp ' P -6' '-6' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop -x+y,-x,-z +symop -y,x-y,z +symop x,y,-z +symop -x+y,-x,z +symop -y,x-y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 175 +basisop x,y,z +symbol ccp4 175 +symbol Hall '-P 6' +symbol xHM 'P 6/m' +symbol old 'P 6/m' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp '-P 6' '6/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z +symop -y,x-y,z +symop -x,-y,z +symop -x+y,-x,z +symop y,-x+y,z +symop -x,-y,-z +symop -x+y,-x,-z +symop y,-x+y,-z +symop x,y,-z +symop x-y,x,-z +symop -y,x-y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 176 +basisop x,y,z +symbol ccp4 176 +symbol Hall '-P 6c' +symbol xHM 'P 63/m' +symbol old 'P 63/m' +symbol laue '-P 6' '6/m' +symbol patt '-P 6' '6/m' +symbol pgrp '-P 6' '6/m' +hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z+1/2 +symop -y,x-y,z +symop -x,-y,z+1/2 +symop -x+y,-x,z +symop y,-x+y,z+1/2 +symop -x,-y,-z +symop -x+y,-x,-z+1/2 +symop y,-x+y,-z +symop x,y,-z+1/2 +symop x-y,x,-z +symop -y,x-y,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 177 +basisop x,y,z +symbol ccp4 177 +symbol Hall ' P 6 2' +symbol xHM 'P 6 2 2' +symbol old 'P 6 2 2' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 2' '622' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=2/3; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z +symop -y,x-y,z +symop -x,-y,z +symop -x+y,-x,z +symop y,-x+y,z +symop -y,-x,-z +symop x-y,-y,-z +symop x,x-y,-z +symop y,x,-z +symop -x+y,y,-z +symop -x,-x+y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 178 +basisop x,y,z +symbol ccp4 178 +symbol Hall ' P 61 2 (x,y,z+5/12)' +symbol xHM 'P 61 2 2' +symbol old 'P 61 2 2' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 2' '622' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/12 +mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/6 +mapasu nonz 0<=x<1; 0<=y<=1/2; -1/12<=z<=1/12 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z+1/6 +symop -y,x-y,z+1/3 +symop -x,-y,z+1/2 +symop -x+y,-x,z+2/3 +symop y,-x+y,z+5/6 +symop -y,-x,-z+5/6 +symop x-y,-y,-z +symop x,x-y,-z+1/6 +symop y,x,-z+1/3 +symop -x+y,y,-z+1/2 +symop -x,-x+y,-z+2/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 179 +basisop x,y,z +symbol ccp4 179 +symbol Hall ' P 65 2 (x,y,z+1/12)' +symbol xHM 'P 65 2 2' +symbol old 'P 65 2 2' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 2' '622' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/12 +mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<1/3 +mapasu nonz 0<=x<=1/2; 0<=y<1; 1/12<=z<=1/4 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z+5/6 +symop -y,x-y,z+2/3 +symop -x,-y,z+1/2 +symop -x+y,-x,z+1/3 +symop y,-x+y,z+1/6 +symop -y,-x,-z+1/6 +symop x-y,-y,-z +symop x,x-y,-z+5/6 +symop y,x,-z+2/3 +symop -x+y,y,-z+1/2 +symop -x,-x+y,-z+1/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 180 +basisop x,y,z +symbol ccp4 180 +symbol Hall ' P 62 2 (x,y,z+1/3)' +symbol xHM 'P 62 2 2' +symbol old 'P 62 2 2' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 2' '622' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/6 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/6 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z+1/3 +symop -y,x-y,z+2/3 +symop -x,-y,z +symop -x+y,-x,z+1/3 +symop y,-x+y,z+2/3 +symop -y,-x,-z+2/3 +symop x-y,-y,-z +symop x,x-y,-z+1/3 +symop y,x,-z+2/3 +symop -x+y,y,-z +symop -x,-x+y,-z+1/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 181 +basisop x,y,z +symbol ccp4 181 +symbol Hall ' P 64 2 (x,y,z+1/6)' +symbol xHM 'P 64 2 2' +symbol old 'P 64 2 2' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 2' '622' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 +mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/6 +mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/6 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z+2/3 +symop -y,x-y,z+1/3 +symop -x,-y,z +symop -x+y,-x,z+2/3 +symop y,-x+y,z+1/3 +symop -y,-x,-z+1/3 +symop x-y,-y,-z +symop x,x-y,-z+2/3 +symop y,x,-z+1/3 +symop -x+y,y,-z +symop -x,-x+y,-z+2/3 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 182 +basisop x,y,z +symbol ccp4 182 +symbol Hall ' P 6c 2c' +symbol xHM 'P 63 2 2' +symbol old 'P 63 2 2' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 2' '622' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/4 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z+1/2 +symop -y,x-y,z +symop -x,-y,z+1/2 +symop -x+y,-x,z +symop y,-x+y,z+1/2 +symop -y,-x,-z+1/2 +symop x-y,-y,-z +symop x,x-y,-z+1/2 +symop y,x,-z +symop -x+y,y,-z+1/2 +symop -x,-x+y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 183 +basisop x,y,z +symbol ccp4 183 +symbol Hall ' P 6 -2' +symbol xHM 'P 6 m m' +symbol old 'P 6 m m' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 -2' '6mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z +symop -y,x-y,z +symop -x,-y,z +symop -x+y,-x,z +symop y,-x+y,z +symop y,x,z +symop -x+y,y,z +symop -x,-x+y,z +symop -y,-x,z +symop x-y,-y,z +symop x,x-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 184 +basisop x,y,z +symbol ccp4 184 +symbol Hall ' P 6 -2c' +symbol xHM 'P 6 c c' +symbol old 'P 6 c c' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 -2' '6mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z +symop -y,x-y,z +symop -x,-y,z +symop -x+y,-x,z +symop y,-x+y,z +symop y,x,z+1/2 +symop -x+y,y,z+1/2 +symop -x,-x+y,z+1/2 +symop -y,-x,z+1/2 +symop x-y,-y,z+1/2 +symop x,x-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 185 +basisop x,y,z +symbol ccp4 185 +symbol Hall ' P 6c -2' +symbol xHM 'P 63 c m' +symbol old 'P 63 c m' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 -2' '6mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z+1/2 +symop -y,x-y,z +symop -x,-y,z+1/2 +symop -x+y,-x,z +symop y,-x+y,z+1/2 +symop y,x,z +symop -x+y,y,z+1/2 +symop -x,-x+y,z +symop -y,-x,z+1/2 +symop x-y,-y,z +symop x,x-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 186 +basisop x,y,z +symbol ccp4 186 +symbol Hall ' P 6c -2c' +symbol xHM 'P 63 m c' +symbol old 'P 63 m c' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P 6 -2' '6mm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 +mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 +symop x,y,z +symop x-y,x,z+1/2 +symop -y,x-y,z +symop -x,-y,z+1/2 +symop -x+y,-x,z +symop y,-x+y,z+1/2 +symop y,x,z+1/2 +symop -x+y,y,z +symop -x,-x+y,z+1/2 +symop -y,-x,z +symop x-y,-y,z+1/2 +symop x,x-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 187 +basisop x,y,z +symbol ccp4 187 +symbol Hall ' P -6 2' +symbol xHM 'P -6 m 2' +symbol old 'P -6 m 2' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P -6 2' '-62m' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop -x+y,-x,-z +symop -y,x-y,z +symop x,y,-z +symop -x+y,-x,z +symop -y,x-y,-z +symop -y,-x,-z +symop -x+y,y,z +symop x,x-y,-z +symop -y,-x,z +symop -x+y,y,-z +symop x,x-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 188 +basisop x,y,z +symbol ccp4 188 +symbol Hall ' P -6c 2' +symbol xHM 'P -6 c 2' +symbol old 'P -6 c 2' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P -6 2' '-62m' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 +mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/4 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop -x+y,-x,-z+1/2 +symop -y,x-y,z +symop x,y,-z+1/2 +symop -x+y,-x,z +symop -y,x-y,-z+1/2 +symop -y,-x,-z +symop -x+y,y,z+1/2 +symop x,x-y,-z +symop -y,-x,z+1/2 +symop -x+y,y,-z +symop x,x-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 189 +basisop x,y,z +symbol ccp4 189 +symbol Hall ' P -6 -2' +symbol xHM 'P -6 2 m' +symbol old 'P -6 2 m' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P -6 -2' '-6m2' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop -x+y,-x,-z +symop -y,x-y,z +symop x,y,-z +symop -x+y,-x,z +symop -y,x-y,-z +symop y,x,z +symop x-y,-y,-z +symop -x,-x+y,z +symop y,x,-z +symop x-y,-y,z +symop -x,-x+y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 190 +basisop x,y,z +symbol ccp4 190 +symbol Hall ' P -6c -2c' +symbol xHM 'P -6 2 c' +symbol old 'P -6 2 c' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp ' P -6 -2' '-6m2' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 1/4<=z<=3/4 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop -x+y,-x,-z+1/2 +symop -y,x-y,z +symop x,y,-z+1/2 +symop -x+y,-x,z +symop -y,x-y,-z+1/2 +symop y,x,z+1/2 +symop x-y,-y,-z +symop -x,-x+y,z+1/2 +symop y,x,-z +symop x-y,-y,z+1/2 +symop -x,-x+y,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 191 +basisop x,y,z +symbol ccp4 191 +symbol Hall '-P 6 2' +symbol xHM 'P 6/m m m' +symbol old 'P 6/m 2/m 2/m' 'P 6/m m m' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp '-P 6 2' '6/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 0<=z<=1/2 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z +symop -y,x-y,z +symop -x,-y,z +symop -x+y,-x,z +symop y,-x+y,z +symop -y,-x,-z +symop x-y,-y,-z +symop x,x-y,-z +symop y,x,-z +symop -x+y,y,-z +symop -x,-x+y,-z +symop -x,-y,-z +symop -x+y,-x,-z +symop y,-x+y,-z +symop x,y,-z +symop x-y,x,-z +symop -y,x-y,-z +symop y,x,z +symop -x+y,y,z +symop -x,-x+y,z +symop -y,-x,z +symop x-y,-y,z +symop x,x-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 192 +basisop x,y,z +symbol ccp4 192 +symbol Hall '-P 6 2c' +symbol xHM 'P 6/m c c' +symbol old 'P 6/m 2/c 2/c' 'P 6/m c c' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp '-P 6 2' '6/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/3 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/4 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z +symop -y,x-y,z +symop -x,-y,z +symop -x+y,-x,z +symop y,-x+y,z +symop -y,-x,-z+1/2 +symop x-y,-y,-z+1/2 +symop x,x-y,-z+1/2 +symop y,x,-z+1/2 +symop -x+y,y,-z+1/2 +symop -x,-x+y,-z+1/2 +symop -x,-y,-z +symop -x+y,-x,-z +symop y,-x+y,-z +symop x,y,-z +symop x-y,x,-z +symop -y,x-y,-z +symop y,x,z+1/2 +symop -x+y,y,z+1/2 +symop -x,-x+y,z+1/2 +symop -y,-x,z+1/2 +symop x-y,-y,z+1/2 +symop x,x-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 193 +basisop x,y,z +symbol ccp4 193 +symbol Hall '-P 6c 2' +symbol xHM 'P 63/m c m' +symbol old 'P 63/m 2/c 2/m' 'P 63/m c m' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp '-P 6 2' '6/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/3 +mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/4 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z+1/2 +symop -y,x-y,z +symop -x,-y,z+1/2 +symop -x+y,-x,z +symop y,-x+y,z+1/2 +symop -y,-x,-z +symop x-y,-y,-z+1/2 +symop x,x-y,-z +symop y,x,-z+1/2 +symop -x+y,y,-z +symop -x,-x+y,-z+1/2 +symop -x,-y,-z +symop -x+y,-x,-z+1/2 +symop y,-x+y,-z +symop x,y,-z+1/2 +symop x-y,x,-z +symop -y,x-y,-z+1/2 +symop y,x,z +symop -x+y,y,z+1/2 +symop -x,-x+y,z +symop -y,-x,z+1/2 +symop x-y,-y,z +symop x,x-y,z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 194 +basisop x,y,z +symbol ccp4 194 +symbol Hall '-P 6c 2c' +symbol xHM 'P 63/m m c' +symbol old 'P 63/m 2/m 2/c' 'P 63/m m c' +symbol laue '-P 6 2' '6/mmm' +symbol patt '-P 6 2' '6/mmm' +symbol pgrp '-P 6 2' '6/mmm' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 +mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 1/4<=z<=3/4 +cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 +symop x,y,z +symop x-y,x,z+1/2 +symop -y,x-y,z +symop -x,-y,z+1/2 +symop -x+y,-x,z +symop y,-x+y,z+1/2 +symop -y,-x,-z+1/2 +symop x-y,-y,-z +symop x,x-y,-z+1/2 +symop y,x,-z +symop -x+y,y,-z+1/2 +symop -x,-x+y,-z +symop -x,-y,-z +symop -x+y,-x,-z+1/2 +symop y,-x+y,-z +symop x,y,-z+1/2 +symop x-y,x,-z +symop -y,x-y,-z+1/2 +symop y,x,z+1/2 +symop -x+y,y,z +symop -x,-x+y,z+1/2 +symop -y,-x,z +symop x-y,-y,z+1/2 +symop x,x-y,z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 195 +basisop x,y,z +symbol ccp4 195 +symbol Hall ' P 2 2 3' +symbol xHM 'P 2 3' +symbol old 'P 2 3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-P 2 2 3' 'm-3' +symbol pgrp ' P 2 2 3' '23' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop z,x,y +symop -z,-x,y +symop z,-x,-y +symop -z,x,-y +symop y,z,x +symop y,-z,-x +symop -y,z,-x +symop -y,-z,x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 196 +basisop x,y,z +symbol ccp4 196 +symbol Hall ' F 2 2 3' +symbol xHM 'F 2 3' +symbol old 'F 2 3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-F 2 2 3' 'm-3' +symbol pgrp ' P 2 2 3' '23' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop z,x,y +symop -z,-x,y +symop z,-x,-y +symop -z,x,-y +symop y,z,x +symop y,-z,-x +symop -y,z,-x +symop -y,-z,x +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 197 +basisop x,y,z +symbol ccp4 197 +symbol Hall ' I 2 2 3' +symbol xHM 'I 2 3' +symbol old 'I 2 3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-I 2 2 3' 'm-3' +symbol pgrp ' P 2 2 3' '23' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/2 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop z,x,y +symop -z,-x,y +symop z,-x,-y +symop -z,x,-y +symop y,z,x +symop y,-z,-x +symop -y,z,-x +symop -y,-z,x +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 198 +basisop x,y,z +symbol ccp4 198 +symbol Hall ' P 2ac 2ab 3' +symbol xHM 'P 21 3' +symbol old 'P 21 3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-P 2 2 3' 'm-3' +symbol pgrp ' P 2 2 3' '23' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz -1/4<=x<1/4; 0<=y<1/2; 0<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop x+1/2,-y+1/2,-z +symop -x,y+1/2,-z+1/2 +symop z,x,y +symop -z+1/2,-x,y+1/2 +symop z+1/2,-x+1/2,-y +symop -z,x+1/2,-y+1/2 +symop y,z,x +symop y+1/2,-z+1/2,-x +symop -y,z+1/2,-x+1/2 +symop -y+1/2,-z,x+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 199 +basisop x,y,z +symbol ccp4 199 +symbol Hall ' I 2b 2c 3' +symbol xHM 'I 21 3' +symbol old 'I 21 3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-I 2 2 3' 'm-3' +symbol pgrp ' P 2 2 3' '23' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop z,x,y +symop -z,-x,y +symop z,-x,-y +symop -z,x,-y +symop y,z,x +symop y,-z,-x +symop -y,z,-x +symop -y,-z,x +symop -x,-y,-z +symop x,y,-z +symop -x,y,z +symop x,-y,z +symop -z,-x,-y +symop z,x,-y +symop -z,x,y +symop z,-x,y +symop -y,-z,-x +symop -y,z,x +symop y,-z,x +symop y,z,-x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 201 +basisop x-1/4,y-1/4,z-1/4 +symbol ccp4 201 +symbol Hall '-P 2ab 2bc 3 (x-1/4,y-1/4,z-1/4)' +symbol xHM 'P n -3 :1' +symbol old 'P 2/n -3' 'P n -3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-P 2 2 3' 'm-3' +symbol pgrp '-P 2 2 3' 'm-3' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop z,x,y +symop -z,-x,y +symop z,-x,-y +symop -z,x,-y +symop y,z,x +symop y,-z,-x +symop -y,z,-x +symop -y,-z,x +symop -x+1/2,-y+1/2,-z+1/2 +symop x+1/2,y+1/2,-z+1/2 +symop -x+1/2,y+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +symop -z+1/2,-x+1/2,-y+1/2 +symop z+1/2,x+1/2,-y+1/2 +symop -z+1/2,x+1/2,y+1/2 +symop z+1/2,-x+1/2,y+1/2 +symop -y+1/2,-z+1/2,-x+1/2 +symop -y+1/2,z+1/2,x+1/2 +symop y+1/2,-z+1/2,x+1/2 +symop y+1/2,z+1/2,-x+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 201 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 2ab 2bc 3' +symbol xHM 'P n -3 :2' +symbol old '' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-P 2 2 3' 'm-3' +symbol pgrp '-P 2 2 3' 'm-3' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y,-z+1/2 +symop z,x,y +symop -z+1/2,-x+1/2,y +symop z,-x+1/2,-y+1/2 +symop -z+1/2,x,-y+1/2 +symop y,z,x +symop y,-z+1/2,-x+1/2 +symop -y+1/2,z,-x+1/2 +symop -y+1/2,-z+1/2,x +symop -x,-y,-z +symop x+1/2,y+1/2,-z +symop -x,y+1/2,z+1/2 +symop x+1/2,-y,z+1/2 +symop -z,-x,-y +symop z+1/2,x+1/2,-y +symop -z,x+1/2,y+1/2 +symop z+1/2,-x,y+1/2 +symop -y,-z,-x +symop -y,z+1/2,x+1/2 +symop y+1/2,-z,x+1/2 +symop y+1/2,z+1/2,-x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 202 +basisop x,y,z +symbol ccp4 202 +symbol Hall '-F 2 2 3' +symbol xHM 'F m -3' +symbol old 'F 2/m -3' 'F m -3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-F 2 2 3' 'm-3' +symbol pgrp '-P 2 2 3' 'm-3' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop z,x,y +symop -z,-x,y +symop z,-x,-y +symop -z,x,-y +symop y,z,x +symop y,-z,-x +symop -y,z,-x +symop -y,-z,x +symop -x,-y,-z +symop x,y,-z +symop -x,y,z +symop x,-y,z +symop -z,-x,-y +symop z,x,-y +symop -z,x,y +symop z,-x,y +symop -y,-z,-x +symop -y,z,x +symop y,-z,x +symop y,z,-x +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 203 +basisop x+1/8,y+1/8,z+1/8 +symbol ccp4 203 +symbol Hall '-F 2uv 2vw 3 (x+1/8,y+1/8,z+1/8)' +symbol xHM 'F d -3 :1' +symbol old 'F 2/d -3' 'F d -3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-F 2 2 3' 'm-3' +symbol pgrp '-P 2 2 3' 'm-3' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y,-z+1/2 +symop z,x,y +symop -z+1/2,-x+1/2,y +symop z,-x+1/2,-y+1/2 +symop -z+1/2,x,-y+1/2 +symop y,z,x +symop y,-z+1/2,-x+1/2 +symop -y+1/2,z,-x+1/2 +symop -y+1/2,-z+1/2,x +symop -x+1/4,-y+1/4,-z+1/4 +symop x+3/4,y+3/4,-z+1/4 +symop -x+1/4,y+3/4,z+3/4 +symop x+3/4,-y+1/4,z+3/4 +symop -z+1/4,-x+1/4,-y+1/4 +symop z+3/4,x+3/4,-y+1/4 +symop -z+1/4,x+3/4,y+3/4 +symop z+3/4,-x+1/4,y+3/4 +symop -y+1/4,-z+1/4,-x+1/4 +symop -y+1/4,z+3/4,x+3/4 +symop y+3/4,-z+1/4,x+3/4 +symop y+3/4,z+3/4,-x+1/4 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 203 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-F 2uv 2vw 3' +symbol xHM 'F d -3 :2' +symbol old '' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-F 2 2 3' 'm-3' +symbol pgrp '-P 2 2 3' 'm-3' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -x+1/4,-y+1/4,z +symop x,-y+1/4,-z+1/4 +symop -x+1/4,y,-z+1/4 +symop z,x,y +symop -z+1/4,-x+1/4,y +symop z,-x+1/4,-y+1/4 +symop -z+1/4,x,-y+1/4 +symop y,z,x +symop y,-z+1/4,-x+1/4 +symop -y+1/4,z,-x+1/4 +symop -y+1/4,-z+1/4,x +symop -x,-y,-z +symop x+3/4,y+3/4,-z +symop -x,y+3/4,z+3/4 +symop x+3/4,-y,z+3/4 +symop -z,-x,-y +symop z+3/4,x+3/4,-y +symop -z,x+3/4,y+3/4 +symop z+3/4,-x,y+3/4 +symop -y,-z,-x +symop -y,z+3/4,x+3/4 +symop y+3/4,-z,x+3/4 +symop y+3/4,z+3/4,-x +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 204 +basisop x,y,z +symbol ccp4 204 +symbol Hall '-I 2 2 3' +symbol xHM 'I m -3' +symbol old 'I 2/m -3' 'I m -3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-I 2 2 3' 'm-3' +symbol pgrp '-P 2 2 3' 'm-3' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x,-y,z +symop x,-y,-z +symop -x,y,-z +symop z,x,y +symop -z,-x,y +symop z,-x,-y +symop -z,x,-y +symop y,z,x +symop y,-z,-x +symop -y,z,-x +symop -y,-z,x +symop -x,-y,-z +symop x,y,-z +symop -x,y,z +symop x,-y,z +symop -z,-x,-y +symop z,x,-y +symop -z,x,y +symop z,-x,y +symop -y,-z,-x +symop -y,z,x +symop y,-z,x +symop y,z,-x +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 205 +basisop x,y,z +symbol ccp4 205 +symbol Hall '-P 2ac 2ab 3' +symbol xHM 'P a -3' +symbol old 'P 21/a -3' 'P a -3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-P 2 2 3' 'm-3' +symbol pgrp '-P 2 2 3' 'm-3' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/4; -1/4<=z<1/4 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop x+1/2,-y+1/2,-z +symop -x,y+1/2,-z+1/2 +symop z,x,y +symop -z+1/2,-x,y+1/2 +symop z+1/2,-x+1/2,-y +symop -z,x+1/2,-y+1/2 +symop y,z,x +symop y+1/2,-z+1/2,-x +symop -y,z+1/2,-x+1/2 +symop -y+1/2,-z,x+1/2 +symop -x,-y,-z +symop x+1/2,y,-z+1/2 +symop -x+1/2,y+1/2,z +symop x,-y+1/2,z+1/2 +symop -z,-x,-y +symop z+1/2,x,-y+1/2 +symop -z+1/2,x+1/2,y +symop z,-x+1/2,y+1/2 +symop -y,-z,-x +symop -y+1/2,z+1/2,x +symop y,-z+1/2,x+1/2 +symop y+1/2,z,-x+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 206 +basisop x,y,z +symbol ccp4 206 +symbol Hall '-I 2b 2c 3' +symbol xHM 'I a -3' +symbol old 'I 21/a -3' 'I a -3' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-I 2 2 3' 'm-3' +symbol pgrp '-P 2 2 3' 'm-3' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -x,-y+1/2,z +symop x,-y,-z+1/2 +symop -x,y+1/2,-z+1/2 +symop z,x,y +symop -z,-x+1/2,y +symop z,-x,-y+1/2 +symop -z,x+1/2,-y+1/2 +symop y,z,x +symop y,-z,-x+1/2 +symop -y,z+1/2,-x+1/2 +symop -y+1/2,-z,x+1/2 +symop -x,-y,-z +symop x,y+1/2,-z +symop -x,y,z+1/2 +symop x,-y+1/2,z+1/2 +symop -z,-x,-y +symop z,x+1/2,-y +symop -z,x,y+1/2 +symop z,-x+1/2,y+1/2 +symop -y,-z,-x +symop -y,z,x+1/2 +symop y,-z+1/2,x+1/2 +symop y+1/2,z,-x+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 207 +basisop x,y,z +symbol ccp4 207 +symbol Hall ' P 4 2 3' +symbol xHM 'P 4 3 2' +symbol old 'P 4 3 2' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp ' P 4 2 3' '432' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop z,x,y +symop -x,z,y +symop -z,-x,y +symop x,-z,y +symop z,-x,-y +symop x,z,-y +symop -z,x,-y +symop -x,-z,-y +symop y,z,x +symop y,-z,-x +symop z,y,-x +symop -y,z,-x +symop -z,-y,-x +symop -y,-z,x +symop z,-y,x +symop -z,y,x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 208 +basisop x,y,z +symbol ccp4 208 +symbol Hall ' P 4n 2 3' +symbol xHM 'P 42 3 2' +symbol old 'P 42 3 2' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp ' P 4 2 3' '432' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/4 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x,-y,-z +symop y+1/2,x+1/2,-z+1/2 +symop -x,y,-z +symop -y+1/2,-x+1/2,-z+1/2 +symop z,x,y +symop -x+1/2,z+1/2,y+1/2 +symop -z,-x,y +symop x+1/2,-z+1/2,y+1/2 +symop z,-x,-y +symop x+1/2,z+1/2,-y+1/2 +symop -z,x,-y +symop -x+1/2,-z+1/2,-y+1/2 +symop y,z,x +symop y,-z,-x +symop z+1/2,y+1/2,-x+1/2 +symop -y,z,-x +symop -z+1/2,-y+1/2,-x+1/2 +symop -y,-z,x +symop z+1/2,-y+1/2,x+1/2 +symop -z+1/2,y+1/2,x+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 209 +basisop x,y,z +symbol ccp4 209 +symbol Hall ' F 4 2 3' +symbol xHM 'F 4 3 2' +symbol old 'F 4 3 2' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp ' P 4 2 3' '432' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop z,x,y +symop -x,z,y +symop -z,-x,y +symop x,-z,y +symop z,-x,-y +symop x,z,-y +symop -z,x,-y +symop -x,-z,-y +symop y,z,x +symop y,-z,-x +symop z,y,-x +symop -y,z,-x +symop -z,-y,-x +symop -y,-z,x +symop z,-y,x +symop -z,y,x +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 210 +basisop x,y,z +symbol ccp4 210 +symbol Hall ' F 4d 2 3' +symbol xHM 'F 41 3 2' +symbol old 'F 41 3 2' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp ' P 4 2 3' '432' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/4,x+1/4,z+1/4 +symop -x,-y+1/2,z+1/2 +symop y+3/4,-x+1/4,z+3/4 +symop x,-y,-z +symop y+1/4,x+1/4,-z+1/4 +symop -x,y+1/2,-z+1/2 +symop -y+3/4,-x+1/4,-z+3/4 +symop z,x,y +symop -x+1/4,z+1/4,y+1/4 +symop -z,-x+1/2,y+1/2 +symop x+3/4,-z+1/4,y+3/4 +symop z,-x,-y +symop x+1/4,z+1/4,-y+1/4 +symop -z,x+1/2,-y+1/2 +symop -x+3/4,-z+1/4,-y+3/4 +symop y,z,x +symop y+1/2,-z,-x+1/2 +symop z+1/4,y+3/4,-x+3/4 +symop -y+1/2,z+1/2,-x +symop -z+1/4,-y+1/4,-x+1/4 +symop -y,-z,x +symop z+1/4,-y+3/4,x+3/4 +symop -z+3/4,y+3/4,x+1/4 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 211 +basisop x,y,z +symbol ccp4 211 +symbol Hall ' I 4 2 3' +symbol xHM 'I 4 3 2' +symbol old 'I 4 3 2' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-I 4 2 3' 'm-3m' +symbol pgrp ' P 4 2 3' '432' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop z,x,y +symop -x,z,y +symop -z,-x,y +symop x,-z,y +symop z,-x,-y +symop x,z,-y +symop -z,x,-y +symop -x,-z,-y +symop y,z,x +symop y,-z,-x +symop z,y,-x +symop -y,z,-x +symop -z,-y,-x +symop -y,-z,x +symop z,-y,x +symop -z,y,x +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 212 +basisop x,y,z +symbol ccp4 212 +symbol Hall ' P 4acd 2ab 3' +symbol xHM 'P 43 3 2' +symbol old 'P 43 3 2' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp ' P 4 2 3' '432' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<1; 0<=y<=1/8; 0<=z<1 +mapasu nonz 1/8<=x<=3/8; 1/8<=y<=3/8; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y+3/4,x+1/4,z+3/4 +symop -x+1/2,-y,z+1/2 +symop y+3/4,-x+3/4,z+1/4 +symop x+1/2,-y+1/2,-z +symop y+1/4,x+3/4,-z+3/4 +symop -x,y+1/2,-z+1/2 +symop -y+1/4,-x+1/4,-z+1/4 +symop z,x,y +symop -x+3/4,z+1/4,y+3/4 +symop -z+1/2,-x,y+1/2 +symop x+3/4,-z+3/4,y+1/4 +symop z+1/2,-x+1/2,-y +symop x+1/4,z+3/4,-y+3/4 +symop -z,x+1/2,-y+1/2 +symop -x+1/4,-z+1/4,-y+1/4 +symop y,z,x +symop y+1/2,-z+1/2,-x +symop z+1/4,y+3/4,-x+3/4 +symop -y,z+1/2,-x+1/2 +symop -z+1/4,-y+1/4,-x+1/4 +symop -y+1/2,-z,x+1/2 +symop z+3/4,-y+3/4,x+1/4 +symop -z+3/4,y+1/4,x+3/4 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 213 +basisop x,y,z +symbol ccp4 213 +symbol Hall ' P 4bd 2ab 3' +symbol xHM 'P 41 3 2' +symbol old 'P 41 3 2' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp ' P 4 2 3' '432' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<1; 0<=y<=1/8; 0<=z<1 +mapasu nonz 1/8<=x<=3/8; 1/8<=y<=3/8; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y+1/4,x+3/4,z+1/4 +symop -x+1/2,-y,z+1/2 +symop y+1/4,-x+1/4,z+3/4 +symop x+1/2,-y+1/2,-z +symop y+3/4,x+1/4,-z+1/4 +symop -x,y+1/2,-z+1/2 +symop -y+3/4,-x+3/4,-z+3/4 +symop z,x,y +symop -x+1/4,z+3/4,y+1/4 +symop -z+1/2,-x,y+1/2 +symop x+1/4,-z+1/4,y+3/4 +symop z+1/2,-x+1/2,-y +symop x+3/4,z+1/4,-y+1/4 +symop -z,x+1/2,-y+1/2 +symop -x+3/4,-z+3/4,-y+3/4 +symop y,z,x +symop y+1/2,-z+1/2,-x +symop z+3/4,y+1/4,-x+1/4 +symop -y,z+1/2,-x+1/2 +symop -z+3/4,-y+3/4,-x+3/4 +symop -y+1/2,-z,x+1/2 +symop z+1/4,-y+1/4,x+3/4 +symop -z+1/4,y+3/4,x+1/4 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 214 +basisop x,y,z +symbol ccp4 214 +symbol Hall ' I 4bd 2c 3' +symbol xHM 'I 41 3 2' +symbol old 'I 41 3 2' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-I 4 2 3' 'm-3m' +symbol pgrp ' P 4 2 3' '432' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/8 +mapasu zero 0<=x<1; 0<=y<=1/8; 0<=z<1/2 +mapasu nonz -1/8<=x<=1/8; 0<=y<=1/8; 0=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x,-y,-z +symop -y,-x,z +symop -x,y,-z +symop y,x,z +symop z,x,y +symop x,-z,-y +symop -z,-x,y +symop -x,z,-y +symop z,-x,-y +symop -x,-z,y +symop -z,x,-y +symop x,z,y +symop y,z,x +symop y,-z,-x +symop -z,-y,x +symop -y,z,-x +symop z,y,x +symop -y,-z,x +symop -z,y,-x +symop z,-y,-x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 216 +basisop x,y,z +symbol ccp4 216 +symbol Hall ' F -4 2 3' +symbol xHM 'F -4 3 m' +symbol old 'F -4 3 m' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp ' P -4 2 3' '-43m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x,-y,-z +symop -y,-x,z +symop -x,y,-z +symop y,x,z +symop z,x,y +symop x,-z,-y +symop -z,-x,y +symop -x,z,-y +symop z,-x,-y +symop -x,-z,y +symop -z,x,-y +symop x,z,y +symop y,z,x +symop y,-z,-x +symop -z,-y,x +symop -y,z,-x +symop z,y,x +symop -y,-z,x +symop -z,y,-x +symop z,-y,-x +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 217 +basisop x,y,z +symbol ccp4 217 +symbol Hall ' I -4 2 3' +symbol xHM 'I -4 3 m' +symbol old 'I -4 3 m' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-I 4 2 3' 'm-3m' +symbol pgrp ' P -4 2 3' '-43m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop y,-x,-z +symop -x,-y,z +symop -y,x,-z +symop x,-y,-z +symop -y,-x,z +symop -x,y,-z +symop y,x,z +symop z,x,y +symop x,-z,-y +symop -z,-x,y +symop -x,z,-y +symop z,-x,-y +symop -x,-z,y +symop -z,x,-y +symop x,z,y +symop y,z,x +symop y,-z,-x +symop -z,-y,x +symop -y,z,-x +symop z,y,x +symop -y,-z,x +symop -z,y,-x +symop z,-y,-x +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 218 +basisop x,y,z +symbol ccp4 218 +symbol Hall ' P -4n 2 3' +symbol xHM 'P -4 3 n' +symbol old 'P -4 3 n' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp ' P -4 2 3' '-43m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop y+1/2,-x+1/2,-z+1/2 +symop -x,-y,z +symop -y+1/2,x+1/2,-z+1/2 +symop x,-y,-z +symop -y+1/2,-x+1/2,z+1/2 +symop -x,y,-z +symop y+1/2,x+1/2,z+1/2 +symop z,x,y +symop x+1/2,-z+1/2,-y+1/2 +symop -z,-x,y +symop -x+1/2,z+1/2,-y+1/2 +symop z,-x,-y +symop -x+1/2,-z+1/2,y+1/2 +symop -z,x,-y +symop x+1/2,z+1/2,y+1/2 +symop y,z,x +symop y,-z,-x +symop -z+1/2,-y+1/2,x+1/2 +symop -y,z,-x +symop z+1/2,y+1/2,x+1/2 +symop -y,-z,x +symop -z+1/2,y+1/2,-x+1/2 +symop z+1/2,-y+1/2,-x+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 219 +basisop x,y,z +symbol ccp4 219 +symbol Hall ' F -4a 2 3' +symbol xHM 'F -4 3 c' +symbol old 'F -4 3 c' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp ' P -4 2 3' '-43m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop y+1/2,-x,-z +symop -x+1/2,-y+1/2,z +symop -y,x+1/2,-z +symop x,-y,-z +symop -y+1/2,-x,z +symop -x+1/2,y+1/2,-z +symop y,x+1/2,z +symop z,x,y +symop x+1/2,-z,-y +symop -z+1/2,-x+1/2,y +symop -x,z+1/2,-y +symop z,-x,-y +symop -x+1/2,-z,y +symop -z+1/2,x+1/2,-y +symop x,z+1/2,y +symop y,z,x +symop y,-z+1/2,-x+1/2 +symop -z,-y,x+1/2 +symop -y+1/2,z,-x+1/2 +symop z+1/2,y,x +symop -y,-z,x +symop -z,y,-x+1/2 +symop z+1/2,-y+1/2,-x+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 220 +basisop x,y,z +symbol ccp4 220 +symbol Hall ' I -4bd 2c 3' +symbol xHM 'I -4 3 d' +symbol old 'I -4 3 d' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-I 4 2 3' 'm-3m' +symbol pgrp ' P -4 2 3' '-43m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz -1/8<=x<=1/8; 0<=y<=1/8; 0=l and l>=h and h>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop z,x,y +symop -x,z,y +symop -z,-x,y +symop x,-z,y +symop z,-x,-y +symop x,z,-y +symop -z,x,-y +symop -x,-z,-y +symop y,z,x +symop y,-z,-x +symop z,y,-x +symop -y,z,-x +symop -z,-y,-x +symop -y,-z,x +symop z,-y,x +symop -z,y,x +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x,y,z +symop -y,-x,z +symop x,-y,z +symop y,x,z +symop -z,-x,-y +symop x,-z,-y +symop z,x,-y +symop -x,z,-y +symop -z,x,y +symop -x,-z,y +symop z,-x,y +symop x,z,y +symop -y,-z,-x +symop -y,z,x +symop -z,-y,x +symop y,-z,x +symop z,y,x +symop y,z,-x +symop -z,y,-x +symop z,-y,-x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 222 +basisop x-1/4,y-1/4,z-1/4 +symbol ccp4 222 +symbol Hall '-P 4a 2bc 3 (x-1/4,y-1/4,z-1/4)' +symbol xHM 'P n -3 n :1' +symbol old 'P 4/n -3 2/n' 'P n -3 n' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop z,x,y +symop -x,z,y +symop -z,-x,y +symop x,-z,y +symop z,-x,-y +symop x,z,-y +symop -z,x,-y +symop -x,-z,-y +symop y,z,x +symop y,-z,-x +symop z,y,-x +symop -y,z,-x +symop -z,-y,-x +symop -y,-z,x +symop z,-y,x +symop -z,y,x +symop -x+1/2,-y+1/2,-z+1/2 +symop y+1/2,-x+1/2,-z+1/2 +symop x+1/2,y+1/2,-z+1/2 +symop -y+1/2,x+1/2,-z+1/2 +symop -x+1/2,y+1/2,z+1/2 +symop -y+1/2,-x+1/2,z+1/2 +symop x+1/2,-y+1/2,z+1/2 +symop y+1/2,x+1/2,z+1/2 +symop -z+1/2,-x+1/2,-y+1/2 +symop x+1/2,-z+1/2,-y+1/2 +symop z+1/2,x+1/2,-y+1/2 +symop -x+1/2,z+1/2,-y+1/2 +symop -z+1/2,x+1/2,y+1/2 +symop -x+1/2,-z+1/2,y+1/2 +symop z+1/2,-x+1/2,y+1/2 +symop x+1/2,z+1/2,y+1/2 +symop -y+1/2,-z+1/2,-x+1/2 +symop -y+1/2,z+1/2,x+1/2 +symop -z+1/2,-y+1/2,x+1/2 +symop y+1/2,-z+1/2,x+1/2 +symop z+1/2,y+1/2,x+1/2 +symop y+1/2,z+1/2,-x+1/2 +symop -z+1/2,y+1/2,-x+1/2 +symop z+1/2,-y+1/2,-x+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 222 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4a 2bc 3' +symbol xHM 'P n -3 n :2' +symbol old '' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 1/4<=z<=3/4 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y+1/2,x,z +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z +symop x,-y+1/2,-z+1/2 +symop y,x,-z+1/2 +symop -x+1/2,y,-z+1/2 +symop -y+1/2,-x+1/2,-z+1/2 +symop z,x,y +symop -x+1/2,z,y +symop -z+1/2,-x+1/2,y +symop x,-z+1/2,y +symop z,-x+1/2,-y+1/2 +symop x,z,-y+1/2 +symop -z+1/2,x,-y+1/2 +symop -x+1/2,-z+1/2,-y+1/2 +symop y,z,x +symop y,-z+1/2,-x+1/2 +symop z,y,-x+1/2 +symop -y+1/2,z,-x+1/2 +symop -z+1/2,-y+1/2,-x+1/2 +symop -y+1/2,-z+1/2,x +symop z,-y+1/2,x +symop -z+1/2,y,x +symop -x,-y,-z +symop y+1/2,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z +symop -x,y+1/2,z+1/2 +symop -y,-x,z+1/2 +symop x+1/2,-y,z+1/2 +symop y+1/2,x+1/2,z+1/2 +symop -z,-x,-y +symop x+1/2,-z,-y +symop z+1/2,x+1/2,-y +symop -x,z+1/2,-y +symop -z,x+1/2,y+1/2 +symop -x,-z,y+1/2 +symop z+1/2,-x,y+1/2 +symop x+1/2,z+1/2,y+1/2 +symop -y,-z,-x +symop -y,z+1/2,x+1/2 +symop -z,-y,x+1/2 +symop y+1/2,-z,x+1/2 +symop z+1/2,y+1/2,x+1/2 +symop y+1/2,z+1/2,-x +symop -z,y+1/2,-x +symop z+1/2,-y,-x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 223 +basisop x,y,z +symbol ccp4 223 +symbol Hall '-P 4n 2 3' +symbol xHM 'P m -3 n' +symbol old 'P 42/m -3 2/n' 'P m -3 n' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x,-y,-z +symop y+1/2,x+1/2,-z+1/2 +symop -x,y,-z +symop -y+1/2,-x+1/2,-z+1/2 +symop z,x,y +symop -x+1/2,z+1/2,y+1/2 +symop -z,-x,y +symop x+1/2,-z+1/2,y+1/2 +symop z,-x,-y +symop x+1/2,z+1/2,-y+1/2 +symop -z,x,-y +symop -x+1/2,-z+1/2,-y+1/2 +symop y,z,x +symop y,-z,-x +symop z+1/2,y+1/2,-x+1/2 +symop -y,z,-x +symop -z+1/2,-y+1/2,-x+1/2 +symop -y,-z,x +symop z+1/2,-y+1/2,x+1/2 +symop -z+1/2,y+1/2,x+1/2 +symop -x,-y,-z +symop y+1/2,-x+1/2,-z+1/2 +symop x,y,-z +symop -y+1/2,x+1/2,-z+1/2 +symop -x,y,z +symop -y+1/2,-x+1/2,z+1/2 +symop x,-y,z +symop y+1/2,x+1/2,z+1/2 +symop -z,-x,-y +symop x+1/2,-z+1/2,-y+1/2 +symop z,x,-y +symop -x+1/2,z+1/2,-y+1/2 +symop -z,x,y +symop -x+1/2,-z+1/2,y+1/2 +symop z,-x,y +symop x+1/2,z+1/2,y+1/2 +symop -y,-z,-x +symop -y,z,x +symop -z+1/2,-y+1/2,x+1/2 +symop y,-z,x +symop z+1/2,y+1/2,x+1/2 +symop y,z,-x +symop -z+1/2,y+1/2,-x+1/2 +symop z+1/2,-y+1/2,-x+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 224 +basisop x+1/4,y+1/4,z+1/4 +symbol ccp4 224 +symbol Hall '-P 4bc 2bc 3 (x+1/4,y+1/4,z+1/4)' +symbol xHM 'P n -3 m :1' +symbol old 'P 42/n -3 2/m' 'P n -3 m' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y+1/2,x+1/2,z+1/2 +symop -x,-y,z +symop y+1/2,-x+1/2,z+1/2 +symop x,-y,-z +symop y+1/2,x+1/2,-z+1/2 +symop -x,y,-z +symop -y+1/2,-x+1/2,-z+1/2 +symop z,x,y +symop -x+1/2,z+1/2,y+1/2 +symop -z,-x,y +symop x+1/2,-z+1/2,y+1/2 +symop z,-x,-y +symop x+1/2,z+1/2,-y+1/2 +symop -z,x,-y +symop -x+1/2,-z+1/2,-y+1/2 +symop y,z,x +symop y,-z,-x +symop z+1/2,y+1/2,-x+1/2 +symop -y,z,-x +symop -z+1/2,-y+1/2,-x+1/2 +symop -y,-z,x +symop z+1/2,-y+1/2,x+1/2 +symop -z+1/2,y+1/2,x+1/2 +symop -x+1/2,-y+1/2,-z+1/2 +symop y,-x,-z +symop x+1/2,y+1/2,-z+1/2 +symop -y,x,-z +symop -x+1/2,y+1/2,z+1/2 +symop -y,-x,z +symop x+1/2,-y+1/2,z+1/2 +symop y,x,z +symop -z+1/2,-x+1/2,-y+1/2 +symop x,-z,-y +symop z+1/2,x+1/2,-y+1/2 +symop -x,z,-y +symop -z+1/2,x+1/2,y+1/2 +symop -x,-z,y +symop z+1/2,-x+1/2,y+1/2 +symop x,z,y +symop -y+1/2,-z+1/2,-x+1/2 +symop -y+1/2,z+1/2,x+1/2 +symop -z,-y,x +symop y+1/2,-z+1/2,x+1/2 +symop z,y,x +symop y+1/2,z+1/2,-x+1/2 +symop -z,y,-x +symop z,-y,-x +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 224 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-P 4bc 2bc 3' +symbol xHM 'P n -3 m :2' +symbol old '' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-P 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y,x+1/2,z+1/2 +symop -x+1/2,-y+1/2,z +symop y+1/2,-x,z+1/2 +symop x,-y+1/2,-z+1/2 +symop y+1/2,x+1/2,-z +symop -x+1/2,y,-z+1/2 +symop -y,-x,-z +symop z,x,y +symop -x,z+1/2,y+1/2 +symop -z+1/2,-x+1/2,y +symop x+1/2,-z,y+1/2 +symop z,-x+1/2,-y+1/2 +symop x+1/2,z+1/2,-y +symop -z+1/2,x,-y+1/2 +symop -x,-z,-y +symop y,z,x +symop y,-z+1/2,-x+1/2 +symop z+1/2,y+1/2,-x +symop -y+1/2,z,-x+1/2 +symop -z,-y,-x +symop -y+1/2,-z+1/2,x +symop z+1/2,-y,x+1/2 +symop -z,y+1/2,x+1/2 +symop -x,-y,-z +symop y,-x+1/2,-z+1/2 +symop x+1/2,y+1/2,-z +symop -y+1/2,x,-z+1/2 +symop -x,y+1/2,z+1/2 +symop -y+1/2,-x+1/2,z +symop x+1/2,-y,z+1/2 +symop y,x,z +symop -z,-x,-y +symop x,-z+1/2,-y+1/2 +symop z+1/2,x+1/2,-y +symop -x+1/2,z,-y+1/2 +symop -z,x+1/2,y+1/2 +symop -x+1/2,-z+1/2,y +symop z+1/2,-x,y+1/2 +symop x,z,y +symop -y,-z,-x +symop -y,z+1/2,x+1/2 +symop -z+1/2,-y+1/2,x +symop y+1/2,-z,x+1/2 +symop z,y,x +symop y+1/2,z+1/2,-x +symop -z+1/2,y,-x+1/2 +symop z,-y+1/2,-x+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 225 +basisop x,y,z +symbol ccp4 225 +symbol Hall '-F 4 2 3' +symbol xHM 'F m -3 m' +symbol old 'F 4/m -3 2/m' 'F m -3 m' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/4 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop z,x,y +symop -x,z,y +symop -z,-x,y +symop x,-z,y +symop z,-x,-y +symop x,z,-y +symop -z,x,-y +symop -x,-z,-y +symop y,z,x +symop y,-z,-x +symop z,y,-x +symop -y,z,-x +symop -z,-y,-x +symop -y,-z,x +symop z,-y,x +symop -z,y,x +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x,y,z +symop -y,-x,z +symop x,-y,z +symop y,x,z +symop -z,-x,-y +symop x,-z,-y +symop z,x,-y +symop -x,z,-y +symop -z,x,y +symop -x,-z,y +symop z,-x,y +symop x,z,y +symop -y,-z,-x +symop -y,z,x +symop -z,-y,x +symop y,-z,x +symop z,y,x +symop y,z,-x +symop -z,y,-x +symop z,-y,-x +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 226 +basisop x,y,z +symbol ccp4 226 +symbol Hall '-F 4a 2 3' +symbol xHM 'F m -3 c' +symbol old 'F 4/m -3 2/c' 'F m -3 c' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/4 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/4 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x,z +symop -x+1/2,-y+1/2,z +symop y,-x+1/2,z +symop x,-y,-z +symop y+1/2,x,-z +symop -x+1/2,y+1/2,-z +symop -y,-x+1/2,-z +symop z,x,y +symop -x+1/2,z,y +symop -z+1/2,-x+1/2,y +symop x,-z+1/2,y +symop z,-x,-y +symop x+1/2,z,-y +symop -z+1/2,x+1/2,-y +symop -x,-z+1/2,-y +symop y,z,x +symop y,-z+1/2,-x+1/2 +symop z,y,-x+1/2 +symop -y+1/2,z,-x+1/2 +symop -z+1/2,-y,-x +symop -y,-z,x +symop z,-y,x+1/2 +symop -z+1/2,y+1/2,x+1/2 +symop -x,-y,-z +symop y+1/2,-x,-z +symop x+1/2,y+1/2,-z +symop -y,x+1/2,-z +symop -x,y,z +symop -y+1/2,-x,z +symop x+1/2,-y+1/2,z +symop y,x+1/2,z +symop -z,-x,-y +symop x+1/2,-z,-y +symop z+1/2,x+1/2,-y +symop -x,z+1/2,-y +symop -z,x,y +symop -x+1/2,-z,y +symop z+1/2,-x+1/2,y +symop x,z+1/2,y +symop -y,-z,-x +symop -y,z+1/2,x+1/2 +symop -z,-y,x+1/2 +symop y+1/2,-z,x+1/2 +symop z+1/2,y,x +symop y,z,-x +symop -z,y,-x+1/2 +symop z+1/2,-y+1/2,-x+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 227 +basisop x+1/8,y+1/8,z+1/8 +symbol ccp4 227 +symbol Hall '-F 4vw 2vw 3 (x+1/8,y+1/8,z+1/8)' +symbol xHM 'F d -3 m :1' +symbol old 'F 41/d -3 2/m' 'F d -3 m' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/4,x+1/4,z+1/4 +symop -x,-y+1/2,z+1/2 +symop y+3/4,-x+1/4,z+3/4 +symop x,-y+1/2,-z+1/2 +symop y+3/4,x+1/4,-z+3/4 +symop -x,y,-z +symop -y+1/4,-x+1/4,-z+1/4 +symop z,x,y +symop -x+1/4,z+1/4,y+1/4 +symop -z,-x+1/2,y+1/2 +symop x+3/4,-z+1/4,y+3/4 +symop z,-x+1/2,-y+1/2 +symop x+3/4,z+1/4,-y+3/4 +symop -z,x,-y +symop -x+1/4,-z+1/4,-y+1/4 +symop y,z,x +symop y+1/2,-z,-x+1/2 +symop z+1/4,y+3/4,-x+3/4 +symop -y+1/2,z+1/2,-x +symop -z+1/4,-y+3/4,-x+3/4 +symop -y+1/2,-z+1/2,x +symop z+1/4,-y+1/4,x+1/4 +symop -z+3/4,y+1/4,x+3/4 +symop -x+1/4,-y+1/4,-z+1/4 +symop y,-x,-z +symop x+1/4,y+3/4,-z+3/4 +symop -y+1/2,x,-z+1/2 +symop -x+1/4,y+3/4,z+3/4 +symop -y+1/2,-x,z+1/2 +symop x+1/4,-y+1/4,z+1/4 +symop y,x,z +symop -z+1/4,-x+1/4,-y+1/4 +symop x,-z,-y +symop z+1/4,x+3/4,-y+3/4 +symop -x+1/2,z,-y+1/2 +symop -z+1/4,x+3/4,y+3/4 +symop -x+1/2,-z,y+1/2 +symop z+1/4,-x+1/4,y+1/4 +symop x,z,y +symop -y+1/4,-z+1/4,-x+1/4 +symop -y+3/4,z+1/4,x+3/4 +symop -z,-y+1/2,x+1/2 +symop y+3/4,-z+3/4,x+1/4 +symop z,y+1/2,x+1/2 +symop y+3/4,z+3/4,-x+1/4 +symop -z,y,-x +symop z+1/2,-y,-x+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 227 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-F 4vw 2vw 3' +symbol xHM 'F d -3 m :2' +symbol old '' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y,x+1/4,z+1/4 +symop -x+3/4,-y+1/4,z+1/2 +symop y+3/4,-x,z+3/4 +symop x,-y+1/4,-z+1/4 +symop y+3/4,x+1/4,-z+1/2 +symop -x+3/4,y,-z+3/4 +symop -y,-x,-z +symop z,x,y +symop -x,z+1/4,y+1/4 +symop -z+3/4,-x+1/4,y+1/2 +symop x+3/4,-z,y+3/4 +symop z,-x+1/4,-y+1/4 +symop x+3/4,z+1/4,-y+1/2 +symop -z+3/4,x,-y+3/4 +symop -x,-z,-y +symop y,z,x +symop y+1/2,-z+3/4,-x+1/4 +symop z+1/4,y+3/4,-x+1/2 +symop -y+1/4,z+1/2,-x+3/4 +symop -z,-y+1/2,-x+1/2 +symop -y+1/4,-z+1/4,x +symop z+1/4,-y,x+1/4 +symop -z+1/2,y+1/4,x+3/4 +symop -x,-y,-z +symop y,-x+3/4,-z+3/4 +symop x+1/4,y+3/4,-z+1/2 +symop -y+1/4,x,-z+1/4 +symop -x,y+3/4,z+3/4 +symop -y+1/4,-x+3/4,z+1/2 +symop x+1/4,-y,z+1/4 +symop y,x,z +symop -z,-x,-y +symop x,-z+3/4,-y+3/4 +symop z+1/4,x+3/4,-y+1/2 +symop -x+1/4,z,-y+1/4 +symop -z,x+3/4,y+3/4 +symop -x+1/4,-z+3/4,y+1/2 +symop z+1/4,-x,y+1/4 +symop x,z,y +symop -y,-z,-x +symop -y+1/2,z+1/4,x+3/4 +symop -z+3/4,-y+1/4,x+1/2 +symop y+3/4,-z+1/2,x+1/4 +symop z,y+1/2,x+1/2 +symop y+3/4,z+3/4,-x +symop -z+3/4,y,-x+3/4 +symop z+1/2,-y+3/4,-x+1/4 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 228 +basisop x-1/8,y-1/8,z-1/8 +symbol ccp4 228 +symbol Hall '-F 4ud 2vw 3 (x-1/8,y-1/8,z-1/8)' +symbol xHM 'F d -3 c :1' +symbol old 'F d -3 c' 'F 41/d -3 2/c' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1/2 +mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/4,x+1/4,z+1/4 +symop -x,-y+1/2,z+1/2 +symop y+3/4,-x+1/4,z+3/4 +symop x,-y,-z +symop y+1/4,x+1/4,-z+1/4 +symop -x,y+1/2,-z+1/2 +symop -y+3/4,-x+1/4,-z+3/4 +symop z,x,y +symop -x+1/4,z+1/4,y+1/4 +symop -z,-x+1/2,y+1/2 +symop x+3/4,-z+1/4,y+3/4 +symop z,-x,-y +symop x+1/4,z+1/4,-y+1/4 +symop -z,x+1/2,-y+1/2 +symop -x+3/4,-z+1/4,-y+3/4 +symop y,z,x +symop y+1/2,-z,-x+1/2 +symop z+1/4,y+3/4,-x+3/4 +symop -y+1/2,z+1/2,-x +symop -z+1/4,-y+1/4,-x+1/4 +symop -y,-z,x +symop z+1/4,-y+3/4,x+3/4 +symop -z+3/4,y+3/4,x+1/4 +symop -x+3/4,-y+3/4,-z+3/4 +symop y+1/2,-x+1/2,-z+1/2 +symop x+3/4,y+1/4,-z+1/4 +symop -y,x+1/2,-z +symop -x+3/4,y+3/4,z+3/4 +symop -y+1/2,-x+1/2,z+1/2 +symop x+3/4,-y+1/4,z+1/4 +symop y,x+1/2,z +symop -z+3/4,-x+3/4,-y+3/4 +symop x+1/2,-z+1/2,-y+1/2 +symop z+3/4,x+1/4,-y+1/4 +symop -x,z+1/2,-y +symop -z+3/4,x+3/4,y+3/4 +symop -x+1/2,-z+1/2,y+1/2 +symop z+3/4,-x+1/4,y+1/4 +symop x,z+1/2,y +symop -y+3/4,-z+3/4,-x+3/4 +symop -y+1/4,z+3/4,x+1/4 +symop -z+1/2,-y,x +symop y+1/4,-z+1/4,x+3/4 +symop z+1/2,y+1/2,x+1/2 +symop y+3/4,z+3/4,-x+3/4 +symop -z+1/2,y,-x +symop z,-y,-x+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 228 +basisop x,y,z +symbol ccp4 0 +symbol Hall '-F 4ud 2vw 3' +symbol xHM 'F d -3 c :2' +symbol old '' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-F 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1/2 +mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1/2 +cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +symop x,y,z +symop -y+1/2,x+1/4,z+1/4 +symop -x+1/4,-y+3/4,z+1/2 +symop y+3/4,-x+1/2,z+3/4 +symop x,-y+1/4,-z+1/4 +symop y+1/4,x+1/4,-z+1/2 +symop -x+1/4,y+1/2,-z+3/4 +symop -y,-x+1/2,-z +symop z,x,y +symop -x+1/2,z+1/4,y+1/4 +symop -z+1/4,-x+3/4,y+1/2 +symop x+3/4,-z+1/2,y+3/4 +symop z,-x+1/4,-y+1/4 +symop x+1/4,z+1/4,-y+1/2 +symop -z+1/4,x+1/2,-y+3/4 +symop -x,-z+1/2,-y +symop y,z,x +symop y+1/2,-z+1/4,-x+3/4 +symop z+1/4,y+3/4,-x +symop -y+3/4,z+1/2,-x+1/4 +symop -z+1/2,-y+1/2,-x+1/2 +symop -y+1/4,-z+1/4,x +symop z+1/4,-y,x+3/4 +symop -z,y+3/4,x+1/4 +symop -x,-y,-z +symop y+1/2,-x+3/4,-z+3/4 +symop x+3/4,y+1/4,-z+1/2 +symop -y+1/4,x+1/2,-z+1/4 +symop -x,y+3/4,z+3/4 +symop -y+3/4,-x+3/4,z+1/2 +symop x+3/4,-y+1/2,z+1/4 +symop y,x+1/2,z +symop -z,-x,-y +symop x+1/2,-z+3/4,-y+3/4 +symop z+3/4,x+1/4,-y+1/2 +symop -x+1/4,z+1/2,-y+1/4 +symop -z,x+3/4,y+3/4 +symop -x+3/4,-z+3/4,y+1/2 +symop z+3/4,-x+1/2,y+1/4 +symop x,z+1/2,y +symop -y,-z,-x +symop -y+1/2,z+3/4,x+1/4 +symop -z+3/4,-y+1/4,x +symop y+1/4,-z+1/2,x+3/4 +symop z+1/2,y+1/2,x+1/2 +symop y+3/4,z+3/4,-x +symop -z+3/4,y,-x+1/4 +symop z,-y+1/4,-x+3/4 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 229 +basisop x,y,z +symbol ccp4 229 +symbol Hall '-I 4 2 3' +symbol xHM 'I m -3 m' +symbol old 'I 4/m -3 2/m' 'I m -3 m' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-I 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 +cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 +symop x,y,z +symop -y,x,z +symop -x,-y,z +symop y,-x,z +symop x,-y,-z +symop y,x,-z +symop -x,y,-z +symop -y,-x,-z +symop z,x,y +symop -x,z,y +symop -z,-x,y +symop x,-z,y +symop z,-x,-y +symop x,z,-y +symop -z,x,-y +symop -x,-z,-y +symop y,z,x +symop y,-z,-x +symop z,y,-x +symop -y,z,-x +symop -z,-y,-x +symop -y,-z,x +symop z,-y,x +symop -z,y,x +symop -x,-y,-z +symop y,-x,-z +symop x,y,-z +symop -y,x,-z +symop -x,y,z +symop -y,-x,z +symop x,-y,z +symop y,x,z +symop -z,-x,-y +symop x,-z,-y +symop z,x,-y +symop -x,z,-y +symop -z,x,y +symop -x,-z,y +symop z,-x,y +symop x,z,y +symop -y,-z,-x +symop -y,z,x +symop -z,-y,x +symop y,-z,x +symop z,y,x +symop y,z,-x +symop -z,y,-x +symop z,-y,-x +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 230 +basisop x,y,z +symbol ccp4 230 +symbol Hall '-I 4bd 2c 3' +symbol xHM 'I a -3 d' +symbol old 'I 41/a -3 2/d' 'I a -3 d' +symbol laue '-P 4 2 3' 'm-3m' +symbol patt '-I 4 2 3' 'm-3m' +symbol pgrp '-P 4 2 3' 'm-3m' +hklasu ccp4 'k>=l and l>=h and h>=0' +mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 +mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 +mapasu nonz 0<=x<=1/8; -1/8<=y<=0; 1/8=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<1; 0<=y<1/2; 0<=z<1 +mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -x+1/2,y,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 5 +basisop x+1/4,y+1/4,z +symbol ccp4 3005 +symbol Hall ' C 2y (x+1/4,y+1/4,z)' +symbol xHM 'C 1 21 1' +symbol old 'C 1 21 1' +symbol laue '-P 2y' '2/m' +symbol patt '-C 2y' '2/m' +symbol pgrp ' P 2y' '2' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<=1/4; 0<=y<1; 0<=z<1 +mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -x+1/2,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 8 +basisop -x,z,y +symbol ccp4 1008 +symbol Hall ' B -2' +symbol xHM 'B 1 1 m' +symbol old 'B 1 1 m' +symbol laue '-P 2' '2/m' +symbol patt '-B 2' '2/m' +symbol pgrp ' P -2' 'm' +hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' +mapasu ccp4 0<=x<1; 0<=y<1/4; 0<=z<1 +mapasu zero 0<=x<1/2; 0<=y<=1; 0<=z<1/2 +mapasu nonz 0<=x<1/2; 0<=y<=1; 0<=z<1/2 +cheshire +symop x,y,z +symop x,y,-z +cenop x,y,z +cenop x+1/2,y,z+1/2 +end_spacegroup + +begin_spacegroup +number 18 +basisop x+1/4,y+1/4,z +symbol ccp4 1018 +symbol Hall ' P 2 2ab (x+1/4,y+1/4,z)' +symbol xHM '' +symbol old 'P 21 21 2 (a)' +symbol laue '-P 2 2' 'mmm' +symbol patt '-P 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x+1/2,-y,-z +symop -x,y+1/2,-z +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 20 +basisop x+1/4,y,z +symbol ccp4 1020 +symbol Hall ' C 2c 2 (x+1/4,y,z)' +symbol xHM '' +symbol old 'C 2 2 21a)' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -x+1/2,-y,z+1/2 +symop x,-y,-z +symop -x+1/2,y,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 21 +basisop x+1/4,y+1/4,z +symbol ccp4 1021 +symbol Hall ' C 2 2 (x+1/4,y+1/4,z)' +symbol xHM '' +symbol old 'C 2 2 2a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-C 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x,-y+1/2,-z +symop -x+1/2,y,-z +cenop x,y,z +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 22 +basisop x,y,z+1/4 +symbol ccp4 1022 +symbol Hall ' F 2 2 (x,y,z+1/4)' +symbol xHM '' +symbol old 'F 2 2 2a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-F 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -x,-y,z +symop x,-y,-z+1/2 +symop -x,y,-z+1/2 +cenop x,y,z +cenop x,y+1/2,z+1/2 +cenop x+1/2,y,z+1/2 +cenop x+1/2,y+1/2,z +end_spacegroup + +begin_spacegroup +number 23 +basisop x-1/4,y+1/4,z-1/4 +symbol ccp4 1023 +symbol Hall ' I 2 2 (x-1/4,y+1/4,z-1/4)' +symbol xHM '' +symbol old 'I 2 2 2a' +symbol laue '-P 2 2' 'mmm' +symbol patt '-I 2 2' 'mmm' +symbol pgrp ' P 2 2' '222' +hklasu ccp4 'h>=0 and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/4 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y,-z+1/2 +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + +begin_spacegroup +number 94 +basisop x-1/4,y-1/4,z-1/4 +symbol ccp4 1094 +symbol Hall ' P 4n 2n (x-1/4,y-1/4,z-1/4)' +symbol xHM '' +symbol old 'P 42 21 2a' +symbol laue '-P 4 2' '4/mmm' +symbol patt '-P 4 2' '4/mmm' +symbol pgrp ' P 4 2' '422' +hklasu ccp4 'h>=k and k>=0 and l>=0' +mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 +mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -y,x+1/2,z+1/2 +symop -x+1/2,-y+1/2,z +symop y+1/2,-x,z+1/2 +symop x+1/2,-y,-z +symop y,x,-z+1/2 +symop -x,y+1/2,-z +symop -y+1/2,-x+1/2,-z+1/2 +cenop x,y,z +end_spacegroup + +begin_spacegroup +number 197 +basisop x+1/4,y+1/4,z+1/4 +symbol ccp4 1197 +symbol Hall ' I 2 2 3 (x+1/4,y+1/4,z+1/4)' +symbol xHM '' +symbol old 'I 2 3a' +symbol laue '-P 2 2 3' 'm-3' +symbol patt '-I 2 2 3' 'm-3' +symbol pgrp ' P 2 2 3' '23' +hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' +mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/2 +mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 +mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 +cheshire +symop x,y,z +symop -x+1/2,-y+1/2,z +symop x,-y+1/2,-z+1/2 +symop -x+1/2,y,-z+1/2 +symop z,x,y +symop -z+1/2,-x+1/2,y +symop z,-x+1/2,-y+1/2 +symop -z+1/2,x,-y+1/2 +symop y,z,x +symop y,-z+1/2,-x+1/2 +symop -y+1/2,z,-x+1/2 +symop -y+1/2,-z+1/2,x +cenop x,y,z +cenop x+1/2,y+1/2,z+1/2 +end_spacegroup + diff --git a/ccp4c/data/symop.lib b/ccp4c/data/symop.lib new file mode 100644 index 00000000..f770634e --- /dev/null +++ b/ccp4c/data/symop.lib @@ -0,0 +1,4920 @@ +1 1 1 P1 PG1 TRICLINIC 'P 1' + X,Y,Z +2 2 2 P-1 PG1bar TRICLINIC 'P -1' + X,Y,Z + -X,-Y,-Z +3 2 2 P2 PG2 MONOCLINIC 'P 1 2 1' + X,Y,Z + -X,Y,-Z +4 2 2 P21 PG2 MONOCLINIC 'P 1 21 1' + X,Y,Z + -X,Y+1/2,-Z +5 4 2 C2 PG2 MONOCLINIC 'C 1 2 1' + X,Y,Z + -X,Y,-Z + 1/2+X,1/2+Y,Z + 1/2-X,1/2+Y,-Z +6 2 2 Pm PGm MONOCLINIC 'P 1 m 1' + X,Y,Z + X,-Y,Z +7 2 2 Pc PGm MONOCLINIC 'P 1 c 1' + X,Y,Z + X,-Y,1/2+Z +8 4 2 Cm PGm MONOCLINIC 'C 1 m 1' + X,Y,Z + X,-Y,Z + 1/2+X,1/2+Y,Z + 1/2+X,1/2-Y,Z +9 4 2 Cc PGm MONOCLINIC 'C 1 c 1' + X,Y,Z + X,-Y,1/2+Z + 1/2+X,1/2+Y,Z + 1/2+X,1/2-Y,1/2+Z +10 4 4 P2/m PG2/m M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Z,1/4-Y,1/4+X + 1/4-Z,1/4+Y,3/4-X + 1/4+Z,3/4-Y,1/4-X + 3/4+Z,3/4+Y,3/4+X +1003 2 2 P112 PG2C MONOCLINIC 'P 1 1 2' !(dyad along z) + X,Y,Z + -X,-Y,Z +1004 2 2 P1121 PG2C MONOCLINIC 'P 1 1 21' !(unique axis c) + X,Y,Z + -X,-Y,1/2+Z +1005 4 2 B2 PG2C MONOCLINIC 'B 1 1 2' 'B 2' + X,Y,Z + -X,-Y,Z + 1/2+X,+Y,1/2+Z + 1/2-X,-Y,1/2+Z +2005 4 2 A2 PG2 MONOCLINIC 'A 1 2 1' + X,Y,Z + -X,Y,-Z + X,1/2+Y,1/2+Z + -X,1/2+Y,1/2-Z +3005 4 2 C21 PG2 MONOCLINIC 'C 1 21 1' ! (Origin on screw at 1/4X) + X,Y,Z + -X,1/2+Y,-Z + 1/2+X,1/2+Y,Z + 1/2-X,Y,-Z +4005 4 2 I2 PG2 MONOCLINIC 'I 1 2 1' 'I 2' !!! GJK @ 2003-06-02 + X,Y,Z + -X,Y,-Z + X+1/2,Y+1/2,Z+1/2 + -X+1/2,Y+1/2,-Z+1/2 +5005 4 2 I21 PG2 MONOCLINIC 'I 1 21 1' + X,Y,Z + -X,1/2+Y,-Z + X+1/2,Y+1/2,Z+1/2 + -X+1/2,Y,1/2-Z +1006 2 2 P11m PGmC MONOCLINIC 'P 1 1 m' + X,Y,Z + X,Y,-Z +1007 2 2 P11b PGmC MONOCLINIC 'P 1 1 b' + X,Y,Z + X,1/2+Y,-Z +1008 4 2 B11m PGmC MONOCLINIC 'B 1 1 m' + X,Y,Z + X,Y,-Z + 1/2+X,Y,1/2+Z + 1/2+X,Y,1/2-Z +1009 4 2 B11b PGmC MONOCLINIC 'B 1 1 b' + X,Y,Z + X,1/2+Y,-Z + 1/2+X,Y,1/2+Z + 1/2+X,1/2+Y,1/2-Z +1010 4 4 P112/m PG2/mC MONOCLINIC 'P 1 1 2/m' + X,Y,Z + X,Y,-Z + -X,-Y,Z + -X,-Y,-Z +1011 4 4 P1121/m PG2/mC MONOCLINIC 'P 1 1 21/m' + X,Y,Z + -X,-Y,1/2+Z + -X,-Y,-Z + X,Y,1/2-Z +1012 8 4 B112/m PG2/mC MONOCLINIC 'B 1 1 2/m' + X,Y,Z + X,Y,-Z + -X,-Y,Z + -X,-Y,-Z + 1/2+X,Y,1/2+Z + 1/2+X,Y,1/2-Z + 1/2-X,-Y,1/2+Z + 1/2-X,-Y,1/2-Z +1013 4 4 P112/b PG2/mC MONOCLINIC 'P 1 1 2/b' + X,Y,Z + -X,1/2-Y,Z + -X,-Y,-Z + X,1/2+Y,-Z +1014 4 4 P1121/b PG2/mC MONOCLINIC 'P 1 1 21/b' + X,Y,Z + -X,-Y,-Z + -X,1/2-Y,1/2+Z + X,1/2+Y,1/2-Z +2014 4 4 P121/n1 PG2/m MONOCLINIC 'P 1 21/n 1' + X,Y,Z + -X+1/2,Y+1/2,-Z+1/2 + -X,-Y,-Z + X+1/2,-Y+1/2,Z+1/2 +3014 4 4 P121/a1 PG2/m MONOCLINIC 'P 1 21/a 1' + X,Y,Z + -X+1/2,Y+1/2,-Z + -X,-Y,-Z + X+1/2,-Y+1/2,Z +1015 8 4 B112/b PG2/mC MONOCLINIC 'B 1 1 2/b' + X,Y,Z + -X,1/2-Y,Z + -X,-Y,-Z + X,1/2+Y,-Z + 1/2+X,Y,1/2+Z + 1/2-X,1/2-Y,1/2+Z + 1/2-X,-Y,1/2-Z + 1/2+X,1/2+Y,1/2-Z +1017 4 4 P2122 PG222 ORTHORHOMBIC 'P 21 2 2' !(unique axis a) + X,Y,Z + -X,Y,-Z + 1/2+X,-Y,-Z + 1/2-X,-Y,Z +2017 4 4 P2212 PG222 ORTHORHOMBIC 'P 2 21 2' !(unique axis b) + X,Y,Z + X,1/2-Y,-Z + -X,1/2+Y,-Z + -X,-Y,Z +1018 4 4 P21212a PG222 ORTHORHOMBIC 'P 21 21 2 (a)' ! origin on 21 21, shift (1/4,1/4,0) + X,Y,Z + 1/2-X,1/2-Y,Z + X+1/2,-Y,-Z + -X,Y+1/2,-Z +2018 4 4 P21221 PG222 ORTHORHOMBIC 'P 21 2 21' !(unique axis b) + X,Y,Z + -X,Y,-Z + 1/2+X,-Y,1/2-Z + 1/2-X,-Y,1/2+Z +3018 4 4 P22121 PG222 ORTHORHOMBIC 'P 2 21 21' !(unique axis a) + X,Y,Z + X,-Y,-Z + -X,1/2+Y,1/2-Z + -X,1/2-Y,1/2+Z +1020 8 4 C2221a PG222 ORTHORHOMBIC 'C 2 2 21a)' ! P212121 with C centring, shift(1/4,0,0) + X,Y,Z + 1/2-X,-Y,1/2+Z + 1/2+X,1/2-Y,-Z + -X,1/2+Y,1/2-Z + 1/2+X,1/2+Y,Z + -X,1/2-Y,1/2+Z + X,-Y,-Z + 1/2-X,Y,1/2-Z +1021 8 4 C222a PG222 ORTHORHOMBIC 'C 2 2 2a' ! C21212a origin on 21 21 + X,Y,Z + 1/2-X,1/2-Y,Z + X+1/2,-Y,-Z + -X,Y+1/2,-Z + 1/2+ X,1/2+Y,Z + -X,-Y,Z + X,1/2-Y,-Z + 1/2-X,Y,-Z +1022 16 4 F222a PG222 ORTHORHOMBIC 'F 2 2 2a' ! same as 1018 with face centring shift (1/4,0,0) + X,Y,Z + 1/2-X,1/2-Y,Z + X+1/2,-Y,-Z + -X,Y+1/2,-Z + X,Y+1/2,Z+1/2 + 1/2-X,-Y,Z+1/2 + X+1/2,-Y+1/2,-Z+1/2 + -X,Y,-Z+1/2 + X+1/2,Y,Z+1/2 + -X,1/2-Y,Z+1/2 + X,-Y,-Z+1/2 + -X+1/2,Y+1/2,-Z+1/2 + X+1/2,Y+1/2,Z + -X,-Y,Z + X,-Y+1/2,-Z + -X+1/2,Y,-Z +1023 8 4 I222a PG222 ORTHORHOMBIC 'I 2 2 2a' ! as 1018 with origin shift (1/4,1/4,1/4) + X,Y,Z + 1/2-X,1/2-Y,Z + X+1/2,-Y,-Z + -X,Y+1/2,-Z + 1/2+X,1/2+Y,1/2+Z + -X,-Y,1/2+Z + 1/2-X,Y,1/2-Z + X,1/2-Y,1/2-Z +1059 8 8 Pmmn2 PGmmm ORTHORHOMBIC 'P 21/m 21/m 2/n a' + X,Y,Z + 1/2-X,1/2-Y,Z + -X,1/2+Y,-Z + 1/2+X,-Y,-Z + -X,-Y,-Z + X+1/2,Y+1/2,-Z + X,1/2-Y,Z + 1/2-X,Y,Z +1094 8 8 P42212a PG422 TETRAGONAL 'P 42 21 2a' ! (as P21212a) origin on 21 21 ie Shift 1/4,1/4,1/4 + X,Y,Z + 1/2-X,1/2-Y,Z + -Y,X+1/2,1/2+Z + Y+1/2,-X,1/2+Z + -X,Y+1/2,-Z + X+1/2,-Y,-Z + Y,X,1/2-Z + 1/2-Y,1/2-X,1/2-Z +1197 24 12 I23a PG23 CUBIC 'I 2 3a' ! Expansion of 1023 which is an expansion of 1018 + X,Y,Z + 1/2-X,1/2-Y,Z + X+1/2,-Y,-Z + -X,Y+1/2,-Z + Y,Z,X + 1/2-Y,1/2-Z,X + Y+1/2,-Z,-X + -Y,Z+1/2,-X + Z,X,Y + 1/2-Z,1/2-X,Y + Z+1/2,-X,-Y + -Z,X+1/2,-Y + 1/2+X,1/2+Y,1/2+Z + -X,-Y,1/2+Z + X,1/2-Y,1/2-Z + 1/2-X,Y,1/2-Z + 1/2+Y,1/2+Z,1/2+X + -Y,-Z,1/2+X + Y,1/2-Z,1/2-X + 1/2-Y,Z,1/2-X + 1/2+Z,1/2+X,1/2+Y + -Z,-X,1/2+Y + Z,1/2-X,1/2-Y + 1/2-Z,X,1/2-Y diff --git a/docs/SOFTWARE.md b/docs/SOFTWARE.md index 3f783c2d..8e642cfe 100644 --- a/docs/SOFTWARE.md +++ b/docs/SOFTWARE.md @@ -47,7 +47,8 @@ Directly included in the repository: * Cpp-http library for HTTP - see [github.com/yhirose/cpp-httplib](https://github.com/yhirose/cpp-httplib) * Base64 decoder/encoder - see [gist.github.com/tomykaira](https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594) * GEMMI library by Global Phasing - see [github.com/project-gemmi/gemmi](https://github.com/project-gemmi/gemmi) - +* CCP4c library 8.0.0 by CCP4 - see [ccp4.ac.uk](https://www.ccp4.ac.uk/) + For license check LICENSE file in respective directory diff --git a/image_analysis/scale_merge/CMakeLists.txt b/image_analysis/scale_merge/CMakeLists.txt index 62aefd28..1850ba53 100644 --- a/image_analysis/scale_merge/CMakeLists.txt +++ b/image_analysis/scale_merge/CMakeLists.txt @@ -1,2 +1,2 @@ -ADD_LIBRARY(JFJochScaleMerge ScaleAndMerge.cpp ScaleAndMerge.h FrenchWilson.cpp FrenchWilson.h) -TARGET_LINK_LIBRARIES(JFJochScaleMerge Ceres::ceres Eigen3::Eigen JFJochCommon) \ No newline at end of file +ADD_LIBRARY(JFJochScaleMerge ScaleAndMerge.cpp ScaleAndMerge.h FrenchWilson.cpp FrenchWilson.h MtzWriter.h MtzWriter.cpp) +TARGET_LINK_LIBRARIES(JFJochScaleMerge Ceres::ceres Eigen3::Eigen JFJochCommon ccp4c) \ No newline at end of file diff --git a/image_analysis/scale_merge/MtzWriter.cpp b/image_analysis/scale_merge/MtzWriter.cpp new file mode 100644 index 00000000..c1c7ad9f --- /dev/null +++ b/image_analysis/scale_merge/MtzWriter.cpp @@ -0,0 +1,234 @@ +// SPDX-FileCopyrightText: 2025 Paul Scherrer Institute +// SPDX-License-Identifier: GPL-3.0-only + +#include "MtzWriter.h" + +#include +#include +#include +#include + +// CCP4 C library — lives inside the CMtz namespace when included from C++ +#include "../../ccp4c/ccp4/cmtzlib.h" +#include "../../ccp4c/ccp4/csymlib.h" +#include "../../ccp4c/ccp4/mtzdata.h" + +MtzWriteOptions::MtzWriteOptions(const DiffractionExperiment& experiment, + const std::optional& cell_override) { + // Unit cell: prefer explicit override, then experiment setting, else default + if (cell_override.has_value()) { + cell = cell_override.value(); + } else if (experiment.GetUnitCell().has_value()) { + cell = experiment.GetUnitCell().value(); + } + + // Space group + auto sg = experiment.GetGemmiSpaceGroup(); + if (sg) { + spacegroup_number = sg->ccp4; + spacegroup_name = sg->xhm(); + } + + // Wavelength + wavelength = experiment.GetWavelength_A(); + + // Sample name → crystal name + auto sample = experiment.GetSampleName(); + if (!sample.empty()) + crystal_name = sample; + + // File prefix → project name + auto prefix = experiment.GetFilePrefix(); + if (!prefix.empty()) + project_name = prefix; +} + +namespace { + +/// Helper: create a fresh in-memory MTZ structure, set up symmetry, +/// crystal, dataset, and the requested columns. +/// Returns {mtz, columns} or throws on failure. +struct MtzSetup { + CMtz::MTZ* mtz = nullptr; + std::vector cols; +}; + +MtzSetup CreateMtzSkeleton(const MtzWriteOptions& opts, + const char labels[][31], + const char types[][3], + int ncol) { + using namespace CMtz; + + // Allocate empty MTZ (0 crystals initially) + int nset_zero = 0; + MTZ* mtz = MtzMalloc(0, &nset_zero); + if (!mtz) + throw std::runtime_error("MtzMalloc failed"); + + mtz->refs_in_memory = 1; // we build everything in memory, then write + + // Title + ccp4_lwtitl(mtz, opts.title.c_str(), 0); + + // Symmetry: use CCP4 spacegroup lookup + CCP4SPG* spg = ccp4spg_load_by_ccp4_num(opts.spacegroup_number); + if (!spg) { + // Fallback to P1 + spg = ccp4spg_load_by_ccp4_num(1); + } + + if (spg) { + const int nsym = spg->nsymop; + const int nsymp = spg->nsymop_prim; + float rsymx[192][4][4]; + std::memset(rsymx, 0, sizeof(rsymx)); + + for (int i = 0; i < nsym && i < 192; ++i) { + for (int r = 0; r < 3; ++r) { + for (int c = 0; c < 3; ++c) + rsymx[i][r][c] = static_cast(spg->symop[i].rot[r][c]); + rsymx[i][r][3] = static_cast(spg->symop[i].trn[r]); + } + rsymx[i][3][3] = 1.0f; + } + + char ltypex[2] = {spg->symbol_old[0], '\0'}; + char spgrnx[MAXSPGNAMELENGTH + 1]; + std::strncpy(spgrnx, spg->symbol_xHM, MAXSPGNAMELENGTH); + spgrnx[MAXSPGNAMELENGTH] = '\0'; + char pgnamx[MAXPGNAMELENGTH + 1]; + std::strncpy(pgnamx, spg->pgname, MAXPGNAMELENGTH); + pgnamx[MAXPGNAMELENGTH] = '\0'; + + ccp4_lwsymm(mtz, nsym, nsymp, rsymx, + ltypex, spg->spg_ccp4_num, spgrnx, pgnamx); + + ccp4spg_free(&spg); + } + + // Crystal + dataset + float cell[6] = { + static_cast(opts.cell.a), + static_cast(opts.cell.b), + static_cast(opts.cell.c), + static_cast(opts.cell.alpha), + static_cast(opts.cell.beta), + static_cast(opts.cell.gamma) + }; + + MTZXTAL* xtal = MtzAddXtal(mtz, + opts.crystal_name.c_str(), + opts.project_name.c_str(), + cell); + if (!xtal) { + MtzFree(mtz); + throw std::runtime_error("MtzAddXtal failed"); + } + + MTZSET* set = MtzAddDataset(mtz, xtal, + opts.dataset_name.c_str(), + opts.wavelength); + if (!set) { + MtzFree(mtz); + throw std::runtime_error("MtzAddDataset failed"); + } + + // Add columns + MtzSetup result; + result.mtz = mtz; + result.cols.resize(ncol, nullptr); + + for (int i = 0; i < ncol; ++i) { + result.cols[i] = MtzAddColumn(mtz, set, labels[i], types[i]); + if (!result.cols[i]) { + MtzFree(mtz); + throw std::runtime_error(std::string("MtzAddColumn failed for ") + labels[i]); + } + } + + return result; +} + +} // namespace + +bool WriteMtzIntensities(const std::string& filename, + const std::vector& merged, + const MtzWriteOptions& opts) { + using namespace CMtz; + + if (merged.empty()) + return false; + + constexpr int NCOL = 5; + const char labels[NCOL][31] = {"H", "K", "L", "IMEAN", "SIGIMEAN"}; + const char types[NCOL][3] = {"H", "H", "H", "J", "Q"}; + + MtzSetup setup; + try { + setup = CreateMtzSkeleton(opts, labels, types, NCOL); + } catch (...) { + return false; + } + + // Write reflections (1-indexed) + const int nref = static_cast(merged.size()); + for (int i = 0; i < nref; ++i) { + float adata[NCOL]; + adata[0] = static_cast(merged[i].h); + adata[1] = static_cast(merged[i].k); + adata[2] = static_cast(merged[i].l); + adata[3] = static_cast(merged[i].I); + adata[4] = std::isfinite(static_cast(merged[i].sigma)) + ? static_cast(merged[i].sigma) + : 0.0f; + + ccp4_lwrefl(setup.mtz, adata, setup.cols.data(), NCOL, i + 1); + } + + // Write to disk + setup.mtz->nref = nref; + int ok = MtzPut(setup.mtz, filename.c_str()); + MtzFree(setup.mtz); + return ok != 0; +} + +bool WriteMtzAmplitudes(const std::string& filename, + const std::vector& fw, + const MtzWriteOptions& opts) { + using namespace CMtz; + + if (fw.empty()) + return false; + + constexpr int NCOL = 7; + const char labels[NCOL][31] = {"H", "K", "L", "FP", "SIGFP", "IMEAN", "SIGIMEAN"}; + const char types[NCOL][3] = {"H", "H", "H", "F", "Q", "J", "Q"}; + + MtzSetup setup; + try { + setup = CreateMtzSkeleton(opts, labels, types, NCOL); + } catch (...) { + return false; + } + + const int nref = static_cast(fw.size()); + for (int i = 0; i < nref; ++i) { + float adata[NCOL]; + adata[0] = static_cast(fw[i].h); + adata[1] = static_cast(fw[i].k); + adata[2] = static_cast(fw[i].l); + adata[3] = static_cast(fw[i].F); + adata[4] = static_cast(fw[i].sigmaF); + adata[5] = static_cast(fw[i].I); + adata[6] = std::isfinite(static_cast(fw[i].sigmaI)) + ? static_cast(fw[i].sigmaI) + : 0.0f; + + ccp4_lwrefl(setup.mtz, adata, setup.cols.data(), NCOL, i + 1); + } + + setup.mtz->nref = nref; + int ok = MtzPut(setup.mtz, filename.c_str()); + MtzFree(setup.mtz); + return ok != 0; +} \ No newline at end of file diff --git a/image_analysis/scale_merge/MtzWriter.h b/image_analysis/scale_merge/MtzWriter.h new file mode 100644 index 00000000..fa6fe3b8 --- /dev/null +++ b/image_analysis/scale_merge/MtzWriter.h @@ -0,0 +1,57 @@ +// SPDX-FileCopyrightText: 2025 Paul Scherrer Institute +// SPDX-License-Identifier: GPL-3.0-only + +#pragma once + +#include +#include + +#include "ScaleAndMerge.h" +#include "FrenchWilson.h" +#include "../../common/UnitCell.h" +#include "../../common/DiffractionExperiment.h" + +/// Options controlling what goes into the MTZ file +struct MtzWriteOptions { + /// Unit cell parameters (required for a valid MTZ) + UnitCell cell = {50.0, 50.0, 50.0, 90.0, 90.0, 90.0}; + + /// Space group number (1 = P1 if unknown) + int spacegroup_number = 1; + + /// Space group name (e.g. "P 21 21 21") + std::string spacegroup_name = "P 1"; + + /// Dataset metadata + std::string project_name = "JFJoch"; + std::string crystal_name = "crystal"; + std::string dataset_name = "dataset"; + + /// Wavelength in Angstroms + float wavelength = 1.0f; + + /// Title line + std::string title = "JFJoch scaled data"; + + /// Construct default options + MtzWriteOptions() = default; + + /// Construct from a DiffractionExperiment, optionally overriding the + /// unit cell (e.g. with the lattice found by the rotation indexer). + explicit MtzWriteOptions(const DiffractionExperiment& experiment, + const std::optional& cell_override = std::nullopt); +}; + +/// Write merged intensities (ScaleMergeResult) to an MTZ file. +/// Columns: H K L IMEAN SIGIMEAN +/// Returns true on success. +bool WriteMtzIntensities(const std::string& filename, + const std::vector& merged, + const MtzWriteOptions& opts); + +/// Write French-Wilson amplitudes to an MTZ file. +/// Columns: H K L FP SIGFP IMEAN SIGIMEAN +/// Returns true on success. +bool WriteMtzAmplitudes(const std::string& filename, + const std::vector& fw, + const MtzWriteOptions& opts); \ No newline at end of file diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 1f5fdf78..8325acc7 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -25,6 +25,7 @@ #include "../receiver/JFJochReceiverPlots.h" #include "../compression/JFJochCompressor.h" #include "../image_analysis/scale_merge/FrenchWilson.h" +#include "../image_analysis/scale_merge/MtzWriter.h" void print_usage(Logger &logger) { logger.Info("Usage ./jfjoch_analysis {} "); @@ -426,10 +427,9 @@ int main(int argc, char **argv) { } } - // --- French-Wilson: convert I → F --- { FrenchWilsonOptions fw_opts; - fw_opts.acentric = true; // typical for MX + fw_opts.acentric = true; fw_opts.num_shells = 20; auto fw = FrenchWilson(scale_result->merged, fw_opts); @@ -448,6 +448,30 @@ int main(int argc, char **argv) { fw_file.close(); logger.Info("French-Wilson: wrote {} amplitudes to {}", fw.size(), fw_path); } + + // --- Write MTZ files --- + MtzWriteOptions mtz_opts(experiment, + rotation_indexer_ret.has_value() + ? std::optional(rotation_indexer_ret->lattice.GetUnitCell()) + : std::nullopt); + + // Intensities MTZ + { + const std::string mtz_i_path = output_prefix + "_scaled.mtz"; + if (WriteMtzIntensities(mtz_i_path, scale_result->merged, mtz_opts)) + logger.Info("Wrote {} reflections to {}", scale_result->merged.size(), mtz_i_path); + else + logger.Error("Failed to write {}", mtz_i_path); + } + + // Amplitudes MTZ (French-Wilson) + { + const std::string mtz_f_path = output_prefix + "_amplitudes.mtz"; + if (WriteMtzAmplitudes(mtz_f_path, fw, mtz_opts)) + logger.Info("Wrote {} reflections to {}", fw.size(), mtz_f_path); + else + logger.Error("Failed to write {}", mtz_f_path); + } } } else { logger.Warning("Scaling skipped — too few reflections accumulated (need >= 20)"); -- 2.52.0 From f49cb3a6f002b748dd75ef6c689134dc98cff12c Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Mon, 9 Feb 2026 10:08:39 +0100 Subject: [PATCH 31/81] Revert "CCP4: Add library to save MTZs" This reverts commit d4d1f6cd9c419fa8beeef79b26c1a9db0be1bf0d. --- CMakeLists.txt | 1 - ccp4c/CMakeLists.txt | 57 - ccp4c/COPYING | 685 - ccp4c/COPYING.LESSER | 165 - ccp4c/ccp4/ccp4_array.c | 155 - ccp4c/ccp4/ccp4_array.h | 251 - ccp4c/ccp4/ccp4_errno.h | 166 - ccp4c/ccp4/ccp4_file_err.h | 38 - ccp4c/ccp4/ccp4_fortran.h | 393 - ccp4c/ccp4/ccp4_general.c | 1436 -- ccp4c/ccp4/ccp4_general.h | 124 - ccp4c/ccp4/ccp4_parser.c | 1738 --- ccp4c/ccp4/ccp4_parser.h | 308 - ccp4c/ccp4/ccp4_program.c | 353 - ccp4c/ccp4/ccp4_program.h | 171 - ccp4c/ccp4/ccp4_spg.h | 96 - ccp4c/ccp4/ccp4_sysdep.h | 273 - ccp4c/ccp4/ccp4_types.h | 74 - ccp4c/ccp4/ccp4_unitcell.c | 328 - ccp4c/ccp4/ccp4_unitcell.h | 119 - ccp4c/ccp4/ccp4_utils.h | 112 - ccp4c/ccp4/ccp4_vars.h | 46 - ccp4c/ccp4/cmap_accessor.c | 261 - ccp4c/ccp4/cmap_close.c | 80 - ccp4c/ccp4/cmap_data.c | 476 - ccp4c/ccp4/cmap_data.h | 32 - ccp4c/ccp4/cmap_errno.h | 52 - ccp4c/ccp4/cmap_header.c | 182 - ccp4c/ccp4/cmap_header.h | 34 - ccp4c/ccp4/cmap_labels.c | 179 - ccp4c/ccp4/cmap_labels.h | 34 - ccp4c/ccp4/cmap_open.c | 117 - ccp4c/ccp4/cmap_skew.c | 104 - ccp4c/ccp4/cmap_skew.h | 32 - ccp4c/ccp4/cmap_stats.c | 53 - ccp4c/ccp4/cmap_stats.h | 33 - ccp4c/ccp4/cmap_symop.c | 141 - ccp4c/ccp4/cmaplib.h | 241 - ccp4c/ccp4/cmaplib_f.h | 34 - ccp4c/ccp4/cmtzlib.c | 3964 ------ ccp4c/ccp4/cmtzlib.h | 1054 -- ccp4c/ccp4/csymlib.c | 2086 --- ccp4c/ccp4/csymlib.h | 645 - ccp4c/ccp4/cvecmat.c | 162 - ccp4c/ccp4/cvecmat.h | 39 - ccp4c/ccp4/library_err.c | 324 - ccp4c/ccp4/library_file.c | 2375 ---- ccp4c/ccp4/library_file.h | 167 - ccp4c/ccp4/library_utils.c | 674 - ccp4c/ccp4/mtzdata.h | 199 - ccp4c/ccp4/overview.h | 88 - ccp4c/ccp4/pack_c.c | 1521 -- ccp4c/ccp4/pack_c.h | 129 - ccp4c/ccp4/vmslibrary.c | 99 - ccp4c/ccp4/w32mvs.c | 265 - ccp4c/ccp4/w32mvs.h | 200 - ccp4c/data/README | 39 - ccp4c/data/atomsf.lib | 1121 -- ccp4c/data/atomsf_electron.lib | 514 - ccp4c/data/atomsf_neutron.lib | 1002 -- ccp4c/data/font84.ascii | 5160 ------- ccp4c/data/fontpack.f | 16 - ccp4c/data/fontunpack.for | 23 - ccp4c/data/syminfo.lib | 14552 -------------------- ccp4c/data/symop.lib | 4920 ------- docs/SOFTWARE.md | 3 +- image_analysis/scale_merge/CMakeLists.txt | 4 +- image_analysis/scale_merge/MtzWriter.cpp | 234 - image_analysis/scale_merge/MtzWriter.h | 57 - tools/jfjoch_process.cpp | 28 +- 70 files changed, 5 insertions(+), 50833 deletions(-) delete mode 100644 ccp4c/CMakeLists.txt delete mode 100644 ccp4c/COPYING delete mode 100644 ccp4c/COPYING.LESSER delete mode 100644 ccp4c/ccp4/ccp4_array.c delete mode 100644 ccp4c/ccp4/ccp4_array.h delete mode 100644 ccp4c/ccp4/ccp4_errno.h delete mode 100644 ccp4c/ccp4/ccp4_file_err.h delete mode 100644 ccp4c/ccp4/ccp4_fortran.h delete mode 100644 ccp4c/ccp4/ccp4_general.c delete mode 100644 ccp4c/ccp4/ccp4_general.h delete mode 100644 ccp4c/ccp4/ccp4_parser.c delete mode 100644 ccp4c/ccp4/ccp4_parser.h delete mode 100644 ccp4c/ccp4/ccp4_program.c delete mode 100644 ccp4c/ccp4/ccp4_program.h delete mode 100644 ccp4c/ccp4/ccp4_spg.h delete mode 100644 ccp4c/ccp4/ccp4_sysdep.h delete mode 100644 ccp4c/ccp4/ccp4_types.h delete mode 100644 ccp4c/ccp4/ccp4_unitcell.c delete mode 100644 ccp4c/ccp4/ccp4_unitcell.h delete mode 100644 ccp4c/ccp4/ccp4_utils.h delete mode 100644 ccp4c/ccp4/ccp4_vars.h delete mode 100644 ccp4c/ccp4/cmap_accessor.c delete mode 100644 ccp4c/ccp4/cmap_close.c delete mode 100644 ccp4c/ccp4/cmap_data.c delete mode 100644 ccp4c/ccp4/cmap_data.h delete mode 100644 ccp4c/ccp4/cmap_errno.h delete mode 100644 ccp4c/ccp4/cmap_header.c delete mode 100644 ccp4c/ccp4/cmap_header.h delete mode 100644 ccp4c/ccp4/cmap_labels.c delete mode 100644 ccp4c/ccp4/cmap_labels.h delete mode 100644 ccp4c/ccp4/cmap_open.c delete mode 100644 ccp4c/ccp4/cmap_skew.c delete mode 100644 ccp4c/ccp4/cmap_skew.h delete mode 100644 ccp4c/ccp4/cmap_stats.c delete mode 100644 ccp4c/ccp4/cmap_stats.h delete mode 100644 ccp4c/ccp4/cmap_symop.c delete mode 100644 ccp4c/ccp4/cmaplib.h delete mode 100644 ccp4c/ccp4/cmaplib_f.h delete mode 100644 ccp4c/ccp4/cmtzlib.c delete mode 100644 ccp4c/ccp4/cmtzlib.h delete mode 100644 ccp4c/ccp4/csymlib.c delete mode 100644 ccp4c/ccp4/csymlib.h delete mode 100644 ccp4c/ccp4/cvecmat.c delete mode 100644 ccp4c/ccp4/cvecmat.h delete mode 100644 ccp4c/ccp4/library_err.c delete mode 100644 ccp4c/ccp4/library_file.c delete mode 100644 ccp4c/ccp4/library_file.h delete mode 100644 ccp4c/ccp4/library_utils.c delete mode 100644 ccp4c/ccp4/mtzdata.h delete mode 100644 ccp4c/ccp4/overview.h delete mode 100644 ccp4c/ccp4/pack_c.c delete mode 100644 ccp4c/ccp4/pack_c.h delete mode 100644 ccp4c/ccp4/vmslibrary.c delete mode 100644 ccp4c/ccp4/w32mvs.c delete mode 100644 ccp4c/ccp4/w32mvs.h delete mode 100644 ccp4c/data/README delete mode 100644 ccp4c/data/atomsf.lib delete mode 100644 ccp4c/data/atomsf_electron.lib delete mode 100644 ccp4c/data/atomsf_neutron.lib delete mode 100644 ccp4c/data/font84.ascii delete mode 100644 ccp4c/data/fontpack.f delete mode 100644 ccp4c/data/fontunpack.for delete mode 100644 ccp4c/data/syminfo.lib delete mode 100644 ccp4c/data/symop.lib delete mode 100644 image_analysis/scale_merge/MtzWriter.cpp delete mode 100644 image_analysis/scale_merge/MtzWriter.h diff --git a/CMakeLists.txt b/CMakeLists.txt index ddd8b33d..fb4eeb75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,7 +138,6 @@ ADD_SUBDIRECTORY(detector_control) ADD_SUBDIRECTORY(image_puller) ADD_SUBDIRECTORY(preview) ADD_SUBDIRECTORY(symmetry) -ADD_SUBDIRECTORY(ccp4c) IF (JFJOCH_WRITER_ONLY) MESSAGE(STATUS "Compiling HDF5 writer only") diff --git a/ccp4c/CMakeLists.txt b/ccp4c/CMakeLists.txt deleted file mode 100644 index 917ae9df..00000000 --- a/ccp4c/CMakeLists.txt +++ /dev/null @@ -1,57 +0,0 @@ -set(ccp4c_SOURCES - ccp4/ccp4_array.c - ccp4/cmap_data.c - ccp4/cmtzlib.c - ccp4/ccp4_general.c - ccp4/cmap_header.c - ccp4/csymlib.c - ccp4/ccp4_parser.c - ccp4/cmap_labels.c - ccp4/cvecmat.c - ccp4/ccp4_program.c - ccp4/cmap_open.c - ccp4/library_err.c - ccp4/ccp4_unitcell.c - ccp4/cmap_skew.c - ccp4/library_file.c - ccp4/cmap_accessor.c - ccp4/cmap_stats.c - ccp4/library_utils.c - ccp4/cmap_close.c - ccp4/cmap_symop.c - ccp4/pack_c.c -) - -set(ccp4c_HEADERS - ccp4/ccp4_file_err.h - ccp4/ccp4_program.h - ccp4/ccp4_unitcell.h - ccp4/cmap_errno.h - ccp4/cmap_stats.h - ccp4/csymlib.h - ccp4/library_file.h - ccp4/w32mvs.h - ccp4/ccp4_fortran.h - ccp4/ccp4_spg.h - ccp4/ccp4_utils.h - ccp4/cmap_header.h - ccp4/cmaplib.h - ccp4/cvecmat.h - ccp4/mtzdata.h - ccp4/ccp4_array.h - ccp4/ccp4_general.h - ccp4/ccp4_vars.h - ccp4/cmap_labels.h - ccp4/cmaplib_f.h - ccp4/overview.h - ccp4/ccp4_errno.h - ccp4/ccp4_parser.h - ccp4/ccp4_types.h - ccp4/cmap_data.h - ccp4/cmap_skew.h - ccp4/cmtzlib.h - ccp4/pack_c.h - ccp4/ccp4_sysdep.h -) - -ADD_LIBRARY(ccp4c STATIC ${ccp4c_SOURCES} ${ccp4c_HEADERS}) \ No newline at end of file diff --git a/ccp4c/COPYING b/ccp4c/COPYING deleted file mode 100644 index 14c5b73a..00000000 --- a/ccp4c/COPYING +++ /dev/null @@ -1,685 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - -Section 15 has been amended in accordance with Section 7a) above to -address the requirements of UK law. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - -Section 16 has been replaced in accordance with Section 7a) above to -address the requirements of UK law. - - THE LICENSOR OR ANY THIRD PARTIES FROM WHOM IT HAS LICENSED ANY CODE -WILL NOT BE LIABLE FOR: ANY LOSS OF PROFITS, LOSS OF REVENUE, LOSS OR -CORRUPTION OF DATA, LOSS OF CONTRACTS OR OPPORTUNITY, LOSS OF SAVINGS -OR THIRD PARTY CLAIMS (IN EACH CASE WHETHER DIRECT OR INDIRECT), ANY -DIRECT OR INDIRECT LOSS OR DAMAGE ARISING OUT OF OR IN CONNECTION WITH -THE PROGRAM, IN EACH CASE, WHETHER THAT LOSS ARISES AS A RESULT OF -LICENSOR"S NEGLIGENCE, OR IN ANY OTHER WAY, EVEN IF LICENSOR HAS BEEN -ADVISED OF THE POSSIBILITY OF THAT LOSS ARISING, OR IF IT WAS WITHIN -LICENSOR'S CONTEMPLATION. - -NONE OF THESE PROVISION LIMITS OR EXCLUDES THE LICENSOR"S LIABILITY -FOR DEATH OR PERSONAL INJURY CAUSED BY ITS NEGLIGENCE OR FOR ANY -FRAUD, OR FOR ANY SORT OF LIABILITY THAT, BY LAW, CANNOT BE LIMITED OR -EXCLUDED - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/ccp4c/COPYING.LESSER b/ccp4c/COPYING.LESSER deleted file mode 100644 index fc8a5de7..00000000 --- a/ccp4c/COPYING.LESSER +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/ccp4c/ccp4/ccp4_array.c b/ccp4c/ccp4/ccp4_array.c deleted file mode 100644 index d088c0ce..00000000 --- a/ccp4c/ccp4/ccp4_array.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - ccp4_array.c: implementation file for resizable array implementation. - Copyright (C) 2002 Kevin Cowtan - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_array.c - * implementation file for resizable array implementation. - * Kevin Cowtan - */ - -#include "ccp4_array.h" -/* rcsid[] = "$Id$" */ - -ccp4_ptr ccp4array_new_(ccp4_ptr *p) -{ - ccp4array_base *v; - v = (ccp4array_base *)malloc(sizeof(ccp4array_base)); - v->size = v->capacity = 0; - *p = (ccp4_ptr *)((ccp4_byteptr)(v)+sizeof(ccp4array_base)); - return *p; -} - -ccp4_ptr ccp4array_new_size_(ccp4_ptr *p, const int size, const size_t reclen) -{ - ccp4array_base *v; - int capacity = (size * 12) / 10 + 2; - v = (ccp4array_base *)malloc(sizeof(ccp4array_base) + capacity * reclen); - v->size = size; - v->capacity = capacity; - *p = (ccp4_ptr *)((ccp4_byteptr)(v)+sizeof(ccp4array_base)); - return *p; -} - -void ccp4array_resize_(ccp4_ptr *p, const int size, const size_t reclen) -{ - ccp4array_base *v; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - if (size > v->capacity) { - v->capacity = (size * 12) / 10 + 2; - v = (ccp4array_base *)realloc(v, sizeof(ccp4array_base) + v->capacity * reclen); - *p = (ccp4_ptr *)((ccp4_byteptr)(v)+sizeof(ccp4array_base)); - } - v->size = size; -} - -void ccp4array_reserve_(ccp4_ptr *p, const int size, const size_t reclen) -{ - ccp4array_base *v; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - v->capacity = size; - if ( v->size > size ) v->size = size; - v = (ccp4array_base *)realloc(v, sizeof(ccp4array_base) + v->capacity * reclen); - *p = (ccp4_ptr *)((ccp4_byteptr)(v)+sizeof(ccp4array_base)); -} - -void ccp4array_append_(ccp4_ptr *p, ccp4_constptr data, const size_t reclen) -{ - ccp4array_base *v; - int osize; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - osize = v->size; - ccp4array_resize_(p, osize+1, reclen); - memcpy((ccp4_byteptr)(*p)+osize*reclen, data, reclen); -} - -void ccp4array_append_n_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen) -{ - ccp4array_base *v; - ccp4_byteptr newdata; - int osize, i; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - osize = v->size; - ccp4array_resize_(p, osize+n, reclen); - newdata = (ccp4_byteptr)(*p)+osize*reclen; - for ( i = 0; i < n; i++ ) { - memcpy(newdata, data, reclen); - newdata += reclen; - } -} - -void ccp4array_append_list_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen) -{ - ccp4array_base *v; - int osize; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - osize = v->size; - ccp4array_resize_(p, osize+n, reclen); - memcpy((ccp4_byteptr)(*p)+osize*reclen, data, n * reclen); -} - -void ccp4array_insert_(ccp4_ptr *p, const int i, ccp4_constptr data, const size_t reclen) -{ - ccp4array_base *v; - int osize; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - osize = v->size; - ccp4array_resize_(p, osize+1, reclen); - memmove((ccp4_byteptr)(*p)+(i+1)*reclen, (ccp4_byteptr)(*p)+i*reclen, (osize-i)*reclen); - memcpy((ccp4_byteptr)(*p)+i*reclen, data, reclen); -} - -void ccp4array_delete_ordered_(ccp4_ptr *p, const int i, const size_t reclen) -{ - ccp4array_base *v; - int nsize; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - nsize = v->size - 1; - memmove((ccp4_byteptr)(*p)+i*reclen, (ccp4_byteptr)(*p)+(i+1)*reclen, (nsize-i)*reclen); - v->size--; /* ccp4array_resize_(p, nsize, reclen); */ -} - -void ccp4array_delete_(ccp4_ptr *p, const int i, const size_t reclen) -{ - ccp4array_base *v; - int nsize; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - nsize = v->size - 1; - memcpy((ccp4_byteptr)(*p)+i*reclen, (ccp4_byteptr)(*p)+nsize*reclen, reclen); - v->size--; /* ccp4array_resize_(p, size, reclen); */ -} - -void ccp4array_delete_last_(ccp4_ptr *p, const size_t reclen) -{ - ccp4array_base *v; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - v->size--; /* ccp4array_resize_(p, v->size-1, reclen); */ -} - -int ccp4array_size_(ccp4_constptr *p) -{ - ccp4array_base *v; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - return v->size; -} - -void ccp4array_free_(ccp4_ptr *p) -{ - ccp4array_base *v; - v = (ccp4array_base *)((ccp4_byteptr)(*p)-sizeof(ccp4array_base)); - free(v); -} diff --git a/ccp4c/ccp4/ccp4_array.h b/ccp4c/ccp4/ccp4_array.h deleted file mode 100644 index 64147b63..00000000 --- a/ccp4c/ccp4/ccp4_array.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - ccp4_array.h: header file for resizable array implementation. - Copyright (C) 2002 Kevin Cowtan - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_array.h - * header file for resizable array implementation. - * Kevin Cowtan - */ - -/* -CCP4 resizable array implementation. - -This defines an object and methods which looks just like a simple C -array, but can be resized at will without incurring excessive -overheads. - -A pointer to the desired type is created. Array elements are accessed -from this pointer as normal. Other operations depend on macros which -extract the stored type from the type of the pointer. - -The array is managed with a header, which is positioned before the -beginning of the array. The malloc'ed memory area starts at the -beginning of this header. However the pointer to the header is not -stored, but rather derived from the array pointer whenever it is -required. - -Arrays have a size and a capacity. The size is the number of elements -in use, and the capacity is the number of elements available before a -new memory allocation is required. When new memory is required, an -excess is reqested to allow the array to grow further before -performing another malloc. - -If the precise amount of memory is known, the capacity can be -controlled directly using the 'reserve' macro. - -Example: to handle an array of type mytype: - -\code - int i; - mytype x,y; - mytype *array; - - ccp4array_new(array); - - ccp4array_append_n(array, x, 3); - - for ( i = 0; i < 3; i++ ) y = array[i]; - - ccp4array_free(array); -\endcode -*/ - -#ifndef __CCP4_ARRAY_INC -#define __CCP4_ARRAY_INC - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -/* rcsidha[] = "$Id$" */ - -/*! constant pointer type */ -typedef const void *ccp4_constptr; -/*! byte pointer type */ -typedef char *ccp4_byteptr; -/*! pointer type */ -typedef void *ccp4_ptr; - -/*! struct definition for the array pre-header */ -typedef struct ccp4array_base_ { - int size, capacity; -} ccp4array_base; - -/*! Macro to allocate a new array. - The array is allocated with a size and capacity of 0 - \param v The array pointer - \return The new array pointer (redundent) -*/ -#define ccp4array_new(v) ccp4array_new_((ccp4_ptr*)(&v)) - -/*! Macro to allocate a new array with non-zero size. - The array is allocated with a size of s and capacity of at least s - \param v The array pointer - \param s The new size - \return The new array pointer (redundent) -*/ -#define ccp4array_new_size(v,s) ccp4array_new_size_((ccp4_ptr*)(&v),s,sizeof(*v)) - -/*! Macro to resize an array. - This changes the size. Memory allocation only takes place if the new - size is greater than the capacity. If that occurs, the new capacity - will be slightly greater than the requested size, to allow room for - expansion. - \param v The array pointer - \param s The new size -*/ -#define ccp4array_resize(v,s) ccp4array_resize_((ccp4_ptr*)(&v),s,sizeof(*v)) - -/*! Macro to reserve space for an array. - This forces a memory reallocation. The size of the array is - unchanged, unless the new capacity is less than the current size, in - which case the size is set to the new capacity. Unlike resize, the - new allocation will be exactly the size of the array. - \param v The array pointer - \param s The new capacity -*/ -#define ccp4array_reserve(v,s) ccp4array_reserve_((ccp4_ptr*)(&v),s,sizeof(*v)) - -/*! Macro to append an element to an array. - This increments the size. Memory allocation only takes place if the new - size is greater than the capacity. - \param v The array pointer - \param d The new element (may not be a literal) -*/ -#define ccp4array_append(v,d) ccp4array_append_((ccp4_ptr*)(&v),(ccp4_constptr)(&d),sizeof(*v)) - -/*! Macro to append n copies of an element to an array. - This increments the size by n. Memory allocation only takes place if the new - size is greater than the capacity. - \param v The array pointer - \param d The new element (may not be a literal) - \param n The number of copies to append -*/ -#define ccp4array_append_n(v,d,n) ccp4array_append_n_((ccp4_ptr*)(&v),(ccp4_constptr)(&d),n,sizeof(*v)) - -/*! Macro to append n elements from another list to an array. - This increment the size by n. Memory allocation only takes place if the new - size is greater than the capacity. - \param v The array pointer - \param l Pointer to the list - \param n The number of copies to append -*/ -#define ccp4array_append_list(v,l,n) ccp4array_append_list_((ccp4_ptr*)(&v),(ccp4_constptr)l,n,sizeof(*v)) - -/*! Macro to insert an element before the element[i] of an array. - This increments the size. All subsequent elements are moved up. As a - result this method is slow. - \param v The array pointer - \param d The new element (may not be a literal) - \param i The element before which the insertion is to be made. -*/ -#define ccp4array_insert(v,i,d) ccp4array_insert_((ccp4_ptr*)(&v),i,(ccp4_constptr)(&d),sizeof(*v)) - -/*! Macro to delete element[i] of an array, preserving order. - This decrements the size. All subsequent elements are moved down. As a - result this method is slow. - \param v The array pointer - \param i The element to be deleted -*/ -#define ccp4array_delete_ordered(v,i) ccp4array_delete_ordered_((ccp4_ptr*)(&v),i,sizeof(*v)) - -/*! Macro to delete element[i] of an array without preserving order. The - last element is moved into the gap, and the size is decremented. - \param v The array pointer - \param i The element to be deleted -*/ -#define ccp4array_delete(v,i) ccp4array_delete_((ccp4_ptr*)(&v),i,sizeof(*v)) - -/*! Macro to delete the last element of an array. - This decrements the size. - \param v The array pointer -*/ -#define ccp4array_delete_last(v) ccp4array_delete_last_((ccp4_ptr*)(&v),sizeof(*v)) - -/*! Macro to return the size of the array. - \param v The array pointer - \return The size (int) -*/ -#define ccp4array_size(v) ccp4array_size_((ccp4_constptr*)(&v)) - -/*! Macro free the array. - All memory, including the header, is freed. - \param v The array pointer -*/ -#define ccp4array_free(v) ccp4array_free_((ccp4_ptr*)(&v)) - -/** - * See macro ccp4array_new -*/ -ccp4_ptr ccp4array_new_(ccp4_ptr *p); -/** - * See macro ccp4array_new_size -*/ -ccp4_ptr ccp4array_new_size_(ccp4_ptr *p, const int size, const size_t reclen); -/** - * See macro ccp4array_resize -*/ -void ccp4array_resize_(ccp4_ptr *p, const int size, const size_t reclen); -/** - * See macro ccp4array_reserve -*/ -void ccp4array_reserve_(ccp4_ptr *p, const int size, const size_t reclen); -/** - * See macro ccp4array_append -*/ -void ccp4array_append_(ccp4_ptr *p, ccp4_constptr data, const size_t reclen); -/** - * See macro ccp4array_append_n -*/ -void ccp4array_append_n_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen); -/** - * See macro ccp4array_append_list -*/ -void ccp4array_append_list_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen); -/** - * See macro ccp4array_insert -*/ -void ccp4array_insert_(ccp4_ptr *p, const int i, ccp4_constptr data, const size_t reclen); -/** - * See macro ccp4array_delete_ordered -*/ -void ccp4array_delete_ordered_(ccp4_ptr *p, const int i, const size_t reclen); -/** - * See macro ccp4array_delete -*/ -void ccp4array_delete_(ccp4_ptr *p, const int i, const size_t reclen); -/** - * See macro ccp4array_delete_last -*/ -void ccp4array_delete_last_(ccp4_ptr *p, const size_t reclen); -/** - * See macro ccp4array_size -*/ -int ccp4array_size_(ccp4_constptr *p); -/** - * See macro ccp4array_free -*/ -void ccp4array_free_(ccp4_ptr *p); - -#ifdef __cplusplus -} -#endif - -#endif /* __CCP4_ARRAY_INC */ diff --git a/ccp4c/ccp4/ccp4_errno.h b/ccp4c/ccp4/ccp4_errno.h deleted file mode 100644 index 3e9bc659..00000000 --- a/ccp4c/ccp4/ccp4_errno.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ccp4_errno.h: Header file for error handling routines - Copyright (C) 2001 CCLRC, Charles Ballard and Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -/** @file ccp4_errno.h - * Header file for error handling routines - * base error codes on system errors. - */ - -#ifndef __CCP4_ERROR_GUARD -#define __CCP4_ERROR_GUARD - -#include -#include "ccp4_sysdep.h" - -/* rcsidhe[] = "$Id$" */ - -#ifndef CCP4_ERRSYSTEM -#define CCP4_ERRSYSTEM(x) (((x)&0xfff)<<24) -#endif -#ifndef CCP4_ERRLEVEL -#define CCP4_ERRLEVEL(x) (((x)&0xf)<<16) -#endif -#ifndef CCP4_ERRSETLEVEL -#define CCP4_ERRSETLEVEL(y,x) ((y) & (~CCP4_ERRLEVEL(0xf)) | CCP4_ERRLEVEL(x))) -#endif -#ifndef CCP4_ERRGETSYS -#define CCP4_ERRGETSYS(x) (((x)>>24)&0xfff) -#endif -#ifndef CCP4_ERRGETLEVEL -#define CCP4_ERRGETLEVEL(x) (((x)>>16)&0xf) -#endif -#ifndef CCP4_ERRGETCODE -#define CCP4_ERRGETCODE(x) ((x)&0xffff) -#endif - -#define CCP4_ERR_SYS CCP4_ERRSYSTEM(0x0) -#define CCP4_ERR_FILE CCP4_ERRSYSTEM(0x1) -#define CCP4_ERR_COORD CCP4_ERRSYSTEM(0x2) -#define CCP4_ERR_MTZ CCP4_ERRSYSTEM(0x3) -#define CCP4_ERR_MAP CCP4_ERRSYSTEM(0x4) -#define CCP4_ERR_UTILS CCP4_ERRSYSTEM(0x5) -#define CCP4_ERR_PARS CCP4_ERRSYSTEM(0x6) -#define CCP4_ERR_SYM CCP4_ERRSYSTEM(0x7) -#define CCP4_ERR_GEN CCP4_ERRSYSTEM(0x8) - -#define CCP4_COUNT(x) sizeof(x)/sizeof(x[0]) - -/** @global ccp4_errno: global variable that stores the error last error - * code from the ccp4 libraries - * | 12 bits - library | 4 bits - level | 16 bits - code | - * - * associated macros - * CCP4_ERR_SYS 0 OS error - * CCP4_ERR_FILE 1 io library - * CCP4_ERR_COORD 2 mmdb - * CCP4_ERR_MTZ 3 cmtz - * CCP4_ERR_MAP 4 map io - * CCP4_ERR_UTILS 5 utility routines - * CCP4_ERR_PARS 6 parser routines - * CCP4_ERR_SYM 7 csymlib - * - * and bit manipulation - * CCP4_ERRSYSTEM system mask for setting - * CCP4_ERRLEVEL error level mask - * CCP4_ERRSETLEVEL error level mask for setting error level - * CCP4_ERRGETSYS mask for returning system - * CCP4_ERRGETLEVEL mask for returning level - * CCP4_ERRGETCODE mask for returning the code - * - * error levels - * 0 Success - * 1 Informational - * 2 Warning - * 3 Error - * 4 Fatal - */ -#ifdef __cplusplus -extern "C" { -#endif -extern CCP4_DL_IMPORT(int) ccp4_errno; -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -namespace CCP4 { -extern "C" { -#endif - -/** Print out passed message and internal message based upon - * ccp4_errno - * "message : error message " - * @param message (const char *) - * @return void - */ -void ccp4_error( const char *); - -/** Obtain character string based upon error code. - * Typical use ccp4_strerror(ccp4_errno) - * The returned string is statically allocated in the - * library_err.c file and should not be freed. - * @param error code (int) - * @return const pointer to error message (const char *) - */ -const char *ccp4_strerror( int); - -/** Wrapper for ccp4_error which also calls exit(1) - * @param message (const char *) - * @return void - */ -void ccp4_fatal(const char *); - -/** Function to set verbosity level for messages from - * ccp4_signal. Currently just off (0) and on (1). - * It should be generalised to be able to switch - * individual components on and off, i.e. replace 1 by - * a mask. - * cf. ccp4VerbosityLevel which sets the verbosity level - * for ccp4printf These are separate as they may be used - * differently. - * @param iverb If >= 0 then set the verbosity level to the - * value of iverb. If < 0 (by convention -1) then report - * current level. - * @return current verbosity level - */ -int ccp4_liberr_verbosity(int iverb); - -/** Routine to set ccp4_errno and print out message for - * error tracing. This should be the only way in - * which ccp4_errno is set. - * See error codes above for levels and systems. - * A callback with prototype void function(void) - * may also be passed to the routine. - * Note: FATAL calls exit(1). - * If ccp4_liberr_verbosity returns 0, then ccp4_signal sets - * ccp4_errno and returns without doing anything else. - * @param error code (int) - * @param message (const char * const) - * @param callback (point to routine void (*)(void) ) - * @return void - */ -void ccp4_signal(const int, const char *const, void (*)()); - -int cfile_perror(const char *); - -#ifdef __cplusplus -} -} -#endif - -#endif /*!CCP4_ERROR_GUARD */ diff --git a/ccp4c/ccp4/ccp4_file_err.h b/ccp4c/ccp4/ccp4_file_err.h deleted file mode 100644 index 6f6ae483..00000000 --- a/ccp4c/ccp4/ccp4_file_err.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - ccp4_file_err.h: header file with file handling error codes - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef _GUARD_FILE_ERR -#define _GUARD_FILE_ERR - -#define CCP4_ERRNO(y) (CCP4_ERR_FILE | (y)) -#define CIO_Ok 0 -#define CIO_BadMode 1 -#define CIO_CantOpenFile 2 -#define CIO_MaxFile 3 -#define CIO_ReadFail 4 -#define CIO_WriteFail 5 -#define CIO_CloseFail 6 -#define CIO_SeekFail 7 -#define CIO_NullPtr 8 -#define CIO_EOF 9 -#define CIO_NoFile 10 -#define CIO_NotOpen 11 -#define CIO_UnlinkFail 12 - -#endif - diff --git a/ccp4c/ccp4/ccp4_fortran.h b/ccp4c/ccp4/ccp4_fortran.h deleted file mode 100644 index ea79b65c..00000000 --- a/ccp4c/ccp4/ccp4_fortran.h +++ /dev/null @@ -1,393 +0,0 @@ -/* - ccp4_fortran.h: header file for Fortran APIs - Copyright (C) 2001 Eugene Krissinel - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_fortran.h - * header file for Fortran APIs - * Eugene Krissinel - */ - -#ifndef __CCP4_FORTRAN -#define __CCP4_FORTRAN - -#include "ccp4_types.h" -/* rcsidhh[] = "$Id$" */ - -/* stardent is now obsolete, but we retain this category in case it is useful later */ -#ifdef CALL_LIKE_STARDENT - /* SStrParam is used in Ardent-like machines' fortran calls */ - /* for passing a string parameter */ - DefineStructure(SStrPar) - struct SStrPar { - pstr S; - int len; - int id; - }; -#endif - -#define _LVTOB(l) ((long) ((l) == 0 ? 0 : 1)) -#define _BTOLV(l) ((int) ((l) == 0 ? 0 : 1)) -#if defined (__OSF1__) || defined (__osf__) -#undef _BTOLV -#define _BTOLV(l) ((int) ((l) == 0 ? 0 : -1)) -#endif - -/* - Macro FORTRAN_SUBR(NAME,name,p_send,p_sstruct,p_sflw) - makes function header statements that allow for linking with - programs written in FORTRAN. - - Parameters: - - NAME name of the FORTRAN subroutine in capital letters - name name of the FORTRAN subroutine in small letters - p_send parameter list (in brackets) with string lengths - attached to the end of it (see below) - p_sstruct parameter list (in brackets) with strings passed - as complex parameters, or structures - p_sflw parameter list (in brackets) with string lengths - following immediately the string parameters - (see below) - - All non-string parameters must be passed as pointers, in - the same order as they enter the FORTRAN call. Rules for - the string parameters are as follows. - - 1. All strings should be specified as of 'fpstr' type. - The 'fpstr' type is defined below and depends on the - platform: - - a) whenever length of string is passed as a separate - parameter ( CALL_LIKE_SUN, CALL_LIKE_HPUX, - CALL_LIKE_MVS ) 'fpstr' is identical to 'pstr'. - You may choose arbitrary name for the string, - but you MUST use the same name, appended with - suffix '_len', for its length (see example below). - - b) whenever string and its length are passed as - complex parameter, 'fpstr' is identical to the - pointer on the corresponding structure: - CALL_LIKE_STARDENT : - 'fpstr' is identical to 'PSStrPar' - CALL_LIKE_VMS : - 'fpstr' is identical to 'dsc$descriptor_s *' - - With 'fpstr' type, two important macro definition come: - - i) FTN_STR(s) - returns pointer to fortran-passed - string s. This pointer is always - of 'pstr' type - ii) FTN_LEN(s) - returns integer length of fortran- - passed string s. For this macro to - work properly with SUN- and MVS-like - machines, always use suffix '_len' - for the string length parameters as - described in a) above. - - 2. Three parameter lists, each enclosed in brackets, should - be given. These lists retain the general order of - parameters in the corresponding fortran call. Non-string - parameters are passed as pointers. String parameters - and their lengths are passed differently in different - lists: - - p_send strings enter their place in the list as in - the corresponding FORTRAN call, having 'fpstr' - parameter type. Their lengths are appended as - 'int' to the end of the list. They should - retain the order in which the strings appear - in the list. - - p_sstruct strings enter their place in the list as in - the corresponding FORTRAN call, having 'fpstr' - parameter type. - - p_sflw strings enter their place in the list as in - the corresponding FORTRAN call, having 'fpstr' - type and being immediately followed by their - lengths as 'int' parameters. - - - - Example: - - FORTRAN statement - - subroutine SomeSub ( k,s1,a,s2,m ) - integer k,m - real a - character*(*) s1,s2 - - is translated to - - FORTRAN_SUBR ( SOMESUB, somesub, - ( int * k, fpstr s1, float * a, fpstr s2, int * m, - int s1_len, int s2_len ), - ( int * k, fpstr s1, float * a, fpstr s2, int * m ), - ( int * k, fpstr s1, int s1_len, float * a, - fpstr s2, int s2_len, int * m ) ) - - - The macro should replace ordinary function header - statements to assure compatibility with FORTRAN links. - In header files, do not forget to add semicolumn: - - FORTRAN_SUBR ( .... ); - - while in source files use simply - - FORTRAN_SUBR ( .... ) { - - } - - - - Macro FORTRAN_CALL(NAME,name,p_send,p_sstruct,p_sflw) - calls function defined with macro FORTRAN_SUBR(...), from - a C/C++ application. Its parameters and their meaning are - exactly identical to those of FORTRAN_SUBR(...). - FORTRAN_CALL(...) should be followed by semicolon. */ - - -#if defined(CALL_LIKE_SUN) - - typedef pstr fpstr; -#if __GNUC__ > 7 || __clang_major__ > 10 - typedef size_t fpstr_size_t; -#else - typedef int fpstr_size_t; -#endif - -#define FTN_STR(s) s -#define FTN_LEN(s) s##_len - -#define char_struct(s) \ - pstr s; \ - int s##_len; -#define fill_char_struct(s,str) \ - s = str; \ - s##_len = strlen(str); -#define init_char_struct(s,str,size) \ - s = str; \ - s##_len = size; - -#define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ - void name##_ p_sun -#define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ - name##_ p_sun -#define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ - val name##_ p_sun -#elif defined(CALL_LIKE_HPUX) - - typedef pstr fpstr; - typedef int fpstr_size_t; - -# define FTN_STR(s) s -# define FTN_LEN(s) s##_len - -# define char_struct(s) \ - pstr s; \ - int s##_len; -# define fill_char_struct(s,str) \ - s = str; \ - s##_len = strlen(str); -# define init_char_struct(s,str,size) \ - s = str; \ - s##_len = size; - -# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ - void name p_sun -# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ - name p_sun -# define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ - val name p_sun -#elif defined(CALL_LIKE_STARDENT) - - typedef PStrPar fpstr; - typedef int fpstr_size_t; - -# define FTN_STR(s) s->Str_pointer -# define FTN_LEN(s) s->Str_length - -# define char_struct(s) \ - SStrPar s; -# define fill_char_struct(s,str) \ - s.S = str; \ - s.len = strlen(FName); \ - s.id = 0; -# define init_char_struct(s,str,size) \ - s.S = str; \ - s.len = size; \ - s.id = 0; - -# define FORTRAN_SUBR(NAME,name,p_send,p_sstruct,p_sflw) \ - void NAME p_stardent -# define FORTRAN_CALL(NAME,name,p_send,p_sstruct,p_sflw) \ - NAME p_stardent -# define FORTRAN_FUN(val,NAME,name,p_send,p_sstruct,p_sflw) \ - val NAME p_stardent - -#elif defined(CALL_LIKE_VMS) - - typedef dsc$descriptor_s * fpstr; - -# define FTN_STR(s) s->dsc$a_pointer; -# define FTN_LEN(s) s->dsc$w_length; - -# define char_struct(s) \ - dsc$descriptor_s s; -# define fill_char_struct(s,str) \ - s.dsc$a_pointer = str; \ - s.dsc$w_length = strlen(str); \ - s.dsc$b_dtype = DSC$K_DTYPE_T; \ - s.dsc$b_class = DSC$K_CLASS_S; -# define init_char_struct(s,str,size) \ - s.dsc$a_pointer = str; \ - s.dsc$w_length = size; \ - s.dsc$b_dtype = DSC$K_DTYPE_T; \ - s.dsc$b_class = DSC$K_CLASS_S; - -# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ - void NAME p_stardent -# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ - NAME p_stardent -# define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ - val NAME p_stardent - -#elif defined(CALL_LIKE_MVS) - -#if (CALL_LIKE_MVS == 2) - - typedef pstr fpstr; - typedef int fpstr_size_t; - -#define FTN_STR(s) s -#define FTN_LEN(s) s##_len - -#define char_struct(s) \ - pstr s; \ - int s##_len; -#define fill_char_struct(s,str) \ - s = str; \ - s##_len = strlen(str); -#define init_char_struct(s,str,size) \ - s = str; \ - s##_len = size; - -#define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ - void NAME p_sun -#define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ - NAME p_sun -#define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ - val NAME p_sun - -#else - - typedef pstr fpstr; - typedef int fpstr_size_t; - -# define FTN_STR(s) s -# define FTN_LEN(s) s##_len - -# define char_struct(s) \ - pstr s; \ - int s##_len; -# define fill_char_struct(s,str) \ - s = str; \ - s##_len = strlen(str); -# define init_char_struct(s,str,size) \ - s = str; \ - s##_len = size; - -# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ - void __stdcall NAME p_mvs -# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ - NAME p_mvs -# define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ - val __stdcall NAME p_mvs - -# endif - -#else - -# error Unknown machine!!! - - typedef pstr fpstr; - typedef int fpstr_size_t; - -# define FTN_STR(s) s -# define FTN_LEN(s) s##_len - -# define char_struct(s) \ - pstr s; \ - int s##_len; -# define fill_char_struct(s,str) \ - s = str; \ - s##_len = strlen(str); -# define init_char_struct(s,str,size) \ - s = str; \ - s##_len = size; - -/** Macro to define a function such that it is callable as - * a Fortran subroutine. - * @param NAME Subroutine name in upper case - * @param name Subroutine name in lower case - * @param p_sun Argument list in Sun style - * @param p_stardent Argument list in Stardent style - * @param p_mvs Argument list in MVS style -*/ -# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ - void name##_ p_sun - -/** Macro to call a Fortran subroutine from a C function. - * @param NAME Subroutine name in upper case - * @param name Subroutine name in lower case - * @param p_sun Argument list in Sun style - * @param p_stardent Argument list in Stardent style - * @param p_mvs Argument list in MVS style -*/ -# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ - name##_ p_sun - -/** Macro to define a function such that it is callable as - * a Fortran function. - * @param val Data type of return value. - * @param NAME Function name in upper case - * @param name Function name in lower case - * @param p_sun Argument list in Sun style - * @param p_stardent Argument list in Stardent style - * @param p_mvs Argument list in MVS style -*/ -# define FORTRAN_FUN(val,NAME,name,p_sun,p_stardent,p_mvs) \ - val name##_ p_sun - -#endif - -/* Define Fortran logical */ -typedef unsigned int ftn_logical; -#define FORTRAN_LOGICAL_TRUE 1 -#define FORTRAN_LOGICAL_FALSE 0 -#if defined (__OSF1__) || defined (__osf__) -# undef FORTRAN_LOGICAL_TRUE -# define FORTRAN_LOGICAL_TRUE -1 -#endif - -char *ccp4_FtoCString(fpstr str1, int str1_len); -void ccp4_CtoFString(fpstr str1, int str1_len, const char *cstring); - -#endif /* __CCP4_FORTRAN */ diff --git a/ccp4c/ccp4/ccp4_general.c b/ccp4c/ccp4/ccp4_general.c deleted file mode 100644 index 4c0d38fa..00000000 --- a/ccp4c/ccp4/ccp4_general.c +++ /dev/null @@ -1,1436 +0,0 @@ -/* - ccp4_general.c: General library functions and utilities. - Copyright (C) 2001 CCLRC, Peter Briggs et al - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_general.c - * General library functions and utilities. - * Peter Briggs et al - */ - -/* ccp4_general.c - Peter Briggs CCP4 May 2001/Feb 2003 - - General library functions and utilities - - ccperror(level,message) - Error reporting and program termination - - ccp4printf(level,format,printargs) - A wrapper for vprintf - acts like printf with an additional - argument which is checked against the reference verbosity - level. - - ccp4fyp(argc,argv) - Initialise environment for CCP4 programs and parse the - command line arguments - - ccp4setenv(logical_name,value,envname,envtype,envext,ienv, - no_overwrt) - Set up file names and associate with logical_name in - environment - - ccpexists(filename) - Check if file exists and can be opened for reading - - ccpputenv(logical_name,file_name) - Set environment variable logical_name to have value file_name -*/ - -/*------------------------------------------------------------------*/ - -/* CCP4 library clones */ - -#include -#include -#include -#include - -#ifdef HAVE_CONFIG_H -#include /* PACKAGE_ROOT */ -#endif -/* Library header files */ -#include "ccp4_fortran.h" -#include "ccp4_utils.h" -#include "ccp4_parser.h" -#include "ccp4_general.h" -#include "ccp4_program.h" -#include "cmtzlib.h" -#include "csymlib.h" -#include "ccp4_errno.h" -/* rcsid[] = "$Id$" */ - -/*------------------------------------------------------------------*/ - -/* ccperror - - Error reporting and program termination - - ccperror is called with a message level ierr and a message string - The exact behaviour is determined by the value of ierr: - - 0 : normal termination and stop - 1 : fatal error and stop - 2 : report severe warning - 3 : report information - 4 : report from library - - ierr=-1 also reports last system error and terminates. - - The text in message is sent to standard output, and to standard - error for ierr=1 (or -1). - -*/ -int ccperror(int ierr, const char *message) -{ - /* Execute user-defined function callback */ - ccp4InvokeCallback(ierr,message); - /* Do messaging */ - ccperror_noexit(ierr, message); - /* Exit if necessary */ - if (ierr==0) { - exit(0); - } else if (ierr==1 || ierr==-1) { - exit(1); - } - return 0; -} - -/* ccperror_noexit - - As above, but doesn't call exit() - -*/ - -int ccperror_noexit(int ierr, const char *message) -{ - char *prog_name=NULL; - - /* Get the program name */ - prog_name = ccp4ProgramName(NULL); - if (!prog_name) prog_name = strdup("CCP4"); - - if (ierr==0) { - /* Level 0 : normal termination */ - ccp4printf(0," %s: %s\n",prog_name,message); - /* Get the amount of time elapsed since start of - program. Initialised by ccp4fyp */ - ccp4ProgramTime(0); - - /* closing tags - these are simplified w.r.t. Fortranic - versions for this special case */ - if (html_log_output(-1)) { - printf("\n"); - printf("\n"); - } - if (summary_output(-1)) { - if (html_log_output(-1)) { - printf("\n"); - } else { - printf("\n"); - } - } - - } else if (ierr==1 || ierr==-1) { - /* Level 1 (-1) : fatal error */ - /* If ierr=-1 then print last system error - N.B. Use of perror in this context is untested by me */ - if (ierr < 0) perror("Last system error message"); - /* Send the message to the standard error */ - fprintf(stderr," %s: %s\n",prog_name,message); - /* Also to the standard out */ - ccp4printf(0," %s: %s\n",prog_name,message); - /* Get the amount of time elapsed since start of - program. Initialised by ccp4fyp */ - ccp4ProgramTime(0); - - /* closing tags - these are simplified w.r.t. Fortranic - versions for this special case */ - if (html_log_output(-1)) { - printf("\n"); - printf("\n"); - } - if (summary_output(-1)) { - if (html_log_output(-1)) { - printf("\n"); - } else { - printf("\n"); - } - } - - } else if (ierr==2) { - /* Level 2 : severe warning */ - ccp4printf(0," \n $TEXT:Warning: $$ comment $$ \n WARNING: %s\n $$\n", - message); - - } else if (ierr>2) { - /* Levels higher than 2 : report information */ - ccp4printf(0,"%s\n",message); - } - return 0; -} - -/*------------------------------------------------------------------*/ - -/* ccp4printf - - This is a wrapper for vprintf - - If the supplied message is less than or equal to the reference - verbosity level then the format string and remaining arguments - are passed to vprintf to be printed on stdout. - Otherwise nothing is printed. - - The format string has the same format as the format strings - passed to printf, with the remaining arguments being the values - (if any) to be inserted into placeholders in the format string. - - Returns the number of bytes printed, or zero if no printing was - performed, or a negative number for an error from vprintf. -*/ -int ccp4printf(int level, char *format, ...) -{ - int nbytes=0; - va_list args; - - /* Check the level against the refence verbosity level */ - if (level <= ccp4VerbosityLevel(-1)) { - /* Use the vprint function to print */ - va_start(args,format); - nbytes = vprintf(format,args); - va_end(args); - } - /* Return to calling function */ - return nbytes; -} - -/*------------------------------------------------------------------*/ - -/* return parent of directory that contains arg, e.g. - * /foo/bin/prog -> /foo (actually /foo/bin/..) - * C:\CCP4\bin\prog.exe -> C:\CCP4 (actually C:\CCP4\bin\..) - * foo/prog -> . (actually foo/..) - * prog -> .. - * ../prog -> ../.. - */ -static const char* get_parent_directory(const char* arg) -{ - const char *last_sep = strrchr(arg, PATH_SEPARATOR); - const char *basename = last_sep != NULL ? last_sep + 1 : arg; - int dir_len = basename - arg; - char* parent_dir = (char*) ccp4_utils_malloc(dir_len + 3); - strncpy(parent_dir, arg, dir_len); - strcpy(parent_dir+dir_len, ".."); - return parent_dir; -} - -/*------------------------------------------------------------------*/ - -/* ccp4fyp - - Initialise environment for CCP4 programs and parse the - command line arguments - - Background: - This function processes the command line arguments supplied via - the argv array, and performs initialisations of the CCP4 - environment within the program based on these arguments. - - CCP4 programs which use ccp4fyp should be called with the following - syntax: - - [switches] ... - - The command switches all start with a hyphen (-) and immediately - follow the program name. The remainer of the arguments are logical - name-value pairs. - - On successful completion ccp4fyp returns 0 (zero). - On encountering an error, ccp4fyp registers the error condition via - ccp4_signal and returns a non-zero value. -*/ -int ccp4fyp(int argc, char **argv) -{ - /* Diagnostics/debug output */ - int diag=0; - - int i,iarg=1,arg_end=0,ienv=0; - char *envname[CCP4_MAXNAMES],*envtype[CCP4_MAXNAMES],*envext[CCP4_MAXNAMES]; - - /* Flags for processing command line switches */ - int info=0,ihelp=1,idefault=0,ienviron=0,nohtml=0,nosummary=0; - char *testarg=NULL; - - /* Filenames, directories etc */ -#ifdef PACKAGE_ROOT - const char *pkgroot=PACKAGE_ROOT; -#else - const char *pkgroot=get_parent_directory(argv[0]); -#endif - char *basename=NULL,*cinclude=NULL,*home=NULL; - char *dir=NULL,*std_dir=NULL,*tmpstr=NULL; - - /* Decoding environ/defaults files */ - char line[CCP4_MAXLINE]; - char *logical_name=NULL,*file_name=NULL,*file_type=NULL,*file_ext=NULL; - CCP4PARSERARRAY *parser=NULL; - - /* Environ.def file */ - int env_init=1; - char *env_file=NULL; - char *env_logical_name=NULL,*env_file_type=NULL,*env_file_ext=NULL; - FILE *envfp; - - /* Default.def file */ - int def_init=1; - char *def_file=NULL; - char *def_logical_name=NULL,*def_file_name=NULL; - FILE *deffp; - - /* Used for error messages from ccp4setenv */ - int ierr; - - /* Begin */ - if (diag) printf("CCP4FYP: starting\n"); - - if (diag) - for (i = 0; i < argc; ++i) - printf("ccp4fyp: comand line argument %d %s\n",i,argv[i]); - - /* ------------------------------------------------------ */ - /* Initialise program name and timing information */ - /* ------------------------------------------------------ */ - ccp4ProgramTime(1); - - /*ccp4ProgramName(ccp4_utils_basename(argv[0])); */ - basename = ccp4_utils_basename(argv[0]); - ccp4ProgramName(basename); - free(basename); - basename = NULL; - - /* ------------------------------------------------------ */ - /* Process command line option switches */ - /* ------------------------------------------------------ */ - /* Nb ignore the first argument (iarg=0), - because this is just the executable name */ - while (iarg < argc && !arg_end) { - if (diag) printf("CCP4FYP: command line argument %d = \"%s\"\n",iarg,argv[iarg]); - - if (argv[iarg][0] == '-') { - /* An argument of the form -option */ - if (diag) printf("--> This is an option switch\n"); - - /* Remove the leading hyphen */ - testarg = (char *) ccp4_utils_realloc(testarg,(strlen(argv[iarg])+1)*sizeof(char)); - strtoupper(testarg,&(argv[iarg][1])); - if (diag) printf("--> Truncated and uppercased it is now \"%s\"\n",testarg); - - /* Test for each possible option: - -v(erbose) 0-9 verbose output level - -h(elp) 0-9 (alias for -v) - -n don't read environ.def and default.def - -d use instead of default.def - -e use instead of environ.def - -i print CCP4 library version, program name and - program version to standard output, and exit. - -nohtml suppress printing of html tags - -nosummary suppress printing of summary tags - */ - if (testarg[0] == 'V' || testarg[0] == 'H') { - /* -v|h <0-9>: Verbose option */ - if (diag) printf("--> Identified -v option:"); - /* Set ihelp to point to the argument which should - hold the verbosity level, and process later */ - ihelp = ++iarg; - - } else if (testarg[0] == 'N') { - /* -n, -nohtml, -nosummary */ - if (strlen(testarg) == 1) { - /* -n: Don't read environ.def and default.def */ - if (diag) printf("--> Identified -n option\n"); - def_init = 0; - env_init = 0; - } else if (strncmp("NOHTML",testarg,3)==0) { - /* -nohtml: Don't write html tags into logfile */ - nohtml = -1; - } else if (strncmp("NOSUMMARY",testarg,3)==0) { - /* -nosummary: Don't write summary tags into logfile */ - nosummary = -1; - } - } else if (testarg[0] == 'D') { - /* -d : Use non-default default.def file */ - if (diag) printf("--> Identified -d option:"); - /* Set idefault to point to the argument which should - hold the default.def file, and process later */ - idefault = ++iarg; - } else if (testarg[0] == 'E') { - /* -e : Use non-default environ.def file */ - if (diag) printf("--> Identified -e option:"); - /* Set ienviron to point to the argument which should - hold the environ.def file, and process later */ - ienviron = ++iarg; - } else if (testarg[0] == 'I') { - /* -i(nfo): Info option */ - if (diag) printf("--> Identified -i(nfo) option\n"); - info = 1; - - /* Unrecognised switch */ - } else { - ccp4printf(1,"Ignoring unrecognised switch \"%s\"\n",argv[iarg]); - } - - /* Next argument */ - iarg++; - - } else { - /* Found an argument which doesn't start with a "-" - This is the end of the command line switches */ - if (diag) printf("CCP4FYP: end of command line switches\n"); - arg_end = 1; - } - } - /* Release the memory associated with the temporary argument pointer */ - if (testarg) { - free(testarg); - testarg = NULL; - } - - /* ------------------------------------------------------ */ - /* Finished processing command line options */ - /* ------------------------------------------------------ */ - - /* At this point we may need to perform some actions based - on the switches supplied by the user */ - - /* Program information requested by -i(nfo) option */ - if (info) { - /* Print program information and stop */ - ccp4_prog_info(); - exit(0); - } - - /* Initialise debug (verbosity) level - Level 0 switches off all output (silent mode) - Level 9 prints everything - Level 1 is normal I guess - It is not clear from documentation precisely what is/is not - output for the levels between 0 and 9 */ - if (ihelp > 0) { - /* Extract the level from the argument list - ihelp - points to which argument should hold it */ - if (ihelp < argc) { - if (strlen(argv[ihelp]) == 1 && isdigit(argv[ihelp][0])) { - ihelp = atoi(argv[ihelp]); - } else { - ihelp = 1; - } - if (diag) printf("Verbose level %d\n",ihelp); - } else { - ihelp = 1; - if (diag) puts("No verbose level - defaulting to 1."); - } - } - ccp4VerbosityLevel(ihelp); - - /* ------------------------------------------------------ */ - /* Initialise HTML and SUMMARY tags */ - /* ------------------------------------------------------ */ - - /* Initialise html, summary tags by setting environment variables - for Fortran html library to pick up. No direct call, as - C programs may not link to Fortran library. */ - if (nohtml) ccpputenv("CCP_SUPPRESS_HTML","1"); - if (nosummary) ccpputenv("CCP_SUPPRESS_SUMMARY","1"); - - /* ------------------------------------------------------ */ - /* Get useful directories (CINCL and HOME) */ - /* ------------------------------------------------------ */ - - /* Get value of CINCL variable - - Note that (1) getenv returns a null pointer if no name is - found, (2) we should not free the resulting address */ - cinclude = (char *) getenv("CINCL"); - if (!cinclude) { - if (diag) printf("--> CINCL env var has no value assigned\n"); - } else { - if (diag) printf("--> CINCL is \"%s\"\n",cinclude); - } - - /* Get value of HOME variable (same notes apply as for CINCL) */ - home = (char *) getenv("HOME"); - if (!home) { - if (diag) printf("--> HOME env var has no value assigned\n"); - } else { - if (diag) printf("--> HOME is \"%s\"\n",home); - } - - /* ------------------------------------------------------ */ - /* Environ.def file */ - /* ------------------------------------------------------ */ - - /* ------------------------------------------------------ */ - /* Use non-standard environ.def file */ - /* ------------------------------------------------------ */ - /* The search logic is: - 1. If a directory is specified as part of the filename, then - use the filename as is, otherwise - 2. if the HOME variable is defined, then use $HOME/filename, - otherwise - 3. use the filename as is (in current directory). - */ - if (ienviron > 0) { - /* Non-standard environ.def was specified */ - if (ienviron < argc) { - if (env_file) free(env_file); - env_file = (char *) ccp4_utils_malloc(sizeof(char)*(strlen(argv[ienviron])+1)); - if (!env_file) { - /* Couldn't allocate memory to store filename - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_AllocFail),"ccp4fyp",NULL); - return 1; - } - strcpy(env_file,argv[ienviron]); - if (diag) printf("CCP4FYP: env file is \"%s\"\n",env_file); - env_init = 1; - /* Check whether this includes the path */ - if (dir) free(dir); - dir = ccp4_utils_pathname(env_file); - if (dir && dir[0] == '\0') { - /* No path name - try and use $HOME/file_name */ - if (diag) puts("CCP4FYP: env file has no path."); - if (home) { - tmpstr = ccp4_utils_joinfilenames(home,env_file); - if (diag) printf("CCP4FYP: HOME exists, joined filename \"%s\"\n",tmpstr); - if (tmpstr) { - if (env_file) free(env_file); - env_file = tmpstr; - } else { - /* Failed to make complete filename - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_EnvPathFail),"ccp4fyp",NULL); - return 1; - } - } - } - if (diag) printf(" environ.def file is \"%s\"\n",env_file); - } else { - /* Not enough arguments in the arg list - Do clean up and exit */ - if (diag) printf(" no filename found\n"); - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_EOptionUseError),"ccp4fyp",NULL); - return 1; - } - } - - /* ------------------------------------------------------ */ - /* Use standard environ.def file */ - /* ------------------------------------------------------ */ - /* The search logic is: - 1. If the CINCL variable is defined, then use $CINCL/filename, - otherwise - 2. if the HOME variable is defined, then use $HOME/filename, - otherwise - 3. use the filename as is (in current directory). - */ - if (!env_file) { - /* Use the standard environ.def file in CINCL */ - if (diag) printf("--> use standard environ.def file\n"); - std_dir = NULL; - if (cinclude) { - std_dir = cinclude; - } else if (home) { - std_dir = home; - } - /* Set the full path for the environ.def file */ - if (env_file) free(env_file); - if (std_dir) { - if (diag) printf("--> leading directory is \"%s\"\n",std_dir); - env_file = ccp4_utils_joinfilenames(std_dir,"environ.def"); - } else { - env_file = ccp4_utils_joinfilenames(".","environ.def"); - } - if (!env_file) { - /* Failed to make full path name for environ.def - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_EnvPathFail),"ccp4fyp",NULL); - return 1; - } - if (diag) printf("--> Full path for environ.def is \"%s\"\n",env_file); - } - - /* ------------------------------------------------------ */ - /* Read in environ.def */ - /* ------------------------------------------------------ */ - /* environ.def contains lines of the form - LOGICALNAME=type.ext # comments - where type is "in", "out" or "inout" - and ext is the default extension, e.g. "mtz" or "scr" - */ - if (env_init && env_file) { - if (diag) printf("CCP4FYP: reading environ.def file\n"); - if (diag) printf("--> Full path for environ.def is \"%s\"\n",env_file); - /* Open the environ.def file as read-only*/ - ccp4printf(2,"Opening file \"%s\"\n",env_file); - envfp = fopen(env_file,"r"); - /* did not find the environ.def file in std_dir - so try "PACKAGE_ROOT" */ - if (!envfp) { - free(env_file); - env_file = ccp4_utils_joinfilenames(ccp4_utils_joinfilenames( - ccp4_utils_joinfilenames(pkgroot,"share"),"ccp4"),"environ.def"); - if (diag) printf("CCP4FYP: reading environ.def file\n"); - if (diag) printf("--> Full path for environ.def is \"%s\"\n",env_file); - /* Open the environ.def file as read-only*/ - ccp4printf(2,"Opening file \"%s\"\n",env_file); - - envfp = fopen(env_file,"r"); - } - /* multiple failures */ - if (!envfp) { - /* Failed to open the file - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantOpenEnvFile),"ccp4fyp",NULL); - return 1; - } else { - /* Set up a ccp4_parser array to deal with the contents of - environ.def */ - parser = (CCP4PARSERARRAY *) ccp4_parse_start(CCP4_MAXTOKS); - /* Set the delimiters to whitespace, = and . - This should split lines into the three components */ - ccp4_parse_delimiters(parser," \t=.",NULL); - - /* Read from the file until EOF*/ - while (fgets(line,CCP4_MAXLINE,envfp)) { - /* Remove the trailing newline from fgets */ - line[strlen(line)-1] = '\0'; - /* Use ccp4_parse to get the tokens on each line */ - ccp4_parse_reset(parser); - if (ccp4_parse(line,parser) == 3) { - env_logical_name = parser->token[0].fullstring; - env_file_type = parser->token[1].fullstring; - env_file_ext = parser->token[2].fullstring; - /* Check that we have values for all three components */ - if (!env_logical_name || !env_file_type || !env_file_ext) { - /* Error parsing the line - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - if (envfp) fclose(envfp); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_ParseEnvFail),"ccp4fyp",NULL); - return -1; - } else { - /* Store in arrays for use when decoding default.def - and logical names on command line */ - if (ienv+1 == CCP4_MAXNAMES) { - /* Exceeded the allowed number of logical names - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - if (envfp) fclose(envfp); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_MaxNamesExceeded),"ccp4fyp",NULL); - return 1; - } else { - /* Store logical name in envname */ - envname[ienv] = (char *) - ccp4_utils_malloc(sizeof(char)*(strlen(env_logical_name)+1)); - strcpy(envname[ienv],env_logical_name); - /* Store file type in envtype */ - envtype[ienv] = (char *) - ccp4_utils_malloc(sizeof(char)*(strlen(env_file_type)+1)); - strcpy(envtype[ienv],env_file_type); - /* File extension in envext */ - envext[ienv] = (char *) - ccp4_utils_malloc(sizeof(char)*(strlen(env_file_ext)+1)); - strcpy(envext[ienv],env_file_ext); - - if (diag) printf("Decoded line: %s = %s.%s\n",envname[ienv], - envtype[ienv],envext[ienv]); - - /* Increment ienv counter for number of name-pairs - read in */ - ienv++; - } - } - /* Reset number of tokens before reading next line */ - ccp4_parse_reset(parser); - } - /* End of loop over lines in file */ - } - /* Close the environ.def file and free memory storing - the filename*/ - fclose(envfp); - if (env_file) { - free(env_file); - env_file = NULL; - } - - /* Finished with the parser array */ - ccp4_parse_end(parser); - parser = NULL; - } - } - - /* ------------------------------------------------------ */ - /* Default.def file */ - /* ------------------------------------------------------ */ - - /* ------------------------------------------------------ */ - /* Non-standard default.def file */ - /* ------------------------------------------------------ */ - /* The search logic is: - 1. If a directory is specified as part of the filename, then - use the filename as is, otherwise - 2. if the HOME variable is defined, then use $HOME/filename, - otherwise - 3. use the filename as is (in current directory). - */ - if (idefault > 0) { - /* Extract the filename from the argument list - idefault - points to which argument should hold it */ - if (idefault < argc) { - if (def_file) free(def_file); - def_file = (char *) ccp4_utils_malloc(sizeof(char)*(strlen(argv[idefault])+1)); - if (!def_file) { - /* Couldn't allocate memory to store filename - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_AllocFail),"ccp4fyp",NULL); - return 1; - } - strcpy(def_file,argv[idefault]); - def_init = 1; - if (diag) printf("CCP4FYP: def file is \"%s\"\n",def_file); - /* Check whether this includes the path */ - if (dir) free(dir); - dir = ccp4_utils_pathname(def_file); - if (dir && dir[0] == '\0') { - /* No path name - try and use $HOME/file_name */ - if (diag) puts("CCP4FYP: def file has no path."); - if (home) { - tmpstr = ccp4_utils_joinfilenames(home,def_file); - if (diag) printf("CCP4FYP: HOME exists, joined filename \"%s\"\n",tmpstr); - if (tmpstr) { - if (def_file) free(def_file); - def_file = tmpstr; - } else { - /* Failed to make complete filename - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_DefPathFail),"ccp4fyp",NULL); - return 1; - } - } - } - if (diag) printf(" default.def file is \"%s\"\n",def_file); - } else { - /* Not enough arguments in the arg list - Do clean up and exit */ - if (diag) printf(" no filename found\n"); - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_DOptionUseError),"ccp4fyp",NULL); - return 1; - } - } - - /* ------------------------------------------------------ */ - /* Standard default.def file */ - /* ------------------------------------------------------ */ - /* The search logic is: - 1. If the CINCL variable is defined, then use $CINCL/filename, - otherwise - 2. if the HOME variable is defined, then use $HOME/filename, - otherwise - 3. use the filename as is (in current directory). - */ - if (!def_file) { - /* Use the standard default.def */ - if (diag) printf("--> use standard default.def file\n"); - std_dir = NULL; - if (cinclude) { - std_dir = cinclude; - } else if (home) { - std_dir = home; - } - /* Set the full path for the default.def file */ - if (def_file) free(def_file); - if (std_dir) { - if (diag) printf("--> leading directory is \"%s\"\n",std_dir); - def_file = ccp4_utils_joinfilenames(std_dir,"default.def"); - } else { - def_file = ccp4_utils_joinfilenames(".","default.def"); - } - if (!def_file) { - /* Unable to set the filename - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_DefPathFail),"ccp4fyp",NULL); - return 1; - } - if (diag) printf("--> Full path for default.def is \"%s\"\n",def_file); - } - - /* ------------------------------------------------------ */ - /* Read in default.def */ - /* ------------------------------------------------------ */ - /* default.def contains lines of the form - LOGICALNAME=FILENAME # comments - */ - if (def_init && def_file) { - if (diag) printf("CCP4FYP: reading default.def file\n"); - if (diag) printf("--> Full path for default.def is \"%s\"\n",def_file); - /* Open the default.def file as read-only*/ - ccp4printf(2,"Opening file \"%s\"\n",def_file); - deffp = fopen(def_file,"r"); - /* did not find the default.def file in std_dir - so try "PACKAGE_ROOT" */ - if (!deffp) { - free(def_file); - def_file = ccp4_utils_joinfilenames(ccp4_utils_joinfilenames( - ccp4_utils_joinfilenames(pkgroot,"share"),"ccp4"),"default.def"); - if (diag) printf("CCP4FYP: reading default.def file\n"); - if (diag) printf("--> Full path for default.def is \"%s\"\n",def_file); - /* Open the default.def file as read-only*/ - ccp4printf(2,"Opening file \"%s\"\n",def_file); - - deffp = fopen(def_file,"r"); - } - /* multiple failures */ - if (!deffp) { - /* Failed to open the file - Do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantOpenDefFile),"ccp4fyp",NULL); - return 1; - } - /* Set a ccp4_parser array to deal with the contents of default.def */ - parser = (CCP4PARSERARRAY *) ccp4_parse_start(CCP4_MAXTOKS); - /* Set the delimiters to whitespace and = - This should split lines into the two components */ - ccp4_parse_delimiters(parser," \t=",NULL); - - /* Read from the file until EOF*/ - while (fgets(line,CCP4_MAXLINE,deffp)) { - - /* Remove the trailing newline from fgets */ - line[strlen(line)-1] = '\0'; - - /* Use ccp4_parse to get the tokens on each line */ - ccp4_parse_reset(parser); - if (ccp4_parse(line,parser) == 2) { - def_logical_name = parser->token[0].fullstring; - def_file_name = parser->token[1].fullstring; - if (!def_logical_name || !def_file_name) { - /* Failed to parse the line - - do clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - if (deffp) fclose(deffp); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_ParseDefFail),"ccp4fyp",NULL); - return -1; - } - if (diag) printf("Decoded line: %s = %s\n",def_logical_name,def_file_name); - - /* Set up the environment for this pair - Don't overwrite any existing logical name */ - ierr = ccp4setenv(def_logical_name,def_file_name, - envname,envtype,envext,&ienv,1); - if (ierr) { - /* An error from ccp4setenv - Clean up and exit */ - if (deffp) fclose(deffp); - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - return ierr; - } - /* Reset number of tokens before reading next line */ - ccp4_parse_reset(parser); - } - } - /* Close the default.def file */ - fclose(deffp); - if (def_file) { - free(def_file); - def_file = NULL; - } - - /* Finished with the parser array */ - ccp4_parse_end(parser); - parser = NULL; - } - - /* ------------------------------------------------------ */ - /* Process remaining command line arguments */ - /* ------------------------------------------------------ */ - - /* Read in the rest of the command line arguments - These should consist of pairs of arguments i.e. - - */ - - ccp4printf(2,"Processing Command Line Arguments\n"); - while (iarg < argc) { - /* Get logical name and uppercase it */ - if (logical_name) free(logical_name); - logical_name = (char *) ccp4_utils_malloc((strlen(argv[iarg])+1)*sizeof(char)); - if (diag) printf("--> Raw logical name: \"%s\"\n",argv[iarg]); - strtoupper(logical_name,argv[iarg]); - logical_name[strlen(argv[iarg])] = '\0'; - if (diag) printf("--> Logical name: \"%s\"",logical_name); - iarg++; - /* Get associated filename */ - if (iarg < argc) { - if (file_name) free(file_name); - file_name = (char *) ccp4_utils_malloc((strlen(argv[iarg])+1)*sizeof(char)); - strcpy(file_name,argv[iarg]); - if (diag) printf(" file name: \"%s\"\n",file_name); - /* Set up the environment for this pair - Do overwrite any existing logical name */ - ierr = ccp4setenv(logical_name,file_name,envname,envtype,envext,&ienv,0); - if (diag) printf("CCP4FYP: returned from ccp4setenv, ierr = %d\n",ierr); - if (ierr) { - /* An error from ccp4setenv - Clean up and exit */ - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - return ierr; - } - iarg++; - } else { - /* No associated filename - Do clean up and exit with error */ - if (diag) printf(" no associated file name\n"); - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_LogicalNameUseError),"ccp4fyp",NULL); - return 1; - } - /* Next pair of arguments */ - } - ccp4printf(2,"End of pre-processing stage\n"); - - /* ------------------------------------------------------ */ - /* Finished processing - do local clean up */ - /* ------------------------------------------------------ */ - - ccp4fyp_cleanup(ienv,envname,envtype,envext,logical_name,file_name, - file_type,file_ext,env_file,def_file,dir,parser); - if (diag) printf("CCP4FYP: ending\n"); - return 0; -} - -/*------------------------------------------------------------------*/ - -/* ccp4fyp_cleanup - - Internal function. - Called on exit from ccp4fyp - free memory associated with - pointers used inside ccp4fyp. -*/ -int ccp4fyp_cleanup(int ienv, char **envname, char **envtype, char **envext, - char *logical_name, char *file_name, char *file_type, - char *file_ext, char *env_file, char *def_file, - char *dir, CCP4PARSERARRAY *parser) -{ - int i; - /* Parser */ - if (parser) ccp4_parse_end(parser); - /* Free single valued pointers, if set */ - if (file_type) free(file_type); - if (file_ext) free(file_ext); - if (env_file) free(env_file); - if (def_file) free(def_file); - if (logical_name) free(logical_name); - if (file_name) free(file_name); - if (dir) free(dir); - /* Free arrays of pointers */ - if (ienv > 0) { - for (i=0; i/_. - */ - /* Fetch CCP4_SCR */ - cscr = (char *) getenv("CCP4_SCR"); - if (cscr) { - if (diag) printf("CCP4SETENV: CCP4_SCR = \"%s\"\n",cscr); - /* Store in file_path */ - lpath = strlen(cscr); - if (file_path) free(file_path); - file_path = (char *) ccp4_utils_malloc(sizeof(char)*(lpath+1)); - strncpy(file_path,cscr,(lpath+1)); - if (diag) printf("CCP4SETENV: set file path to CCP4_SCR = \"%s\"\n",file_path); - } else { - /* Couldn't get CCP4_SCR - Clean up, set message and return an error */ - ccp4setenv_cleanup(file_ext,file_root,file_path,file_name); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantGetCcp4Scr),"ccp4setenv",NULL); - return 1; - } - /* Replace with _ */ - lprognam = strlen(ccp4ProgramName(NULL)); - tmpstr1 = ccp4_utils_malloc(sizeof(char)*(lprognam + lroot + 2)); - strncpy(tmpstr1,ccp4ProgramName(NULL),lprognam); - tmpstr1[lprognam] = '\0'; - strncat(tmpstr1,"_",1); - strncat(tmpstr1,file_root,lroot); - if (file_root) free(file_root); - file_root = tmpstr1; - lroot = strlen(file_root); - if (diag) printf("CCP4SETENV: updated file_root = \"%s\"\n",file_root); - /* Replace scr extension with the process id - In fact to guarantee that it is always 5 characters, - take the id number modulo 100,000 */ - procid = (int) getpid(); - if (diag) printf("CCP4SETENV: initial procid = %d\n",procid); - procid = procid % CCP4_MODULO; - if (diag) printf("CCP4SETENV: procid = %d",procid); - if (file_ext) free(file_ext); - file_ext = (char*) ccp4_utils_malloc(sizeof(char)*6); - sprintf(file_ext,"%05d",procid); - lext = 5; - if (diag) printf(" giving file extension \"%s\"\n",file_ext); - } - /* No special path for this particular extension */ - } - } else { - if (diag) printf("CCP4SETENV: detected dev-null\n"); - } - - /* Build the filename */ - lname = lpath + 1; - file_name = (char *) ccp4_utils_realloc(file_name,sizeof(char)*(lname + 1)); - if (lpath < 0) { - file_name[0] = '\0'; - } else if (lpath == 0) { - file_name[0] = PATH_SEPARATOR; - file_name[1] = '\0'; - } else { - strncpy(file_name,file_path,lname); - file_name[lpath] = PATH_SEPARATOR; - file_name[lpath+1] = '\0'; - } - if (diag) printf("CCP4SETENV: building filename = \"%s\"\n",file_name); - lname = lname + lroot; - file_name = (char *) ccp4_utils_realloc(file_name,sizeof(char)*(lname + 1)); - if (lroot) { - strcat(file_name,file_root); - } - if (diag) printf("CCP4SETENV: building filename = \"%s\"\n",file_name); - if (lext > 0) { - lname = lname + lext + 1; - file_name = (char *) ccp4_utils_realloc(file_name,sizeof(char)*(lname + 1)); - strcat(file_name,"."); - if (lext) { - strcat(file_name,file_ext); - } - file_name[lname] = '\0'; - } - if (diag) printf("CCP4SETENV: building filename = \"%s\"\n",file_name); - - /* Test that (non-default) input files exist */ - if (icount < *ienv) { - if (strmatch(envtype[icount],"in") && !no_overwrt) { - /* Does the file exist? */ - if (diag) printf("CCP4SETENV: checking for existence of input file\n"); - if (ccpexists(file_name)) { - if (diag) printf("CCP4SETENV: \"%s\" can be opened for reading\n",file_name); - } else { - /* File doesn't exist/cannot be opened for reading - Clean up, set message and return an error */ - if (diag) printf("CCP4SETENV: \"%s\" cannot be opened for reading\n",file_name); - printf("File: \"%s\"\nCannot be opened for reading\n",file_name); - ccp4setenv_cleanup(file_ext,file_root,file_path,file_name); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantFindInFile),"ccp4setenv",NULL); - return -1; - } - } - } else { - if (diag) printf("CCP4SETENV: cannot determine file type (input or output)\n"); - } - - /* Set the environment variable */ - if (ccpputenv(logical_name,file_name)) { - if (diag) printf("CCP4SETENV: ccpputenv returned okay\n"); - } else { - /* Unable to set environment variable - Clean up and exit the program */ - ccp4setenv_cleanup(file_ext,file_root,file_path,file_name); - ccp4_signal(CCP4_ERRLEVEL(3) | CGEN_ERRNO(CGENERR_CantSetEnvironment),"ccp4setenv",NULL); - printf("Cannot create environment variable: \"%s\"\n",logical_name); - return -1; - } - - if (diag) { - tmpstr1 = (char *) getenv(logical_name); - if (tmpstr1) { - printf("CCP4SETENV: logical name %s has value \"%s\"\n",logical_name,tmpstr1); - } else { - printf("CCP4SETENV: failed to fetch value for logical_name \"%s\"\n",logical_name); - } - } - - /* Free dynamically allocated memory before returning */ - ccp4setenv_cleanup(file_ext,file_root,file_path,file_name); - return 0; -} - -/*------------------------------------------------------------------*/ - -/* ccp4setenv_cleanup - - Internal function. - Called on exit from ccp4setenv - free memory associated with - pointers used inside ccp4setenv. -*/ -int ccp4setenv_cleanup(char *file_ext, char *file_root, char *file_path, - char *file_name) -{ - if (file_ext) free(file_ext); - if (file_root) free(file_root); - if (file_path) free(file_path); - if (file_name) free(file_name); - return 1; -} - -/*------------------------------------------------------------------*/ - -/* ccpexists - - Check if named file exists - The check is performed by attempting to fopen the file for - read only, then immediately closing the file. If this method - proves to be unsatisfactory then it may be necessary to investigate - using access or stat instead. - - Returns 1 if the file can be opened for read (=exists), 0 otherwise. -*/ -int ccpexists(char *filename) -{ - FILE *fp; - - if (filename) { - fp = fopen(filename,"r"); - if (fp) { - fclose(fp); - return 1; - } - } - return 0; -} - -/*------------------------------------------------------------------*/ - -/* ccpputenv - - This is a wrapper for the ccp4_utils_setenv command. - - It must be supplied with a logical name (the name of a variable - which will be set in the environment) and a file name (the value which - will be assigned to that variable). - - Returns 1 if successful and 0 otherwise. - - Notes: - 1. Platform-dependency is encoded in ccp4_utils_setenv. - 2. Dynamically allocated strings passed to ccpputenv should be - freed by the calling subprogram to avoid memory leaks. -*/ -int ccpputenv(char *logical_name, char *file_name) -{ - int ltmpstr,diag=0; - char *tmpstr; - - if (logical_name && file_name) { - /* Allocate memory for temporary string */ - ltmpstr = strlen(logical_name) + strlen(file_name) + 1; - tmpstr = (char *) ccp4_utils_malloc(sizeof(char)*(ltmpstr+1)); - /* putenv requires a string of the form "logical_name=file_name" */ - if (tmpstr) { - strcpy(tmpstr,logical_name); - strcat(tmpstr,"="); - strcat(tmpstr,file_name); - tmpstr[ltmpstr] = '\0'; - if (diag) printf("CCPPUTENV: string going into ccp4_utils_setenv is \"%s\"\n",tmpstr); - /* ccp4_utils_setenv returns 0 on success */ - if (ccp4_utils_setenv(tmpstr) == 0) { - /* free tmpstr here as ccp4_utils_setenv does separate malloc */ - free (tmpstr); - return 1; - } - } - } - return 0; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_banner - - Write CCP4 banner to standard output. -*/ -void ccp4_banner(void) { - - int diag=0,i,npad; - char date[11],time[9],prog_vers_str[19],infoline[100]; - char prog_vers_full[MAXLEN_PROGVERSION]; - - if (diag) printf("Entering ccp4_banner \n"); - - /* Program version number */ - strcpy(prog_vers_full,ccp4_prog_vers(NULL)); - if (strlen(prog_vers_full)) { - strcpy(prog_vers_str,"version "); - strncpy(prog_vers_str+8,prog_vers_full,10); - prog_vers_str[18] = '\0'; - } else { - /* If no program version available then use the major library - version number */ - sprintf(prog_vers_str,"version %-10s",ccp4_vers_no()); - } - /* Trim back the spaces in this string */ - i = strlen(prog_vers_str); - while (prog_vers_str[--i] == ' ') { - prog_vers_str[i] = '\0'; - } - - printf(" \n"); - printf(" ###############################################################\n"); - printf(" ###############################################################\n"); - printf(" ###############################################################\n"); - /* Information line - This has information on the version numbers, names and RCS date - Originally it was printed using the line: - - printf(" ### CCP4 %3s: %-17s %-18s: %-8s##\n", - ccp4_vers_no(),ccp4ProgramName(NULL),prog_vers_str,ccp4RCSDate(NULL)); - - If the CCP4 version number exceeded three characters this would lead - to the tail of the line being misaligned. - - This version tries to account for components of the line being - longer than expected (nb it is still possible to run out of space). - */ - sprintf(infoline," ### CCP4 %3s: %-17s",ccp4_vers_no(),ccp4ProgramName(NULL)); - /* Trim back spaces in this string */ - i = strlen(infoline); - while ( i != 0 && infoline[--i] == ' ') { - infoline[i] = '\0'; - } - /* Determine how much padding we need based on length of the - program version number plus what's already been printed*/ - npad = 51 - strlen(infoline) - strlen(prog_vers_str); - i = strlen(infoline); - while (npad > 0) { - infoline[i++] = ' '; - infoline[i] = '\0'; - --npad; - } - sprintf(infoline+i,"%s : %-8s##",prog_vers_str,ccp4RCSDate(NULL)); - printf("%s\n",infoline); - /* Rest of the banner */ - printf(" ###############################################################\n"); - printf(" User: %s Run date: %s Run time: %s \n\n\n", - ccp4_utils_username(),ccp4_utils_date(date),ccp4_utils_time(time)); - printf(" Please reference: Collaborative Computational Project, Number 4. 2011.\n"); - printf(" \"Overview of the CCP4 suite and current developments\". Acta Cryst. D67, 235-242.\n"); - printf(" as well as any specific reference in the program write-up.\n\n"); - - if (diag) printf("Leaving ccp4_banner \n"); - -} diff --git a/ccp4c/ccp4/ccp4_general.h b/ccp4c/ccp4/ccp4_general.h deleted file mode 100644 index bb441050..00000000 --- a/ccp4c/ccp4/ccp4_general.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - ccp4_general.h: header for general library functions and utilities. - Copyright (C) 2001 CCLRC, Peter Briggs et al - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/* ccp4_general.c - - Header file for CCP4 library clones - Peter Briggs et al CCP4 April 2001 -*/ - -/*------------------------------------------------------------------*/ - -/* Macro definitions */ - -/*------------------------------------------------------------------*/ - -#ifndef __CCPGeneral__ -#define __CCPGeneral__ - -/* rcsidhl[] = "$Id$" */ - -/* note order: this must be outside CCP4 namespace */ -#include "ccp4_parser.h" - -#ifdef __cplusplus -namespace CCP4 { -extern "C" { -#endif - -/* MAXLINE = maximum number of characters in lines read - from environ.def and default.def files (ccp4fyp) - MAXTOKS = maximum number of tokens in lines read from - environ.def and default.def files (ccp4fyp) - MAXNAMES = maximum number of logical names that can be - read and stored from environ.def (ccp4fyp) -*/ -#define CCP4_MAXLINE 200 -#define CCP4_MAXTOKS 3 -#define CCP4_MAXNAMES 150 -#define CCP4_MODULO 100000 - -/* stuff for error reporting */ -#define CGEN_ERRNO(n) (CCP4_ERR_GEN | (n)) - -/* error defs */ -#define CGENERR_Ok 0 -#define CGENERR_AllocFail 1 -#define CGENERR_CantSetEnvironment 2 -#define CGENERR_MaxNamesExceeded 3 -#define CGENERR_EOptionUseError 4 -#define CGENERR_DOptionUseError 5 -#define CGENERR_LogicalNameUseError 6 -#define CGENERR_CantOpenEnvFile 7 -#define CGENERR_CantOpenDefFile 8 -#define CGENERR_ParseEnvFail 9 -#define CGENERR_ParseDefFail 10 -#define CGENERR_CantFindInFile 11 -#define CGENERR_EnvPathFail 12 -#define CGENERR_DefPathFail 13 -#define CGENERR_CantGetClibd 14 -#define CGENERR_CantGetCcp4Scr 15 - -/*------------------------------------------------------------------*/ - -/* Structures and typedefs */ - -/*------------------------------------------------------------------*/ - -/* */ - -/*------------------------------------------------------------------*/ - -/* Function Prototypes */ - -/*------------------------------------------------------------------*/ - -void ccp4f_mem_tidy(void); - -int ccperror(int ierr, const char *message); - -int ccperror_noexit(int ierr, const char *message); - -int ccp4printf(int level, char *format, ...); - -int ccp4fyp(int argc, char **argv); - -int ccp4fyp_cleanup(int ienv, char **envname, char **envtype, char **envext, - char *logical_name, char *file_name, char *file_type, - char *file_ext, char *env_file, char *def_file, - char *dir, CCP4PARSERARRAY *parser); - -int ccp4setenv(char *logical_name, char* value, char **envname, - char **envtype, char **envext, int *ienv, int no_overwrt); - -int ccp4setenv_cleanup(char *file_ext, char *file_root, char *file_path, - char *file_name); - -int ccpexists(char *filename); - -int ccpputenv(char *logical_name, char *file_name); - -void ccp4_banner(void); - -#ifdef __cplusplus -} -} -#endif - -#endif /* __CCPGeneral__ */ diff --git a/ccp4c/ccp4/ccp4_parser.c b/ccp4c/ccp4/ccp4_parser.c deleted file mode 100644 index 7974318b..00000000 --- a/ccp4c/ccp4/ccp4_parser.c +++ /dev/null @@ -1,1738 +0,0 @@ -/* - ccp4_parser.c: Functions to read in and "parse" CCP4 keyworded input. - Copyright (C) 2001 CCLRC, Peter Briggs - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - - -/** @file ccp4_parser.c - * - * @brief Functions to read in and "parse" CCP4-style keyworded input. - * - * @author Peter Briggs - * @date April 2001 - */ - -/* ccp4_parser.c - Peter Briggs CCP4 April 2001 - - Functions to read in and "parse" (scan, in reality) CCP4-style - "keyworded" input, plus utility routines. - - ccp4_parse_start(maxtokens) - initialise a CCP4PARSERARRAY to be used in subsequent calls to - ccp4_parser routines. - - ccp4_parse_end(parser) - clean up CCP4PARSERARRAY parser after use - - ccp4_parse_init_token(parser,itok) - initialise a single token in CCP4PARSERARRAY before use - - ccp4_parse_reset(parser) - initialise CCP4PARSERARRAY before use (includes calls to - ccp4_parse_init_token to initialise all tokens) - - ccp4_parse_delimiters(parser,delimiters,nulldelimiters) - set up or restore non-default delimiters - - int ccp4_parse_comments(parser,comment_chars) - set up or restore non-default comment characters - - ccp4_parse_maxmin(parser,max_exp,min_exp) - set non-default maximum and minimum values for numerical tokens - - ccp4_parse(line,parser) - given a string "line", break up into tokens and store in - CCP4PARSERARRAY "parser" - - ccp4_parser(line,parser,print) - read input from stdin or external file, break up into tokens - and store in CCP4PARSERARRAY "parser" - - ccp4_keymatch(keyin1,keyin2) - compare input strings to see if they match as CCP4-style keywords - - strtoupper(str1,str2) - convert string to uppercase - - strmatch(str1,str2) - check if strings are identical - - charmatch(character,charlist) - check if character appears in a list of possibilities - - doublefromstr(str,....) - convert a string representation of a number into the number, also - checks for exponent over/underflow, returns numbers of digits and - values of "components" (integer and fractional parts, and base-10 - exponent) - -*/ - -/* Header files */ - -#include -#include -#include -#ifndef __FLOAT_H__ -# include -#endif -#include -#include "ccp4_parser.h" -#include "ccp4_errno.h" -#include "ccp4_sysdep.h" -/* rcsid[] = "$Id$" */ - -/* stuff for error reporting */ -#define CPARSER_ERRNO(n) (CCP4_ERR_PARS | (n)) - -/* error defs */ -#define CPARSERR_Ok 0 -#define CPARSERR_MaxTokExceeded 1 -#define CPARSERR_AllocFail 2 -#define CPARSERR_NullPointer 3 -#define CPARSERR_LongLine 4 -#define CPARSERR_CantOpenFile 5 -#define CPARSERR_NoName 6 -#define CPARSERR_ExpOverflow 7 -#define CPARSERR_ExpUnderflow 8 -#define CPARSERR_MatToSymop 9 -#define CPARSERR_SymopToMat 10 - -/*------------------------------------------------------------------*/ - -/* Parser Functions */ - -/*------------------------------------------------------------------*/ - -/* ccp4_parse_start - - This initialises a CCP4PARSERARRAY to be used with the ccp4_parse/ - ccp4_parser functions. - The calling function must supply the maximum number of tokens. -*/ -CCP4PARSERARRAY* ccp4_parse_start(const int maxtokens) -{ - int itok,diag=0; - CCP4PARSERARRAY *parsePtr; - - if (diag) printf("CCP4_PARSE_START: ccp4_parse_start starting\n"); - - /* Initial check for sensible values */ - if (maxtokens < 1) return NULL; - - /* Return a pointer to a CCP4PARSERARRAY */ - parsePtr = (CCP4PARSERARRAY *) ccp4_utils_malloc(sizeof(CCP4PARSERARRAY)); - if (parsePtr) { - if (diag) printf("CCP4_PARSE_START: allocated parsePtr\n"); - parsePtr->token = (CCP4PARSERTOKEN *) ccp4_utils_malloc(sizeof(CCP4PARSERTOKEN)*maxtokens); - if (!parsePtr->token) { - free(parsePtr); - parsePtr = NULL; - } else { - if (diag) printf("CCP4_PARSE_START: allocated parsePtr->token\n"); - parsePtr->maxtokens = maxtokens; - parsePtr->fp = NULL; - - /* Explicitly ensure that each token's fullstring member is - set to NULL before calling ccp4_parse_reset (which tries to - free memory associated with non-NULL fullstrings) since - we can't rely on them being created with a NULL value */ - for (itok = 0; itok < maxtokens; itok++) - parsePtr->token[itok].fullstring = NULL; - ccp4_parse_reset(parsePtr); - if (diag) printf("CCP4_PARSE_START: fullstring set to NULL\n"); - - /* Initialise the default maximum and minimum allowed - exponents for numerical tokens */ - ccp4_parse_maxmin(parsePtr,DBL_MAX_10_EXP,DBL_MIN_10_EXP); - if (diag) printf("CCP4_PARSE_START: max and min set\n"); - - /* Initialise the default delimiter and null delimiter characters - with a call to ccp4_parse_delimiters */ - parsePtr->delim=NULL; - parsePtr->nulldelim=NULL; - if (!ccp4_parse_delimiters(parsePtr,NULL,NULL)) { - ccp4_parse_end(parsePtr); - parsePtr = NULL; - } - if (diag) printf("CCP4_PARSE_START: delimiters set\n"); - - /* Initialise the default comment characters with a call - to ccp4_parse_comments */ - parsePtr->comment=NULL; - if (!ccp4_parse_comments(parsePtr,NULL)) { - ccp4_parse_end(parsePtr); - parsePtr = NULL; - } - if (diag) printf("CCP4_PARSE_START: comments set\n"); - } - } - - if (diag) printf("CCP4_PARSE_START: Returning from ccp4_parse_start\n"); - return parsePtr; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_parse_end - - This cleans up a CCP4PARSEARRAY after being used by ccp4_parse/ - ccp4_parser functions. -*/ -int ccp4_parse_end(CCP4PARSERARRAY *parsePtr) -{ - int i,maxtokens; - - /* Anything to do? */ - if (parsePtr) { - /* Free memory for each token */ - maxtokens = parsePtr->maxtokens; - if (parsePtr->token && parsePtr->maxtokens > 0) { - for (i=0; itoken[i].fullstring) free(parsePtr->token[i].fullstring); - free(parsePtr->token); - } - /* Free memory for lists of comments and delimiters */ - if (parsePtr->comment) free(parsePtr->comment); - if (parsePtr->delim) free(parsePtr->delim); - if (parsePtr->nulldelim) free(parsePtr->nulldelim); - /* Free memory for rest of parserarray structure */ - free(parsePtr); - } - /* All done */ - return 0; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_parse_init_token - - Initialise a token in a parser array - This sets all string members of the specified token to NULL and - all numerical values (including flags) to zero -*/ - -int ccp4_parse_init_token(const CCP4PARSERARRAY *parsePtr, const int itok) -{ - if (parsePtr) { - if (itok < parsePtr->maxtokens) { - /* Full string is dynamically allocated - free the - associated memory, if assigned */ - if (parsePtr->token[itok].fullstring) { - free(parsePtr->token[itok].fullstring); - parsePtr->token[itok].fullstring = NULL; - } - /* Set fixed string tokens to empty string */ - strcpy(parsePtr->token[itok].word,""); - /* Set numerical value to zero */ - parsePtr->token[itok].value = 0.0; - /* Set flags to zero */ - parsePtr->token[itok].isstring = 0; - parsePtr->token[itok].isnumber = 0; - parsePtr->token[itok].isquoted = 0; - parsePtr->token[itok].isnull = 0; - /* Set start and end positions to zero */ - parsePtr->token[itok].ibeg = 0; - parsePtr->token[itok].iend = 0; - } - } - return 0; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_parse_reset - - Reinitialise a parser array before calling ccp4_parse - - An application using ccp4_parse (rather than ccp4_parser, which - also calls this function) can call this function to reset the - parser array, rather than reinitialising the structure members - explicitly -*/ -int ccp4_parse_reset(CCP4PARSERARRAY *parsePtr) -{ - int itok; - - if (parsePtr) { - /* Initialise the tokens to have null values */ - for (itok=0; itokmaxtokens; itok++) - ccp4_parse_init_token(parsePtr,itok); - /* Initialise number of tokens to zero */ - parsePtr->ntokens = 0; - } - return 0; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_parse_delimiters - - This allows the application to set its own delimiter characters - to be used in the ccp4_parser routines. - - If a NULL pointer is supplied for either of the two lists then - then the default delimiters are (re)set. - - Returns 1 on success, 0 if there was an error. In the event of - an error the delimiter lists will be unchanged. -*/ - -int ccp4_parse_delimiters(CCP4PARSERARRAY *parsePtr, - const char *delim, const char *nulldelim) -{ - const char defdelim[]=" \t,=\r",defnulldelim[]=",="; - char *delimPtr=NULL,*nulldelimPtr=NULL; - int ldelim,lnulldelim,istatus=1; - - if (parsePtr) { - - /* If supplied delim is NULL then set to the default */ - if (!delim) { - ldelim = strlen(defdelim) + 1; - } else { - ldelim = strlen(delim) + 1; - } - delimPtr = (char *) ccp4_utils_malloc(sizeof(char)*ldelim); - if (delimPtr) { - ldelim--; - if (!delim) { - strncpy(delimPtr,defdelim,ldelim+1); - } else { - strncpy(delimPtr,delim,ldelim+1); - } - delimPtr[ldelim] = '\0'; - } - - /* If supplied nulldelim is NULL then set to the default */ - if (!nulldelim) { - lnulldelim = strlen(defnulldelim) + 1; - } else { - lnulldelim = strlen(nulldelim) + 1; - } - nulldelimPtr = (char *) ccp4_utils_malloc(sizeof(char)*lnulldelim); - if (nulldelimPtr) { - lnulldelim--; - if (!nulldelim) { - strncpy(nulldelimPtr,defnulldelim,lnulldelim+1); - } else { - strncpy(nulldelimPtr,nulldelim,lnulldelim+1); - } - nulldelimPtr[lnulldelim] = '\0'; - } - - /* Assign new delimiters in parser array */ - if (delimPtr && nulldelimPtr) { - if (parsePtr->delim) free(parsePtr->delim); - parsePtr->delim = delimPtr; - if (parsePtr->nulldelim) free(parsePtr->nulldelim); - parsePtr->nulldelim = nulldelimPtr; - } else { - /* There is an error - don't reset the parser array */ - if (delimPtr) free(delimPtr); - if (nulldelimPtr) free(nulldelimPtr); - istatus = 0; - } - } else { - istatus = 0; - } - return istatus; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_parse_comments - - This allows the application to set its own comment characters - to be used in the ccp4_parser routines. - - If a NULL pointer is supplied for the list of comment characters - then the default comment characters are (re)set. - - Returns 1 on success, 0 if there was an error. In the event of - an error the comment lists will be unchanged. -*/ - -int ccp4_parse_comments(CCP4PARSERARRAY *parsePtr, const char *comment_chars) -{ - const char def_comment_chars[]="#!"; - char *commentPtr=NULL; - int lcomment,istatus=1; - - if (parsePtr) { - - /* If the supplied comment list is NULL then set to the default */ - if (!comment_chars) { - lcomment = strlen(def_comment_chars) + 1; - } else { - lcomment = strlen(comment_chars) + 1; - } - commentPtr = (char *) ccp4_utils_malloc(sizeof(char)*lcomment); - if (commentPtr) { - if (!comment_chars) { - strncpy(commentPtr,def_comment_chars,lcomment); - } else { - strncpy(commentPtr,comment_chars,lcomment); - } - lcomment--; - commentPtr[lcomment] = '\0'; - } - - /* Assign the new comments in the parser array */ - if (commentPtr) { - if (parsePtr->comment) free(parsePtr->comment); - parsePtr->comment = commentPtr; - } else { - /* There was an error - don't reset the parser array */ - istatus = 0; - } - } else { - /* The parser was unset on entry - also an error */ - istatus = 0; - } - return istatus; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_parse_maxmin - - This allows the application to set its own maximum and minimum - exponent values, which are used as limits when evaluating the values - of numerical tokens in order to avoid over/underflow. -*/ - -int ccp4_parse_maxmin(CCP4PARSERARRAY *parsePtr, const double max_exponent, - const double min_exponent) -{ - if (parsePtr) { - parsePtr->max_exponent = (double) max_exponent; - parsePtr->min_exponent = (double) min_exponent; - } - return 1; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_parse - - This is a scanner based on the old CCP4 Fortranic PARSE routine. - - It takes an input string ("line") and returns the number of - tokens ("ntokens") which are delimited by certain characters - (defaulted to space, tab, comma, equals - these can be changed by - the application using a call to ccp4_parse_delimiters). - Information about the tokens themselves is returned as members of - elements in an array ("tokens") of type CCP4PARSERTOKEN (see header - file for definition and members). - - Substrings can be delimited by single- or double-quotes but must - be surrounded by delimiters to be recognised. - - An unquoted comment character (defaulted to ! or #) in the input line - introduces a trailing comment which is ignored. The comment - characters can be changed using a call to ccp4_parse_comments. - - Null fields are denoted by two adjacent null delimiters (defaulted - to comma and equals - these can be changed by the application - using a call to ccp4_parse_delimiters). - - ccp4_parse returns the number of tokens found in the line. The - tokens are returned via the CCP4PARSERARRAY parser. - - Arguments: - - line = pointer to a null-terminated string of characters, - forming the input to be processed. Unaltered on - output. - parser = pointer to a CCP4PARSERARRAY structure which will - be used to hold the results of processing the input - line. -*/ - -int ccp4_parse(const char *line, CCP4PARSERARRAY *parser) -{ - int quotedstring,starttoken,endtoken; - char this_char,next_char,matchquote; - - int llen,ich,lword,diag=0; - int token,nulltoken,isquote,iscommt=0,isdelim; - double value; - char *delim,*nulldelim,*comm; - char quot[]="\"\'"; - int ibeg,iend,start; - - double intvalue,frcvalue,expvalue; - int intdigits,frcdigits,expdigits; - - /* Local parser variables */ - int ntok,maxtok; - CCP4PARSERTOKEN *tokenarray; - - /* Begin */ - - /* Set diag = 1 and recompile to switch on diagnostic output */ - if (diag) printf("CCP4_PARSE: ccp4_parse starting\n"); - - maxtok = parser->maxtokens; - ntok = parser->ntokens; - if (ntok < 0) ntok = 0; - - /* Initialise pointer for local version of the token array */ - tokenarray = parser->token; - - /* Initialise pointers for lists of comments and delimiters */ - comm = parser->comment; - delim = parser->delim; - nulldelim = parser->nulldelim; - - /* Don't process any tokens already dealt with */ - if (ntok > 0) { - start = tokenarray[ntok-1].iend + 1; - /* Special case: if the last token was quoted - then in fact the character at this position will be - a quote - if so then step on another character */ - if (charmatch(line[start],quot)) { - if (diag) printf("CCP4_PARSE: start character is a quote, stepping on\n"); - start++; - } - } else { - start = 0; - } - - /* Don't process empty lines */ - llen = strlen(line); - if (diag) printf("CCP4_PARSE: Line is: \"%s\"\nLength of line is %d\n",line,llen); - if (llen > 0) { - - /* Initialise flags and counters */ - quotedstring = 0; - token = 0; - nulltoken = 0; - - /* Process the line two characters at a time */ - - if (diag) printf("CCP4_PARSE: Start position for parsing line is %d\n",start); - for (ich=start-1; ichntokens = ntok; - return ntok; - } - if (diag) printf("CCP4_PARSE: This is the start of token %d\n",ntok); - } - /* End of new token */ - - /* End of current token */ - if (endtoken) { - token = 0; - /* Exclude trailing quote from the token? */ - if (tokenarray[ntok].isquoted) { - iend = ich - 1; - } else { - iend = ich; - } - if (diag) printf("CCP4_PARSE: End of a token... iend = %d\n",iend); - /* Store the full token in the array */ - lword = iend - ibeg + 1; - if (diag) printf("CCP4_PARSE: lword = %d - start char = %c, end char = %c\n", - lword,line[ibeg],line[iend]); - tokenarray[ntok].fullstring = (char *) ccp4_utils_malloc(sizeof(char)*(lword+1)); - if (tokenarray[ntok].fullstring) { - strncpy(tokenarray[ntok].fullstring,&line[ibeg],lword); - tokenarray[ntok].fullstring[lword] = '\0'; - if (diag) printf("CCP4_PARSE: Token is \"%s\"\n",tokenarray[ntok].fullstring); - } else { - ccp4_signal(CPARSER_ERRNO(CPARSERR_AllocFail),"ccp4_parse",NULL); - } - tokenarray[ntok].ibeg = ibeg; - tokenarray[ntok].iend = iend; - /* Store the 4 character token in the array */ - if (lword > 4) lword = 4; - strncpy(tokenarray[ntok].word,&line[ibeg],lword); - tokenarray[ntok].word[lword] = '\0'; - /* Determine numerical value (if any) */ - if (doublefromstr(tokenarray[ntok].fullstring,parser->max_exponent, - parser->min_exponent,&value,&intvalue,&intdigits, - &frcvalue,&frcdigits,&expvalue,&expdigits)) { - if (diag) printf("CCP4_PARSE: This has a numerical value of %lf\n",value); - tokenarray[ntok].value = value; - tokenarray[ntok].isnumber = 1; - tokenarray[ntok].intdigits = intdigits; - tokenarray[ntok].frcdigits = frcdigits; - } else { - if (diag) printf("CCP4_PARSE: There is no numerical value for this token\n"); - tokenarray[ntok].isstring = 1; - tokenarray[ntok].strlength = strlen(tokenarray[ntok].fullstring); - } - /* Reset flags etc ready for next token*/ - token = 0; - value = 0.0; - /* Increment number of tokens */ - ntok++; - if (diag) printf("CCP4_PARSE: This is the end of a token\n"); - } - - /* Don't do any more processing after a comment */ - - if (iscommt) { - parser->ntokens = ntok; - if (diag) printf("CCP4_PARSE: returning after a comment\n"); - return ntok; - } - /* Check the next pair of characters */ - } - /* Reset the number of tokens in the parser array */ - parser->ntokens = ntok; - if (diag) printf("CCP4_PARSE: ntokens = %d, and ntok = %d\n",parser->ntokens,ntok); - } - if (diag) printf("CCP4_PARSE: returning at function end\n"); - return ntok; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_parser - - This is based on the old CCP4 Fortranic PARSER routine. - - The normal behaviour is to read "keyworded" data from the input - stream, and interpret it. Stdin is the default, but a line - starting with @ starts reading from file until eof. - - Each input line may be continued on the next line by the continuation - characters `&', `-' or `\' at the end of the input line. This - character is dropped from the list returned to the calling application. - - Pass in a zero length line to force reading from the command line. - nchars is the maximum number of characters which will be read into the line. - (If line is not blank then it will be processed and more input - read in if it ends in a continuation character, or forces reading from - an external file.) - - The "print" argument should be supplied as 0 to suppress echoing of the - input lines to standard output. - - ccp4_parser returns the number of tokens parsed in the input line. The - results of the parsing are stored as members of the CCP4PARSEARRAY - structure "parser" and can be accessed by the application program. - - The function returns the number of tokens, or 0 on reaching end of file. - On encountering an unrecoverable error ccp4_parser returns -1. - - Arguments: - - line = pointer to a null-terminated string of characters, - forming the input to be processed. - On input can either be an empty string ("") or - contain characters to be processed (see above for - description). - On output "line" will be overwritten with the actual - input line, up to nchar characters. - nchars = maximum number of characters that can be read into - "line" i.e. the size of "line" in memory. - parser = pointer to a CCP4PARSERARRAY structure which will - be used to hold the results of processing the input - line. - print = flag controlling echoing of input lines to stdout. - print=0: suppress echoing of lines to stdout - Otherwise echoing is turned on. -*/ - -int ccp4_parser(char *line, const int nchars, CCP4PARSERARRAY *parser, - const int print) -{ - int fromstdin=0,fromfile=0,fromapp=0,diag=0; - int nch,nold,continuation,first,trunc,llen,buflen; - char *linein=NULL,filename[200]; - - /* Local parser variables */ - int ntok; - FILE *filein; - CCP4PARSERTOKEN *tokenarray; - - /* Undocumented feature - if print < 0 then also print out - diagnostic info */ - if (print < 0) { - /*print = 1;*/ - diag = 1; - } - - /* Begin */ - if (diag) printf("CCP4_PARSER: ccp4_parser starting\n"); - - /* Abort if parser is a NULL pointer */ - if (!parser) { - ccp4_signal(CPARSER_ERRNO(CPARSERR_NullPointer),"ccp4_parser",NULL); - return -1; - } - - /* Abort if line is NULL pointer */ - if (!line) { - ccp4_signal(CPARSER_ERRNO(CPARSERR_NullPointer),"ccp4_parser",NULL); - return -1; - } - - /* Reset the parser array for this sweep - This will prevent phantom values from an earlier call - to ccp4_parser persisting in the parser array */ - ccp4_parse_reset(parser); - - /* Blank the keyword */ - strcpy(parser->keyword,""); - - /* Initialise local variables and pointers */ - tokenarray = parser->token; - ntok = parser->ntokens; - filein = parser->fp; - if (diag) printf("CCP4_PARSER: parser->ntokens = %d, ntok = %d\n", - parser->ntokens,ntok); - - /* Set up an internal buffer for input - The buffer is over-allocated (twice as long as the max string - length allocated for line by the calling application) - */ - buflen = (nchars*2)+1; - linein = (char *) ccp4_utils_malloc(buflen*sizeof(char)); - - if (!linein) { - ccp4_signal(CPARSER_ERRNO(CPARSERR_AllocFail),"ccp4_parser",NULL); - return 0; - } - - /* Use nch as a count of the number of remaining characters - in line */ - nch = nchars; - - /* If line is empty then read from the standard input - Otherwise process the line from the application first */ - if (strlen(line)==0) { - if (!filein) { - if (diag) printf("CCP4_PARSER: Reading from stdin\n"); - fromstdin = 1; - } else { - if (diag) printf("CCP4_PARSER: Reading from file\n"); - fromfile = 1; - } - } else { - if (diag) printf("CCP4_PARSER: Reading line supplied by the application program\n"); - fromapp = 1; - } - - /* Set flag for first line of input */ - first = 1; - - /* Set flag for line continuation */ - continuation = 1; - - /* Start the input loop */ - while (continuation) { - - if (diag) printf("CCP4_PARSER: starting loop\n"); - /* Read input from stdin a line at a time */ - if (fromstdin) { - if (diag) printf("CCP4_PARSER: reading from stdin...\n"); - if (!fgets(linein,buflen,stdin)) { - /* Jump out at this point if eof is reached from - stdin */ - return 0; - } - } else if (fromfile) { - if (diag) printf("CCP4_PARSER: reading from external file...\n"); - if (!fgets(linein,buflen,filein)) { - /* Return to input from stdin if eof is read from - the external file */ - if (diag) printf("CCP4_PARSER: End of external file reached\n"); - fclose(filein); - filein = NULL; - fromfile = 0; - fromstdin = 1; - /* Blank the line and reset the first flag to - force reading from standard input immediately */ - linein[0] = '\0'; - ntok = 0; - parser->ntokens = ntok; - first = 1; - } - } else if (fromapp) { - if (diag) printf("CCP4_PARSER: reading from application...\n"); - /* If this line contains a continuation mark then - read from stdin next time around */ - strncpy(linein,line,nchars); - linein[nchars]='\0'; - } - - /* Strip any trailing newline e.g. from fgets */ - llen = strlen(linein); - if (llen > 0) - if (linein[llen-1] == '\n') { - linein[llen-1] = '\0'; - llen--; - } - - /* If previous line ended with a continuation character - then append this one to it - Check that we don't overflow the number of characters - specified by the application */ - - if (llen > nch) { - ccp4_signal(CPARSER_ERRNO(CPARSERR_LongLine),"ccp4_parser",NULL); - } - if (first) { - strncpy(line,linein,nch); - first = 0; - } else { - strncat(line,linein,nch); - } - nch = nchars - llen; - if (diag) { - printf("CCP4_PARSER: line = \"%s\"\n",line); - printf("CCP4_PARSER: remaining available characters = %d\n",nch); - } - - /* Use ccp4_parse to break the input line up into tokens - Only parse the latest chunk - ccp4_parse will append - new tokens onto the tokenarray */ - nold = ntok; - ntok = ccp4_parse(line,parser); - - if (diag) printf("CCP4_PARSER: ntok = %d, nold = %d\n",ntok,nold); - - /* Have we found more tokens since last time? */ - if (ntok != nold) { - /* Check first token to see if it is an instruction - to read from an external file */ - if (!fromfile && tokenarray[0].word[0] == '@') { - if (diag) printf("CCP4_PARSER: Instruction to read from external file\n"); - /* Get filename and attempt to open file */ - if (tokenarray[0].fullstring) { - llen = strlen(tokenarray[0].fullstring); - strncpy(filename,&tokenarray[0].fullstring[1],llen); - if (diag) printf("CCP4_PARSER: External file name is \"%s\"\n",filename); - /* Open the external file as read-only */ - filein = fopen(filename,"r"); - if (!filein) { - ccp4_signal(CPARSER_ERRNO(CPARSERR_CantOpenFile),"ccp4_parser",NULL); - } else { - fromstdin = 0; - fromfile = 1; - } - } else { - /* Token with file name is null */ - ccp4_signal(CPARSER_ERRNO(CPARSERR_NoName),"ccp4_parser",NULL); - } - /* Blank the line and reset the number of tokens - to force reading from the external file immediately */ - line[0] = '\0'; - ntok = 0; - parser->ntokens = ntok; - - /* Check last token to see if it is continuation - character */ - } else if (ntok > 0 && - (strmatch("&",tokenarray[ntok-1].word) || - strmatch("\\",tokenarray[ntok-1].word) || - strmatch("-",tokenarray[ntok-1].word))) { - if (diag) printf("CCP4_PARSER: Detected continuation character\n"); - /* It's a continuation mark - Set flag to indicate this fact in later rounds */ - continuation = 1; - /* Truncate the line to remove the continuation - character */ - if (ntok > 1) - trunc = tokenarray[ntok-1].ibeg; - else - trunc = 0; - if (diag) printf("CCP4_PARSER: Continuation character should be at position %d\n\"%c\" is the character at this position\n",trunc,line[trunc]); - line[trunc] = '\0'; - /* Lose the last token */ - ntok--; - parser->ntokens = ntok; - } else { - /* Not a continuation character */ - continuation = 0; - } - - } else { - /* Didn't get any more tokens from the last pass - Check if it is a blank line or comment line */ - if (ntok == 0) { - /* Echo comment line to stdout and blank - the line */ - if (strlen(line) > 0) { - if (print) printf(" Comment line--- %s\n",line); - line[0] = '\0'; - nch = nchars; - } - if (fromapp) continuation = 0; - } - } - if (diag) printf("CCP4_PARSER: Continuation = %d\n",continuation); - - /* If the line was supplied by the application but is now being continued - then make sure we read from stdin next time */ - if (continuation && fromapp) { - if (diag) printf("CCP4_PARSER: switching to stdin\n"); - fromapp = 0; - fromstdin = 1; - } - } - - /* Fetch and uppercase keyword */ - if (ntok > 0) { - strtoupper(parser->keyword,tokenarray[0].word); - parser->keyword[strlen(tokenarray[0].word)] = '\0'; - if (diag) printf("CCP4_PARSER: Keyword is %s\n",parser->keyword); - /*Echo the line to standard output */ - if (print) printf(" Data line--- %s\n",line); - } else { - parser->keyword[0] = '\0'; - } - - free(linein); - /* Update the returned variables */ - parser->fp = filein; - - if (diag) printf("CCP4_PARSER: Returning from ccp4_parser\n"); - return ntok; -} - -/*------------------------------------------------------------------*/ - -/* ccp4_keymatch - - Returns 1 if keywords keyin1 and keyin2 are "identical", 0 otherwise. - - Keywords are identical if they are the same up to the first four - characters, independent of case. -*/ -int ccp4_keymatch(const char *keyin1, const char *keyin2) -{ - int len1,len2; - char key1[5],key2[5],keyup1[5],keyup2[5]; - - /* Initial check */ - if (!keyin1 || !keyin2) return 0; - - /* Compare truncated lengths */ - len1 = strlen(keyin1); - if (len1 > 4) len1 = 4; - - len2 = strlen(keyin2); - if (len2 > 4) len2 = 4; - - /* If lengths don't match then keywords can't be identical */ - if (len1 != len2) return 0; - - /* If supplied words are longer than four characters then - truncate them after the fourth character */ - strncpy(key1,keyin1,len1); - key1[len1] = '\0'; - - strncpy(key2,keyin2,4); - key2[len2] = '\0'; - - /* Convert strings to uppercase */ - strtoupper(keyup1,key1); - keyup1[len1] = '\0'; - strtoupper(keyup2,key2); - keyup2[len2] = '\0'; - - /* Compare using strmatch */ - return strmatch(keyup1,keyup2); -} - -char *strtoupper (char *str1, const char *str2) -{ - int len2,i; - - if (!str2) return NULL; - - len2 = strlen(str2); - if (len2 > 0) for (i=0; i 0) for (i=0; i -1) return 0; - point = ichar; - is_int = 0; - is_frc = 1; - - } else if (toupper(this_char) == 'E') { - char next_char = (ichar+1 < lstr ) ? str[ichar+1] : '\0'; - if ( next_char == '+' || next_char == '-') - next_char = (ichar+2 < lstr ) ? str[ichar+2] : '\0'; - /* require the next active character after E to be a digit */ - if ( !isdigit(next_char) ) return 0; - /* Exponent? i.e. e or E - There can only be one exponent */ - if (exponent > -1) return 0; - exponent = ichar; - is_int = 0; - is_frc = 0; - is_exp = 1; - } else { - /* Not a permissible character - This is not a number so get out now */ - if (diag) printf("DOUBLEFROMSTR: Not a permitted character - exiting\n"); - return 0; - } - } else { - /* It is a digit - Build up the value of each component */ - - if (diag) printf(" is a digit ...\n"); - - this_str[0] = this_char; - this_str[1] = '\0'; - char_value = atoi(this_str); - - if (is_int) { - /* Integer part of the number */ - n_int_digits++; - int_value = int_value * 10.0 + (double) char_value; - if (diag) printf("DOUBLEFROMSTR: Processing integer component: value = %lf, #digits = %d\n",int_value,n_int_digits); - } else if (is_frc) { - /* Decimal part of the number */ - n_frc_digits++; - frc_value = frc_value + ((double) char_value)/pow(10.0,(double) n_frc_digits); - if (diag) printf("DOUBLEFROMSTR: Processing decimal component: value = %lf, #digits = %d\n",frc_value,n_frc_digits); - } else if (is_exp) { - /* Exponent */ - n_exp_digits++; - exp_value = exp_value * 10.0 + (double) char_value; - if (diag) printf("DOUBLEFROMSTR: Processing exponential component: value = %lf, #digits = %d\n",exp_value,n_exp_digits); - } - - } - /* Next character */ - ichar++; - } - /* - Done loop over characters - if we have got this far then it - must be a number - */ - - /* Set component values */ - int_value = int_value * (double) sign; - frc_value = frc_value * (double) sign; - exp_value = exp_value * (double) expsign; - - /* Export component values */ - *intvaluePtr = int_value; - *frcvaluePtr = frc_value; - *expvaluePtr = exp_value; - - /* Export numbers of 'digits' */ - *intdigitsPtr = n_int_digits; - *frcdigitsPtr = n_frc_digits; - *expdigitsPtr = n_exp_digits; - - /* Is the exponent out-of-range? */ - - /* There are two considerations: - (i) can pow(10.0,exp_value) actually be evaluated? - (ii) can int_part * pow(10.0,exp_value) be evaluated? - This second is an issue for numbers with int_part > 0. - */ - if ( (exp_value + (double) (n_int_digits - 1) > max_exp) && - (n_int_digits || n_frc_digits) ) { - ccp4_signal(CPARSER_ERRNO(CPARSERR_ExpOverflow),"doublefromstr",NULL); - printf("DOUBLEFROMSTR: Token is \"%s\"\n",str); - *valuePtr = 0.0; - } else if ( (exp_value < min_exp) && - (n_int_digits || n_frc_digits) ) { - ccp4_signal(CPARSER_ERRNO(CPARSERR_ExpUnderflow),"doublefromstr",NULL); - printf("DOUBLEFROMSTR: Token is \"%s\"\n",str); - *valuePtr = 0.0; - } else { - /* Evaluate the number to get a value */ - *valuePtr = int_value + frc_value; - if (is_exp) *valuePtr = (*valuePtr)*pow(10.0,exp_value); - } - - if (diag) printf("DOUBLEFROMSTR: Integer component = %lf, (%d digits)\n", - *intvaluePtr,*intdigitsPtr); - if (diag) printf("DOUBLEFROMSTR: Decimal component = %lf, (%d digits)\n", - *frcvaluePtr,*frcdigitsPtr); - if (diag) printf("DOUBLEFROMSTR: Exponent component = %lf, (%d digits)\n", - *expvaluePtr,*expdigitsPtr); - if (diag) printf("DOUBLEFROMSTR: Finished - value is determined to be %lf\n",*valuePtr); - - return 1; -} - -ccp4_symop symop_to_rotandtrn(const char *symchs_begin, const char *symchs_end) { - - float rsm[4][4]; - - symop_to_mat4(symchs_begin, symchs_end, rsm[0]); - return (mat4_to_rotandtrn((const float (*)[4])rsm)); - -} - -/*------------------------------------------------------------------*/ - -/* symop_to_mat4 - - Translates a single symmetry operator string into a 4x4 quine - matrix representation - NB Uses a utility function (symop_to_mat4_err) when reporting - failures. - - Syntax of possible symop strings: - - real space symmetry operations, e.g. X+1/2,Y-X,Z - reciprocal space operations, e.g. h,l-h,-k - reciprocal axis vectors, e.g. a*+c*,c*,-b* - real space axis vectors, e.g. a,c-a,-b - - The strings can contain spaces, and the coordinate and translation - parts may be in either order. - - The function returns 1 on success, 0 if there was a failure to - generate a matrix representation. -*/ -const char *symop_to_mat4(const char *symchs_begin, const char *symchs_end, float *rot) -{ - int no_real =0, no_recip = 0, no_axis = 0; /* counters */ - int col = 3, nops = 0; - int nsym = 0, init_array = 1; - float sign = 1.0f, value = 0.0f, value2; - char *cp, ch; - const char *ptr_symchs = symchs_begin; - int j,k; /* loop variables */ - int Isep = 0; /* parsed seperator? */ - - while (ptr_symchs < symchs_end) { - ch = *ptr_symchs; - - /* Parse symop */ - if (isspace(ch)) { - /* Have to allow symop strings to contain spaces for - compatibility with older MTZ files - Ignore and step on to next character */ - ++ptr_symchs; - continue; - } else if (ch == ',' || ch == '*') { - ++ptr_symchs; - if (value == 0.0f && col == 3) { - /* nothing set, this is a problem */ - ccp4_signal(CPARSER_ERRNO(CPARSERR_SymopToMat),"symop_to_mat4",NULL); - return NULL ; - } else { - Isep = 1; /* drop through to evaluation*/ - } - } else if (ch == 'X' || ch == 'x') { - no_real++, col = 0; - if (value == 0.0f) value = sign * 1.0f; - ++ptr_symchs; - continue; - } else if (ch == 'Y' || ch == 'y') { - no_real++, col = 1; - if (value == 0.0f) value = sign * 1.0f; - ++ptr_symchs; - continue; - } else if (ch == 'Z' || ch == 'z') { - no_real++, col = 2; - if (value == 0.0f) value = sign * 1.0f; - ++ptr_symchs; - continue; - } else if (ch == 'H' || ch == 'h') { - no_recip++, col = 0; - if (value == 0.0f) value = sign * 1.0f; - ++ptr_symchs; - continue; - } else if (ch == 'K' || ch == 'k') { - no_recip++, col = 1; - if (value == 0.0f) value = sign * 1.0f; - ++ptr_symchs; - continue; - } else if (ch == 'L' || ch == 'l') { - no_recip++, col = 2; - if (value == 0.0f) value = sign * 1.0f; - ++ptr_symchs; - continue; - } else if (ch == 'A' || ch == 'a') { - no_axis++, col = 0; - if (value == 0.0f) value = sign * 1.0f; - if (*++ptr_symchs == '*' && ( no_axis != 3 || no_recip )) ++ptr_symchs; - continue; - } else if (ch == 'B' || ch == 'b') { - no_axis++, col = 1; - if (value == 0.0f) value = sign * 1.0f; - if (*++ptr_symchs == '*' && ( no_axis != 3 || no_recip )) ++ptr_symchs; - continue; - } else if (ch == 'C' || ch == 'c') { - no_axis++, col = 2; - if (value == 0.0f) value = sign * 1.0f; - if (*++ptr_symchs == '*' && ( no_axis != 3 || no_recip )) ++ptr_symchs; - continue; - } else if (ch == '+' || ch == '-') { - sign = ((ch == '+')? 1.0f : -1.0f) ; - ++ptr_symchs; - if ( value == 0.0f && col == 3) - continue; - /* drop through to evaluation */ - } else if ( ch == '/') { - ++ptr_symchs; - if (value == 0.0f) { - /* error */ - symop_to_mat4_err(symchs_begin); - return NULL; - } - value2 = strtod(ptr_symchs, &cp); - if (!value2) { - /* error */ - symop_to_mat4_err(symchs_begin); - return NULL; - } - /* Nb don't apply the sign to value here - It will already have been applied in the previous round */ - value = (float) value/value2; - ptr_symchs = cp; - continue; - } else if ( isdigit(ch) || ch == '.') { - value = sign*strtod(ptr_symchs, &cp); - ptr_symchs = cp; - continue; - } else { - ++ptr_symchs; - continue; - } - - /* initialise and clear the relevant array (init_array == 1)*/ - /* use knowledge that we are using a [4][4] for rot */ - if (init_array) { - init_array = 0; - for (j = 0 ; j !=4 ; ++j) - for (k = 0; k !=4 ; ++k) - rot[(((nsym << 2) + k ) << 2) +j] = 0.0f; - rot[(((nsym << 2 ) + 3 ) << 2) +3] = 1.0f; - } - - /* value to be entered in rot */ - rot[(((nsym << 2) + nops) << 2) + col] = value; - - /* have we passed a operator seperator */ - if (Isep) { - Isep = 0; - ++nops; - sign = 1.0f; - if (nops == 3 ) { ++nsym; nops=0 ; init_array = 1; } - } - - /* reset for next cycle */ - col = 3; - value = 0.0f; - no_recip = 0, no_axis = 0, no_real = 0; - } - - /* Tidy up last value */ - if (value) rot[(((nsym << 2) + nops) << 2) + col] = value; - - if (nops<2) { - /* Processed fewer than 3 operators, raise an error */ - symop_to_mat4_err(symchs_begin); - return NULL; - } - - /* Return with success */ - return ptr_symchs; -} - -/* Internal function: report error from symop_to_mat4_err */ -int symop_to_mat4_err(const char *symop) -{ - printf("\n **SYMMETRY OPERATOR ERROR**\n\n Error in interpreting symop \"%s\"\n\n", - symop); - ccp4_signal(CPARSER_ERRNO(CPARSERR_SymopToMat),"symop_to_mat4",NULL); - return 1; -} - -ccp4_symop mat4_to_rotandtrn(const float rsm[4][4]) { - - int i,j; - ccp4_symop symop; - - for (i = 0; i < 3; ++i) { - for (j = 0; j < 3; ++j) - symop.rot[i][j]=rsm[i][j]; - symop.trn[i]=rsm[i][3]; - } - - return (symop); -} - -char *rotandtrn_to_symop(char *symchs_begin, char *symchs_end, const ccp4_symop symop) -{ - float rsm[4][4]; - - rotandtrn_to_mat4(rsm,symop); - return(mat4_to_symop(symchs_begin,symchs_end,(const float (*)[4])rsm)); -} - -void rotandtrn_to_mat4(float rsm[4][4], const ccp4_symop symop) { - - int i,j; - - for (i = 0; i < 3; ++i) { - for (j = 0; j < 3; ++j) - rsm[i][j]=symop.rot[i][j]; - rsm[i][3]=symop.trn[i]; - rsm[3][i]=0.0; - } - rsm[3][3]=1.0; -} - -char *mat4_to_symop(char *symchs_begin, char *symchs_end, const float rsm[4][4]) -{ - static char axiscr[] = {'X','Y','Z'}; - static char numb[] = {'0','1','2','3','4','5','6','7','8','9'}; - static int npntr1[12] = { 0,1,1,1,0,1,0,2,3,5,0,0 }; - static int npntr2[12] = { 0,6,4,3,0,2,0,3,4,6,0,0 }; - - int jdo10, jdo20, irsm, itr, ist; - register char *ich; - int debug=0; - - if (debug) - for (jdo20 = 0; jdo20 != 4; ++jdo20) - printf("Input matrix: %f %f %f %f \n",rsm[jdo20][0],rsm[jdo20][1], - rsm[jdo20][2],rsm[jdo20][3]); - - /* blank output string */ - for (ich = symchs_begin; ich < symchs_end; ++ich) - *ich = ' '; - ich = symchs_begin; - - for (jdo20 = 0; jdo20 != 3; ++jdo20) { - *ich = '0'; - ist = 0; /* ---- Ist is flag for first character of operator */ - for (jdo10 = 0; jdo10 != 4; ++jdo10) { - - if (rsm[jdo20][jdo10] != 0.f) { - irsm = (int) rint(fabs(rsm[jdo20][jdo10])); - - if ( rsm[jdo20][jdo10] > 0. && ist) { - if (ich >= symchs_end) { - ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), - "mat4_to_symop 1", NULL); - return NULL; } - *ich++ = '+'; - } else if ( rsm[jdo20][jdo10] < 0.f ) { - if (ich >= symchs_end) { - ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), - "mat4_to_symop 2", NULL); - return NULL; } - if (jdo10 != 3) { - *ich++ = '-'; - } else { - /* translation part is forced to be positive, see below */ - *ich++ = '+'; - } - ist = 1; - } - - if (jdo10 != 3) { - /* rotation part */ - if (ich+1 >= symchs_end) { - ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), - "mat4_to_symop 3", NULL); - return NULL; } - if (irsm != 1) { - *ich++ = numb[irsm]; - *ich++ = axiscr[jdo10]; - } else { - *ich++ = axiscr[jdo10]; - } - ist = 1; - } else { - /* translation part */ - itr = (int) rint(rsm[jdo20][3]*12.0); - while (itr < 0) itr += 12; - itr = (itr - 1) % 12; - if (npntr1[itr] > 0) { - if (ich+2 >= symchs_end) { - ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), - "mat4_to_symop 4", NULL); - return NULL; } - *ich++ = numb[npntr1[itr]]; - *ich++ = '/'; - *ich++ = numb[npntr2[itr]]; - } else { - *--ich = ' '; - } - } - } - } - if (jdo20 != 2) { - if (*ich == '0') - ++ich; - if (ich+2 >= symchs_end) { - ccp4_signal(CCP4_ERRLEVEL(3) | CPARSER_ERRNO(CPARSERR_MatToSymop), - "mat4_to_symop 5", NULL); - return NULL; } - *ich++ = ','; - *ich++ = ' '; - *ich++ = ' '; - } - } - return symchs_begin; -} - -char *mat4_to_recip_symop(char *symchs_begin, char *symchs_end, const float rsm[4][4]) -{ - char *symop; - size_t lsymop; - register char *ich, *ich_out; - - lsymop = symchs_end-symchs_begin; - symop = (char *) ccp4_utils_malloc(lsymop*sizeof(char)); - - mat4_to_symop(symop, symop+lsymop, rsm); - ich_out = symchs_begin; - for (ich = symop; ich < symop+lsymop; ++ich) { - if (*ich == 'X') { - if (ich_out == symchs_begin || (ich_out > symchs_begin && - *(ich_out-1) != '-' && *(ich_out-1) != '+')) *ich_out++ = '+'; - *ich_out++ = 'h'; - } else if (*ich == 'Y') { - if (ich_out == symchs_begin || (ich_out > symchs_begin && - *(ich_out-1) != '-' && *(ich_out-1) != '+')) *ich_out++ = '+'; - *ich_out++ = 'k'; - } else if (*ich == 'Z') { - if (ich_out == symchs_begin || (ich_out > symchs_begin && - *(ich_out-1) != '-' && *(ich_out-1) != '+')) *ich_out++ = '+'; - *ich_out++ = 'l'; - } else if (*ich == ' ') { - /* skip */ - } else { - *ich_out++ = *ich; - } - } - while (ich_out < symchs_end) *ich_out++ = ' '; - - free (symop); - return symchs_begin; -} diff --git a/ccp4c/ccp4/ccp4_parser.h b/ccp4c/ccp4/ccp4_parser.h deleted file mode 100644 index bb768e8b..00000000 --- a/ccp4c/ccp4/ccp4_parser.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - ccp4_parser.h: Headers for functions to read in and "parse" CCP4 keyworded input. - Copyright (C) 2001 CCLRC, Peter Briggs - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @page cparser_page CParser library - * - * @verbatim - - - - @endverbatim - * - * @section cparser_file_list File list - -
    -
  • ccp4_parser.h - contains details of the C/C++ API -
- - * @section cparser_overview Overview - -These functions do CCP4-style parsing, as used for processing keywords -of CCP4 programs, MTZ header records, etc. - - * @section cparser_usage Usage - -The following code snippets illustrate how the functions might be used -to read from stdin: -
-
-int           ntok=0;
-char          line[201],*key;
-CCP4PARSERTOKEN * token=NULL;
-CCP4PARSERARRAY * parser;
-
-  parser = (CCP4PARSERARRAY *) ccp4_parse_start(20);
-  key   = parser->keyword;
-  token = parser->token;
-
-  RC   = 0;
-  while (!RC) {
-
-    line[0] = '\0';
-    ntok = ccp4_parser(line,200,parser,1);
-
-    if (ntok < 1) {
-
-      RC = 111;
-
-    } else {      
-
-      if (ccp4_keymatch("MINDIST",key))  {
-	if (ntok != 2) {
-	  ccperror ( 1,"MINDIST requires a single numerical argument" );
-	  RC = -100;
-	} else {
-	  minDist = token[1].value;
-        }
-      }	else  {
-	printf ( "Unrecognised keyword \"%s\"\n",token[0].fullstring );
-	RC = -118;
-      }
-    }
-  }
-
-  ccp4_parse_end ( parser );
-
-
- - * @section cparser_examples Examples - -See the distributed programs NCONT and -PDBCUR. - - */ - -/** @file ccp4_parser.h - * - * @brief Functions to read in and "parse" CCP4-style keyworded input. - * - * @author Peter Briggs - * @date April 2001 - */ - -/*------------------------------------------------------------------*/ - -/* Macro definitions */ - -/*------------------------------------------------------------------*/ - -#ifndef __CCP4_Parser__ -#define __CCP4_Parser__ - -/* rcsidhhh[] = "$Id$" */ - -/* note order: these must be outside CCP4 namespace */ -#include -#include"ccp4_utils.h" -#include"ccp4_spg.h" - -/* Macro to make C functions callable from C++ */ -#ifdef __cplusplus -namespace CCP4 { -extern "C" { -typedef CSym::ccp4_symop ccp4_symop; -#endif - -/*------------------------------------------------------------------*/ - -/* Structures and typedefs */ - -/*------------------------------------------------------------------*/ - -/* CCP4 Parser token - Construct to hold the information about a single token */ - -typedef struct { - char *fullstring; /* Full string containing all of token */ - char word[5]; /* First four characters of token */ - double value; /* Equivalent numerical value */ - int isstring; /* Flag: true if token is character string */ - int strlength; /* Number of characters in whole token (strings only) */ - int isnumber; /* Flag: true if token is number */ - int intdigits; /* Number of 'digits' preceeding the decimal point - (numbers only) */ - int frcdigits; /* Number of 'digits' after the decimal point (numbers - only) */ - int isquoted; /* Flag: true if token is contained in quotes */ - int isnull; /* Flag: true if token is null field */ - int ibeg,iend; /* Begin and end character positions of token - in input line */ -} CCP4PARSERTOKEN; - -/* CCP4 Parser array - Construct to hold the information about a parsed line */ - -typedef struct { - /* "Public" members */ - char keyword[5]; /* Keyword (=token[1].token, uppercased) */ - int ntokens; /* Number of tokens */ - CCP4PARSERTOKEN *token; /* Array of tokens */ - /* "Private" members */ - FILE *fp; /* Pointer to an external command file */ - int maxtokens; /* Maximum number of tokens allowed */ - char *delim; /* List of delimiter characters */ - char *nulldelim; /* List of null delimiter characters */ - char *comment; /* List of comment characters */ - double max_exponent; /* Largest allowed exponent for numerical tokens */ - double min_exponent; /* Smallest allowed exponent for numerical tokens */ -} CCP4PARSERARRAY; - -/*------------------------------------------------------------------*/ - -/* Function Prototypes */ - -/*------------------------------------------------------------------*/ - -/* Core cparser functions */ - -/** Initialise a CCP4PARSERARRAY to be used in subsequent calls to - * ccp4_parser routines. The calling function must supply the maximum - * number of tokens on a line (including continuation lines). - * @param maxtokens maximum number of tokens on a line - * @return pointer to a new CCP4PARSERARRAY structure - */ -CCP4PARSERARRAY* ccp4_parse_start(const int maxtokens); - -/** Cleans up a CCP4PARSEARRAY after being used by ccp4_parse/ - ccp4_parser functions. - * @param parsePtr pointer to a CCP4PARSERARRAY structure - * @return 0 on completion - */ -int ccp4_parse_end(CCP4PARSERARRAY *parsePtr); - -int ccp4_parse_init_token(const CCP4PARSERARRAY *parsePtr, const int itok); - -int ccp4_parse_delimiters(CCP4PARSERARRAY *parsePtr, const char *delim, - const char *nulldelim); - -int ccp4_parse_comments(CCP4PARSERARRAY *parsePtr, const char *comment_chars); - -int ccp4_parse_maxmin(CCP4PARSERARRAY *parsePtr, const double max_exponent, - const double min_exponent); - -int ccp4_parse_reset(CCP4PARSERARRAY *parsePtr); - -int ccp4_parse(const char *line, CCP4PARSERARRAY *parser); - -/** The main function for parsing lines, either supplied or read - * from stdin. - * @param line pointer to a null-terminated string of characters, - * forming the input to be processed. On input can either be an empty - * string ("") which forces reading from stdin, or contain characters - * to be processed. On output "line" will be overwritten with the actual - * input line. - * @param n maximum number of characters that can be read into - * "line" i.e. the size of "line" in memory. - * @param parser pointer to a CCP4PARSERARRAY structure which will - * be used to hold the results of processing the input line. - * @param print flag controlling echoing of input lines to stdout. - * print=0: suppress echoing of lines to stdout. Otherwise echoing is - * turned on. - * @return Number of tokens found. - */ -int ccp4_parser(char *line, const int n, CCP4PARSERARRAY *parser, - const int print); - -/* External utility functions */ - -/** Test whether two keywords are identical. Keywords are identical if - * they are the same up to the first four characters, independent of case. - * @param keyin1 keyword 1. - * @param keyin2 keyword 2. - * @return 1 if keywords keyin1 and keyin2 are "identical", 0 otherwise. - */ -int ccp4_keymatch(const char *keyin1, const char *keyin2); - -/* Internal utility functions */ - -/** Convert string to uppercase. - * @param str1 On exit str1 will contain uppercased copy of str2 - * @param str2 Input string - * @return str1 - */ -char *strtoupper (char *str1, const char *str2); - -/** Convert string to lowercase. - * @param str1 On exit str1 will contain lowercased copy of str2 - * @param str2 Input string - * @return str1 - */ -char *strtolower (char *str1, const char *str2); - -int strmatch (const char *str1, const char *str2); - -int charmatch(const char character, const char *charlist); - -int doublefromstr(const char *str, const double max_exp, const double min_exp, - double *valuePtr, double *intvaluePtr, int *intdigitsPtr, - double *frcvaluePtr, int *frcdigitsPtr, - double *expvaluePtr, int *expdigitsPtr); - -/** Convert symmetry operator as string to ccp4_symop struct. - * @param symchs_begin pointer to beginning of string - * @param symchs_end pointer to end of string (i.e. last character - * is *(symchs_end-1) ) - * @return pointer to ccp4_symop struct - */ -ccp4_symop symop_to_rotandtrn(const char *symchs_begin, const char *symchs_end); - -/** Convert symmetry operator as string to matrix. - * This is Charles' version of symfr. Note that translations - * are held in elements [*][3] and [3][3] is set to 1.0 - * @param symchs_begin pointer to beginning of string - * @param symchs_end pointer to end of string (i.e. last character - * is *(symchs_end-1) ) - * @param rot 4 x 4 matrix operator - * @return NULL on error, final position pointer on success - */ -const char * symop_to_mat4(const char *symchs_begin, const char *symchs_end, float *rot); -int symop_to_mat4_err(const char *symop); -ccp4_symop mat4_to_rotandtrn(const float rsm[4][4]); -/* This is Charles' version of symtr */ -char *rotandtrn_to_symop(char *symchs_begin, char *symchs_end, const ccp4_symop symop); -void rotandtrn_to_mat4(float rsm[4][4], const ccp4_symop symop); - -/** Convert symmetry operator as matrix to string. - * This is Charles' version of symtr. Note that translations - * are held in elements [*][3] and [3][3] is set to 1.0 - * @param symchs_begin pointer to beginning of string - * @param symchs_end pointer to end of string (i.e. last character - * is *(symchs_end-1) ) - * @param rsm 4 x 4 matrix operator - * @return pointer to beginning of string - */ -char *mat4_to_symop(char *symchs_begin, char *symchs_end, const float rsm[4][4]); - -/** Convert symmetry operator as matrix to string in reciprocal space notation. - * This is Charles' version of symtr. Note that translations - * are held in elements [*][3] and [3][3] is set to 1.0 - * @param symchs_begin pointer to beginning of string - * @param symchs_end pointer to end of string (i.e. last character - * is *(symchs_end-1) ) - * @param rsm 4 x 4 matrix operator - * @return pointer to beginning of string - */ -char *mat4_to_recip_symop(char *symchs_begin, char *symchs_end, const float rsm[4][4]); - -#ifdef __cplusplus -} -} -#endif - -#endif /* __CCP4_Parser__ */ diff --git a/ccp4c/ccp4/ccp4_program.c b/ccp4c/ccp4/ccp4_program.c deleted file mode 100644 index a7671be9..00000000 --- a/ccp4c/ccp4/ccp4_program.c +++ /dev/null @@ -1,353 +0,0 @@ -/* - ccp4_program.c: Utilies to set and fetch program information. - Copyright (C) 2001 CCLRC, Peter Briggs - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_program.c - * Utilies to set and fetch program information. - * Peter Briggs CCP4 May 2001 - */ - -#include -#include -#include -#include -#include "ccp4_program.h" -#include "ccp4_parser.h" -#include "ccp4_utils.h" -#include "ccp4_general.h" -/* rcsid[] = "$Id$" */ - -static char ccp4version[MAXLEN_PROGVERSION]; - -char *ccp4_prog_vers(const char *progvers) -{ - static char programversion[MAXLEN_PROGVERSION]=""; - - if (progvers) { - strncpy(programversion, progvers, MAXLEN_PROGVERSION); - programversion[MAXLEN_PROGVERSION-1] = '\0'; - } - return programversion; -} - -char *ccp4_vers_no(void) -{ - static int init=0; - - char *filepath=NULL, *filename=NULL; - char *vfile="/lib/ccp4/MAJOR_MINOR"; - FILE *cfile; - int i; - - if (!init) { - strcpy(ccp4version,CCP4_VERSION_NO); - - filepath = (char *) getenv("CCP4"); - if (filepath) { - filename = (char *) ccp4_utils_malloc(sizeof(char)*(strlen(filepath)+strlen(vfile))+1); - strcpy(filename,filepath); - strcat(filename,vfile); - if (ccpexists(filename)) { - cfile=fopen(filename,"r"); - if (cfile) { - fgets(ccp4version,MAXLEN_PROGVERSION,cfile); - i = strlen(ccp4version)-1; - while (isspace(ccp4version[i]) ) { - ccp4version[i--]='\0'; - } - } - } - /* Make sure that we clean up */ - if (filename) free(filename); - } - init=1; - } - return ccp4version; -} -/*------------------------------------------------------------------*/ - -/* ccp4ProgramName - - Set or return program name - - Always returns a pointer to the program name - If progname is not NULL then set the program name to - progname. - - NB Default program name will be returned as "CCP4", - until reset by the calling subprogram. -*/ -char *ccp4ProgramName(const char *progname) -{ - static char programname[MAXLEN_PROGNAME]="CCP4"; - int i; - - if (progname) { - i = 0; - while (progname[i] != '\0' && i < MAXLEN_PROGNAME) { - programname[i] = progname[i]; - ++i; - } - if (i == MAXLEN_PROGNAME) { - programname[MAXLEN_PROGNAME-1] = '\0'; - } else { - programname[i] = '\0'; - } - } - return programname; -} - -/* ccp4_prog_info - - Print program info for -i option. - */ -void ccp4_prog_info(void) -{ - printf("CCP4 software suite: library version %s\n",ccp4_vers_no()); - printf("CCP4 software suite: patch level %s\n",ccp4_vers_no()); - printf("Program: %s",ccp4ProgramName(NULL)); - if (ccp4_prog_vers(NULL) && strlen(ccp4_prog_vers(NULL))) - printf("; version %s",ccp4_prog_vers(NULL)); - printf("\n"); -} - -/* ccp4RCSDate - - Set or return program RCS date - - If the input string is not a NULL pointer then - it is assumed to be an RCS string - This is processed to extract a date string in - the form "DD/MM/YY" (day/month/year), which is - then stored. - - ccp4RCSDate always returns the currently - stored date string. -*/ -char *ccp4RCSDate(const char *rcs_string) -{ - static char RCSDate[MAXLEN_RCSDATE]=""; - char tmpstr1[8],tmpstr2[3]; - - /* Deconstruct the RCS string passed to this - function */ - if (rcs_string) { - /* Extract useful data from RCS string for examination */ - strncpy(tmpstr1,rcs_string,7); - tmpstr1[7] = '\0'; - strncpy(tmpstr2,rcs_string,2); - tmpstr2[2] = '\0'; - if (strncmp(tmpstr1,"$Date: ",7) == 0) { - /* Raw form of RCS string (not exported) i.e.: - "$Date$" - */ - /* Build the date string in the form DD/MM/YY */ - strncpy(RCSDate,rcs_string+15,2); - strncat(RCSDate,"/",1); - strncat(RCSDate,rcs_string+12,2); - strncat(RCSDate,"/",1); - strncat(RCSDate,rcs_string+9,2); - } else if (strlen(rcs_string) > 10 && - (strncmp(tmpstr2,"19",2) == 0 || strncmp(tmpstr2,"20",2)) ) { - /* RCS string after export i.e.: - "2003/05/14 11:45:13 ..." */ - /* Build the date string in the form DD/MM/YY */ - strncpy(RCSDate,rcs_string+8,2); - strncat(RCSDate,"/",1); - strncat(RCSDate,rcs_string+5,2); - strncat(RCSDate,"/",1); - strncat(RCSDate,rcs_string+2,2); - } else { - /* Fallback */ - strncpy(RCSDate,"",1); - } - } - /* Always return the stored date */ - return RCSDate; -} - -/* ccp4ProgramTime - - Set or print program time information -*/ -void ccp4ProgramTime(int init) -{ - static int elaps0=0; - static float tarray0[2]; - int elaps; - float tarray[2]; - - if (init || !elaps0 ) { - elaps0 = time(NULL); - ccp4_utils_etime(tarray0); - } else { - elaps = time(NULL) - elaps0; - ccp4_utils_etime(tarray); - - printf("Times: User: %9.1fs System: %6.1fs Elapsed: %5d:%2.2d \n", - tarray[0]-tarray0[0],tarray[1]-tarray0[1],elaps/60,elaps%60); - } - -} - -/* ccp4VerbosityLevel - - Set or return the reference verbosity level - - Always return the verbosity level - if verboselevel is - between 0 and 9 then reset the verbosity level to - verboselevel -*/ -int ccp4VerbosityLevel(int level) -{ - /* The default level is 1 */ - static int verbositylevel=1; - - if (level > -1 && level < 10) - verbositylevel = level; - return verbositylevel; -} - -/*------------------------------------------------------------------*/ - -/* - Callback functionality - */ - -/* ccp4Callback - - Set or invoke a user-defined callback function. - - Internal function: applications should use the API functions - ccp4SetCallback and ccp4InvokeCallback - */ -int ccp4Callback(CCP4INTFUNCPTR mycallback, char *mode, int ierr, - const char *message) -{ - static CCP4INTFUNCPTR callback=ccp4NullCallback; - - if (strncmp(mode,"set",3) == 0) { - /* Set callback - Store the pointer to the callback function */ - callback=mycallback; - return 1; - } else if (strncmp(mode,"invoke",3) == 0) { - /* Invoke callback - Execute the callback function */ - return callback(ierr,message); - } - /* Unrecognised mode */ - return 0; -} - -/* ccp4SetCallback - - Store a pointer to a user-defined callback function of - the form "int func(int, char *)" - - This is a wrapper to ccp4Callback in "set" mode. - */ -int ccp4SetCallback(CCP4INTFUNCPTR mycallback) -{ - return ccp4Callback(mycallback,"set",-1,"No message"); -} - -/* ccp4InvokeCallback - - Execute the user-defined callback function (previously - set up using ccp4SetCallback) with the supplied - arguments. - - This is a wrapper to ccp4Callback in "invoke" mode. - */ -int ccp4InvokeCallback(int ierr, const char *message) -{ - return ccp4Callback(ccp4NullCallback,"invoke",ierr,message); -} - -/* Default null callback function - - Internal function: this is the default callback function - used by ccp4Callback if no user-defined function has been - specified. - */ -int ccp4NullCallback(int level, const char *message) -{ - /* This is the default callback function which takes no - action */ - return 1; -} - -/*------------------------------------------------------------------*/ - -/* check existence of licence agreement */ - -int ccp4_licence_exists(const char *name) -{ - int sue=1,lpath; - char *filepath=NULL,*filename=NULL,tmp_string[20]; - - strtoupper(tmp_string,name); - if (strmatch(tmp_string,"CCP4")) { - filepath = (char *) getenv("CCP4"); - if (filepath) { - lpath = strlen(filepath); - filename = (char *) ccp4_utils_malloc(sizeof(char)*(lpath+12)); - strcpy(filename,filepath); - strcpy(filename+lpath,"/.agree2ccp4"); - if (ccpexists(filename)) sue = 0; - /* Make sure that we clean up */ - if (filename) free(filename); - } - if (sue == 1) { - filepath = (char *) getenv("HOME"); - if (filepath) { - lpath = strlen(filepath); - filename = (char *) ccp4_utils_malloc(sizeof(char)*(lpath+12)); - strcpy(filename,filepath); - strcpy(filename+lpath,"/.agree2ccp4"); - if (ccpexists(filename)) sue = 0; - /* Make sure that we clean up */ - if (filename) free(filename); - } - } - if (sue == 1) { - ccperror(1,"Cannot find required license agreements!"); - return 0; - } - } - return 1; -} - -/* html_log_output and summary_output currently only used by ccperror to - tidy up Fortran program output. Defaults are 0 for C programs. */ -int html_log_output(int ihtml_in) { - static int ihtml=0; - - if (ihtml_in >= 0) - ihtml = ihtml_in; - return ihtml; -} - -int summary_output(int isumm_in) { - static int isumm=0; - - if (isumm_in >= 0) - isumm = isumm_in; - return isumm; -} diff --git a/ccp4c/ccp4/ccp4_program.h b/ccp4c/ccp4/ccp4_program.h deleted file mode 100644 index a5fb5bc1..00000000 --- a/ccp4c/ccp4/ccp4_program.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - ccp4_program.h: Headers to utilies to set and fetch program information. - Copyright (C) 2001 CCLRC, Peter Briggs - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - - -/** @file ccp4_program.h - * Utilies to set and fetch program information. - * Peter Briggs CCP4 May 2001 - */ - -/*------------------------------------------------------------------*/ - -/* Macro definitions */ - -/*------------------------------------------------------------------*/ - -#ifndef __CCP4Program__ -#define __CCP4Program__ - -/* rcsidhp[] = "$Id$" */ - -#ifdef __cplusplus -namespace CCP4 { -extern "C" { -#endif - -#define CCP4_VERSION_NO "8.0" -#define CCP4_PATCH_LEVEL "8.0.0" - -/* Maximum lengths of strings holding program names and versions */ -#define MAXLEN_PROGNAME 80 -#define MAXLEN_PROGVERSION 80 -#define MAXLEN_RCSDATE 80 - -/*------------------------------------------------------------------*/ - -/* Type Definitions */ - -/*------------------------------------------------------------------*/ - -/* Define a type which is a pointer to a function taking an integer - and a pointer to character, and returning an integer */ -typedef int (*CCP4INTFUNCPTR)(int, const char *); - -/*------------------------------------------------------------------*/ - -/* Function Prototypes */ - -/*------------------------------------------------------------------*/ - -/** Register or query program version. - * @param progvers Program version string, or NULL to query existing value. - * @return Program version string. - */ -char *ccp4_prog_vers(const char *progvers); - -/** Query ccp4 version. - * @return CCP4 version string. - */ -char *ccp4_vers_no(void); - -/** Set or return program name. - * @param progname Program name, or NULL to query existing value. - * @return Program name - */ -char *ccp4ProgramName(const char *progname); - -/** Print program info for -i option. - */ -void ccp4_prog_info(void); - -/** Set or return program RCS date - * @param rcs_string Date string, or NULL to query existing value. - * @return Date string - */ -char *ccp4RCSDate(const char *rcs_string); - -/** Set or print program time information - * @param init - */ -void ccp4ProgramTime(int init); - -/** Set or return the reference verbosity level - * Always return the verbosity level - if verboselevel is - * between 0 and 9 then reset the verbosity level to - * verboselevel - * @param level Verbosity level, or -1 to query existing value. - * @return Verbosity level - */ -int ccp4VerbosityLevel(int level); - -/** Set or invoke a user-defined callback function - * The callback must be of the form "function(const int, const char *)" - * This is essentially an internal function which operates in one of two - * modes - in "set" mode the named function is stored and the remaining - * arguments are discarded; in "invoke" mode the stored function is - * executed with the supplied values (the supplied name is discarded). - * @param mycallback Callback function (discarded in "invoke" mode) - * @param mode Either "set" or "invoke" - * @param ierr An error level equivalent to that used in ccperror - * @param message A message string equivalent to that used in ccperror - * @return Result of the executed function (invoke mode) - */ -int ccp4Callback(CCP4INTFUNCPTR mycallback, char *mode, int ierr, - const char *message); - -/** Set a user-defined callback function - * This is a wrapper to ccp4Callback - it stores a user-defined - * callback function which must be of the form - * "function(const int, const char *)" - * @param mycallback Callback function - * @return 1 (if the function is stored), 0 (if it is not) - */ -int ccp4SetCallback(CCP4INTFUNCPTR mycallback); - -/** Invoke the user-defined callback function - * This is a wrapper to ccp4Callback - it executes the user-defined - * callback function previously stored. - * @param ierr An error level equivalent to that used in ccperror - * @param message A message string equivalent to that used in ccperror - * @return Result of the executed function - */ -int ccp4InvokeCallback(int ierr, const char *message); - -/** A dummy callback function used by default in ccp4CallOnExit - * Internal function. This function does nothing. - * @param level Severity level supplied from ccperror - * @param message Message text supplied from ccperror - * @return Always returns 1 -*/ -int ccp4NullCallback(int level, const char *message); - -/** Check existence of licence agreement - * @param name Name of licence, e.g. "CCP4". - * @return 1 for licence exists, else 0. - */ -int ccp4_licence_exists(const char *name); - -/** Register or query html output level. - * @param ihtml_in 0 = turn off html output, 1 = turn on html output, -1 = query existing value - * @return 0 = no html output, 1 = html output - */ -int html_log_output(int ihtml_in); - -/** Register or query summary output level. - * @param isumm_in 0 = turn off summary output, 1 = turn on summary output, -1 = query existing value - * @return 0 = no summary output, 1 = summary output - */ -int summary_output(int isumm_in); - -#ifdef __cplusplus -} -} -#endif - -#endif /* __CCP4Program__ */ diff --git a/ccp4c/ccp4/ccp4_spg.h b/ccp4c/ccp4/ccp4_spg.h deleted file mode 100644 index ac303b99..00000000 --- a/ccp4c/ccp4/ccp4_spg.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - ccp4_spg.h: Data structure for symmetry information - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_spg.h - * - * @brief Data structure for symmetry information. - * - * A data structure for spacegroup information and related - * quantities. Some items are loaded from syminfo.lib while - * others are calculated on the fly. - * - * There is also a struct for symop rotation matrices and translation - * vectors. This can be converted to other representations using - * functions in ccp4_parser. - * - * @author Martyn Winn - */ - -#ifndef __CCP4_SPG__ -#define __CCP4_SPG__ -/* rcsidhsp[] = "$Id$" */ - -#ifdef __cplusplus -namespace CSym { -extern "C" { -#endif - -/* Kevin's symmetry operator */ - -typedef struct ccp4_symop_ -{ - float rot[3][3]; - float trn[3]; -} ccp4_symop; - -typedef struct ccp4_spacegroup_ -{ - int spg_num; /* true spacegroup number */ - int spg_ccp4_num; /* CCP4 spacegroup number */ - char symbol_Hall[40]; /* Hall symbol */ - char symbol_xHM[20]; /* Extended Hermann Mauguin symbol */ - char symbol_old[20]; /* old spacegroup name */ - - char point_group[20]; /* point group name */ - char crystal[20]; /* crystal system e.g. MONOCLINIC */ - - int nlaue; /* CCP4 Laue class number, inferred from asu_descr */ - char laue_name[20]; /* Laue class name */ - int laue_sampling[3]; /* sampling factors for FFT */ - - int npatt; /* Patterson spacegroup number, inferred from asu_descr */ - char patt_name[40]; /* Patterson spacegroup name */ - - int nsymop; /* total number of symmetry operations */ - int nsymop_prim; /* number of primitive symmetry operations */ - ccp4_symop *symop; /* symmetry matrices */ - ccp4_symop *invsymop; /* inverse symmetry matrices */ - - float chb[3][3]; /* change of basis matrix from file */ - - char asu_descr[80]; /* asu description from file */ - int (*asufn)(const int, const int, const int); /* pointer to ASU function */ - - int centrics[12]; /* symop which generates centric zone, 0 if none */ - int epsilon[13]; /* flag which epsilon zones are applicable */ - - char mapasu_zero_descr[80]; /* origin-based map asu: description from file */ - float mapasu_zero[3]; /* origin-based map asu: upper limits */ - - char mapasu_ccp4_descr[80]; /* CCP4 map asu: defaults to mapasu_zero */ - float mapasu_ccp4[3]; /* CCP4 map asu: upper limits */ - -} CCP4SPG; - -#ifdef __cplusplus -} } -#endif - -#endif /*!__CCP4_SPG__ */ - diff --git a/ccp4c/ccp4/ccp4_sysdep.h b/ccp4c/ccp4/ccp4_sysdep.h deleted file mode 100644 index 17700025..00000000 --- a/ccp4c/ccp4/ccp4_sysdep.h +++ /dev/null @@ -1,273 +0,0 @@ -/* - ccp4_sysdep.h: System-dependent definitions - Copyright (C) 2001 CCLRC - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_sysdep.h - * - * @brief System-dependent definitions. - * - * @author Charles Ballard, based in part on earlier versions - */ - -#ifndef __CCP4_BITS -#define __CCP4_BITS - -#ifdef __sgi /* in ANSI mode */ -# ifndef sgi -# define sgi -# endif -#endif - -#ifndef VMS -# if defined (vms) || defined (__vms) || defined (__VMS) -# define VMS -# endif -#endif - -#if defined (sun) || defined (__sun) -# if !defined(__STDC__) || defined(__GNUC__) -# if !defined(G77) - extern char *sys_errlist []; -# define strerror(i) sys_errlist[i] /* k&r compiler doesn't have it */ -# endif -# endif -#endif - -#if defined (_AIX) || defined(___AIX) || defined (__hpux) -# define CALL_LIKE_HPUX 1 -#elif defined (VMS) -# define CALL_LIKE_VMS 1 -#elif defined (_MSC_VER) && (_MSC_VER >= 800) -# define CALL_LIKE_MVS 2 -#elif defined (_MSC_VER) || (defined (_WIN32) && !defined(__MINGW32__)) -# define CALL_LIKE_MVS 1 -#else -# define CALL_LIKE_SUN 1 -#endif - -#ifndef _POSIX_SOURCE -#define _POSIX_SOURCE -#endif - -#include - -#if defined (VMS) -# include /* non-POSIX */ -# define NOUNISTD -#else -# include -# include -# if !defined (_WIN32) && !defined (_MSC_VER) -# include -# endif -# ifdef _MSC_VER -# define NOUNISTD -# endif -#endif - -#include -#include - -#ifndef NOUNISTD -# include -#else -# ifndef VMS -# ifndef _MSC_VER -# include /* ESV, old Concentrix */ /* non-POSIX */ -# endif -# endif -#endif -#ifndef NOSTDLIB /* for TitanOS 4.2, at least? */ -# include -#endif - -#include -#include - -#if defined(_AIX) || defined (__hpux) || defined(F2C) ||\ - defined(G77) || defined(_WIN32) || defined (sun) /* would do no harm on others, though */ -# include -#endif - -#include -#include - -#if defined (F2C) -# define Skip_f2c_Undefs -# include "f2c.h" -#endif -#if defined (G77) -# define Skip_f2c_Undefs /* g2c.h infelicity... */ -# if defined (HAVE_G2C_H) -# include "g2c.h" -# endif -#endif - -/* Using MSVC need __declspec */ -#if defined(__WIN32__) || defined(_WIN32) -# if defined(_MSC_VER) && defined(DLL_EXPORT) -# define CCP4_DL_IMPORT(type) __declspec(dllexport) type -# define CCP4_DL_EXPORT __declspec(dllexport) -# elif defined(_MSC_VER) -# define CCP4_DL_IMPORT(type) __declspec(dllimport) type -# define CCP4_DL_EXPORT -# else -# define CCP4_DL_IMPORT(type) type -# define CCP4_DL_EXPORT -# endif -#else -# define CCP4_DL_IMPORT(type) type -# define CCP4_DL_EXPORT -#endif - -/* defined in library_utils.c */ -#if defined (_MSC_VER) && _MSC_VER < 1800 - double rint(double x); -#endif - -#ifdef _MSC_VER -#define M_PI 3.14159265358979323846 -#endif - -#ifdef _WIN32 -# define PATH_SEPARATOR '\\' -# define EXT_SEPARATOR '.' -#else -# define PATH_SEPARATOR '/' -# define EXT_SEPARATOR '.' -#endif - -#define MAXFLEN 512 /**< the maximum length of a filename in CCP4 */ -#define MAXFILES 16 /**< maximum number of files open symultaneously */ -#define DEFMODE 2 /**< default mode access for random access files */ - -#define IRRELEVANT_OP 0 -#define READ_OP 1 -#define WRITE_OP 2 - -#include -#ifndef SEEK_SET -# define SEEK_SET 0 -# define SEEK_CUR 1 -# define SEEK_END 2 -#endif /* ! SEEK_SET */ -#ifndef O_WRONLY -#define O_RDONLY 0x0000 /**< i/o mode: read-only */ -#define O_WRONLY 0x0001 /**< i/o mode: write-only */ -#define O_RDWR 0x0002 /**< i/o mode: read and write */ -#define O_APPEND 0x0008 /**< i/o mode: append to existing file */ -#define O_CREAT 0x0200 /**< i/o mode: create file */ -#define O_TRUNC 0x0400 /**< i/o mode: truncate existing file */ -#endif -#define O_TMP 0x0010 /**< i/o mode: scratch file */ - -/* Before version 6.3 we defined BYTE, INT16 and INT32 (without the CCP4_ - * prefix). The prefix has been added to avoid name conflicts. - */ -#define CCP4_BYTE 0 -#define CCP4_INT16 1 -#define CCP4_INT32 6 -#define CCP4_INT64 5 -#define FLOAT32 2 -#define COMP32 3 -#define COMP64 4 - -#define DFNTI_MBO 1 /**< Motorola byte order 2's compl */ -#define DFNTI_IBO 4 /**< Intel byte order 2's compl */ - -#define DFNTF_BEIEEE 1 /**< big endian IEEE (canonical) */ -#define DFNTF_VAX 2 /**< Vax format */ -#define DFNTF_CONVEXNATIVE 5 /**< Convex native floats */ -#define DFNTF_LEIEEE 4 /**< little-endian IEEE format */ - -#if defined (VAX) || defined (vax) /* gcc seems to use vax */ -# define NATIVEFT DFNTF_VAX -# define NATIVEIT DFNTI_IBO -#endif - -#if defined(MIPSEL) || defined(i386) || defined(i860) || defined(__ia64__) || defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) -# define NATIVEIT DFNTI_IBO -# define NATIVEFT DFNTF_LEIEEE -#endif - -#if defined (powerpc) || defined (__powerpc__) || defined (__ppc__) || \ - defined __PPC || defined (__s390__) || defined (__s390x__) || \ - defined (__hppa__) -# define NATIVEIT DFNTI_MBO -# define NATIVEFT DFNTF_BEIEEE -#endif - -#ifdef __alpha -# ifdef VMS -# if __IEEE_FLOAT == 1 -# define NATIVEFT DFNTF_LEIEEE -# else -# define NATIVEFT DFNTF_VAX -# endif -# else /* assume OSF/1 */ -# define NATIVEFT DFNTF_LEIEEE -# endif -# define NATIVEIT DFNTI_IBO -#endif - -#if defined(MIPSEB) || defined(__hpux) || defined(_AIX) || defined(m68k) || defined(mc68000) || defined(sparc) || defined (__sparc__) -# define NATIVEIT DFNTI_MBO -# define NATIVEFT DFNTF_BEIEEE -#endif - -#if defined(__ARM__) || defined(__arm__) || defined(__aarch64__) -# if defined(__ARMEB__) || defined (__AARCH64EB__) -# define NATIVEIT DFNTI_MBO -# define NATIVEFT DFNTF_BEIEEE -# elif defined(__ARMEL__) || defined (__AARCH64EL__) -# define NATIVEIT DFNTI_IBO -# define NATIVEFT DFNTF_LEIEEE -# endif -#endif - -/* From time to time new architectures are added here, often because Linux - * packagers want to build it on all platforms supported by their distro. - * Here we try to catch machines not listed explicitely above, under - * assumption that endianness is the same for floating point numbers - * as for integers. Which is safe assumption on modern standard computers - * (not embedded systems), according to - * http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness - */ -#if !defined(NATIVEIT) && !defined(NATIVEFT) && defined(__BYTE_ORDER) -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define NATIVEIT DFNTI_IBO -# define NATIVEFT DFNTF_LEIEEE -# elif __BYTE_ORDER == __BIG_ENDIAN -# define NATIVEIT DFNTI_MBO -# define NATIVEFT DFNTF_BEIEEE -# endif -#endif - -#ifndef NATIVEFT -# error "Can't determine machine number format" -#endif - -#define DFNT_UINT 0 /**< unsigned int */ -#define DFNT_SINT 1 /**< short int */ -#define DFNT_INT 2 /**< int */ -#define DFNT_UCHAR 3 /**< unsigned char */ -#define DFNT_CHAR 4 /**< char */ -#define DFNT_FLOAT 5 /**< float */ -#define DFNT_DOUBLE 6 /**< double */ - -#endif /* __CCP4_BITS */ diff --git a/ccp4c/ccp4/ccp4_types.h b/ccp4c/ccp4/ccp4_types.h deleted file mode 100644 index 4ec074af..00000000 --- a/ccp4c/ccp4/ccp4_types.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - ccp4_types.h: CCP4 library.c macro definitions etc - Copyright (C) 2001 CCLRC - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __CCP4_TYPES -#define __CCP4_TYPES - -#include "ccp4_sysdep.h" - -typedef unsigned short uint16; -#ifdef SIXTEENBIT -typedef unsigned long uint32; -#else -typedef unsigned int uint32; -#endif -typedef float float32; -typedef unsigned char uint8; -union float_uint_uchar { - float32 f; - uint32 i; - uint8 c[4]; - }; - -typedef char * pstr; - -/* CCP4 library.c macro definitions */ - -#ifndef FALSE -#define FALSE 0 -#define TRUE 1 -#endif - -typedef struct { double r; /* radial and */ - double phi; /* angular component of */ - } POLAR; /* a complex number */ - -/* some simple macros, which may exist anyway */ -#ifndef SQR -#define SQR(x) ((x)*(x)) -#endif -#ifndef DEGREE -#define DEGREE(x) ((((x < 0)?(x)+2*M_PI:(x))*360)/(2*M_PI)) -#endif -#ifndef RADIAN -#define RADIAN(x) ((((x<0)?(x)+360:(x))*2*M_PI)/360) -#endif -#ifndef MAX -#define MAX(x, y) (((x)>(y))?(x):(y)) -#endif -#ifndef MIN -#define MIN(x, y) (((x)<(y))?(x):(y)) -#endif -#ifndef ABS -#define ABS(x) (((x)<0)?-(x):(x)) -#endif -#ifndef SIGN -#define SIGN(x) (((x)<0)?-1:1) -#endif - -#endif /* __CCP4_TYPES */ diff --git a/ccp4c/ccp4/ccp4_unitcell.c b/ccp4c/ccp4/ccp4_unitcell.c deleted file mode 100644 index 640dee02..00000000 --- a/ccp4c/ccp4/ccp4_unitcell.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - ccp4_unitcell.c: C library for manipulations based on cell parameters. - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_unitcell.c - * C library for manipulations based on cell parameters. - * Martyn Winn - */ - -#include - -#include "ccp4_unitcell.h" -#include "cvecmat.h" -#include "ccp4_errno.h" -/* rcsid[] = "$Id$" */ - -/* from input cell and orthogonalisation code, find orthogonalisation - and fractionalisation matrices. Returns cell volume. */ - -double ccp4uc_frac_orth_mat(const double cell[6], const int ncode, - double ro[3][3], double rf[3][3]) -{ - int i,j; - double conv,alph,bet,gamm,sina,cosa,sinb,cosb,sing,cosg, - sinas,cosas,sinbs,cosbs,sings,cosgs,a,b,c; - - conv = atan(1.0)*4.0/180.0; - alph = cell[3]*conv; - bet = cell[4]*conv; - gamm = cell[5]*conv; - sina = sin(alph); - cosa = cos(alph); - sinb = sin(bet); - cosb = cos(bet); - sing = sin(gamm); - cosg = cos(gamm); - cosas = (cosg*cosb-cosa)/ (sinb*sing); - sinas = sqrt(1.0-cosas*cosas); - cosbs = (cosa*cosg-cosb)/ (sina*sing); - sinbs = sqrt(1.0-cosbs*cosbs); - cosgs = (cosa*cosb-cosg)/ (sina*sinb); - sings = sqrt(1.0-cosgs*cosgs); - a = cell[0]; - b = cell[1]; - c = cell[2]; - - /* calculate ro */ - for ( i = 0; i < 3; i++ ) - for ( j = 0; j < 3; j++ ) - ro[i][j] = 0.0; - - /* ncode 1 - xo along a zo along c* */ - - switch (ncode) { - case 1: - ro[0][0] = a; - ro[0][1] = b*cosg; - ro[0][2] = c*cosb; - ro[1][1] = b*sing; - ro[1][2] = -c*sinb*cosas; - ro[2][2] = c*sinb*sinas; - break; - - /* ncode 2 - xo along b zo along a* */ - - case 2: - ro[0][0] = a*cosg; - ro[0][1] = b; - ro[0][2] = c*cosa; - ro[1][0] = -a*sing*cosbs; - ro[1][2] = c*sina; - ro[2][0] = a*sing*sinbs; - break; - - /* ncode 3 - xo along c zo along b* */ - - case 3: - ro[0][0] = a*cosb; - ro[0][1] = b*cosa; - ro[0][2] = c; - ro[1][0] = a*sinb; - ro[1][1] = -b*sina*cosgs; - ro[2][1] = b*sina*sings; - break; - - /* ncode 4 - trigonal only - xo along a+b yo alon a-b zo along c* */ - - case 4: - ro[0][0] = a/2.0; - ro[0][1] = a/2.0; - ro[1][0] = -a*sing; - ro[1][1] = a*sing; - ro[2][2] = c; - break; - - /* ncode 5 - xo along a* zo along c */ - - case 5: - ro[0][0] = a*sinb*sings; - ro[1][0] = -a*sinb*cosgs; - ro[1][1] = b*sina; - ro[2][0] = a*cosb; - ro[2][1] = b*cosa; - ro[2][2] = c; - break; - - /* ncode 6 - grr*! to gerard bricogne - his setting for p1 in skew. - xo along a yo along b* */ - - case 6: - ro[0][0] = a; - ro[0][1] = b*cosg; - ro[0][2] = c*cosb; - ro[1][1] = b*sing*sinas; - ro[2][1] = -b*sing*cosas; - ro[2][2] = c*sinb; - break; - } - - /* now calculate rf from ro, determinant gives cell volume */ - - return invert3matrix((const double (*)[3]) ro, rf); - -} - -/* from input cell, find dimensions of reciprocal cell. - Returns reciprocal cell volume. */ - -double ccp4uc_calc_rcell(const double cell[6], double rcell[6]) -{ - double conv,alph,bet,gamm,vol,sina,cosa,sinb,cosb,sing,cosg, - sinas,cosas,sinbs,cosbs,sings,cosgs,a,b,c; - - conv = 3.14159/180.0; - alph = cell[3]*conv; - bet = cell[4]*conv; - gamm = cell[5]*conv; - vol = ccp4uc_calc_cell_volume(cell); - sina = sin(alph); - cosa = cos(alph); - sinb = sin(bet); - cosb = cos(bet); - sing = sin(gamm); - cosg = cos(gamm); - cosas = (cosg*cosb-cosa)/ (sinb*sing); - sinas = sqrt(1.0-cosas*cosas); - cosbs = (cosa*cosg-cosb)/ (sina*sing); - sinbs = sqrt(1.0-cosbs*cosbs); - cosgs = (cosa*cosb-cosg)/ (sina*sinb); - sings = sqrt(1.0-cosgs*cosgs); - a = cell[0]; - b = cell[1]; - c = cell[2]; - rcell[0] = b*c*sina/vol; - rcell[1] = c*a*sinb/vol; - rcell[2] = a*b*sing/vol; - rcell[3] = atan2(sinas,cosas)/conv; - rcell[4] = atan2(sinbs,cosbs)/conv; - rcell[5] = atan2(sings,cosgs)/conv; - - return (1.0 / vol); -} - -/* Convert orthogonal to fractional coordinates. Translation only if - deliberate origin shift - does this ever happen? Leave it to the - application. */ - -void ccp4uc_orth_to_frac(const double rf[3][3], const double xo[3], double xf[3]) -{ - xf[0] = rf[0][0]*xo[0] + rf[0][1]*xo[1] + rf[0][2]*xo[2]; - xf[1] = rf[1][0]*xo[0] + rf[1][1]*xo[1] + rf[1][2]*xo[2]; - xf[2] = rf[2][0]*xo[0] + rf[2][1]*xo[1] + rf[2][2]*xo[2]; -} - -/* Convert fractional to orthogonal coordinates. */ - -void ccp4uc_frac_to_orth(const double ro[3][3], const double xf[3], double xo[3]) -{ - xo[0] = ro[0][0]*xf[0] + ro[0][1]*xf[1] + ro[0][2]*xf[2]; - xo[1] = ro[1][0]*xf[0] + ro[1][1]*xf[1] + ro[1][2]*xf[2]; - xo[2] = ro[2][0]*xf[0] + ro[2][1]*xf[1] + ro[2][2]*xf[2]; -} - -/* Convert orthogonal to fractional u matrix. */ - -void ccp4uc_orthu_to_fracu(const double rf[3][3], const double uo[6], double uf[6]) -{ - int i,j; - double uomat[3][3], ufmat[3][3], rft[3][3], temp[3][3]; - - uomat[0][0] = uo[0]; uomat[0][1] = uo[3]; uomat[0][2] = uo[4]; - uomat[1][0] = uo[3]; uomat[1][1] = uo[1]; uomat[1][2] = uo[5]; - uomat[2][0] = uo[4]; uomat[2][1] = uo[5]; uomat[2][2] = uo[2]; - for ( i = 0; i < 3; i++ ) - for ( j = 0; j < 3; j++ ) - rft[i][j] = rf[j][i]; - - ccp4_3matmul(temp,(const double (*)[3]) uomat,(const double (*)[3]) rft); - ccp4_3matmul(ufmat,rf,(const double (*)[3]) temp); - - uf[0] = ufmat[0][0]; uf[1] = ufmat[1][1]; uf[2] = ufmat[2][2]; - uf[3] = ufmat[0][1]; uf[4] = ufmat[0][2]; uf[5] = ufmat[1][2]; -} - -/* Convert fractional to orthogonal u matrix. */ - -void ccp4uc_fracu_to_orthu(const double ro[3][3], const double uf[6], double uo[6]) -{ - int i,j; - double uomat[3][3], ufmat[3][3], rot[3][3], temp[3][3]; - - ufmat[0][0] = uf[0]; ufmat[0][1] = uf[3]; ufmat[0][2] = uf[4]; - ufmat[1][0] = uf[3]; ufmat[1][1] = uf[1]; ufmat[1][2] = uf[5]; - ufmat[2][0] = uf[4]; ufmat[2][1] = uf[5]; ufmat[2][2] = uf[2]; - for ( i = 0; i < 3; i++ ) - for ( j = 0; j < 3; j++ ) - rot[i][j] = ro[j][i]; - - ccp4_3matmul(temp,(const double (*)[3]) ufmat,(const double (*)[3]) rot); - ccp4_3matmul(uomat,ro,(const double (*)[3]) temp); - - uo[0] = uomat[0][0]; uo[1] = uomat[1][1]; uo[2] = uomat[2][2]; - uo[3] = uomat[0][1]; uo[4] = uomat[0][2]; uo[5] = uomat[1][2]; -} - -/* Calculate cell volume from cell parameters */ - -double ccp4uc_calc_cell_volume(const double cell[6]) -{ - double conv,alph,bet,gamm,sum,v; - - conv = 3.14159/180.0; - alph = cell[3]*conv; - bet = cell[4]*conv; - gamm = cell[5]*conv; - sum = (alph+bet+gamm)*0.5; - v = sqrt(sin(sum-alph)*sin(sum-bet)*sin(sum-gamm)*sin(sum)); - return (2.0*cell[0]*cell[1]*cell[2]*v); -} - -/* Check cells agree within tolerance */ - -int ccp4uc_cells_differ(const double cell1[6], const double cell2[6], const double tolerance) -{ - int i; - double vol1, vol2, acheck; - - vol1 = ccp4uc_calc_cell_volume(cell1); - vol2 = ccp4uc_calc_cell_volume(cell2); - - /* check cell volumes */ - acheck = fabs(0.5*(vol1 - vol2))/(vol1 + vol2); - if (acheck > tolerance) { - if (ccp4_liberr_verbosity(-1)) { - printf("Difference in cell volumes detected.\n"); - printf(" vol1 = %lf vol2 = %lf \n",vol1,vol2); - } - return 1; - } - - /* check cell parameters */ - acheck = 0.0; - for ( i = 0; i < 6; i++ ) - acheck += fabs(0.5*(cell2[i]-cell1[i]))/(cell2[i]+cell1[i]); - if (acheck > 3.0*tolerance) { - if (ccp4_liberr_verbosity(-1)) { - printf("Large difference in cell parameters detected.\n"); - printf(" cell1 = %lf %lf %lf %lf %lf %lf \n", - cell1[0],cell1[1],cell1[2],cell1[3],cell1[4],cell1[5]); - printf(" cell2 = %lf %lf %lf %lf %lf %lf \n", - cell2[0],cell2[1],cell2[2],cell2[3],cell2[4],cell2[5]); - } - return 1; - } else if (acheck > tolerance) { - if (ccp4_liberr_verbosity(-1)) { - printf("Small difference in cell parameters detected.\n"); - printf(" cell1 = %lf %lf %lf %lf %lf %lf \n", - cell1[0],cell1[1],cell1[2],cell1[3],cell1[4],cell1[5]); - printf(" cell2 = %lf %lf %lf %lf %lf %lf \n", - cell2[0],cell2[1],cell2[2],cell2[3],cell2[4],cell2[5]); - } - return 1; - } - return 0; -} - -int ccp4uc_is_rhombohedral(const float cell[6], const float tolerance) { - - double acheck; - - acheck = fabs(cell[0]-cell[1]); - acheck += fabs(cell[1]-cell[2]); - acheck += fabs(cell[0]-cell[2]); - acheck += fabs(cell[3]-cell[4]); - acheck += fabs(cell[3]-cell[5]); - acheck += fabs(cell[4]-cell[5]); - if (acheck > (double) tolerance) return 0; - return 1; - -} - -int ccp4uc_is_hexagonal(const float cell[6], const float tolerance) { - - double acheck; - - acheck = fabs(cell[0]-cell[1]); - acheck += fabs(cell[3]-90.0); - acheck += fabs(cell[4]-90.0); - acheck += fabs(cell[5]-120.0); - if (acheck > (double) tolerance) return 0; - return 1; - -} diff --git a/ccp4c/ccp4/ccp4_unitcell.h b/ccp4c/ccp4/ccp4_unitcell.h deleted file mode 100644 index 07dd29c4..00000000 --- a/ccp4c/ccp4/ccp4_unitcell.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - ccp4_unitcell.h: headers for C library for ccp4_unitcell.c - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_unitcell.h - * C library for manipulations based on cell parameters. - * Martyn Winn - */ - -#ifndef __CCP4_UNITCELL -#define __CCP4_UNITCELL - -#ifdef __cplusplus -namespace CCP4uc { -extern "C" { -#endif - -#include - -/** From input cell and orthogonalisation code, find orthogonalisation - and fractionalisation matrices. - * @param cell - * @param ncode - * @param ro - * @param rf - * @return Cell volume - */ -double ccp4uc_frac_orth_mat(const double cell[6], const int ncode, - double ro[3][3], double rf[3][3]); - -/** From input cell, find dimensions of reciprocal cell. - * @param cell - * @param rcell - * @return Reciprocal cell volume - */ -double ccp4uc_calc_rcell(const double cell[6], double rcell[6]); - -/** Convert orthogonal to fractional coordinates. Translation only if - deliberate origin shift - does this ever happen? Leave it to the - application. - * @param rf - * @param xo - * @param xf - * @return void - */ -void ccp4uc_orth_to_frac(const double rf[3][3], const double xo[3], double xf[3]); - -/** Convert fractional to orthogonal coordinates. - * @param ro - * @param xf - * @param xo - * @return void - */ -void ccp4uc_frac_to_orth(const double ro[3][3], const double xf[3], double xo[3]); - -/** Convert orthogonal to fractional u matrix. - * @param rf - * @param uo - * @param uf - * @return void - */ -void ccp4uc_orthu_to_fracu(const double rf[3][3], const double uo[6], double uf[6]); - -/** Convert fractional to orthogonal u matrix. - * @param ro - * @param uf - * @param uo - * @return void - */ -void ccp4uc_fracu_to_orthu(const double ro[3][3], const double uf[6], double uo[6]); - -/** Calculate cell volume from cell parameters. - * @param cell - * @return Cell volume. - */ -double ccp4uc_calc_cell_volume(const double cell[6]); - -/** Check cells agree within tolerance. - * @param cell1 First cell. - * @param cell2 Second cell. - * @param tolerance A tolerance for agreement. - * @return 1 if cells differ by more than tolerance, 0 otherwise. - */ -int ccp4uc_cells_differ(const double cell1[6], const double cell2[6], const double tolerance); - -/** Check if cell parameters conform to a rhombohedral setting. - * @param cell Cell parameters. Angles are assumed to be in degrees. - * @param tolerance A tolerance for agreement. - * @return 1 if cell parameters conform, 0 otherwise. - */ -int ccp4uc_is_rhombohedral(const float cell[6], const float tolerance); - -/** Check if cell parameters conform to a hexagonal setting. - * @param cell Cell parameters. Angles are assumed to be in degrees. - * @param tolerance A tolerance for agreement. - * @return 1 if cell parameters conform, 0 otherwise. - */ -int ccp4uc_is_hexagonal(const float cell[6], const float tolerance); - -#ifdef __cplusplus -} } -#endif - -#endif /*!CCP4_UNITCELL */ diff --git a/ccp4c/ccp4/ccp4_utils.h b/ccp4c/ccp4/ccp4_utils.h deleted file mode 100644 index ba579eb9..00000000 --- a/ccp4c/ccp4/ccp4_utils.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - ccp4_utils.h: headers for utility functions. - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file ccp4_utils.h - * @brief Utility functions. - * @author Charles Ballard - */ - -#ifndef __CCP4_UTILS -#define __CCP4_UTILS - -#include -#include "ccp4_types.h" -#include "library_file.h" -/* rcsidh[] = "$Id$" */ - -#ifdef __cplusplus -namespace CCP4 { -extern "C" { -#endif - -/**************************************************************************** - * Function prototypes * - ****************************************************************************/ - -size_t ccp4_utils_flength (char *, int); - -int ccp4_utils_translate_mode_float(float *, const void *, int, int); - -void ccp4_utils_fatal (const char *); - -void ccp4_utils_print (const char *message); - -int ccp4_utils_setenv (char *); - -/* turn on line buffering for stdout */ -int ccp4_utils_outbuf (void); - -/* turn off any buffering on stdin */ -int ccp4_utils_noinpbuf (void); - -union float_uint_uchar ccp4_nan (); - -int ccp4_utils_isnan (const union float_uint_uchar *); - -void ccp4_utils_bml (int, union float_uint_uchar *); - -void ccp4_utils_wrg (int, union float_uint_uchar *, float *); - -void ccp4_utils_hgetlimits (int *, float *); - -int ccp4_utils_mkdir (const char *, const char *); - -int ccp4_utils_chmod (const char *, const char *); - -void *ccp4_utils_malloc(size_t); - -void *ccp4_utils_realloc(void *, size_t); - -void *ccp4_utils_calloc(size_t, size_t); - -int ccp4_file_size(const char *); - -char *ccp4_utils_username(void); - -char *ccp4_utils_basename(const char *filename); - -char *ccp4_utils_pathname(const char *filename); - -char *ccp4_utils_extension(const char *filename); - -char *ccp4_utils_joinfilenames(const char *dir, const char *file); - -void ccp4_utils_idate (int *); - -char *ccp4_utils_date(char *); - -void ccp4_utils_itime (int *); - -char *ccp4_utils_time(char *); - -float ccp4_utils_etime (float *); - -#if defined (_MSC_VER) -double ccp4_erfc( double x ); -#endif - -/**************************************************************************** -* End of prototypes * -*****************************************************************************/ -#ifdef __cplusplus -} -} -#endif - -#endif /* __CCP4_UTILS */ diff --git a/ccp4c/ccp4/ccp4_vars.h b/ccp4c/ccp4/ccp4_vars.h deleted file mode 100644 index d2a463fb..00000000 --- a/ccp4c/ccp4/ccp4_vars.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - ccp4_vars.h: Standard strings for certain quantites - Copyright (C) 2002 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -/* -*/ - -/* Author: Martyn Winn */ - -/* Standard strings for certain quantites - for future use */ - -#ifndef __CCP4_VARS__ -#define __CCP4_VARS__ - -#define MTZFILENAME "data::mtzfile::filename" -#define MTZTITLE "data::mtzfile::title" -#define MTZSPACEGROUP "data::mtzfile::spacegroup_num" -#define MTZNUMREFLS "data::mtzfile::num_reflections" -#define MTZMNF "data::mtzfile::missing_number_flag" -#define MTZSORTORDER "data::mtzfile::sort_order" - -#define CRYSTALXTALNAME "data::crystal::crystal_name" -#define CRYSTALPNAME "data::crystal::project_name" -#define CRYSTALCELL "data::crystal::cell" - -#define DATASETDNAME "data::crystal::dataset::dataset_name" -#define DATASETWAVELENGTH "data::crystal::dataset::wavelength" - -#define COLUMNLABEL "data::crystal_i::dataset_i::column_i::label" -#define COLUMNTYPE "data::crystal_i::dataset_i::column_i::type" - -#endif /*!__CCP4_VARS__ */ diff --git a/ccp4c/ccp4/cmap_accessor.c b/ccp4c/ccp4/cmap_accessor.c deleted file mode 100644 index 8ef24ee9..00000000 --- a/ccp4c/ccp4/cmap_accessor.c +++ /dev/null @@ -1,261 +0,0 @@ -/* - cmap_accessor.c: get and set map header information - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include "cmaplib.h" -#include "cmap_errno.h" - -/* accessors */ - -/*! Get the cell parameters - \param mfile (const CMMFile *) - \param cell (float *) contains the cell parameter on exit (dim 6) */ -void ccp4_cmap_get_cell(const CMMFile *mfile, float *cell) -{ - cell[0] = mfile->cell[0]; - cell[1] = mfile->cell[1]; - cell[2] = mfile->cell[2]; - cell[3] = mfile->cell[3]; - cell[4] = mfile->cell[4]; - cell[5] = mfile->cell[5]; -} - -/*! Set the cell parameters. - Only allowed when file is opened in write mode. - \param mfile (CMMFile *) - \param cell (const float *) the cell parameters */ -void ccp4_cmap_set_cell(CMMFile *mfile, const float *cell) -{ - if (ccp4_file_is_write(mfile->stream)) { - mfile->cell[0] = cell[0]; - mfile->cell[1] = cell[1]; - mfile->cell[2] = cell[2]; - mfile->cell[3] = cell[3]; - mfile->cell[4] = cell[4]; - mfile->cell[5] = cell[5]; - } -} - -/*! Get the grid for the complete cell (X,Y,Z) ordering - \param mfile (const CMMFile *) - \param grid (int *) contains the grid dimension on exit (dim 3) */ -void ccp4_cmap_get_grid(const CMMFile *mfile, int *grid) -{ - grid[0] = mfile->cell_grid[0]; - grid[1] = mfile->cell_grid[1]; - grid[2] = mfile->cell_grid[2]; -} - -/*! Set the cell grid dimension. - Only allowed when file is opened in write mode. - \param mfile (CMMFile *) - \param grid (const int *) the cell grid dimension (X,Y,Z) */ -void ccp4_cmap_set_grid(CMMFile *mfile, const int *grid) -{ - if (ccp4_file_is_write(mfile->stream)) { - mfile->cell_grid[0] = grid[0]; - mfile->cell_grid[1] = grid[1]; - mfile->cell_grid[2] = grid[2]; - } -} - -/*! Get the stored map origin (rows,sections,columns) - \param mfile (const CMMFile *) - \param origin (int *) contains the origin on exit (dim 3) */ -void ccp4_cmap_get_origin(const CMMFile *mfile, int *origin) -{ - origin[0] = mfile->origin[0]; - origin[1] = mfile->origin[1]; - origin[2] = mfile->origin[2]; -} - -/*! Set the stored map origin (rows,sections,columns) - Only allowed when file is opened in write mode. - \param mfile (CMMFile *) - \param origin (const int *) the origin */ -void ccp4_cmap_set_origin(CMMFile *mfile, const int *origin) -{ - if (ccp4_file_is_write(mfile->stream)) { - mfile->origin[0] = origin[0]; - mfile->origin[1] = origin[1]; - mfile->origin[2] = origin[2]; - } -} - -/*! Get the stored map axes order (rows,sections,columns) - where 1=X, 2=Y, 3=Z - \param mfile (const CMMFile *) - \param axes_order (float *) contains the ordering on exit (dim 3) */ -void ccp4_cmap_get_order(const CMMFile *mfile, int *axes_order) -{ - axes_order[0] = mfile->axes_order[0]; - axes_order[1] = mfile->axes_order[1]; - axes_order[2] = mfile->axes_order[2]; -} - -/*! Set the stored map axes order (rows,sections,columns) - where 1=X, 2=Y, 3=Z. - Only allowed when file is opened in write mode. - \param mfile (CMMFile *) - \param axes_order (const float *) the axes ordering */ -void ccp4_cmap_set_order(CMMFile *mfile, const int *axes_order) -{ - if (ccp4_file_is_write(mfile->stream)) { - mfile->axes_order[0] = axes_order[0]; - mfile->axes_order[1] = axes_order[1]; - mfile->axes_order[2] = axes_order[2]; - } -} - -/*! Get the stored map dimension (rows,sections,columns) - \param mfile (const CMMFile *) - \param map_dim (int *) contains the map dimension on exit (dim 3) */ -void ccp4_cmap_get_dim(const CMMFile *mfile, int *map_dim) -{ - map_dim[0] = mfile->map_dim[0]; - map_dim[1] = mfile->map_dim[1]; - map_dim[2] = mfile->map_dim[2]; -} - -/*! Set the stored map dimension (rows,sections,columns) - Only allowed when file is opened in write mode before any data - is written. - Note: the row dimension will be overridden during writing - \param mfile (CMMFile *) - \param map_dim (const int *) the map dimension */ -void ccp4_cmap_set_dim(CMMFile *mfile, const int *map_dim) -{ - if (ccp4_file_is_write(mfile->stream) && !mfile->data.number) { - mfile->map_dim[0] = map_dim[0]; - mfile->map_dim[1] = map_dim[1]; - mfile->map_dim[2] = map_dim[2]; - mfile->data.section_size = map_dim[0]*map_dim[1]* - ccp4_file_itemsize(mfile->stream); - mfile->data.block_size = mfile->data.section_size + - mfile->data.header_size; - } -} -/*! Return the spacegroup listed in the map header. - This is overriden by the symops. - \param mfile (CMMFile *) - \return spacegroup number */ -int ccp4_cmap_get_spacegroup(const CMMFile *mfile) -{ - return mfile->spacegroup; -} - -/*! Set the spacegroup listed in the map header. - Only allowed when file is opened in write mode. - \param mfile (CMMFile *) - \param spacegroup (int) spacegroup number */ -void ccp4_cmap_set_spacegroup(CMMFile *mfile, int spacegroup) -{ - if (ccp4_file_is_write(mfile->stream)) - mfile->spacegroup = spacegroup; -} - -/*! Return the datamode - \param mfile (const CMMFile *) - \return datamode */ -unsigned int ccp4_cmap_get_datamode(const CMMFile *mfile) -{ - return mfile->data_mode; -} - -/*! Set the datamode. - This is only allowed if the file is opened in write mode, and - no data has been written. - \param mfile (CMMFile *) - \param datamode (unsigned int) major mode of map */ -void ccp4_cmap_set_datamode(CMMFile *mfile, unsigned int datamode) -{ - if (ccp4_file_is_write(mfile->stream) && !mfile->data.number && - datamode <= 6 && datamode != 5) { - mfile->data_mode = datamode; - ccp4_file_setmode(mfile->stream, datamode); - mfile->data.section_size = mfile->map_dim[0]*mfile->map_dim[1]* - ccp4_file_itemsize(mfile->stream); - mfile->data.block_size = mfile->data.section_size + - mfile->data.header_size; - } -} - -/*! Get the map statistics, including maximum, minimum, mean and standard - deviation. This is only meaningful for datamode FLOAT32. - \param mfile (const CMMFile *) - \param min (float *) - \param max (float *) - \param mean (double *) - \param rms (double *) */ -void ccp4_cmap_get_mapstats(const CMMFile *mfile, float *min, float* max, - double *mean, double *rms) -{ - double f1,f2,f3; - *min = mfile->stats.min; - *max = mfile->stats.max; - if (ccp4_file_is_write(mfile->stream) && mfile->close_mode == 0) { - f1 = (mfile->stats.total != 0) ? mfile->stats.mean / mfile->stats.total : 0; - f2 = (mfile->stats.total != 0) ? mfile->stats.rms / mfile->stats.total : 0; - f3 = f2 - f1*f1; - *rms = (f3 > 0) ? sqrt(f3) : 0; - *mean = f1 - (double) mfile->stats.offset; - } else { - *mean = mfile->stats.mean; - *rms = mfile->stats.rms; - } -} - -/*! Set the map statistics, including maximum, minimum, mean and standard - deviation. This is only meaningful for datamode FLOAT32 and the file - open in write mode. - \param mfile (CMMFile *) - \param min (float) - \param max (float) - \param mean (double) - \param rms (double) */ -void ccp4_cmap_set_mapstats(CMMFile *mfile, const float min, const float max, - const double mean, const double rms) -{ - if (ccp4_file_is_write(mfile->stream)) { - mfile->stats.min = min; - mfile->stats.max = max; - mfile->stats.mean = mean; - mfile->stats.rms = rms; - } -} - -/*! Set the local header size (in bytes) - \param mfile (CMMFile *) - \param size (size_t) header size associated with each section (in bytes) */ -void ccp4_cmap_set_local_header(CMMFile *mfile, size_t size) -{ - if (ccp4_file_is_write(mfile->stream) && mfile->data.number == 0) { - mfile->data.header_size = size; - mfile->data.block_size = mfile->data.section_size + mfile->data.header_size; - } - return; -} - -/*! Return the local header size - \param mfile (CMMFile *) - \return header size associated with each section (in bytes) */ -size_t ccp4_cmap_get_local_header(CMMFile *mfile) -{ - return mfile->data.header_size; -} - diff --git a/ccp4c/ccp4/cmap_close.c b/ccp4c/ccp4/cmap_close.c deleted file mode 100644 index 150af451..00000000 --- a/ccp4c/ccp4/cmap_close.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - cmap_close.c: close map file - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include -#include -#include "cmaplib.h" -#include "cmap_header.h" -#include "cmap_labels.h" -#include "cmap_errno.h" - -/*! Close the file. - In write mode the header is output, along with the machine - stamp. In read mode the file is just closed. - Write mode supports ways of updating the map statistics ( - only active for FLOAT32). - /param mfile (CMMFile *) - /return void */ -void ccp4_cmap_close(CMMFile *mfile) -{ - int i; - - if ( mfile == NULL) - return; - - if (ccp4_file_is_write(mfile->stream) ) { - if ( mfile->data_mode == FLOAT32) { - switch (mfile->close_mode) { - case 1: - break; - case 2: - mfile->stats.offset = 0.0f; - case 0: - default: - if (mfile->stats.total != 0) { - mfile->stats.mean /= mfile->stats.total; - mfile->stats.rms /= mfile->stats.total; - mfile->stats.rms -= mfile->stats.mean*mfile->stats.mean; - mfile->stats.rms = (mfile->stats.rms > 0) ? sqrt(mfile->stats.rms) : 0; - mfile->stats.mean += (double) mfile->stats.offset; - } - break; - } - } - write_mapheader(mfile); - write_maplabels(mfile); - ccp4_file_warch(mfile->stream); - } - ccp4_file_close(mfile->stream); - for (i=0 ; i != mfile->labels.number ; i++) - if (mfile->labels.labels[i] != NULL) - free(mfile->labels.labels[i]); - free(mfile); -} - -/*! Set the close mode: - 0: calculate based on stored values (default) - 1: just dump the current values - /param mfile (CMMFile *) - /param mask (unsigned int) close mode - /return void */ -void ccp4_cmap_closemode(CMMFile *mfile, unsigned int mask) -{ - mfile->close_mode = mask; -} diff --git a/ccp4c/ccp4/cmap_data.c b/ccp4c/ccp4/cmap_data.c deleted file mode 100644 index 0046d73e..00000000 --- a/ccp4c/ccp4/cmap_data.c +++ /dev/null @@ -1,476 +0,0 @@ -/* - cmap_data.c: read and write map sections. - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include -#include -#include "cmaplib.h" -#include "cmap_data.h" -#include "cmap_stats.h" -#include "cmap_errno.h" - -/*! Internal: return the an estimate of the number of sections in the map - file based upon the length. - Update mfile->data.number as a side effect. - \param mfile (CMMFile *) - \return number of sections according to length-data/section_size */ -int number_sections(CMMFile *mfile) -{ - div_t sections; - - sections = div(ccp4_file_length(mfile->stream)-mfile->data.offset, - mfile->data.block_size); - - return mfile->data.number = sections.quot; -} - -/*! seek among the map sections. The units are of size block_size. - \param mfile (CMMFile *) - \param sec (int) section number - \param whence (unsigned int) SEEK_SET, SEEK_CUR or SEEK_END - \return offset in file, or EOF */ -int ccp4_cmap_seek_section(CMMFile *mfile, int sec, unsigned int whence) -{ - size_t curr_posn; - div_t secs; - int result = EOF; - - if ( mfile == NULL ) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_seekdata",NULL); - return EOF; } - - switch (whence) { - case SEEK_SET: - if ( ccp4_file_is_read(mfile->stream) && - ( sec < 0 || sec > mfile->data.number) ) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_section",NULL); - else - result = ccp4_file_raw_seek(mfile->stream, mfile->data.offset + - sec * mfile->data.block_size, SEEK_SET); - break; - case SEEK_END: - if ( ccp4_file_is_read(mfile->stream) && - ( sec > 0 || abs(sec) > mfile->data.number) ) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_section",NULL); - else - result = ccp4_file_raw_seek(mfile->stream, sec * mfile->data.block_size, - SEEK_END); - break; - case SEEK_CUR: - curr_posn = ccp4_file_tell(mfile->stream); - secs = div(curr_posn - mfile->data.offset,mfile->data.block_size); - if ( ccp4_file_is_read(mfile->stream) && - ( (secs.quot + sec) < 0 || (secs.quot + sec) >= mfile->data.number) ) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_section",NULL); - else - result = ccp4_file_raw_seek(mfile->stream, - (sec > 0) ? (mfile->data.block_size - secs.rem + - (sec - 1)*mfile->data.block_size) : - (sec*mfile->data.block_size - secs.rem), - SEEK_CUR); - } - return (result == EOF) ? EOF : - ((result - mfile->data.offset)/mfile->data.block_size); -} - -/*! write map section to file. - Note: this wraps a raw write, with no location checking. It is - therefore the responsibility of the calling program to ensure that - everything is correct. Effectively assume appending to file. - \param mfile (CMMFile *) - \param section (const void *) - \return 1 on success, 0 on failure */ -int ccp4_cmap_write_section(CMMFile *mfile, const void *section) -{ - int result=0; - size_t write_dim; - - if (mfile == NULL || section == NULL) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_write_section",NULL); - return 0; } - - if (!ccp4_file_is_write(mfile->stream)) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), - "ccp4_cmap_write_section",NULL); - return 0; } - - write_dim = mfile->map_dim[0] * mfile->map_dim[1]; - result = ccp4_file_write(mfile->stream, section, write_dim); - -/* note that we have started writing */ - mfile->data.number++; - - if (result != write_dim) - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), - "ccp4_cmap_write_section",NULL); - else - if (mfile->data_mode == FLOAT32) - stats_update(&mfile->stats, (float *)section, - (float *)section+write_dim); - - return (result == write_dim) ? 1 : 0; -} - -/*! read current map section from file to section. - Some checking is performed to ensure we are at the start of a - legitimate map section. - \param mfile (CMMFile *) - \param section (void *) array large enough to hold the map section - \return 1 on success, 0 on failure */ -int ccp4_cmap_read_section(CMMFile *mfile, void *section) -{ - int result = 0; - div_t secs; - off_t curr_posn; - const off_t data_offset = 0; - size_t read_dim; - - if (mfile == NULL ) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_read_section",NULL); - return 0; } - - if (!ccp4_file_is_read(mfile->stream)) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ReadFail), - "ccp4_cmap_read_section",NULL); - return 0; } - - curr_posn = ccp4_file_tell(mfile->stream); - - secs = div(curr_posn - mfile->data.offset, - mfile->data.block_size); - -/* ensure legit section (although rely upon EOF ) */ - if (secs.quot < 0 || secs.rem < 0) { - ccp4_file_raw_seek(mfile->stream, mfile->data.offset, SEEK_SET); - secs.quot = 0; - } else if( secs.rem > data_offset && secs.rem < mfile->data.section_size ) - ccp4_file_raw_seek(mfile->stream, - secs.rem, SEEK_CUR); - else if ( secs.rem >= mfile->data.section_size ) { - ccp4_file_raw_seek(mfile->stream, (mfile->data.block_size-secs.rem), SEEK_CUR); - secs.quot++; } - - read_dim = mfile->map_dim[0] * mfile->map_dim[1]; -/* do not read if at end */ - if (secs.quot < 0 || secs.quot < mfile->data.number) - result = ccp4_file_read(mfile->stream, section, read_dim); - - if (result != read_dim) - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), - "ccp4_cmap_read_section",NULL); - - return (result == read_dim) ? 1 : 0; -} - -/*! read current section header (character array) - After reading we are at the end of the local header - \param mfile (CMMFile *) - \param header (char *) character array large enough to hold - the local header (raw read so not string) - \return 1 on success, 0 on failure */ -int ccp4_cmap_read_section_header(const CMMFile *mfile, char *header) -{ - int result; - div_t secs; - - if (mfile == NULL || header == NULL) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_read_section_header",NULL); - return EOF; } - - if (!ccp4_file_is_read(mfile->stream)) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), - "ccp4_cmap_read_section header",NULL); - return EOF; } - - if ( mfile->data.header_size == 0) return (0); - - result = ccp4_file_tell(mfile->stream); - secs = div(result - mfile->data.offset, mfile->data.block_size); - - if ( secs.quot < 0 || secs.quot >= mfile->data.number ) return (0); - -/* navigate to nearest header */ - if ( secs.rem != mfile->data.section_size) - ccp4_file_raw_seek(mfile->stream,(mfile->data.section_size - - secs.rem), SEEK_CUR); - - if ( (result = ccp4_file_readchar( mfile->stream, (uint8 *) header, - mfile->data.header_size)) != mfile->data.header_size) - ccp4_signal(ccp4_errno, - "ccp4_cmap_read_section_header", - NULL); - - return (result == mfile->data.header_size) ? 1 : 0; -} - -/*! write the local section header to the file. This must be of - size mfile->data.header.size. - Note: no checking is done so it is up to the calling program - to ensure that the file is in the correct location. As seeking - is turned off, this assumes we are appending to the file. - \param mfile (CMMFile *) - \param header (const char *) the local header character array - (not necessarily a string) - \return number of bytes written or EOF */ -int ccp4_cmap_write_section_header(CMMFile *mfile, const char *header) -{ - char *output; - int result; - - if (mfile == NULL ) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_write_section_header",NULL); - return EOF; } - - if (!ccp4_file_is_write(mfile->stream)) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_write_section_header",NULL); - return EOF; } - - if ( mfile->data.header_size == 0) return (0); - - output = (char *) malloc(mfile->data.header_size); - memset(output,' ', mfile->data.header_size); - if (header) memcpy(output, header,mfile->data.header_size); - - if ( (result = ccp4_file_writechar( mfile->stream, (uint8 *) output, - mfile->data.header_size)) - != mfile->data.header_size) - ccp4_signal(ccp4_errno, - "ccp4_cmap_write_section_header", - NULL); - - return (result == mfile->data.header_size) ? 1 : 0; -} - -/*! seek a row within a map section - \param mfile (CMMFile *) - \param row (int) - \param whence (unsigned int) SEEK_SET, SEEK_END, SEEK_CUR - \return offset in file or EOF */ -int ccp4_cmap_seek_row(CMMFile *mfile, int row, unsigned int whence) -{ - size_t curr_posn; - div_t secs, rows; - int result = EOF; - size_t item_size; - - if ( mfile == NULL ) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_seek_row",NULL); - return EOF; } - - item_size = ccp4_file_itemsize(mfile->stream); - curr_posn = ccp4_file_tell(mfile->stream); - secs = div(curr_posn - mfile->data.offset,mfile->data.block_size); - - switch (whence) { - case SEEK_SET: - if ( row < 0 || row >= mfile->map_dim[1]) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_row",NULL); - else - result = ccp4_file_raw_seek(mfile->stream, mfile->data.offset + - (secs.quot * mfile->data.block_size + - row * mfile->map_dim[0]*item_size), - SEEK_SET); - break; - case SEEK_END: - if ( row >= 0 || abs(row) > mfile->map_dim[1]) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_row",NULL); - else - result = ccp4_file_raw_seek(mfile->stream, mfile->data.offset + - (secs.quot * mfile->data.block_size + - mfile->data.section_size + - row * mfile->map_dim[0]*item_size), - SEEK_SET); - break; - case SEEK_CUR: - rows = div(secs.rem,mfile->map_dim[0]*item_size); - if ( (rows.quot + row) < 0 || (rows.quot + row) >= mfile->data.number) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_row",NULL); - else - result = ccp4_file_raw_seek(mfile->stream, - ( row > 0) ? (mfile->map_dim[0]*item_size - rows.rem - + (row-1)*mfile->map_dim[0]*item_size) : - ( row*mfile->map_dim[0]*item_size - rows.rem), - SEEK_CUR); - } - return (result); -} - -/*! write map row to file. - Note: this wraps a raw write, with no location checking. It is - therefore the responsibility of the calling program to ensure that - everything is correct. Effectively assume appending to file. - \param mfile (CMMFile *) - \param row (const void *) data to be written - \return 1 on success, 0 on failure */ -int ccp4_cmap_write_row(CMMFile *mfile, const void *row) -{ - int result=0; - - if (mfile == NULL || row == NULL) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_write_row",NULL); - return EOF; } - - if (!ccp4_file_is_write(mfile->stream)) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), - "ccp4_cmap_write_row",NULL); - return EOF; } - - result = ccp4_file_write(mfile->stream, row, mfile->map_dim[0]); - -/* note that we have started writing */ - mfile->data.number++; - - if (result != mfile->map_dim[0]) - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), - "ccp4_cmap_write_row",NULL); - else - if (mfile->data_mode == FLOAT32) - stats_update(&mfile->stats, (float *)row, (float *)row+mfile->map_dim[0]); - - return (result == mfile->map_dim[0]) ? 1 : 0; -} - -/*! read current map section from file to section. - Some checking is performed to ensure we are at the start of a - legitimate map row. - \param mfile (CMMFile *) - \param row (void *) array large enough to hold the map row - \return 1 on success, 0 on failure */ -int ccp4_cmap_read_row(CMMFile *mfile, void *row) -{ - int result = 0, item_size; - div_t secs, rows; - off_t curr_posn; - - if (mfile == NULL) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_read_row",NULL); - return EOF; } - - if (!ccp4_file_is_read(mfile->stream) || row == NULL) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ReadFail), - "ccp4_cmap_read_row",NULL); - return EOF; } - - item_size = ccp4_file_itemsize(mfile->stream); - curr_posn = ccp4_file_tell(mfile->stream); - - secs = div(curr_posn - mfile->data.offset, - mfile->data.block_size); - rows = div(secs.rem, mfile->map_dim[0]*item_size); - - if (secs.quot < 0 || secs.rem < 0) - ccp4_file_raw_seek(mfile->stream, mfile->data.offset, SEEK_SET); - else if(rows.quot >= mfile->map_dim[1] ) - ccp4_file_raw_seek(mfile->stream, (mfile->data.block_size - - secs.rem), SEEK_CUR); - else if( rows.rem != 0) - ccp4_file_raw_seek(mfile->stream, ( - secs.rem), SEEK_CUR); - - result = ccp4_file_read(mfile->stream, row, mfile->map_dim[0]); - - if (result != mfile->map_dim[0]) - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), - "ccp4_cmap_read_row",NULL); - - return (result == mfile->map_dim[0]) ? 1 : 0; -} - -/*! raw seek in items - \param mfile (CMMFile *) - \param offset (int) number of items - \param whence (unsigned int) SEEK_SET, SEEK_CUR, SEEK_END; - \return 0 on success, EOF on failure */ -int ccp4_cmap_seek_data(CMMFile *mfile, int offset, unsigned int whence) -{ - int result = EOF; - - if ( mfile == NULL ) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_seekdata",NULL); - return (result); } - - if ((result = ccp4_file_seek( mfile->stream, offset, whence)) == -1) - ccp4_signal(ccp4_errno, "ccp4_cmap_seek_data",NULL); - - return (result); -} - -/*! raw write of nelements items to file, according to the datamode, - at current location - \param mfile (const CMMFile *) - \param section (void *) values written, should contain at least - nelements items - \param n_items (int) number of items to be written - \return number of items written or EOF */ -int ccp4_cmap_write_data(CMMFile *mfile, const void *items, int n_items) -{ - int result=0; - - if (mfile == NULL || items == NULL) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_write_data",NULL); - return EOF; } - - if (ccp4_file_is_write(mfile->stream)) { - result = ccp4_file_write(mfile->stream, (uint8 *) items, n_items); - if (result != n_items) - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), - "ccp4_cmap_write_data",NULL); - else if (mfile->data_mode == FLOAT32) - stats_update(&mfile->stats, (float *)items, (float *)items+result); - } - - return (result); -} - -/*! raw read of nelements items from file according to the datamode - at current location - \param mfile (const CMMFile *) - \param items (void *) values read to here, so should have enough space - for nelements items - \param n_items (int) number of items to be read - \return number of items read or EOF */ -int ccp4_cmap_read_data(const CMMFile *mfile, void *items, int n_items) -{ - int result=0; - - if (mfile == NULL || items == NULL) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_read_data",NULL); - return EOF; } - - if (ccp4_file_is_read(mfile->stream)) - result = ccp4_file_read(mfile->stream, (uint8 *) items, n_items); - - return (result); -} - diff --git a/ccp4c/ccp4/cmap_data.h b/ccp4c/ccp4/cmap_data.h deleted file mode 100644 index 56b70e7d..00000000 --- a/ccp4c/ccp4/cmap_data.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - cmap_data.h: header for cmap_data.c - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __GUARD_MAPLIB_DATA -#define __GUARD_MAPLIB_DATA - -#ifdef __cplusplus -extern "C" { -#endif - -int number_sections(CMMFile *mfile); - -#ifdef __cplusplus -} -#endif - -#endif /* __GUARD_MAPLIB_DATA */ diff --git a/ccp4c/ccp4/cmap_errno.h b/ccp4c/ccp4/cmap_errno.h deleted file mode 100644 index 2584567a..00000000 --- a/ccp4c/ccp4/cmap_errno.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - cmap_errno.h: error codes for map handling functions - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __GUARD_MAPLIB_ERR -#define __GUARD_MAPLIB_ERR - -#include "ccp4_errno.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define CMAP_ERRNO(n) (CCP4_ERR_MAP | (n)) - -/* error defs */ -#define CMERR_Ok 0 -#define CMERR_NoChannel 1 -#define CMERR_NoFile 2 -#define CMERR_NoLogicalName 3 -#define CMERR_CantOpenFile 4 -#define CMERR_NoHeader 5 -#define CMERR_ReadFail 6 -#define CMERR_WriteFail 7 -#define CMERR_ParamError 8 -#define CMERR_UnrecognK 9 -#define CMERR_FileStamp 10 -#define CMERR_SymErr 11 -#define CMERR_AllocFail 12 -#define CMERR_MaxFile 13 -#define CMERR_SeekFail 14 - -#ifdef __cplusplus -} -#endif - -#endif /* __GUARD_MAPLIB_ERR */ - diff --git a/ccp4c/ccp4/cmap_header.c b/ccp4c/ccp4/cmap_header.c deleted file mode 100644 index c8823fd5..00000000 --- a/ccp4c/ccp4/cmap_header.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - cmap_header.c: read and write map file headers - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include -#include -#include "cmaplib.h" -#include "cmap_errno.h" -#include "cmap_skew.h" - -/*! Internal: read header from file and fill CMMFile struct. - Called after file is opened for read. - \param mfile (CMMFile *) - \return 1 on success, EOF on failure*/ -int parse_mapheader(CMMFile *mfile) -{ - const int read_total = 77; - const size_t header_size = 1024U, n_byt_symop = 80U; - unsigned char buffer[224]; - int result; - float fmean,frms; - - ccp4_file_rewind(mfile->stream); - - memset(buffer,'\0',224); - result = ccp4_file_readint(mfile->stream, &buffer[0], 10) ; - result += ccp4_file_readfloat(mfile->stream, &buffer[40], 6); - result += ccp4_file_readint(mfile->stream, &buffer[64], 3); - result += ccp4_file_readfloat(mfile->stream, &buffer[76], 3); - result += ccp4_file_readint(mfile->stream, &buffer[88], 3); - /* skew matrix and translation */ - result += ccp4_file_readfloat(mfile->stream, &buffer[100], 12); - /* reserved */ - result += ccp4_file_readint(mfile->stream, &buffer[148], 8); - /* user access */ - result += ccp4_file_readchar(mfile->stream, &buffer[180], 28); - /* map and machine stamp */ - result += ccp4_file_readint(mfile->stream, &buffer[208], 2); - /* ARMS */ - result += ccp4_file_readfloat(mfile->stream, &buffer[216], 1); - result += ccp4_file_readint(mfile->stream, &buffer[220], 1); - - if (result != read_total) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), - "parse_header", - NULL); - return EOF; } - - memcpy(&mfile->map_dim[0],&buffer[0],sizeof(mfile->map_dim)); - memcpy(&mfile->data_mode,&buffer[12],sizeof(int)); - memcpy(&mfile->origin[0],&buffer[16],sizeof(mfile->origin)); - memcpy(&mfile->cell_grid[0],&buffer[28],sizeof(mfile->cell_grid)); - memcpy(&mfile->cell[0],&buffer[40],sizeof(mfile->cell)); - memcpy(&mfile->axes_order[0],&buffer[64],sizeof(mfile->axes_order)); - memcpy(&mfile->stats.min,&buffer[76],sizeof(float)); - memcpy(&mfile->stats.max,&buffer[80],sizeof(float)); - memcpy(&fmean,&buffer[84],sizeof(float)); - mfile->stats.mean = (double) fmean; - memcpy(&mfile->spacegroup,&buffer[88],sizeof(int)); - - /* Additions for EM support. - Define contents as image, image stack, volume or volume stack. - In latter case, allows for 400+ispg convention. */ - mfile->EM_spacegroup = mfile->spacegroup; - strncpy(mfile->EM_contents,"VOLU",4); - if (mfile->spacegroup > 400 && mfile->spacegroup < 631) { - mfile->spacegroup = mfile->spacegroup - 400; - strncpy(mfile->EM_contents,"VLST",4); - } - if (mfile->spacegroup == 0) { - if (mfile->map_dim[2] == 1) strncpy(mfile->EM_contents,"IMAG",4); - if (mfile->map_dim[2] > 1) strncpy(mfile->EM_contents,"IMST",4); - } - - memcpy(&mfile->symop.size,&buffer[92],sizeof(int)); - memcpy(&mfile->user_access,&buffer[180],sizeof(mfile->user_access)); - /* memcpy(&mfile->data.header_size,&buffer[204],sizeof(int)); */ - memcpy(&frms,&buffer[216],sizeof(float)); - mfile->stats.rms = (double) frms; - memcpy(&mfile->labels.number,&buffer[220],sizeof(int)); - - memcpy(&result,&buffer[96],sizeof(int)); - if (result !=0) { - memcpy(&mfile->skew.rotation[0][0],&buffer[100],sizeof(mfile->skew.rotation)); - memcpy(&mfile->skew.translation[0],&buffer[136],sizeof(mfile->skew.translation)); - } - - ccp4_file_setmode(mfile->stream, mfile->data_mode); - /* may go to seperate function */ - mfile->symop.offset = header_size; - mfile->data.offset = mfile->symop.offset + mfile->symop.size; - mfile->data.section_size = mfile->map_dim[0]*mfile->map_dim[1] - *ccp4_file_itemsize(mfile->stream); - mfile->data.block_size = mfile->data.section_size + mfile->data.header_size; - mfile->data.number = mfile->map_dim[2]; - mfile->symop.number = mfile->symop.size / n_byt_symop; - - return 1; -} - -/*! Internal: write summary of current CMMFile struct to file. - Called when file is opened write, and closed write. - \param mfile (CMMFile *) - \return 1 on success, EOF on failure */ -int write_mapheader(CMMFile *mfile) -{ - const int write_total = 77; - unsigned char buffer[224]; - int result; - float fmean,frms; - - memset(buffer,'\0',224); - memcpy(&buffer[0],&mfile->map_dim[0],sizeof(mfile->map_dim)); - memcpy(&buffer[12],&mfile->data_mode,sizeof(int)); - memcpy(&buffer[16],&mfile->origin[0],sizeof(mfile->origin)); - memcpy(&buffer[28],&mfile->cell_grid[0],sizeof(mfile->cell_grid)); - memcpy(&buffer[40],&mfile->cell[0],sizeof(mfile->cell)); - memcpy(&buffer[64],&mfile->axes_order[0],sizeof(mfile->axes_order)); - memcpy(&buffer[76],&mfile->stats.min,sizeof(float)); - memcpy(&buffer[80],&mfile->stats.max,sizeof(float)); - fmean = (float) mfile->stats.mean; - memcpy(&buffer[84],&fmean,sizeof(float)); - - /* additions for EM support */ - if (!strncmp(mfile->EM_contents,"VLST",4)) { - memcpy(&buffer[88],&mfile->EM_spacegroup,sizeof(int)); - } else { - memcpy(&buffer[88],&mfile->spacegroup,sizeof(int)); - } - - memcpy(&buffer[92],&mfile->symop.size,sizeof(int)); - memcpy(&buffer[180],&mfile->user_access,sizeof(mfile->user_access)); - /* memcpy(&buffer[204],&mfile->data.header_size,sizeof(int)); */ - memcpy(&buffer[208],"MAP ",4U); - frms = (float) mfile->stats.rms; - memcpy(&buffer[216],&frms,sizeof(float)); - memcpy(&buffer[220],&mfile->labels.number,sizeof(int)); - - if (skew_set(&mfile->skew) == TRUE) { - result = 1; - memcpy(&buffer[96],&result, sizeof(int)); - memcpy(&buffer[100],&mfile->skew.rotation[0][0],sizeof(mfile->skew.rotation)); - memcpy(&buffer[148],&mfile->skew.translation[0],sizeof(mfile->skew.translation)); - } - - ccp4_file_seek(mfile->stream, 0L, SEEK_SET); - - result = ccp4_file_writeint(mfile->stream, &buffer[0], 10); - result += ccp4_file_writefloat(mfile->stream, &buffer[40], 6); - result += ccp4_file_writeint(mfile->stream, &buffer[64], 3); - result += ccp4_file_writefloat(mfile->stream, &buffer[76], 3); - result += ccp4_file_writeint(mfile->stream, &buffer[88], 3); - result += ccp4_file_writefloat(mfile->stream, &buffer[100], 12); - result += ccp4_file_writeint(mfile->stream, &buffer[148], 8); - result += ccp4_file_writechar(mfile->stream, &buffer[180], 28); - result += ccp4_file_writeint(mfile->stream, &buffer[208], 2); - result += ccp4_file_writefloat(mfile->stream, &buffer[216], 1); - result += ccp4_file_writeint(mfile->stream, &buffer[220], 1); - - if (result != write_total) - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), - "write_header", - NULL); - - return ( (result == write_total) ? 1 : EOF); -} - diff --git a/ccp4c/ccp4/cmap_header.h b/ccp4c/ccp4/cmap_header.h deleted file mode 100644 index 763fd22d..00000000 --- a/ccp4c/ccp4/cmap_header.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - cmap_header.h: header file for cmap_header.c - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __GUARD_MAPLIB_HEADER -#define __GUARD_MAPLIB_HEADER - -#ifdef __cplusplus -extern "C" { -#endif - -int parse_mapheader(CMMFile *mfile); - -int write_mapheader(CMMFile *mfile); - -#ifdef __cplusplus -} -#endif - -#endif /* __GUARD_MAPLIB_HEADER */ diff --git a/ccp4c/ccp4/cmap_labels.c b/ccp4c/ccp4/cmap_labels.c deleted file mode 100644 index a2a23a54..00000000 --- a/ccp4c/ccp4/cmap_labels.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - cmap_labels.c: read and write map header labels - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include "cmaplib.h" -#include "cmap_labels.h" -#include "cmap_errno.h" - -/*! Internal: read the labels from file header and copy into char * array - Called when the file is opened in read mode. - \param mfile (CMMFile *) - \return 1 on succes */ -int parse_maplabels(CMMFile *mfile) -{ - char buffer[81], *cptr; - const unsigned int n_byt_label = 80U, max_label = 10U; -/* const unsigned int labels_offset = 224U; */ - int i; - -/* ccp4_file_seek(mfile->stream,labels_offset,SEEK_SET); */ - for (i=0 ; i!=mfile->labels.number ; i++) { - ccp4_file_readchar(mfile->stream,(uint8 *) buffer,n_byt_label); - cptr = buffer+n_byt_label; - while (cptr> buffer && *--cptr == ' '); - *(++cptr) = '\0'; - mfile->labels.labels[i] = strdup(buffer); - } - ccp4_file_raw_seek(mfile->stream,(max_label-mfile->labels.number) - *n_byt_label, - SEEK_CUR); - return 1; -} - -/*! Internal: dump the labels char * array to file, offset at 224 bytes. - Called when the file is opened or closed in write mode, immediately after the - header is written. - \param mfile (const CMMFile *) - \return 1 on success, 0 on failure */ -int write_maplabels(const CMMFile *mfile) -{ - char buffer[80]; -/* const unsigned int labels_offset = 224U; */ - int i, result = 0; - size_t slen; - -/* ccp4_file_seek(mfile->stream,labels_offset,SEEK_SET); */ - for (i=0 ; i != mfile->labels.number ; i++) { - memset(buffer,' ',80U); - slen = strlen(mfile->labels.labels[i]); - if (slen > 80U) slen = 80U; - strncpy(buffer,mfile->labels.labels[i],slen); - result += ccp4_file_writechar(mfile->stream,(uint8 *) buffer,80U); - } - memset(buffer,' ',80U); - while(i != 10) { - result += ccp4_file_writechar(mfile->stream,(uint8 *) buffer,80U); - i++; - } - return (result == 800) ? 1 : 0 ; -} - -/*! Set the label in the map header. Headers are 80 characters long. - The labels are written to the file when it is closed. Therefore, - the file must be in write mode. - If label == NULL the element corresponding to posn is removed. - The number of labels is recalculated on each call. - \param mfile (CMMFile *) - \param label (const char *) the C-style character array - \param posn (int) the label number (C-style, 0 -> 9) - \return number of label effected, or EOF */ -int ccp4_cmap_set_label(CMMFile *mfile, const char *label, int posn) -{ - int i,j; - - if (mfile == NULL) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_set_label",NULL); - return (EOF);} - - if (ccp4_file_is_write(mfile->stream) == 0) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), - "ccp4_cmap_label_set",NULL); - return (EOF);} - -/*posn must be between 0 and 9 */ - if (posn < 0) { - posn = 0; - } else if (posn > mfile->labels.number) { - posn = mfile->labels.number; - } - - if (mfile->labels.labels[posn] != NULL) - free(mfile->labels.labels[posn]); - -/* if label == NULL reset the value and compress set */ - if (label == NULL) { - mfile->labels.labels[posn] = NULL; - for ( i=posn ; i!=10 ; i++) - if (mfile->labels.labels[i] == NULL) - for ( j=i+1 ; j!=10; j++) - if (mfile->labels.labels[j] != NULL) { - mfile->labels.labels[i] = mfile->labels.labels[j]; - mfile->labels.labels[j] = NULL; - break; - } - } - else - mfile->labels.labels[posn] = strdup(label); - -/* recalculate number */ - for ( i=0 ; i!=10 ; i++) - if (mfile->labels.labels[i] == NULL) - break; - mfile->labels.number = i; - - return posn; -} - -/*! Get the label corresponding to position posn - \param mfile (const CMMFile *) - \param posn (int) desired label number - \return pointer to label posn */ -char *ccp4_cmap_get_label(const CMMFile *mfile, int posn) -{ - char *label; - if (mfile == NULL) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_get_label",NULL); - return (NULL);} - - if (posn < 0 || posn >= mfile->labels.number) - label = NULL; - else - label = mfile->labels.labels[posn]; - - return label; -} - -/*! Return the number of labels. - \param mfile (CMMFile *) - \return the number of labels */ -int ccp4_cmap_number_label(const CMMFile *mfile) -{ - return mfile->labels.number; -} - -/*! Get the label corresponding to the title - wrapping ccp4_cmap_get_label. - \param mfile (const CMMFile *) - \return pointer to label 0, or NULL */ -char *ccp4_cmap_get_title(const CMMFile *mfile) -{ - return ccp4_cmap_get_label(mfile, 0); -} - -/*! Set the label corresponding to the title, - wrapping ccp4_cmap_set_label - \param mfile (CMMFile *) - \param label - \return 0 or EOF on failure */ -int ccp4_cmap_set_title(CMMFile *mfile, const char *title) -{ - return ccp4_cmap_set_label(mfile, title, 0); -} diff --git a/ccp4c/ccp4/cmap_labels.h b/ccp4c/ccp4/cmap_labels.h deleted file mode 100644 index 086b0624..00000000 --- a/ccp4c/ccp4/cmap_labels.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - cmap_labels.h: header for cmap_labels.c - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __GUARD_MAPLIB_LABEL -#define __GUARD_MAPLIB_LABEL - -#ifdef __cplusplus -extern "C" { -#endif - -int parse_maplabels(CMMFile *mfile); -int write_maplabels(const CMMFile *mfile); - - -#ifdef __cplusplus -} -#endif - -#endif /* __GUARD_MAPLIB_LABEL */ diff --git a/ccp4c/ccp4/cmap_open.c b/ccp4c/ccp4/cmap_open.c deleted file mode 100644 index 310fc2e6..00000000 --- a/ccp4c/ccp4/cmap_open.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - cmap_open.c: Opening CCP4-format map files. - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file cmap_open.c - * - * @brief Opening CCP4-format map files. - * - * @author Charles Ballard - */ - -#include -#include -#include -#include -#include "cmaplib.h" -#include "cmap_header.h" -#include "cmap_labels.h" -#include "cmap_errno.h" - -/*! Internal: malloc CMMFile struct for reading into - \return CMMFile */ -CMMFile *init_cmap_read(void) -{ - CMMFile *mfile = (CMMFile *) malloc(sizeof(CMMFile)); - if (mfile) - memset(mfile,'\0',sizeof(CMMFile)); - return mfile; -} - -/*! Internal: malloc CMMFile struct for writing - \return CMMFile */ -CMMFile *init_cmap_write(void) -{ - CMMFile *mfile = (CMMFile *) malloc(sizeof(CMMFile)); - if (mfile) { - memset(mfile,'\0',sizeof(CMMFile)); - mfile->data_mode = DEFMODE; - mfile->symop.offset = 1024U; - mfile->data.offset = 1024U; } - return mfile; -} - -/*! Internal: Identify file as a ccp4 format map - \param file The (CCP4File *) struct representing the file. - \return non-zero on true, 0 on false */ -int is_cmap(CCP4File *file) -{ - char buffer[4]; - const unsigned int map_offset = 208U; - if (file == NULL) - return 0; - if ( ccp4_file_raw_seek(file,map_offset,SEEK_SET) == EOF) - return 0; - if (ccp4_file_readchar(file,(uint8 *) buffer,4U) != 4U) - return 0; - ccp4_file_rewind(file); - return !strncmp(buffer,"MAP ",4); -} - -/*! The file is opened. - \param filename (char *) the filename - \param mode (int) the i/o mode , possible values are O_RDONLY, O_WRONLY, - O_RDWR, O_APPEND, O_TMP, O_CREAT, O_TRUNC - see ccp4_sysdep.h - \return (void *) CMMFile structure */ -void *ccp4_cmap_open(const char *filename, int mode) -{ - CMMFile *mfile; - CCP4File *cfile; - const size_t stamp_offset = 212U; - - if ((cfile = ccp4_file_open(filename, mode)) == NULL) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_CantOpenFile), - "ccp4_cmap_open",NULL); - return (NULL); } - ccp4_file_raw_setstamp(cfile, stamp_offset); - /* read or write only */ - if (cfile->read) { - if (!is_cmap(cfile) || cfile->length < 1025) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoHeader), - "ccp4_cmap_open",NULL); - ccp4_file_close(cfile); - return NULL; } - ccp4_file_rarch(cfile); - mfile = init_cmap_read(); - mfile->stream = cfile; - mfile->file_name = cfile->name; - parse_mapheader(mfile); - parse_maplabels(mfile); - } else if (cfile->write) { - mfile = init_cmap_write(); - mfile->stream = cfile; - mfile->file_name = cfile->name; - write_mapheader(mfile); - write_maplabels(mfile); - } else { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_CantOpenFile), - "ccp4_cmap_open",NULL); - return (NULL); } - return (mfile); -} - diff --git a/ccp4c/ccp4/cmap_skew.c b/ccp4c/ccp4/cmap_skew.c deleted file mode 100644 index df9e9ed1..00000000 --- a/ccp4c/ccp4/cmap_skew.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - cmap_skew.c: set and fetch the skew matrix - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License version 3, - modified in accordance with the provisions of the license to address - the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be downloaded - from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - -*/ - -#include -#include "cmaplib.h" -#include "cmap_skew.h" -#include "cmap_errno.h" - -/*! Set the values of the translation and rotation elements of the skew matrix. - Note: the stored file is in FORTRAN order mat[fastest][slowest] - \param mfile (CMMFile *) - \param skew_mat (const float *) the skew translation vestor - \param skew_trans (const float *) the skew rotation matrix (C ordering) - \return 1 if either skew_trans or skew_mat is non-NULL */ -int ccp4_cmap_set_mask(CMMFile *mfile, const float *skew_mat, const float *skew_trans) -{ - int ictr, jctr; - - if (!mfile) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_set_mask",NULL); - return (EOF);} - - if (skew_trans) - for(ictr = 0; ictr < 3 ; ++ictr) - mfile->skew.translation[ictr] = *(skew_trans + ictr); - else - for(ictr = 0; ictr < 3 ; ++ictr) - mfile->skew.translation[ictr] = 0.0F; - - if (skew_mat) - for(ictr = 0; ictr < 3 ; ++ictr) - for (jctr = 0 ; jctr < 3 ; ++jctr) - mfile->skew.rotation[jctr][ictr] = *(skew_mat + (3*ictr) + jctr); - else - for(ictr = 0; ictr < 3 ; ++ictr) - for (jctr = 0 ; jctr < 3 ; ++jctr) - mfile->skew.rotation[jctr][ictr] = 0.0F; - - return (skew_trans != NULL || skew_mat != NULL ); -} - -/*! Get the values of the translation and rotation elements of the skew matrix. - Note: the stored file is in FORTRAN order mat[fastest][slowest], the returned - values are in C mat[slowest][fastest] ordering - \param mfile (CMMFile *) - \param skew_mat (const float *) the skew translation vestor - \param skew_trans (const float *) the skew rotation matrix (C ordering) - \return 1 if mask is set */ -int ccp4_cmap_get_mask(const CMMFile *mfile, float *skew_mat, float *skew_trans) -{ - int ictr, jctr; - - if (!mfile || !skew_mat || !skew_trans) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_NoChannel), - "ccp4_cmap_get_mask",NULL); - return (EOF);} - - for(ictr = 0; ictr < 3 ; ++ictr) - *(skew_trans + ictr) = mfile->skew.translation[ictr]; - - for(ictr = 0; ictr < 3 ; ++ictr) - for (jctr = 0 ; jctr < 3 ; ++jctr) - *(skew_mat + (3*ictr) + jctr) = mfile->skew.rotation[jctr][ictr]; - - return skew_set(&mfile->skew); -} - -/*! Internal: test whether values are set in the skew matrices - \param skew (CMMFile_Skew *) - \return TRUE or FALSE */ -int skew_set(const CMMFile_Skew *skew) -{ - return - skew->translation[0] != 0.0F || - skew->translation[1] != 0.0F || - skew->translation[2] != 0.0F || - skew->rotation[0][0] != 0.0F || - skew->rotation[0][1] != 0.0F || - skew->rotation[0][2] != 0.0F || - skew->rotation[1][0] != 0.0F || - skew->rotation[1][1] != 0.0F || - skew->rotation[1][2] != 0.0F || - skew->rotation[2][0] != 0.0F || - skew->rotation[2][1] != 0.0F || - skew->rotation[2][2] != 0.0F; -} diff --git a/ccp4c/ccp4/cmap_skew.h b/ccp4c/ccp4/cmap_skew.h deleted file mode 100644 index 4c9cc08a..00000000 --- a/ccp4c/ccp4/cmap_skew.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - cmap_skew.h: header file for cmap_skew.c - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __GUARD_MAPLIB_SKEW -#define __GUARD_MAPLIB_SKEW - -#ifdef __cplusplus -extern "C" { -#endif - -int skew_set(const CMMFile_Skew *skew); - -#ifdef __cplusplus -} -#endif - -#endif /* __GUARD_MAPLIB_SKEW */ diff --git a/ccp4c/ccp4/cmap_stats.c b/ccp4c/ccp4/cmap_stats.c deleted file mode 100644 index 4c86d16d..00000000 --- a/ccp4c/ccp4/cmap_stats.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - cmap_stats.c: deal with map statistics. - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include "cmaplib.h" -#include "cmap_stats.h" -#include "cmap_errno.h" - -/*! Internal: use floats in range section_begin to section_end - to update the map statistics. - \param stats (CMMFile_Stats *) - \param section_begin (void *) start of section - \param section_end (void *) one past end-of-section - \return total of map elements so far */ -int stats_update(CMMFile_Stats *stats, void *section_begin, - void *section_end) -{ - float *ufp = (float *) section_begin; - double val; - - if (stats->total == 0 && *ufp < -1.0e10 ) { - stats->offset = *ufp; - } - while (ufp < (float *) section_end) { - val = (double) (*ufp - stats->offset); - stats->mean += val; - stats->rms += val * val; - stats->min = MIN( stats->min, *ufp); - stats->max = MAX( stats->max, *ufp); - - ufp++; - } - - stats->total += (float *)section_end - (float *)section_begin; - - return (stats->total); -} - diff --git a/ccp4c/ccp4/cmap_stats.h b/ccp4c/ccp4/cmap_stats.h deleted file mode 100644 index 0f25bb6c..00000000 --- a/ccp4c/ccp4/cmap_stats.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - cmap_stats.h: header file for cmap_stats.c - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __GUARD_MAPLIB_STATS -#define __GUARD_MAPLIB_STATS - -#ifdef __cplusplus -extern "C" { -#endif - -int stats_update(CMMFile_Stats *stats, void *section_begin, - void *section_end); - -#ifdef __cplusplus -} -#endif - -#endif /* __GUARD_MAPLIB_STATS */ diff --git a/ccp4c/ccp4/cmap_symop.c b/ccp4c/ccp4/cmap_symop.c deleted file mode 100644 index e1d3a188..00000000 --- a/ccp4c/ccp4/cmap_symop.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - cmap_symop.c: set and fetch symmetry operations in map header - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include "cmaplib.h" -#include "cmap_errno.h" - -/*! Return the number of symops (estimated as the size/80) - \param mfile (const CMMFile *) - \return number of symops */ -int ccp4_cmap_num_symop(const CMMFile *mfile) -{ - if (mfile == NULL) - return 0; - return (mfile->symop.number); -} - -/*! navigate around the symops, seeking in 80 byte units - The result must lie within the symop strings in the file. - \param mfile (CMMFile *) - \param isymop (int) the number of the symop "string" of interest - \param whence (unsigned int) mode of seek - \return symop string number or EOF */ -int ccp4_cmap_seek_symop(CMMFile *mfile, int isymop, unsigned int whence) -{ - const int n_byt_symop = 80; - div_t symops; - int result = EOF; - - if (ccp4_file_is_read(mfile->stream) == 0) - return EOF; - - switch (whence) { - case SEEK_SET: - if (isymop < 0 || isymop > mfile->symop.number) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_symop", - NULL); - else - result = ccp4_file_raw_seek(mfile->stream, mfile->symop.offset + - isymop*n_byt_symop, whence); - break; - case SEEK_END: - if (isymop > 0 || abs(isymop) > mfile->symop.number ) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_symop", - NULL); - else - result = ccp4_file_raw_seek(mfile->stream, mfile->symop.offset + - mfile->symop.size + isymop*n_byt_symop, - SEEK_SET); - break; - case SEEK_CUR: - symops = div(ccp4_file_tell(mfile->stream) - mfile->symop.offset,n_byt_symop); - if (symops.quot < 0 || symops.quot >= mfile->symop.number || - symops.quot + isymop < 0 || symops.quot + isymop >= mfile->symop.number) - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_ParamError), - "ccp4_cmap_seek_symop", - NULL); - else - result = ccp4_file_raw_seek(mfile->stream,(isymop > 0) ? - (n_byt_symop - symops.rem + n_byt_symop * (isymop-1)) : - (n_byt_symop * isymop -symops.rem), SEEK_CUR); - } - return (result == EOF) ? EOF : (result - mfile->symop.offset)/n_byt_symop; -} - -/*! get a symop string of 80 characters - \param mfile (CMMFile *) - \param buffer (char *) array of bytes which will contain the symop string. - This must be at least 81 characters long (including space for null terminator). - \return 1 on success, 0 if no symops, EOF on failure */ -int ccp4_cmap_get_symop(CMMFile *mfile, char *buffer) -{ - const int n_byt_symop = 80; - off_t file_posn; - - if ( mfile->symop.size == 0) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_SymErr), - "cmap_get_symop",NULL); - return (0);} - - file_posn = ccp4_file_tell(mfile->stream); - if (file_posn < mfile->symop.offset || - file_posn > mfile->symop.offset + mfile->symop.size) { - ccp4_signal( CCP4_ERRLEVEL(2) | CMAP_ERRNO(CMERR_SymErr), - "cmap_get_symop",NULL); - return (EOF);} - - if (ccp4_file_readchar(mfile->stream, (uint8 *) buffer, n_byt_symop) != n_byt_symop) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_ReadFail), - "cmap_get_symop",NULL); - return (EOF); - } - buffer[n_byt_symop] = '\0'; - return (1); -} - -/*! write symops to file. - This wraps a raw write. It is up to the calling program to - ensure the positioning (effectively assume appends). Writing - is blocked if data has alread been written to the file. 80 - bytes of continuous memory is written to the file. - \param mfile (CMMFile *) - \param symop (const char *) character array containing the - symop string (at least 80 characters in length - \return 1 on success, EOF on failure */ -int ccp4_cmap_set_symop(CMMFile *mfile, const char *symop) -{ - const int n_byt_symop = 80; - char buffer[80]; - memset(buffer,' ',80U); - memcpy(buffer, symop, (strlen(symop) > n_byt_symop) ? - n_byt_symop : strlen(symop) ); - if (ccp4_file_is_write(mfile->stream) && mfile->data.number == 0) { - if (ccp4_file_writechar(mfile->stream, (uint8 *) buffer, n_byt_symop) != n_byt_symop) { - ccp4_signal( CCP4_ERRLEVEL(3) | CMAP_ERRNO(CMERR_WriteFail), - "cmap_set_symop",NULL); - return (EOF); - } - mfile->symop.number++; - mfile->symop.size += n_byt_symop; - mfile->data.offset = mfile->symop.offset + mfile->symop.size; -} - return (1); -} diff --git a/ccp4c/ccp4/cmaplib.h b/ccp4c/ccp4/cmaplib.h deleted file mode 100644 index 422be4be..00000000 --- a/ccp4c/ccp4/cmaplib.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - cmaplib.h: C/C++ level API for accessing CCP4 map files - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @page cmap_page CMAP library - * - * @verbatim - - - - @endverbatim - * - * @section cmap_file_list File list - -
    -
  • cmaplib.h - contains details of the C/C++ API -
  • cmap_data.h -
  • cmap_header.h -
  • cmap_skew.h -
  • cmap_errno.h -
  • cmap_labels.h -
  • cmap_stats.h -
- - * @section cmap_overview Overview - - Functions defining the C-level API for accessing CCP4 map files. - - */ - -/** @file cmaplib.h - * - * @brief ccp4 map i/o user-level library header file - * - * Functions defining the C-level API for accessing CCP4 map files. - * - * @author Charles Ballard - */ - -#ifndef __GUARD_MAPLIB -#define __GUARD_MAPLIB - -#include "ccp4_utils.h" - -#ifdef __cplusplus -namespace CMap_io { -typedef CCP4::CCP4File CCP4File; -extern "C" { -#endif - -typedef struct _CMMFile_Skew CMMFile_Skew; -typedef struct _CMMFile_Labels CMMFile_Labels; -typedef struct _CMMFile_Symop CMMFile_Symop; -typedef struct _CMMFile_Data CMMFile_Data; -typedef struct _CMMFile_Stats CMMFile_Stats; -typedef struct _CMMFile CMMFile; - -struct _CMMFile_Labels { - unsigned int number; - char *labels[10]; -}; - -struct _CMMFile_Skew { - float rotation[3][3]; - float translation[3]; -}; - -struct _CMMFile_Symop { -unsigned int offset; -unsigned int size; -unsigned int number; -}; - -struct _CMMFile_Data { - size_t offset; - size_t section_size; - size_t header_size; - size_t block_size; - unsigned int number; -}; - -struct _CMMFile_Stats { - float offset; /* pseudo zero value */ - float min; /* minimum density value */ - float max; /* maximum density value */ - double mean; /* sum of densities (less offset) */ - double rms; /* sum of square of densities (less offset) */ - int total; /* number of summed densities */ -}; - -struct _CMMFile { -CCP4File *stream; -char *file_name; -unsigned int data_mode; -unsigned int close_mode; -float cell[6]; -int spacegroup; -int EM_spacegroup; -char EM_exthead_type[5]; -char EM_contents[5]; -int map_dim[3]; -int origin[3]; -int cell_grid[3]; -int axes_order[3]; -CMMFile_Symop symop; -CMMFile_Data data; -CMMFile_Stats stats; -CMMFile_Labels labels; -CMMFile_Skew skew; -int reserved[8]; -char user_access[28]; -}; - -/* open a file for read/write */ -void *ccp4_cmap_open(const char *filename, int mode); - -/* close a file for read/write (dumping the header if write) */ -void ccp4_cmap_close(CMMFile *mfile); - -/* set the close mode (calculation of map statistics) */ -void ccp4_cmap_closemode(CMMFile *mfile, unsigned int closemode); - -/* seek to a section in the map (read mode only)*/ -int ccp4_cmap_seek_section(CMMFile *mfile, int offset, unsigned int seek_mode); - -/* seek to a row in a section (read mode only)*/ -int ccp4_cmap_seek_row(CMMFile *, int offset, unsigned int seek_mode); - -/* raw seek (read mode only)*/ -int ccp4_cmap_seek_data(CMMFile *, int offset, unsigned int seek_mode); - -/* read a map section from file to memory */ -int ccp4_cmap_read_section(CMMFile *mfile, void *section); - -/* read a row from file to memory */ -int ccp4_cmap_read_row(CMMFile *mfile, void *row); - -/* read n_items from file to memory (item determined by data mode) */ -int ccp4_cmap_read_data(const CMMFile *mfile, void *items, int n_items); - -/* write a map section from memory to file */ -int ccp4_cmap_write_section(CMMFile *mfile, const void *section); - -/* write a map row from memory to file */ -int ccp4_cmap_write_row(CMMFile *mfile, const void *row); - -/* write n_items from memory to file (item determined by data mode) */ -int ccp4_cmap_write_data(CMMFile *mfile, const void *items, int n_items); - -/* read the section header corresponding to the current section */ -int ccp4_cmap_read_section_header(const CMMFile *mfile, char *header); - -/* write the section header corresponding to the current section */ -int ccp4_cmap_write_section_header(CMMFile *mfile, const char *header); - -/* get the header parameters */ -void ccp4_cmap_get_cell(const CMMFile *mfile, float *cell); -void ccp4_cmap_get_grid(const CMMFile *mfile, int *grid); -void ccp4_cmap_get_origin(const CMMFile *mfile, int *origin); -void ccp4_cmap_get_order(const CMMFile *mfile, int *axes_order); -void ccp4_cmap_get_dim(const CMMFile *mfile, int *map_dim); -int ccp4_cmap_get_spacegroup(const CMMFile *mfile); -void ccp4_cmap_get_mapstats(const CMMFile *mfile, float *min, float* max, - double *mean, double *rms); - -/* set the header parameters */ -void ccp4_cmap_set_cell(CMMFile *mfile, const float *cell); -void ccp4_cmap_set_grid(CMMFile *mfile, const int *grid); -void ccp4_cmap_set_origin(CMMFile *mfile, const int *origin); -void ccp4_cmap_set_order(CMMFile *mfile, const int *axes_order); -void ccp4_cmap_set_dim(CMMFile *mfile, const int *map_dim); -void ccp4_cmap_set_spacegroup(CMMFile *mfile, int spacegroup); -void ccp4_cmap_set_mapstats(CMMFile *mfile, const float min, const float max, - const double mean, const double rms); - -/* get map file datamode */ -unsigned int ccp4_cmap_get_datamode(const CMMFile *mfile); - -/* set map file datamode */ -void ccp4_cmap_set_datamode(CMMFile *mfile, unsigned int datamode); - -/* get the local header size */ -size_t ccp4_cmap_get_local_header(CMMFile *mfile); - -/* set the local header size (before data writing begins) */ -void ccp4_cmap_set_local_header(CMMFile *mfile, size_t size); - -/* get the number of symops in the file */ -int ccp4_cmap_num_symop(const CMMFile *mfile); - -/* seek among the symops strings */ -int ccp4_cmap_seek_symop(CMMFile *mfile, int isymop, unsigned int whence); - -/* read a symop string of 80 characters */ -int ccp4_cmap_get_symop(CMMFile *mfile, char *buffer); - -/* write a symop string of 80 characters */ -int ccp4_cmap_set_symop(CMMFile *mfile, const char *buffer); - -/* get the mask */ -int ccp4_cmap_get_mask(const CMMFile *mfile, float *skew_mat, float *skew_trans); - -/* set the mask */ -int ccp4_cmap_set_mask(CMMFile *mfile, const float *skew_mat, const float *skew_trans); - -/* the number of labels used */ -int ccp4_cmap_number_label(const CMMFile *mfile); - -/* set label at posn from C-string */ -int ccp4_cmap_set_label(CMMFile *mfile, const char *label, int posn); - -/* return label at posn as C-string */ -char *ccp4_cmap_get_label(const CMMFile *mfile, int posn); - -/* set title (label=0) */ -int ccp4_cmap_set_title(CMMFile *mfile, const char *label); - -/* get title (label=0) */ -char *ccp4_cmap_get_title(const CMMFile *mfile); - -#ifdef __cplusplus -} -} -#endif - -#endif /* __GUARD_MAPLIB */ diff --git a/ccp4c/ccp4/cmaplib_f.h b/ccp4c/ccp4/cmaplib_f.h deleted file mode 100644 index e687cdc3..00000000 --- a/ccp4c/ccp4/cmaplib_f.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - cmaplib_f.h: header files for cmaplib_f.c - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __GUARD_MAPLIB_FORTRAN -#define __GUARD_MAPLIB_FORTRAN - -#include "cmaplib.h" - -#define MAXMAP MAXFILES - -typedef struct _IOConvMap IOConvMap; - -struct _IOConvMap { - int ipc; - char *logname; - CMMFile *mapfile; -}; - -#endif /* __GUARD_MAPLIB_FORTRAN */ diff --git a/ccp4c/ccp4/cmtzlib.c b/ccp4c/ccp4/cmtzlib.c deleted file mode 100644 index 3d53dff1..00000000 --- a/ccp4c/ccp4/cmtzlib.c +++ /dev/null @@ -1,3964 +0,0 @@ -/* - cmtzlib.c: functions for handling MTZ files - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/* DO NOT put Doxygen comments here - put in cmtzlib.h */ -/* See cmtzlib.h for descriptions of functions */ - -#include -#include -#include -#ifdef _MSC_VER -#include -#endif -#include -#include "cmtzlib.h" -#include "ccp4_types.h" -#include "ccp4_array.h" -#include "ccp4_parser.h" -#include "ccp4_vars.h" -#include "ccp4_errno.h" -#include "ccp4_unitcell.h" -/* "$Id$" */ - -/* stuff for error reporting */ -#define CMTZ_ERRNO(n) (CCP4_ERR_MTZ | (n)) - -/* error defs */ -#define CMTZERR_Ok 0 -#define CMTZERR_NoChannel 1 -#define CMTZERR_NoFile 2 -#define CMTZERR_NoLogicalName 3 -#define CMTZERR_CantOpenFile 4 -#define CMTZERR_NoHeader 5 -#define CMTZERR_ReadFail 6 -#define CMTZERR_WriteFail 7 -#define CMTZERR_ParamError 8 -#define CMTZERR_Cellerr 9 -#define CMTZERR_FileStamp 10 -#define CMTZERR_SymErr 11 -#define CMTZERR_AllocFail 12 -#define CMTZERR_MaxFile 13 -#define CMTZERR_ParserFail 14 -#define CMTZERR_NotMTZ 15 -#define CMTZERR_DatasetIncomplete 16 -#define CMTZERR_NoArch 17 -#define CMTZERR_NullDataset 18 -#define CMTZERR_BadVersion 19 -#define CMTZERR_SYMINFIncomplete 20 -#define CMTZERR_COLUMNIncomplete 21 -#define CMTZERR_BadBatchHeader 22 -#define CMTZERR_DifferentVersion 23 -#define CMTZERR_ColTypeMismatch 24 -#define CMTZERR_ColGroupError 25 -#define CMTZERR_ColSourceError 26 - - -MTZ *MtzGet(const char *logname, int read_refs) - -{ return MtzGetUserCellTolerance(logname, read_refs, 0.002); -} - -MTZ *MtzGetUserCellTolerance(const char *logname, int read_refs, const double cell_tolerance) - -{ MTZ *mtz; - CCP4File *filein; - int istat, newproj, cset_warn=0, length; - MTZCOL *colin[MCOLUMNS], *newcol; - char *filename; - char crysin[MXTALS][65],projin[MXTALS][65],crystal[65],project[65]; - double cellin[MXTALS][6],cell[6]; - int jxtalin[MSETS]; - char mkey[4], keyarg[76], hdrrec[MTZRECORDLENGTH+1], label[31], type[3]; - int i, j, ntotcol, nref, ntotset=0, nbat, nhist=0, icolin; - int ixtal, jxtal, iset, iiset, icset, nxtal=0, nset[MXTALS]={0}, isym=0; - int indhigh[3],indlow[3],isort[5],ind_xtal,ind_set,ind_col[3],debug=0; - float min,max,totcell[6],minres,maxres; - float *refldata; - double coefhkl[6]; - int k; long xmllen; - int32_t tmp_hdrst; - int64_t hdrst; - - /* For cparser */ - CCP4PARSERARRAY *parser; - CCP4PARSERTOKEN *token=NULL; - char *key; - int ntok,iprint=0; - - /* For batches */ - int ibat,nintegers,nreals; - float buf[NBATCHWORDS]; - int *intbuf = (int *) buf; - float *fltbuf = buf + NBATCHINTEGERS; - MTZBAT *batch; - - /* known headers */ - char known_headers[][5] = - { "PROJ","DATA","DCEL","DRES","DWAV","VERS","TITL","CELL", - "SORT","SYMI","SYMM","COLU","VALM","RESO","COLS","COLG", - "NCOL","NDIF","CRYS","MTZH","MTZB","BH" }; - int n_known_headers = sizeof(known_headers)/sizeof(known_headers[0]); - - if (debug) - printf(" Entering MtzGet \n"); - - /* check input */ - if (!logname) return NULL; - - /* Open the mtz file: */ - if (getenv(logname) != NULL) { - filename = strdup(getenv(logname)); - } else { - filename = strdup(logname); - } - - if (debug) - printf(" Opening file %s \n",filename); - - filein = ccp4_file_open(filename,O_RDONLY); - if (! filein ) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_CantOpenFile),"MtzGet",NULL); - free(filename); - return NULL; - } - - if (debug) - printf(" File opened successfully \n"); - - /* specify location of stamp as 2*sizeof(float), where float is default mode */ - ccp4_file_setstamp(filein, 2); - /* Read architecture */ - istat = ccp4_file_rarch (filein); - if (!istat) { - ccp4_signal(CCP4_ERRLEVEL(2) | CMTZ_ERRNO(CMTZERR_NoArch), - "MtzGet", NULL); - } - - parser = ccp4_parse_start(20); - if (parser == NULL) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ParserFail),"MtzGet",NULL); - free(filename); - ccp4_file_close(filein); - return NULL; - } - /* Set some convenient pointers to members of the parser array */ - key = parser->keyword; - token = parser->token; - - /* return to beginning of the file */ - ccp4_file_seek (filein, 0, SEEK_SET); - /* set reading characters */ - ccp4_file_setmode(filein,0); - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, 4); - /* We don't test all reads, but this one should trap for e.g. truncated files */ - if (istat == EOF || hdrrec[0] == '\0') { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - hdrrec[4] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - - if (!ccp4_keymatch(key,"MTZ")) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_NotMTZ),"MtzGet",NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return(NULL); - } - - if (debug) - printf(" MTZ file confirmed \n"); - - /* set reading integers */ - ccp4_file_setmode(filein,6); - istat = ccp4_file_read(filein, (uint8 *) &tmp_hdrst, 1); - if (debug) printf(" tmp_hdrst read as %d \n", tmp_hdrst); - if (tmp_hdrst == -1) { - // read the real header offset in bytes 13-20 i.e. a double-word after the third word - if ( ccp4_file_seek(filein, 3, SEEK_SET) ) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - /* set reading double integers*/ - ccp4_file_setmode(filein,5); - istat = ccp4_file_read(filein, (uint8 *) &hdrst, 1); - if (debug) printf(" hdrst read as %ld \n", hdrst); - /* switch back to reading integers */ - ccp4_file_setmode(filein,6); - } else { - hdrst = (int64_t) tmp_hdrst; - } - - /* 1st Pass: Read ntotcol, nref, nbat and dataset info. - nxtal and nset are used to assign memory for MTZ structure. - Position at top of header */ - /* We don't test all seeks, but this one might trap duff files */ - if ( ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET) ) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - - /* set up base dataset in case it is in not in file */ - iiset = 0; - nxtal = 1; - jxtalin[0]=0; - strcpy(projin[0],"HKL_base"); - strcpy(crysin[0],"HKL_base"); - nset[0] = 1; - - if (debug) - printf(" Start first pass \n"); - - strcpy(project,"dummy"); - strcpy(crystal,"dummy"); - ccp4_file_setmode(filein,0); - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - if (debug) - printf(" Read first header record with istat = %d \n",istat); - /* We don't test all reads, but this one should trap for e.g. truncated files */ - if (istat == EOF || hdrrec[0] == '\0') { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - while (!ccp4_keymatch(key,"END")) { - - /* read total number of columns, reflections and batches */ - if (ccp4_keymatch(key, "NCOL")) { - ntotcol = (int) token[1].value; - nref = (int) token[2].value; - nbat = (int) token[3].value; - } - - /* read total number of datasets over all projects/crystals */ - else if (ccp4_keymatch(key, "NDIF")) { - ntotset = (int) token[1].value; - if (debug) printf(" MtzGet: NDIF is %d\n",ntotset); - } - - /* PROJECT line. Projects are not part of data structure, but - may imply new crystal in hierarchy. */ - else if (ccp4_keymatch(key, "PROJ")) { - ++iiset; - if (iiset >= MSETS) { - if (ccp4_liberr_verbosity(-1)) - printf("MtzGet: Maximum number of datasets exceeded! \n"); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - strcpy(project,"dummy"); - if (ntok > 2) strcpy(project,token[2].fullstring); - strcpy(crystal,project); - jxtal = -1; - for (ixtal = 0; ixtal < nxtal; ++ixtal) { - if (strcmp(projin[ixtal],project) == 0) { - jxtal = ixtal; - jxtalin[iiset] = jxtal; - } - } - /* New project implies new crystal */ - newproj=0; - if (jxtal == -1) { - ++nxtal; - if (nxtal > MXTALS) { - if (ccp4_liberr_verbosity(-1)) - printf("MtzGet: Maximum number of crystals exceeded! \n"); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - jxtalin[iiset]=nxtal-1; - strcpy(projin[nxtal-1],project); - strcpy(crysin[nxtal-1],crystal); - newproj=1; - } - } - - /* CRYSTAL line. This will be missing in old files! - If the line is present but incomplete we treat it as missing. */ - else if (ccp4_keymatch(key, "CRYS")) { - if (ntok >= 3) { - strcpy(crystal,token[2].fullstring); - if (newproj == 1) { - strcpy(crysin[nxtal-1],crystal); - } else { - jxtal = -1; - for (ixtal = 0; ixtal < nxtal; ++ixtal) { - if (strcmp(crysin[ixtal],crystal) == 0) { - jxtal = ixtal; - jxtalin[iiset] = jxtal; - } - } - if (jxtal == -1) { - ++nxtal; - if (nxtal > MXTALS) { - if (ccp4_liberr_verbosity(-1)) - printf("MtzGet: Maximum number of crystals exceeded! \n"); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - jxtalin[iiset]=nxtal-1; - strcpy(projin[nxtal-1],project); - strcpy(crysin[nxtal-1],crystal); - } - } - } - } - - /* DATASET line. This should present for every dataset so use to - increment dataset count. However, if this is the base dataset, - don't increment as we already have it. */ - else if (ccp4_keymatch(key, "DATA")) { - if ( ntok <= 2 || (ntok > 2 && strcmp(token[2].fullstring,"HKL_base")) ) - ++nset[jxtalin[iiset]]; - } - - /* DCELL line. */ - else if (ccp4_keymatch(key, "DCEL")) { - for (i = 0; i < 6; ++i) - cell[i] = token[i+2].value; - /* If old crystal but cell dimensions differ, make new crystal. - This is primarily for old files with no CRYSTAL cards. - This test doesn't apply to base dataset. - Chosen tolerance is arbitrary - there is no single correct value! */ - if (jxtal > 0 && iiset > 0 && - ccp4uc_cells_differ(cellin[jxtal], cell, cell_tolerance)) { - if (debug) { - printf(" MtzGet: Old crystal %d but new cell dimensions. \n",jxtal); - for (i = 0; i < 6; ++i) - printf(" %lf %lf \n",cellin[jxtal][i],cell[i]); - } - ++nxtal; - if (nxtal > MXTALS) { - if (ccp4_liberr_verbosity(-1)) - printf("MtzGet: Maximum number of crystals exceeded! \n"); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - strcpy(projin[nxtal-1],project); - strcpy(crysin[nxtal-1],crystal); - /* Try to make crystal name unique */ - sprintf(crysin[nxtal-1]+strlen(crystal),"%d",nxtal); - /* correct DATASET increment */ - --nset[jxtalin[iiset]]; - jxtalin[iiset]=nxtal-1; - ++nset[jxtalin[iiset]]; - } - for (i = 0; i < 6; ++i) - cellin[jxtalin[iiset]][i] = cell[i]; - } - - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - } - - if (debug) { - printf(" MtzGet: Found %d crystals \n",nxtal); - for (i = 0; i < nxtal; ++i) - printf(" MtzGet: Crystal %d has %d datasets \n",i+1,nset[i]); - } - - if (debug) - printf(" MtzGet: end of 1st pass \n"); - - /* Allocate memory for input MTZ file */ - if (! (mtz = MtzMalloc(nxtal, nset))) { - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - if (debug) - printf(" MtzGet: created mtz \n"); - mtz->filein = filein; - mtz->nref_filein = nref; - mtz->nref = nref; - mtz->ncol_read = ntotcol; - mtz->n_orig_bat = nbat; - mtz->batch = NULL; - mtz->refs_in_memory = read_refs; - - /* set up base dataset in case it is in not in file */ - nset[0] = 0; - for (i = 1; i < nxtal; ++i) - nset[i] = -1; - iiset = 0; - strcpy(mtz->xtal[0]->pname,"HKL_base"); - strcpy(mtz->xtal[0]->xname,"HKL_base"); - mtz->xtal[0]->xtalid = 0; - mtz->xtal[0]->cell[0] = 0.0; - mtz->xtal[0]->set[0]->setid = 0; - strcpy(mtz->xtal[0]->set[0]->dname,"HKL_base"); - mtz->xtal[0]->set[0]->wavelength = 0.0; - - if (debug) - printf(" MtzGet: starting 2nd pass \n"); - - /* 2nd Pass: Copy dataset information to MTZ structure. - Position at top of header */ - ccp4_file_setmode(filein,6); - ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET); - - /* Read dataset information */ - ccp4_file_setmode(filein,0); - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - while (strncmp((strncpy(mkey,hdrrec,4)),"END",3) != 0) { - - if (strncmp (mkey, "PROJ",4) == 0) { - ++iiset; - strcpy(mtz->xtal[jxtalin[iiset]]->pname,projin[jxtalin[iiset]]); - strcpy(mtz->xtal[jxtalin[iiset]]->xname,crysin[jxtalin[iiset]]); - mtz->xtal[jxtalin[iiset]]->xtalid = jxtalin[iiset] + 1; - } - - else if (strncmp (mkey, "DATA",4) == 0) { - if ( ntok <= 2 || (ntok > 2 && strcmp(token[2].fullstring,"HKL_base")) ) { - iset = (int) token[1].value; - ++nset[jxtalin[iiset]]; - /* Test that dataset exists (i.e. pointer is non-NULL) */ - if (!mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]) { - ccp4_signal(CCP4_ERRLEVEL(3) | - CMTZ_ERRNO(CMTZERR_NullDataset),"MtzGet",NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]->setid = iset; - strcpy(mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]->dname,"dummy"); - if (ntok > 2) strcpy(mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]->dname, - token[2].fullstring); - } - } - - else if (strncmp (mkey, "DCEL",4) == 0) { - for (i = 0; i < 6; ++i) - mtz->xtal[jxtalin[iiset]]->cell[i] = (float) token[i+2].value; - } - - /* this keyword not in use yet */ - else if (strncmp (mkey, "DRES",4) == 0) { - for (i = 0; i < 3; ++i) { - indhigh[i] = (int) token[i+2].value; - indlow[i] = (int) token[i+5].value; - } - MtzHklcoeffs(mtz->xtal[jxtalin[iiset]]->cell, coefhkl); - mtz->xtal[jxtalin[iiset]]->resmax = MtzInd2reso(indhigh, coefhkl); - mtz->xtal[jxtalin[iiset]]->resmin = MtzInd2reso(indlow, coefhkl); - } - - else if (strncmp (mkey, "DWAV",4) == 0) { - mtz->xtal[jxtalin[iiset]]->set[nset[jxtalin[iiset]]]->wavelength = (float) token[2].value; - } - - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - if (istat == EOF) { - /* Unexpected end-of-file */ - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ReadFail),"MtzGet",NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - } - - if (debug) - printf(" MtzGet: end of 2nd pass \n"); - - /* 3rd Pass: Position at top of header */ - ccp4_file_setmode(filein,6); - ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET); - - icolin = -1; - ccp4_file_setmode(filein,0); - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - while (strncmp((strncpy(mkey,hdrrec,4)),"END",3) != 0) { - - if (debug) - printf(" MtzGet: header line %s \n",hdrrec); - - if (strncmp (mkey, "VERS",4) == 0) { - if (atoi(hdrrec+10) != MTZ_MAJOR_VERSN) { - if (ccp4_liberr_verbosity(-1)) - printf("Input MTZ file has major version %d and minor version %d \n", - atoi(hdrrec+10),atoi(hdrrec+12)); - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_BadVersion),"MtzGet",NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return(NULL); - } - if (atoi(hdrrec+12) != MTZ_MINOR_VERSN) { - if (ccp4_liberr_verbosity(-1)) - printf("Input MTZ file has major version %d and minor version %d \n", - atoi(hdrrec+10),atoi(hdrrec+12)); - ccp4_signal(CCP4_ERRLEVEL(2) | CMTZ_ERRNO(CMTZERR_DifferentVersion),"MtzGet",NULL); - } - } - else if (strncmp (mkey, "TITL",4) == 0) { - strncpy(mtz->title,hdrrec+6,70); - length = 70; - while ((--length >= 0) && (mtz->title[length] == ' ')); - mtz->title[length+1] = '\0'; - } - - else if (strncmp (mkey, "CELL",4) == 0) { - for (i = 0; i < 6; ++i) - totcell[i] = (float) token[i+1].value; - for (i = 0; i < mtz->nxtal; ++i) { - if (mtz->xtal[i]->cell[0] < 0.01) { - mtz->xtal[i]->cell[0] = totcell[0]; - mtz->xtal[i]->cell[1] = totcell[1]; - mtz->xtal[i]->cell[2] = totcell[2]; - mtz->xtal[i]->cell[3] = totcell[3]; - mtz->xtal[i]->cell[4] = totcell[4]; - mtz->xtal[i]->cell[5] = totcell[5]; - } - } - } - else if (strncmp (mkey, "SORT",4) == 0) { - for (i = 0; i < 5; ++i) - isort[i] = (int) token[i+1].value; - } - else if (strncmp (mkey, "SYMI",4) == 0) { - /* Check that there are enough tokens in the header record */ - if (ntok < 7) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_SYMINFIncomplete), - "MtzGet", NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return(NULL); - } - mtz->mtzsymm.nsym = (int) token[1].value; - mtz->mtzsymm.nsymp = (int) token[2].value; - mtz->mtzsymm.symtyp = token[3].fullstring[0]; - mtz->mtzsymm.spcgrp = (int) token[4].value; - strcpy(mtz->mtzsymm.spcgrpname,token[5].fullstring); - strcpy(mtz->mtzsymm.pgname,token[6].fullstring); - if (ntok > 7) { - mtz->mtzsymm.spg_confidence = token[7].fullstring[0]; - } else { - mtz->mtzsymm.spg_confidence = 'X'; - } - } - else if (strncmp (mkey, "SYMM",4) == 0) { - symop_to_mat4(hdrrec+4,hdrrec+MTZRECORDLENGTH,mtz->mtzsymm.sym[isym++][0]); - } - - else if (strncmp (mkey, "COLU",4) == 0) { - /* Check that there are enough tokens in the header record */ - if (ntok < 5) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_COLUMNIncomplete), - "MtzGet", NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return(NULL); - } - ++icolin; - if (icolin >= MCOLUMNS) { - if (ccp4_liberr_verbosity(-1)) - printf("MtzGet: Maximum number of columns exceeded! \n"); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return NULL; - } - strcpy(label,token[1].fullstring); - strcpy(type,token[2].fullstring); - min = (float) token[3].value; - max = (float) token[4].value; - /* Dataset id for this column - Very old MTZ files may not have this value */ - if (ntok < 6) { - if (!cset_warn) { - if (ccp4_liberr_verbosity(-1)) { - printf("\nWARNING: Dataset id missing from COLUMN records in MTZ header. \n"); - printf("WARNING: Making default dataset assignments. \n"); - } - ccp4_signal(CCP4_ERRLEVEL(2) | CMTZ_ERRNO(CMTZERR_DatasetIncomplete), - "MtzGet", NULL); - cset_warn = 1; - } - icset = 0; - } else { - icset = (int) token[5].value; - } - /* Special trap for M/ISYM */ - if (type[0] == 'Y' && strncmp (label,"M/ISYM",6) == 0) - strcpy(label,"M_ISYM"); - /* Find dataset corresponding to this column */ - ixtal = 0; iset = 0; - for (i = 0; i < mtz->nxtal; ++i) { - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - if (mtz->xtal[i]->set[j]->setid == icset) { - ixtal = i; - iset = j; - break; - } - } - } - - /* Create column. */ - newcol = MtzAddColumn(mtz, mtz->xtal[ixtal]->set[iset], label, type); - newcol->source = icolin + 1; - newcol->min = min; - newcol->max = max; - colin[icolin] = newcol; - } - - else if (strncmp (mkey, "VALM",4) == 0) { - strcpy(keyarg,token[1].fullstring); - if (strncmp (keyarg, "NAN",3) == 0) { - sprintf(mtz->mnf.amnf,"NAN"); - } else { - mtz->mnf.fmnf = (float) token[1].value; - } - } - - else if (strncmp (mkey, "RESO",4) == 0) { - minres = (float) token[1].value; - maxres = (float) token[2].value; - for (i = 0; i < mtz->nxtal; ++i) { - if (mtz->xtal[i]->resmax == 0.0) - mtz->xtal[i]->resmax = maxres; - if (mtz->xtal[i]->resmin == 100.0) - mtz->xtal[i]->resmin = minres; - } - } - - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - } - - /* 4th Pass: Column group and source extensions and unknown keywords */ - /* 4th Pass: Position at top of header */ - ccp4_file_setmode(filein,6); - ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET); - ccp4_file_setmode(filein,0); - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - while (strncmp((strncpy(mkey,hdrrec,4)),"END",3) != 0) { - if (strncmp (mkey, "COLS",4) == 0 ) { - strcpy(label,token[1].fullstring); - /* Special trap for M/ISYM */ - if (strncmp (label,"M/ISYM",6) == 0) - strcpy(label,"M_ISYM"); - icset = (int) token[3].value; - newcol = NULL; - for (i = 0; i < mtz->nxtal; ++i) { - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - if (mtz->xtal[i]->set[j]->setid == icset) { - for ( k = 0; k < mtz->xtal[i]->set[j]->ncol; k++ ) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,label) == 0) { - newcol = mtz->xtal[i]->set[j]->col[k]; - break; - } - } - } - } - } - if ( newcol == NULL ) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ColSourceError), - "MtzGet", NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return(NULL); - } - strncpy( newcol->colsource, token[2].fullstring, 36 ); - newcol->colsource[36] = '\0'; - } else if (strncmp (mkey, "COLG",4) == 0 ) { - strcpy(label,token[1].fullstring); - /* Special trap for M/ISYM */ - if (strncmp (label,"M/ISYM",6) == 0) - strcpy(label,"M_ISYM"); - icset = (int) token[5].value; - newcol = NULL; - for (i = 0; i < mtz->nxtal; ++i) { - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - if (mtz->xtal[i]->set[j]->setid == icset) { - for ( k = 0; k < mtz->xtal[i]->set[j]->ncol; k++ ) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,label) == 0) { - newcol = mtz->xtal[i]->set[j]->col[k]; - break; - } - } - } - } - } - if ( newcol == NULL ) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ColGroupError), - "MtzGet", NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return(NULL); - } - strncpy( newcol->grpname, token[2].fullstring, 30 ); - newcol->grpname[30] = '\0'; - strncpy( newcol->grptype, token[3].fullstring, 4 ); - newcol->grptype[4] = '\0'; - newcol->grpposn = (int) token[4].value; - } - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - } - - /* 5th Pass: Deal with unknown headers */ - /* 5th Pass: Position at top of header */ - ccp4_file_setmode(filein,6); - ccp4_file_seek(filein, (long) (hdrst-1), SEEK_SET); - ccp4_file_setmode(filein,0); - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - while (strncmp((strncpy(mkey,hdrrec,4)),"END",3) != 0) { - for ( i = 0; i < n_known_headers; ++i ) - if (strncmp (mkey,known_headers[i],4) == 0 ) - break; - if ( i == n_known_headers ) { - mtz->unknown_headers = ccp4_utils_realloc( mtz->unknown_headers, mtz->n_unknown_headers*MTZRECORDLENGTH+MTZRECORDLENGTH ); // if null, malloc - memcpy( mtz->unknown_headers+mtz->n_unknown_headers*MTZRECORDLENGTH, hdrrec, MTZRECORDLENGTH ); - mtz->n_unknown_headers++; - } - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - } - - /* copy sort order */ - for (i = 0; i < 5; ++i) { - if (isort[i] > 0) - mtz->order[i] = colin[isort[i]-1]; - } - - if (debug) - printf(" MtzGet: end of 3rd pass \n"); - - /* Now read history if any */ - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - while (!ccp4_keymatch(key,"MTZE")) { - - if (ccp4_keymatch(key, "MTZH")) { - nhist = (int) token[1].value; - /* allocate memory for nhist lines */ - mtz->hist = MtzCallocHist(nhist); - mtz->histlines = nhist; - - for (i = 0; i < nhist; ++i) { - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - strncpy(mtz->hist + MTZRECORDLENGTH*i,hdrrec,MTZRECORDLENGTH); - } - - } else if (ccp4_keymatch(key, "MTZB")) { - for (ibat = 0; ibat < nbat; ++ibat) { - - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - if (!ccp4_keymatch(key, "BH")) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_BadBatchHeader), - "MtzGet", NULL); - ccp4_parse_end(parser); - ccp4_file_close(filein); - free(filename); - return(NULL); - } - - /* allocate memory for this batch */ - if (ibat == 0) { - mtz->batch = MtzMallocBatch(); - batch = mtz->batch; - } else { - batch->next = MtzMallocBatch(); - batch = batch->next; - } - batch->next = NULL; - batch->num = (int) token[1].value; - /* nwords = (int) token[2].value; */ - nintegers = (int) token[3].value; - nreals = (int) token[4].value; - /* read batch title */ - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - strncpy(batch->title,hdrrec+6,70); - batch->title[70]='\0'; - - ccp4_file_setmode(filein,6); - istat = ccp4_file_read(filein, (uint8 *) intbuf, nintegers); - ccp4_file_setmode(filein,2); - istat = ccp4_file_read(filein, (uint8 *) fltbuf, nreals); - - MtzArrayToBatch(intbuf, fltbuf, batch); - - ccp4_file_setmode(filein,0); - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - if (ntok == 4) { - strcpy(batch->gonlab[0],token[1].fullstring); - strcpy(batch->gonlab[1],token[2].fullstring); - strcpy(batch->gonlab[2],token[3].fullstring); - batch->gonlab[0][8] = batch->gonlab[1][8] = batch->gonlab[2][8] = '\0'; - } else if (ntok == 2) { - strcpy(batch->gonlab[0],token[1].fullstring); - batch->gonlab[0][8] = '\0'; - batch->gonlab[1][0] = batch->gonlab[2][0] = '\0'; - } else { - batch->gonlab[0][0] = batch->gonlab[1][0] = batch->gonlab[2][0] = '\0'; - } - } - } - - istat = ccp4_file_readchar(filein, (uint8 *) hdrrec, MTZRECORDLENGTH); - hdrrec[MTZRECORDLENGTH] = '\0'; - ntok = ccp4_parser(hdrrec, MTZRECORDLENGTH, parser, iprint); - } - - /* Finished with the parser array */ - ccp4_parse_end(parser); - - if (debug) - printf(" MtzGet: end of batch pass \n"); - - /* Read XML datablock */ - xmllen = ccp4_file_length(filein) - ccp4_file_tell(filein); - if ( xmllen > 0 ) { - mtz->xml = (char *)ccp4_utils_malloc( xmllen+1 ); - if ( mtz->xml != NULL ) { - istat = ccp4_file_readchar(filein, (uint8 *) mtz->xml, xmllen); - mtz->xml[xmllen] = '\0'; - } - } - - /* Position at start of reflections */ - ccp4_file_setmode(filein,6); - ccp4_file_seek(filein, SIZE1, SEEK_SET); - - if (read_refs) { - - refldata = (float *) ccp4_utils_malloc(ntotcol*sizeof(float)); - /* Read all reflections into memory - make this optional? */ - for (i = 0; i < mtz->nref_filein; ++i) { - MtzRrefl(filein, ntotcol, refldata); - for (j = 0; j < ntotcol; ++j) - colin[j]->ref[i] = refldata[j]; - } - free(refldata); - - /* Recalculate resolution limits */ - - /* Find dataset of indices */ - MtzFindInd(mtz,&ind_xtal,&ind_set,ind_col); - - for (i = 0; i < mtz->nxtal; ++i) { - MtzHklcoeffs(mtz->xtal[i]->cell, coefhkl); - for (j = 0; j < mtz->nref; ++j) { - indhigh[0] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[0]]->ref[j]; - indhigh[1] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[1]]->ref[j]; - indhigh[2] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[2]]->ref[j]; - maxres = MtzInd2reso(indhigh, coefhkl); - if (maxres > mtz->xtal[i]->resmax) mtz->xtal[i]->resmax = maxres; - if (maxres < mtz->xtal[i]->resmin) mtz->xtal[i]->resmin = maxres; - } - } - - /* And close the mtz file: */ - ccp4_file_close(filein); - mtz->filein = NULL; - } - - free(filename); - - return(mtz);} - -int MtzArrayToBatch(const int *intbuf, const float *fltbuf, MTZBAT *batch) - -{ int i; - - batch->iortyp = intbuf[3]; - for (i = 0; i < 6; ++i) - batch->lbcell[i] = intbuf[4 + i]; - batch->misflg = intbuf[10]; - batch->jumpax = intbuf[11]; - batch->ncryst = intbuf[12]; - batch->lcrflg = intbuf[13]; - batch->ldtype = intbuf[14]; - batch->jsaxs = intbuf[15]; - batch->nbscal = intbuf[16]; - batch->ngonax = intbuf[17]; - batch->lbmflg = intbuf[18]; - batch->ndet = intbuf[19]; - batch->nbsetid = intbuf[20]; - - for (i = 0; i < 6; ++i) - batch->cell[i] = fltbuf[i]; - for (i = 0; i < 9; ++i) - batch->umat[i] = fltbuf[6 + i]; - for (i = 0; i < 3; ++i) - batch->phixyz[0][i] = fltbuf[15 + i]; - for (i = 0; i < 3; ++i) - batch->phixyz[1][i] = fltbuf[18 + i]; - for (i = 0; i < 12; ++i) - batch->crydat[i] = fltbuf[21 + i]; - for (i = 0; i < 3; ++i) - batch->datum[i] = fltbuf[33 + i]; - batch->phistt = fltbuf[36]; - batch->phiend = fltbuf[37]; - for (i = 0; i < 3; ++i) - batch->scanax[i] = fltbuf[38 + i]; - batch->time1 = fltbuf[41]; - batch->time2 = fltbuf[42]; - batch->bscale = fltbuf[43]; - batch->bbfac = fltbuf[44]; - batch->sdbscale = fltbuf[45]; - batch->sdbfac = fltbuf[46]; - batch->phirange = fltbuf[47]; - for (i = 0; i < 3; ++i) - batch->e1[i] = fltbuf[59 + i]; - for (i = 0; i < 3; ++i) - batch->e2[i] = fltbuf[62 + i]; - for (i = 0; i < 3; ++i) - batch->e3[i] = fltbuf[65 + i]; - for (i = 0; i < 3; ++i) - batch->source[i] = fltbuf[80 + i]; - for (i = 0; i < 3; ++i) - batch->so[i] = fltbuf[83 + i]; - batch->alambd = fltbuf[86]; - batch->delamb = fltbuf[87]; - batch->delcor = fltbuf[88]; - batch->divhd = fltbuf[89]; - batch->divvd = fltbuf[90]; - for (i = 0; i < 2; ++i) - { batch->dx[i] = fltbuf[111 + (i * 6)]; - batch->theta[i] = fltbuf[112 + (i * 6)]; - batch->detlm[i][0][0] = fltbuf[113 + (i * 6)]; - batch->detlm[i][0][1] = fltbuf[114 + (i * 6)]; - batch->detlm[i][1][0] = fltbuf[115 + (i * 6)]; - batch->detlm[i][1][1] = fltbuf[116 + (i * 6)];} - - return 1; -} - -int MtzRrefl(CCP4File *filein, int ncol, float *refldata) { - - int istat; - - ccp4_file_setmode(filein,2); - istat = ccp4_file_read(filein, (uint8 *) refldata, ncol); - - /* This will return EOF if end-of-file is reached. But by then - you will have read the MTZ file header, so not so useful. */ - return istat; -} - -int MtzFindInd(const MTZ *mtz, int *ind_xtal, int *ind_set, int ind_col[3]) { - - int i,j,k; - - /* default to first 3 columns of 1st datset */ - *ind_xtal = 0; - *ind_set = 0; - ind_col[0] = 0; - ind_col[1] = 1; - ind_col[2] = 2; - - for (i = 0; i < mtz->nxtal; ++i) - for (j = 0; j < mtz->xtal[i]->nset; ++j) - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if (mtz->xtal[i]->set[j]->col[k]->label[0] == 'H' && - mtz->xtal[i]->set[j]->col[k]->type[0] == 'H') { - *ind_xtal = i; - *ind_set = j; - ind_col[0] = k; - } - if (mtz->xtal[i]->set[j]->col[k]->label[0] == 'K' && - mtz->xtal[i]->set[j]->col[k]->type[0] == 'H') - ind_col[1] = k; - if (mtz->xtal[i]->set[j]->col[k]->label[0] == 'L' && - mtz->xtal[i]->set[j]->col[k]->type[0] == 'H') - ind_col[2] = k; - } - - return 1; -} - -float MtzInd2reso(const int in[3], const double coefhkl[6]) { - - int ih,ik,il; - float reso; - - ih = in[0]; - ik = in[1]; - il = in[2]; - - reso = (float) 4.0 * (ih*ih*coefhkl[0] + ih*ik*coefhkl[1] + - ih*il*coefhkl[2] + ik*ik*coefhkl[3] + - ik*il*coefhkl[4] + il*il*coefhkl[5]); - - return reso; - -} - -int MtzHklcoeffs(const float cell[6], double coefhkl[6]) { - - /* generate coefhkl coefficients from given cell parameters */ - - int i; - double alpha,beta,gamma,degtorad,denom; - double ax,bx,by,cx,cy,cz; - double axst,ayst,azst,byst,bzst,czst; - - /* sanity clause (but there ain't no sanity clause!) */ - for (i = 0; i < 6; ++i) - coefhkl[i] = 0.0; - for (i = 0; i < 6; ++i) - if (cell[i] < 0.001) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_Cellerr),"MtzHklcoeffs",NULL); - return 0; - } - - degtorad = atan(1.0)/45.0; - - alpha = degtorad*cell[3]; - beta = degtorad*cell[4]; - gamma = degtorad*cell[5]; - - /* orthogonal frame for calculation - a along x, b in x-y plane */ - - ax = cell[0]; - bx = cell[1] * cos(gamma); - by = cell[1] * sin(gamma); - cx = cell[2] * cos(beta); - cy = (cell[1]*cell[2]*cos(alpha) - bx*cx)/by; - cz = sqrt(cell[2]*cell[2] - cx*cx - cy*cy); - - /* find reciprocal vectors in orthogonal frame */ - - denom = ax*by*cz; - axst = 1.0/ax; - ayst = -bx*cz/denom; - azst = (bx*cy - by*cx)/denom; - byst = 1.0/by; - bzst = -ax*cy/denom; - czst = 1.0/cz; - - coefhkl[0] = 0.25*(axst*axst + ayst*ayst + azst*azst); - coefhkl[1] = 0.5*(ayst*byst + azst*bzst); - coefhkl[2] = 0.5*(azst*czst); - coefhkl[3] = 0.25*(byst*byst + bzst*bzst); - coefhkl[4] = 0.5*(bzst*czst); - coefhkl[5] = 0.25*(czst*czst); - - return 1; -} - -int ccp4_lrtitl(const MTZ *mtz, char *title) { - - int length; - - length = (int) strlen(strcpy(title, mtz->title)); - if (length > 0) { - while ((--length >= 0) && (title[length] == ' ')); - ++length; - } - return(length); -} - -int ccp4_lrhist(const MTZ *mtz, char history[][MTZRECORDLENGTH], int nlines) { - - int i,nhist; - - if (nlines < mtz->histlines) - nhist = nlines; - else - nhist = mtz->histlines; - - for (i = 0; i < nhist; ++i) { - strncpy(history[i],mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); - } - - return nhist; -} - -int ccp4_lrsort(const MTZ *mtz, int isort[5]) { - - int i,j,k,l,icol; - - icol = 0; - for (i = 0; i < 5; ++i) - isort[i] = 0; - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - ++icol; - for (l = 0; l < 5; ++l) { - if (mtz->order[l] == mtz->xtal[i]->set[j]->col[k]) - isort[l] = icol; - } - } - } - } - - return 1; -} - -int ccp4_lrbats(const MTZ *mtz, int *nbatx, int batchx[]) { - - int i=0; - MTZBAT *batch; - - *nbatx = mtz->n_orig_bat; - batch = mtz->batch; - while (batch != NULL) { - batchx[i++] = batch->num; - batch = batch->next; - } - - return i; -} - -void MtzDebugHierarchy(const MTZ *mtz) { - - int i,j,k; - - if (mtz->filein) - printf("MtzDebugHierarchy: input file = %s \n",mtz->filein->name); - if (mtz->fileout) - printf("MtzDebugHierarchy: output file = %s \n",mtz->fileout->name); - - printf("MtzDebugHierarchy: nxtal = %d \n",mtz->nxtal); - for (i = 0; i < mtz->nxtal; ++i) { - printf("MtzDebugHierarchy: xtal = %s, cell = %f %f %f %f %f %f \n", - mtz->xtal[i]->xname, - mtz->xtal[i]->cell[0],mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], - mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); - printf("MtzDebugHierarchy: xtal = %s, nset = %d \n",mtz->xtal[i]->xname, - mtz->xtal[i]->nset); - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - printf("MtzDebugHierarchy: xtal = %s, set = %s, setid = %d, ncol = %d \n", - mtz->xtal[i]->xname,mtz->xtal[i]->set[j]->dname, - mtz->xtal[i]->set[j]->setid,mtz->xtal[i]->set[j]->ncol); - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - printf("MtzDebugHierarchy: col = %s (in: %d) (out: %d) \n", - mtz->xtal[i]->set[j]->col[k]->label, - mtz->xtal[i]->set[j]->col[k]->source, - mtz->xtal[i]->set[j]->col[k]->active); - } - } - } - -} - -/* List of column information: label, type, dataset. - Returns number of columns in current structure. */ -int MtzListColumn(const MTZ *mtz, char clabs[][31], char ctyps[][3], int csetid[]) { - - int i,j,k,icol=0; - - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && - strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { - strcpy(clabs[icol],"M/ISYM"); - } else { - strcpy(clabs[icol],mtz->xtal[i]->set[j]->col[k]->label); - } - strcpy(ctyps[icol],mtz->xtal[i]->set[j]->col[k]->type); - csetid[icol] = mtz->xtal[i]->set[j]->setid; - ++icol; - } - } - } - return icol; -} - -/* List of column information from input file: label, type, dataset. - Returns number of columns in input file. */ -int MtzListInputColumn(const MTZ *mtz, char clabs[][31], char ctyps[][3], int csetid[]) { - - int i,j,k,colin,icol=0; - - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if ((colin = mtz->xtal[i]->set[j]->col[k]->source) != 0) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && - strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { - strcpy(clabs[colin - 1],"M/ISYM"); - } else { - strcpy(clabs[colin - 1],mtz->xtal[i]->set[j]->col[k]->label); - } - strcpy(ctyps[colin - 1],mtz->xtal[i]->set[j]->col[k]->type); - csetid[colin - 1] = mtz->xtal[i]->set[j]->setid; - ++icol; - } - } - } - } - return icol; -} - -int ccp4_lrcell(const MTZXTAL *xtl, float cell[]) { - - int i; - - for (i = 0; i < 6; ++i) { - cell[i] = xtl->cell[i]; - } - - return 1; -} - -int MtzResLimits(const MTZ *mtz, float *minres, float *maxres) { - - int i; - - *maxres = 0.0; - *minres = 100.0; - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - if (mtz->xtal[i]->resmax > *maxres) *maxres = mtz->xtal[i]->resmax; - if (mtz->xtal[i]->resmin < *minres) *minres = mtz->xtal[i]->resmin; - } - - return 1; -} - -int ccp4_lrsymi(const MTZ *mtz, int *nsympx, char *ltypex, int *nspgrx, - char *spgrnx, char *pgnamx) { - char spgconf_temp[2]; - - return ccp4_lrsymi_c(mtz,nsympx,ltypex,nspgrx,spgrnx,pgnamx,spgconf_temp); -} - -int ccp4_lrsymi_c(const MTZ *mtz, int *nsympx, char *ltypex, int *nspgrx, - char *spgrnx, char *pgnamx, char *spgconf) { - - *nsympx = mtz->mtzsymm.nsymp; - *nspgrx = mtz->mtzsymm.spcgrp; - ltypex[0] = mtz->mtzsymm.symtyp; - ltypex[1] = '\0'; - strcpy(spgrnx,mtz->mtzsymm.spcgrpname); - strcpy(pgnamx,mtz->mtzsymm.pgname); - spgconf[0] = mtz->mtzsymm.spg_confidence; - spgconf[1] = '\0'; - - return *nspgrx; -} - -int MtzSpacegroupNumber(const MTZ *mtz) -/* get the spacegroup number (likely CCP4 convention) */ -{ - if (!mtz) return 0; - return mtz->mtzsymm.spcgrp; -} - -int ccp4_lrsymm(const MTZ *mtz, int *nsymx, float rsymx[192][4][4]) { - - int i,j,k; - - *nsymx = mtz->mtzsymm.nsym; - for (i = 0; i < *nsymx; ++i) { - for (j = 0; j < 4; ++j) { - for (k = 0; k < 4; ++k) { - rsymx[i][j][k] = mtz->mtzsymm.sym[i][j][k]; - } - } - } - - return *nsymx; -} - -int MtzParseLabin(char *labin_line, const char prog_labels[][31], - const int nlprgi, char user_labels[][2][31]) - -{ int i,j,imatch,nlabels=0,err=0; - char label1[31],label2[31]; - - /* For cparser */ - CCP4PARSERARRAY *parser=NULL; - CCP4PARSERTOKEN *token=NULL; - char *key; - int ntok,iprint=0; - - parser = ccp4_parse_start(strlen(labin_line)); - if (parser == NULL) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ParserFail),"MtzParseLabin",NULL); - return -1; - } - /* Set some convenient pointers to members of the parser array */ - key = parser->keyword; - token = parser->token; - - ntok = ccp4_parser(labin_line, strlen(labin_line), parser, iprint); - - if (ccp4_keymatch(key,"LABI")) { - if (iprint) printf("Interpreting LABIN line.\n"); - } else if (ccp4_keymatch(key,"LABO")) { - if (iprint) printf("Interpreting LABOUT line.\n"); - } else if (ccp4_keymatch(key,"COMP")) { - if (iprint) printf("Interpreting COMPLETE line (freerflag).\n"); - } else { - printf("Warning in MtzParseLabin: Input is not LABIN or LABOUT line !!\n"); - } - - /* initialise user labels */ - for (j = 0; j < nlprgi; ++j) { - strcpy(user_labels[j][0],""); - strcpy(user_labels[j][1],""); - } - - for (i = 1; i < ntok; i += 2) { - strcpy(label1,token[i].fullstring); - - if (strlen(label1)>30) { - printf("MtzParseLabin: labels cannot be longer than 30 characters: \"%s\"\n",label1); - err++; - break; - } - - /* Trap against trying to access tokens that don't exist */ - if (i+1 < ntok) { - strcpy(label2,token[i+1].fullstring); - - if (strlen(label2)>30) { - printf("MtzParseLabin: labels cannot be longer than 30 characters: \"%s\"\n",label2); - err++; - break; - } - - /* check first label against program labels */ - imatch = 0; - for (j = 0; j < nlprgi; ++j) { - if (strcmp(label1,prog_labels[j]) == 0) { - strcpy(user_labels[j][0],label1); - strcpy(user_labels[j][1],label2); - imatch = 1; - ++nlabels; - break; - } - } - - if (imatch == 0) { - /* check second label against program labels */ - for (j = 0; j < nlprgi; ++j) { - if (strcmp(label2,prog_labels[j]) == 0) { - strcpy(user_labels[j][0],label2); - strcpy(user_labels[j][1],label1); - imatch = 1; - ++nlabels; - break; - } - } - } - } else { - printf("MtzParseLabin: run out of labels trying to match \"%s\"\n",label1); - /* Stop here - there are no more labels to process */ - err++; - break; - } - - if (imatch == 0) { - /* no match */ - printf("MtzParseLabin: neither label recognised: %s %s \n",label1,label2); - err++; - } - } - - /* Finished with the parser array */ - ccp4_parse_end(parser); - - return err ? -1 : nlabels; -} - -MTZCOL **ccp4_lrassn(const MTZ *mtz, const char labels[][31], const int nlabels, - char types[][3]) -{ - int ilab; - char label[31]; - MTZCOL *col, **lookup; - - lookup = (MTZCOL **) ccp4_utils_malloc(nlabels*sizeof(MTZCOL *)); - - /* Loop over labels */ - for (ilab = 0; ilab < nlabels; ++ilab) { - - strcpy(label,labels[ilab]); - /* column not assigned */ - if (label[0] == '\0') { - lookup[ilab] = NULL; - } else { - /* Special trap for M/ISYM */ - if (strcmp(types[ilab],"Y") == 0 && strcmp(label,"M/ISYM") == 0) - strcpy(label,"M_ISYM"); - col = MtzColLookup(mtz,label); - if (col != NULL) { - - /* if requested type is blank, return actual type */ - if (!strcmp(types[ilab],"")) { - if (strcmp(col->type,"")) { - strcpy(types[ilab],col->type); - } else { - strcpy(types[ilab],"R"); - } - - /* check requested column type against file type. */ - } else if (strncmp(col->type,types[ilab],1)) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ColTypeMismatch),"ccp4_lrassn",NULL); - printf(" From ccp4_lrassn: expected type %s does not match file type %s for column %s\n", - types[ilab],col->type,col->label); - if (!strcmp(types[ilab],"R") || !strcmp(types[ilab],"I")) - printf(" (This may be intended for generic types R/I.) \n"); - } - } - - lookup[ilab] = col; - } - } - - return lookup; -} - -int ccp4_lridx(const MTZ *mtz, const MTZSET *set, char crystal_name[64], - char dataset_name[64], char project_name[64], int *isets, - float datcell[6], float *datwave) -{ - int i; - MTZXTAL *xtl; - - /* find which crystal this dataset belongs to */ - xtl = MtzSetXtal(mtz, set); - - /* copy crystal and dataset information */ - strncpy(crystal_name,xtl->xname,63); - crystal_name[63] = '\0'; - strncpy(dataset_name,set->dname,63); - dataset_name[63] = '\0'; - strncpy(project_name,xtl->pname,63); - project_name[63] = '\0'; - *isets = set->setid; - for (i = 0; i < 6; ++i) - datcell[i] = xtl->cell[i]; - *datwave = set->wavelength; - - return 1; -} - -/* Return MTZ record in file order */ -int ccp4_lrrefl(const MTZ *mtz, float *resol, float adata[], int logmss[], int iref) { - - int i,j,k; - int ind[3],ixtal; - unsigned int colin; - float *refldata; - double coefhkl[6]; - - /* If we are past the last reflection, indicate this with return value. */ - if (iref > mtz->nref_filein) - return 1; - - /* If reflections not in memory, read next record from file. */ - if (!mtz->refs_in_memory) { - refldata = (float *) ccp4_utils_malloc(mtz->ncol_read*sizeof(float)); - if (MtzRrefl( mtz->filein, mtz->ncol_read, refldata) == EOF) { - free(refldata); - return 1; - } - } - - /* Loop over all columns in the MTZ struct, and select those which - derive from the input file. */ - for (i = 0; i < mtz->nxtal; ++i) { - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if ((colin = mtz->xtal[i]->set[j]->col[k]->source) != 0) { - if (mtz->refs_in_memory) { - adata[colin - 1] = mtz->xtal[i]->set[j]->col[k]->ref[iref-1]; - } else { - adata[colin - 1] = refldata[colin - 1]; - } - logmss[colin - 1] = ccp4_ismnf(mtz, adata[colin - 1]); - if (mtz->xtal[i]->set[j]->col[k]->type[0] == 'H') { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,"H") == 0) - ind[0] = (int) adata[colin - 1]; - if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,"K") == 0) - ind[1] = (int) adata[colin - 1]; - if (strcmp(mtz->xtal[i]->set[j]->col[k]->label,"L") == 0) - ind[2] = (int) adata[colin - 1]; - } - } - } - } - } - - /* calculate resolution of this reflection, based on cell of - first crystal with non-zero cell dimensions */ - for (ixtal = 0; ixtal < mtz->nxtal; ++ixtal) - if (mtz->xtal[ixtal]->cell[0] > 0.001) { - MtzHklcoeffs(mtz->xtal[ixtal]->cell, coefhkl); - break; - } - *resol = MtzInd2reso(ind, coefhkl); - /* kludge taken from mtzlib.f */ - if (*resol > mtz->xtal[ixtal]->resmax) *resol = mtz->xtal[ixtal]->resmax; - if (*resol < mtz->xtal[ixtal]->resmin) *resol = mtz->xtal[ixtal]->resmin; - - free(refldata); - return 0; -} - -/* Return MTZ record in lookup order */ -int ccp4_lrreff(const MTZ *mtz, float *resol, float adata[], int logmss[], - const MTZCOL *lookup[], const int ncols, const int iref) { - - int icol,l; - int ind[3],ixtal,ind_xtal,ind_set,ind_col[3]; - unsigned int colin; - float *refldata; - double coefhkl[6]; - union float_uint_uchar uf; - - /* If we are past the last reflection, indicate this with return value. */ - if (iref > mtz->nref_filein) - return 1; - - /* If reflections not in memory, read next record from file. */ - if (!mtz->refs_in_memory) { - refldata = (float *) ccp4_utils_malloc(mtz->ncol_read*sizeof(float)); - if (MtzRrefl( mtz->filein, mtz->ncol_read, refldata) == EOF) { - free(refldata); - return 1; - } - } - - if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { - uf = ccp4_nan(); - } else { - uf.f = mtz->mnf.fmnf; - } - - /* loop over columns requested in lookup array. */ - for (icol=0; icol < ncols; icol++) { - logmss[icol] = 1; - if (lookup[icol]) { - if (mtz->refs_in_memory) { - adata[icol] = lookup[icol]->ref[iref-1]; - logmss[icol] = ccp4_ismnf(mtz, adata[icol]); - } else { - if ((colin = lookup[icol]->source) != 0) { - adata[icol] = refldata[colin - 1]; - logmss[icol] = ccp4_ismnf(mtz, adata[icol]); - } else { - adata[icol] = uf.f; - logmss[icol] = 1; - } - } - } - } - - /* Check if HKL are first 3 columns */ - if (lookup[0]->type[0] == 'H' && lookup[1]->type[0] == 'H' && - lookup[2]->type[0] == 'H') { - ind[0] = (int) adata[0]; - ind[1] = (int) adata[1]; - ind[2] = (int) adata[2]; - } else { - MtzFindInd(mtz,&ind_xtal,&ind_set,ind_col); - for (l = 0; l < ncols; ++l) { - if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[0]]) - ind[0] = (int) adata[l]; - if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[1]]) - ind[1] = (int) adata[l]; - if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[2]]) - ind[2] = (int) adata[l]; - } - } - - /* calculate resolution of this reflection, based on cell of - first crystal with non-zero cell dimensions */ - for (ixtal = 0; ixtal < mtz->nxtal; ++ixtal) - if (mtz->xtal[ixtal]->cell[0] > 0.001) { - MtzHklcoeffs(mtz->xtal[ixtal]->cell, coefhkl); - break; - } - *resol = MtzInd2reso(ind, coefhkl); - /* kludge taken from mtzlib.f */ - if (*resol > mtz->xtal[ixtal]->resmax) *resol = mtz->xtal[ixtal]->resmax; - if (*resol < mtz->xtal[ixtal]->resmin) *resol = mtz->xtal[ixtal]->resmin; - - free(refldata); - return 0; -} - -void MtzRewdInput(MTZ *mtz) { - if (mtz->filein) { - ccp4_file_seek(mtz->filein, SIZE1, SEEK_SET); - } else { - printf("MtzRewdInput: No associated file. Was MtzGet called with read_refs option?\n"); - } -} - -int ccp4_ismnf(const MTZ *mtz, const float datum) { - - if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { - return ccp4_utils_isnan((union float_uint_uchar *) &datum); - } else { - if (datum == mtz->mnf.fmnf) - return 1; - } - return 0; -} - -int ccp4_lhprt(const MTZ *mtz, int iprint) { - - int i,j,k,numbat,isort[5],base_set_exists=0; - float maxres=0.0,minres=100.0; - char buffer[MTZRECORDLENGTH+1],symline[81]; - MTZSET *baseset=NULL; - - if (iprint <= 0) return 2; - - printf(" * Title:\n\n"); - printf(" %s\n\n",mtz->title); - - if ((baseset = MtzSetLookup(mtz,"HKL_base/HKL_base")) != NULL) { - if ( MtzNumActiveColsInSet(baseset) || - MtzNbatchesInSet(mtz,baseset) ) { - printf(" * Base dataset:\n\n"); - printf(" %8d %s\n",baseset->setid,"HKL_base"); - printf(" %s\n","HKL_base"); - printf(" %s\n","HKL_base"); - base_set_exists=1; - } - } - - printf("\n * Number of Datasets = %d\n\n",MtzNumActiveSet(mtz)-base_set_exists); - printf(" * Dataset ID, project/crystal/dataset names, cell dimensions, wavelength:\n\n"); - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* is this the base dataset? */ - if (mtz->xtal[i]->set[j] == baseset) continue; - /* check if dataset contains any active columns */ - if ( (MtzNumActiveColsInSet(mtz->xtal[i]->set[j]) == 0) && - (MtzNbatchesInSet(mtz,mtz->xtal[i]->set[j]) == 0) ) continue; - printf(" %8d %s\n",mtz->xtal[i]->set[j]->setid,mtz->xtal[i]->pname); - printf(" %s\n",mtz->xtal[i]->xname); - printf(" %s\n",mtz->xtal[i]->set[j]->dname); - printf(" %10.4f%10.4f%10.4f%10.4f%10.4f%10.4f\n", - mtz->xtal[i]->cell[0],mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], - mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); - printf(" %10.5f\n",mtz->xtal[i]->set[j]->wavelength); - } - } - printf("\n * Number of Columns = %d\n\n",MtzNumActiveCol(mtz)); - printf(" * Number of Reflections = %d\n\n",mtz->nref); - if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { - printf(" * Missing value set to NaN in input mtz file\n\n"); - } else { - printf(" * Missing value set to %f in input mtz file\n\n",mtz->mnf.fmnf); - } - - /* if new batch headers have been written, lose the old ones */ - if (MtzNbat(mtz) > mtz->n_orig_bat) { - numbat = MtzNbat(mtz) - mtz->n_orig_bat; - } else { - numbat = mtz->n_orig_bat; - } - if (numbat > 0) - printf(" * Number of Batches = %d\n\n",numbat); - - if (iprint == 2 || iprint == 3) { - printf(" * HISTORY for current MTZ file :\n\n"); - for (i = 0; i < mtz->histlines; ++i) { - strncpy(buffer,mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); - buffer[MTZRECORDLENGTH] = '\0'; - printf(" %s\n",buffer); - } - printf("\n"); - } - - if (iprint == 1 || iprint == 2 || iprint >=4 ) { - - printf(" * Column Labels :\n\n"); - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if (mtz->xtal[i]->set[j]->col[k]->active) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && - strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { - printf(" M/ISYM"); - } else { - printf(" %s",mtz->xtal[i]->set[j]->col[k]->label); - } - } - } - } - } - printf("\n\n * Column Types :\n\n"); - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if (mtz->xtal[i]->set[j]->col[k]->active) - printf(" %s",mtz->xtal[i]->set[j]->col[k]->type); - } - } - } - printf("\n\n * Associated datasets :\n\n"); - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if (mtz->xtal[i]->set[j]->col[k]->active) - printf(" %d",mtz->xtal[i]->set[j]->setid); - } - } - } - - } else if ( iprint == 3 ) { - - printf(" * Column Labels, Types, Ranges [and Dataset IDs] :\n\n"); - - /* Loop over crystals/datasets/columns */ - for (i = 0; i < mtz->nxtal; ++i) { - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if (mtz->xtal[i]->set[j]->col[k]->active) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && - strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { - printf(" M/ISYM %2s %19.4f %19.4f %8d \n", - mtz->xtal[i]->set[j]->col[k]->type, - mtz->xtal[i]->set[j]->col[k]->min,mtz->xtal[i]->set[j]->col[k]->max, - mtz->xtal[i]->set[j]->setid); - } else { - printf(" %-30s %2s %19.4f %19.4f %8d \n", - mtz->xtal[i]->set[j]->col[k]->label,mtz->xtal[i]->set[j]->col[k]->type, - mtz->xtal[i]->set[j]->col[k]->min,mtz->xtal[i]->set[j]->col[k]->max, - mtz->xtal[i]->set[j]->setid); - } - } - } - } - } - - } - - /* write overall cell - just for scripts which grep for this */ - printf("\n\n * Cell Dimensions : (obsolete - refer to dataset cell dimensions above)\n\n"); - for (i = 0; i < mtz->nxtal; ++i) - if (mtz->xtal[i]->cell[0] > 0.001) { - printf(" %9.4f %9.4f %9.4f %9.4f %9.4f %9.4f \n\n", - mtz->xtal[i]->cell[0],mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], - mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); - break; - } - - /* Calculate overall resolution limits. Two cases: If we have written some reflections - to file, we probably want to know the resolution limits for these. In this case, - mtz->resmax_out and mtz->resmin_out have been set and we use those. Otherwise, - we use the resolution limits of the crystals in memory. */ - if (mtz->resmax_out > 0.0001) { - maxres = mtz->resmax_out; - minres = mtz->resmin_out; - } else { - for (i = 0; i < mtz->nxtal; ++i) { - if (mtz->xtal[i]->resmax > maxres) maxres = mtz->xtal[i]->resmax; - if (mtz->xtal[i]->resmin < minres) minres = mtz->xtal[i]->resmin; - } - } - printf(" * Resolution Range :\n\n"); - if (maxres > 0.0 && minres > 0.0) { - printf(" %10.5f %10.5f ( %10.3f - %10.3f A )\n\n", - minres,maxres,1.0/sqrt(minres),1.0/sqrt(maxres)); - } else if (maxres > 0.0) { - printf(" %10.5f %10.5f ( inf - %10.3f A )\n\n", - minres,maxres,1.0/sqrt(maxres)); - } else { - printf(" Not set - no crystals or reflections? \n\n"); - } - ccp4_lrsort(mtz, isort); - printf(" * Sort Order :\n\n %5d %5d %5d %5d %5d\n\n",isort[0],isort[1],isort[2], - isort[3],isort[4]); - - if (iprint == 3 || iprint == 4 ) { - - printf(" * Number of Symmetry Operations = %d \n",mtz->mtzsymm.nsym); - printf(" * Number of Primitive Operations = %d \n",mtz->mtzsymm.nsymp); - printf(" * Space Group = %d \'%s\' \n",mtz->mtzsymm.spcgrp,mtz->mtzsymm.spcgrpname); - printf(" * Lattice Type = %c \n",mtz->mtzsymm.symtyp); - printf(" * Point Group Name = %s \n",mtz->mtzsymm.pgname); - - printf("\n * Symmetry Operations : \n\n"); - for (i = 0; i < mtz->mtzsymm.nsym; ++i) { - mat4_to_symop(symline,symline+80,(const float (*)[4])mtz->mtzsymm.sym[i]); - symline[60] = '\0'; - printf(" Symmetry %d %s\n",i+1,symline); - for (j = 0; j < 4; ++j) - printf(" %5.2f %5.2f %5.2f %5.2f \n",mtz->mtzsymm.sym[i][j][0], - mtz->mtzsymm.sym[i][j][1],mtz->mtzsymm.sym[i][j][2], - mtz->mtzsymm.sym[i][j][3]); - } - printf("\n"); - - } else { - printf(" * Space group = \'%s\' (number %d)\n\n",mtz->mtzsymm.spcgrpname, - mtz->mtzsymm.spcgrp); - } - - if (mtz->mtzsymm.spg_confidence == 'L') { - printf(" (only Bravais lattice is fixed so far)\n\n"); - } else if (mtz->mtzsymm.spg_confidence == 'P') { - printf(" (only pointgroup is fixed so far)\n\n"); - } else if (mtz->mtzsymm.spg_confidence == 'E') { - printf(" (one of pair of enantiomorphic spacegroups)\n\n"); - } else if (mtz->mtzsymm.spg_confidence == 'S') { - printf(" (spacegroup is known)\n\n"); - } - - return 1; -} - -int ccp4_lhprt_adv(const MTZ *mtz, int iprint) { - - int i,j,k; - char buffer[MTZRECORDLENGTH+1]; - - printf(" HEADER INFORMATION FROM MTZ FILE \n\n"); - - printf(" * File information :\n\n"); - - printf("%s %s\n",MTZTITLE,mtz->title); - printf("%s %d\n",MTZSPACEGROUP,mtz->mtzsymm.spcgrp); - printf("%s %d\n",MTZNUMREFLS,mtz->nref); - if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { - printf("%s %s\n",MTZMNF,"NaN"); - } else { - printf("%s %f\n",MTZMNF,mtz->mnf.fmnf); - } - printf("%s %s\n",MTZSORTORDER,"(not implemented)"); - - printf("\n * Crystals, datasets :\n"); - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - - printf("\n%s %s\n",CRYSTALXTALNAME,mtz->xtal[i]->xname); - printf("%s %s\n",CRYSTALPNAME,mtz->xtal[i]->pname); - printf("%s %10.4f%10.4f%10.4f%10.4f%10.4f%10.4f\n",CRYSTALCELL, - mtz->xtal[i]->cell[0],mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], - mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); - - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - printf("\n %s %s\n",DATASETDNAME,mtz->xtal[i]->set[j]->dname); - printf(" %s %10.5f\n",DATASETWAVELENGTH,mtz->xtal[i]->set[j]->wavelength); - if (mtz->xtal[i]->set[j]->ncol > 0) { - printf("\n %s %s\n",COLUMNLABEL,COLUMNTYPE); - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - printf(" %-31s %-3s\n",mtz->xtal[i]->set[j]->col[k]->label, - mtz->xtal[i]->set[j]->col[k]->type); - } - } - } - } - - printf("\n * HISTORY for current MTZ file :\n\n"); - for (i = 0; i < mtz->histlines; ++i) { - strncpy(buffer,mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); - buffer[MTZRECORDLENGTH] = '\0'; - printf(" %s\n",buffer); - } - - return 1; -} - -int ccp4_lrbat(MTZBAT *batch, float *buf, char *charbuf, int iprint) - -{ int nwords=NBATCHWORDS,nintegers=NBATCHINTEGERS,nreals=NBATCHREALS; - int *intbuf = (int *) buf; - float *fltbuf = buf + NBATCHINTEGERS; - - if (!batch) return 0; - - MtzBatchToArray(batch,intbuf,fltbuf); - intbuf[0] = nwords; - intbuf[1] = nintegers; - intbuf[2] = nreals; - - strncpy(charbuf,batch->title,70); - strncpy(charbuf+70,batch->gonlab[0],8); - strncpy(charbuf+78,batch->gonlab[1],8); - strncpy(charbuf+86,batch->gonlab[2],8); - - if (iprint == 1) { - printf(" Batch number: \n %6d %s\n",batch->num,batch->title); - } else if (iprint > 1) { - MtzPrintBatchHeader(batch); - } - - return 1; -} - -int MtzPrintBatchHeader(const MTZBAT *batch) { - - int i; - char labtype[26],axes[5],string1[40],string2[40]; - - switch (batch->ldtype) { - case 1: - strcpy(labtype,"oscillation data"); - break; - case 2: - strcpy(labtype,"area detector data"); - break; - case 3: - strcpy(labtype,"Laue data"); - break; - default: - strcpy(labtype,"*** unknown data type ***"); - } - - switch (batch->jumpax) { - case 1: - strcpy(axes,"a*"); - break; - case 2: - strcpy(axes,"b*"); - break; - case 3: - strcpy(axes,"c*"); - break; - default: - strcpy(axes,"none"); - } - - printf(" Batch number: \n"); - printf(" %6d %s\n",batch->num,batch->title); - printf("\n %s \n\n %s %7d %s \n\n %s %7d\n %s %7d\n %s %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f\n %s %7d %7d %7d %7d %7d %7d \n", - "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", - "Orientation data for batch",batch->num,labtype, - " Crystal number ...................",batch->ncryst, - " Associated dataset ID ............",batch->nbsetid, - " Cell dimensions ..................", - batch->cell[0],batch->cell[1],batch->cell[2], - batch->cell[3],batch->cell[4],batch->cell[5], - " Cell fix flags ...................", - batch->lbcell[0],batch->lbcell[1],batch->lbcell[2], - batch->lbcell[3],batch->lbcell[4],batch->lbcell[5]); - if (!batch->misflg) { - strcpy(string1,"Orientation matrix U ............."); - strcpy(string2," (including setting angles) "); - } else { - strcpy(string1,"Standard orientation matrix U ...."); - strcpy(string2," "); - } - printf(" %s %9.4f %9.4f %9.4f \n %s %9.4f %9.4f %9.4f \n %s %9.4f %9.4f %9.4f \n", - string1,batch->umat[0],batch->umat[3],batch->umat[6], - string2,batch->umat[1],batch->umat[4],batch->umat[7], - " ",batch->umat[2],batch->umat[5],batch->umat[8]); - if (batch->misflg == 1) { - printf(" %s %6.2f %6.2f %6.2f\n", - "Missetting angles PhiX PhiY PhiZ..", - batch->phixyz[0][0],batch->phixyz[0][1],batch->phixyz[0][2]); - } else if (batch->misflg > 1) { - printf(" %s %6.2f %6.2f %6.2f %6.2f %6.2f %6.2f\n", - "Missetting angles PhiX PhiY PhiZ..", - batch->phixyz[0][0],batch->phixyz[0][1],batch->phixyz[0][2], - batch->phixyz[1][0],batch->phixyz[1][1],batch->phixyz[1][2]); - } - printf(" %s%s%s %s\n", - "Reciprocal axis nearest ",batch->gonlab[batch->ngonax-1],"..",axes); - if (!batch->lcrflg) { - printf(" %s %6.3f \n", - "Mosaicity ........................",batch->crydat[0]); - } else { - printf(" %s %6.3f %6.3f \n", - "Mosaicity (horizontal, vertical)..",batch->crydat[0],batch->crydat[1]); - } - printf(" Datum goniostat angles (degrees).."); - for (i = 0; i < batch->ngonax; ++i) - printf(" %8.3f",batch->datum[i]); - printf("\n"); - - if (batch->jsaxs > 0 && batch->jsaxs <= batch->ngonax) - printf(" %s %s \n", - "Scan axis ........................",batch->gonlab[batch->jsaxs-1]); - printf(" %s %8.3f %8.3f \n %s %8.3f \n %s %8.2f %8.2f \n", - "Start & stop Phi angles (degrees).",batch->phistt,batch->phiend, - "Range of Phi angles (degrees).....",batch->phirange, - "Start & stop time (minutes).......",batch->time1,batch->time2); - - if (batch->nbscal == 4) { - printf(" %s %9.4f %9.4f \n %s %9.4f %9.4f \n", - " Batch scale & SD .................",batch->bscale,batch->sdbscale, - " Batch B-factor & SD ..............",batch->bbfac,batch->sdbfac); - } - - printf(" %s \n %s %7d \n %s %s %s %9.4f %9.4f %9.4f \n %s %s %s %9.4f %9.4f %9.4f \n %s %s %s %9.4f %9.4f %9.4f \n", - " Crystal goniostat information :-", - " Number of goniostat axes..........",batch->ngonax, - " Goniostat vectors.....",batch->gonlab[0],"....",batch->e1[0],batch->e1[1],batch->e1[2], - " .....",batch->gonlab[1],"....",batch->e2[0],batch->e2[1],batch->e2[2], - " .....",batch->gonlab[2],"....",batch->e3[0],batch->e3[1],batch->e3[2]); - - printf(" %s \n %s %9.4f %9.4f %9.4f \n %s %9.4f %9.4f %9.4f \n", - " Beam information :-", - " Idealized X-ray beam vector.......",batch->source[0],batch->source[1],batch->source[2], - " X-ray beam vector with tilts......",batch->so[0],batch->so[1],batch->so[2]); - - if (batch->lbmflg == 0) { - printf(" %s %9.5f %9.5f \n", - " Wavelength and dispersion ........",batch->alambd,batch->delamb); - } else if (batch->lbmflg == 1) { - printf(" %s %9.5f %9.5f %9.5f \n %s %7.3f %7.3f \n", - " Wavelength and dispersion ........",batch->alambd,batch->delamb,batch->delcor, - " Divergence .......................",batch->divhd,batch->divvd); - } - - printf(" Detector information :-\n Number of detectors...............%7d \n",batch->ndet); - printf(" %s%9.3f\n%s%9.3f\n%s%7.1f%7.1f%7.1f%7.1f\n", - " Crystal to Detector distance (mm).",batch->dx[0], - " Detector swing angle..............",batch->theta[0], - " Pixel limits on detector..........",batch->detlm[0][0][0],batch->detlm[0][0][1],batch->detlm[0][1][0],batch->detlm[0][1][1]); - printf(" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n"); - - return 1; -} - -int ccp4_lwtitl(MTZ *mtz, const char *ftitle, int flag) { - - int length; - - if (flag == 0) { - - strncpy(mtz->title,ftitle,70); - - } else { - - /* Append ftitle to existing title. - BEWARE this has been fixed a few times for special - cases. There is often a reaons behind numbers - such as 69, so don't change it lightly */ - - length = (int) strlen(mtz->title); - /* this shouldn't happen if title is NULL terminated */ - if (length > 70) length = 70; - while ((--length >= 0) && mtz->title[length] == ' '); - /* if there is an existing title and it doesn't take - up all 70 chars, then add a space before appending - new title */ - if (length >= 0 && length < 69) - mtz->title[++length] = ' '; - strncpy(mtz->title+length+1,ftitle,69-length); - - } - mtz->title[70] = '\0'; - - return 1; -} - -int MtzSetSortOrder(MTZ *mtz, MTZCOL *colsort[5]) { - - int i; - - for (i = 0; i < 5; ++i) - mtz->order[i] = colsort[i]; - - return 1; -} - -int MtzAddHistory(MTZ *mtz, const char history[][MTZRECORDLENGTH], const int nlines) { - - int i,j,numlines=0; - char *newhist; - - newhist = MtzCallocHist(mtz->histlines + nlines); - /* write new history lines */ - for (i = 0; i < nlines; ++i) { - for (j = 0; j < MTZRECORDLENGTH; ++j) { - /* remove leading blanks and blank lines */ - if ( *(history[i]+j) != ' ') { - strncpy(newhist + MTZRECORDLENGTH*i,history[i]+j,MTZRECORDLENGTH-j); - ++numlines; - break; - } - } - } - /* copy old history lines */ - for (i = 0; i < mtz->histlines; ++i) { - strncpy(newhist + MTZRECORDLENGTH*numlines + MTZRECORDLENGTH*i, - mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); - } - MtzFreeHist(mtz->hist); - mtz->hist = newhist; - mtz->histlines += numlines; - - return mtz->histlines; -} - -int ccp4_lwidx(MTZ *mtz, const char crystal_name[], const char dataset_name[], - const char project_name[], const float datcell[6], const float *datwave) { - - MTZXTAL *xtl; - MTZSET *set; - int i; - char path1[200]; - - /* Is it a new crystal? */ - if ((xtl = MtzXtalLookup(mtz,crystal_name)) == NULL) { - xtl = MtzAddXtal(mtz,crystal_name,project_name,datcell); - MtzAddDataset(mtz,xtl,dataset_name,*datwave); - } else { - /* Existing crystal - update parameters */ - if (project_name && strlen(project_name) > 0) { - strncpy(xtl->pname,project_name,64); - xtl->pname[64] = '\0'; - } - if (datcell[0] > 0.0) - for (i = 0; i < 6; ++i) - xtl->cell[i] = datcell[i]; - strcpy( path1, "/" ); - strcat( path1, xtl->xname ); - strcat( path1, "/" ); - strcat( path1, dataset_name ); - /* Is it a new dataset? */ - if ((set = MtzSetLookup(mtz,path1)) == NULL) { - MtzAddDataset(mtz,xtl,dataset_name,*datwave); - } else { - if (*datwave > 0.0) - set->wavelength = *datwave; - } - } - return 1; -} - -int MtzAssignHKLtoBase(MTZ *mtz) -{ - int i,j,k,l=0; - MTZSET *baseset=NULL; - MTZCOL *colarray[3]; - - /* get base dataset if it exists */ - baseset = MtzSetLookup(mtz,"HKL_base/HKL_base"); - - if (baseset) { - - for (i = 0; i < mtz->nxtal; ++i) - for (j = 0; j < mtz->xtal[i]->nset; ++j) - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) - if ( strcmp(mtz->xtal[i]->set[j]->col[k]->type,"H") == 0 ) { - colarray[l++] = mtz->xtal[i]->set[j]->col[k]; - if (l == 3) goto assign; - } - - assign: - for (l = 0; l < 3; ++l) - if (colarray[l]) MtzAssignColumn(mtz, colarray[l], "HKL_base","HKL_base"); - - } - return 1; -} - -int MtzAssignColumn(MTZ *mtz, MTZCOL *col, const char crystal_name[], - const char dataset_name[]) -{ - - MTZXTAL *xtl; - MTZSET *set, *oldset; - int i,j; - float datcell[6] = {0.0}, datwave = 0.0; - char path1[200], *path2; - - if ( !mtz || !col || !crystal_name || !dataset_name || - !strcmp(crystal_name,"") || !strcmp(dataset_name,"") ) - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_ParamError),"MtzAssignColumn",NULL); - - /* if column already belongs in this dataset, do nothing and return */ - oldset = MtzColSet(mtz, col); - path2 = MtzSetPath(mtz, oldset); - strcpy( path1, "/" ); - strcat( path1, crystal_name ); - strcat( path1, "/" ); - strcat( path1, dataset_name ); - if ( MtzPathMatch( path1, path2 ) ) { - free (path2); - return 1; - } - free (path2); - - /* remove column from existing set */ - for (i = 0; i < oldset->ncol; ++i) { - if ( oldset->col[i] == col ) { - for (j = i; j < oldset->ncol - 1; ++j) - oldset->col[j] = oldset->col[j+1]; - oldset->col[--oldset->ncol] = NULL; - break; - } - } - - /* Does the requested new dataset exist? If not, create it. */ - if ( !(set = MtzSetLookup(mtz,path1)) ) { - if ( !(xtl = MtzXtalLookup(mtz,crystal_name)) ) - xtl = MtzAddXtal(mtz,crystal_name,crystal_name,datcell); - set = MtzAddDataset(mtz,xtl,dataset_name,datwave); - } - - /* Add column to new dataset */ - if ( ++set->ncol > ccp4array_size(set->col)) - ccp4array_resize(set->col, set->ncol + 9); - set->col[set->ncol - 1] = col; - - return 1; -} - -int ccp4_lwsymconf(MTZ *mtz, char spgconf[]) -{ - if (spgconf[0] != ' ' && spgconf[0] != '\0') mtz->mtzsymm.spg_confidence = spgconf[0]; - - return 1; -} - -int ccp4_lwsymm(MTZ *mtz, int nsymx, int nsympx, float rsymx[192][4][4], - char ltypex[], int nspgrx, char spgrnx[], char pgnamx[]) -{ - /* Could set this to "X" but beware of legacy programs where lwsymm - still used. Don't want to overwrite flag in newer file. */ - char spgconf_temp[2]=""; - - return ccp4_lwsymm_c(mtz, nsymx, nsympx, rsymx, ltypex, nspgrx, spgrnx, - pgnamx, spgconf_temp); -} - -int ccp4_lwsymm_c(MTZ *mtz, int nsymx, int nsympx, float rsymx[192][4][4], - char ltypex[], int nspgrx, char spgrnx[], char pgnamx[], - char spgconf[]) -{ - int i,j,k,length; - - if (nsymx > 0) { - mtz->mtzsymm.nsym = nsymx; - mtz->mtzsymm.nsymp = nsympx; - for (i = 0; i < nsymx; ++i) { - for (j = 0; j < 4; ++j) { - for (k = 0; k < 4; ++k) { - mtz->mtzsymm.sym[i][j][k] = rsymx[i][j][k]; - } - } - } - } - if (ltypex[0] != ' ' && ltypex[0] != '\0') mtz->mtzsymm.symtyp = ltypex[0]; - if (nspgrx != 0) mtz->mtzsymm.spcgrp = nspgrx; - if (spgconf[0] != ' ' && spgconf[0] != '\0') mtz->mtzsymm.spg_confidence = spgconf[0]; - - if (strcmp(spgrnx,"")) { - length = ( strlen(spgrnx) < MAXSPGNAMELENGTH ) ? strlen(spgrnx) : MAXSPGNAMELENGTH; - strncpy(mtz->mtzsymm.spcgrpname,spgrnx,length); - mtz->mtzsymm.spcgrpname[length] = '\0'; - } - if (strcmp(pgnamx,"")) { - length = ( strlen(pgnamx) < MAXPGNAMELENGTH ) ? strlen(pgnamx) : MAXPGNAMELENGTH; - strncpy(mtz->mtzsymm.pgname,pgnamx,length); - mtz->mtzsymm.pgname[length] = '\0'; - } - - return 1; -} - -MTZCOL **ccp4_lwassn(MTZ *mtz, const char labels[][31], const int nlabels, - const char types[][3], const int iappnd) -{ - int i,j,k,ilab; - MTZCOL *col, **lookup; - MTZSET *defaultset; - - lookup = (MTZCOL **) ccp4_utils_malloc(nlabels*sizeof(MTZCOL *)); - - /* if iappnd = 0, deactivate existing columns */ - if (iappnd == 0) { - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - mtz->xtal[i]->set[j]->col[k]->active = 0; - } - } - } - } - - /* new columns need to be assigned to a dataset. Set this - as the base dataset if it exists, else the first dataset. */ - if ( !(defaultset = MtzSetLookup(mtz,"HKL_base/HKL_base")) ) - defaultset = mtz->xtal[0]->set[0]; - - /* Loop over labels */ - for (ilab = 0; ilab < nlabels; ++ilab) { - if (strcmp(types[ilab],"Y") == 0 && strcmp(labels[ilab],"M/ISYM") == 0) { - col = MtzColLookup(mtz,"M_ISYM"); - } else { - col = MtzColLookup(mtz,labels[ilab]); - } - if (col) { - col->active = 1; - lookup[ilab] = col; - } else { - /* add new column to first dataset - MtzAssignColumn corrects this */ - if (strcmp(types[ilab],"Y") == 0 && strcmp(labels[ilab],"M/ISYM") == 0) { - lookup[ilab] = MtzAddColumn(mtz, defaultset, - "M/ISYM", types[ilab]); - } else { - lookup[ilab] = MtzAddColumn(mtz, defaultset, - labels[ilab], types[ilab]); - } - } - } - - return lookup; -} - -int ccp4_lwbat(MTZ *mtz, MTZBAT *batch, const int batno, const float *buf, const char *charbuf) - -{ - int *intbuf = (int *) buf; - const float *fltbuf = buf + NBATCHINTEGERS; - char cbatch[95]=" "; - int i,cbatch_len; - MTZBAT *otherbat; - - if (batch == NULL) { - /* add new batch at end of list */ - batch = mtz->batch; - /* is this the first ever batch? */ - if (batch == NULL) { - mtz->batch = MtzMallocBatch(); - batch = mtz->batch; - batch->num = batno; - batch->next = NULL; - } else { - /* first, skip over n_orig_bat batches if some were read in */ - for (i=0; i < mtz->n_orig_bat - 1; ++i) - batch = batch->next; - if (mtz->n_orig_bat == 0 && batch->num == batno) { - printf("From ccp4_lwbat: warning: attempt to add new batch with existing batch number %d!\n",batno); - return 0; - } - while (batch->next != NULL) { - batch = batch->next; - if (batch->num == batno) { - printf("From ccp4_lwbat: warning: attempt to add new batch with existing batch number %d!\n",batno); - return 0; - } - } - batch->next = MtzMallocBatch(); - batch = batch->next; - batch->num = batno; - batch->next = NULL; - } - } else { - if (batch->num != batno) { - /* renumbering - check unique */ - otherbat = mtz->batch; - while (otherbat != NULL) { - if (otherbat->num == batno && otherbat != batch) { - printf("From ccp4_lwbat: warning: attempt to change batch number to existing batch number %d!\n",batno); - return 0; - } - otherbat = otherbat->next; - } - batch->num = batno; - } - } - - MtzArrayToBatch(intbuf,fltbuf,batch); - - cbatch_len = ( strlen(charbuf) < 94 ) ? strlen(charbuf) : 94; - strncpy(cbatch,charbuf,cbatch_len); - - strncpy(batch->title,cbatch,70); - strncpy(batch->gonlab[0],cbatch+70,8); - strncpy(batch->gonlab[1],cbatch+78,8); - strncpy(batch->gonlab[2],cbatch+86,8); - batch->gonlab[0][8] = batch->gonlab[1][8] = batch->gonlab[2][8] = '\0'; - - return 1; -} - -int ccp4_lwbsetid(MTZ *mtz, MTZBAT *batch, const char xname[], const char dname[]) - -{ - MTZXTAL *xtl; - MTZSET *set; - char path1[200]; - - if ((xtl = MtzXtalLookup(mtz,xname)) != NULL) { - strcpy( path1, "/" ); - strcat( path1, xtl->xname ); - strcat( path1, "/" ); - strcat( path1, dname ); - if ((set = MtzSetLookup(mtz,path1)) != NULL) { - batch->nbsetid = set->setid; - return 1; - } - } - - printf("From ccp4_lwbsetid: warning: dataset id not found!\n"); - return 0; -} - -int MtzDeleteRefl(MTZ *mtz, int iref) - -{ - int i,j,k; - - /* only possible if reflections in memory */ - if (mtz->refs_in_memory) { - for (i = 0; i < mtz->nxtal; ++i) - for (j = 0; j < mtz->xtal[i]->nset; ++j) - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) - ccp4array_delete_ordered(mtz->xtal[i]->set[j]->col[k]->ref,iref); - --mtz->nref; - } - - return 1; -} - -int ccp4_lwrefl(MTZ *mtz, const float adata[], MTZCOL *lookup[], - const int ncol, const int iref) - -{ int i,j,k,l,icol,ind[3],ind_xtal,ind_set,ind_col[3]; - float refldata[MCOLUMNS],res; - double coefhkl[6]; - - /* if this is extra reflection, check memory for in-memory mode */ - if (mtz->refs_in_memory && iref > mtz->nref) { - if (iref > ccp4array_size(lookup[0]->ref)) { - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - ccp4array_resize(mtz->xtal[i]->set[j]->col[k]->ref, iref); - } - } - } - } - } - - /* update variables held in memory */ - icol = -1; - for (i = 0; i < ncol; ++i) { - if (lookup[i]) { - /* update reflection for in-memory mode */ - if (mtz->refs_in_memory) { - lookup[i]->ref[iref-1] = adata[i]; - } - /* update column ranges */ - if (iref == 1) { - lookup[i]->min = FLT_MAX; - lookup[i]->max = -FLT_MAX; - } - if (!ccp4_ismnf(mtz, adata[i])) { - if (adata[i] < lookup[i]->min) lookup[i]->min = adata[i]; - if (adata[i] > lookup[i]->max) lookup[i]->max = adata[i]; - } - } - } - - /* write reflection for on-disk mode */ - if (!mtz->refs_in_memory) { - - icol = -1; - /* Loop over all active columns */ - for (i = 0; i < mtz->nxtal; ++i) - for (j = 0; j < mtz->xtal[i]->nset; ++j) - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) - if (mtz->xtal[i]->set[j]->col[k]->active) { - ++icol; - /* for each active column, see if value to write */ - for (l = 0; l < ncol; ++l) - if (lookup[l] == mtz->xtal[i]->set[j]->col[k]) { - refldata[icol] = adata[l]; - break; - } - } - - if (MtzWrefl(mtz->fileout, icol+1, refldata) != icol+1 ) - return 0; - - /* Update resolution limits. For in-memory mode, this is done in MtzPut. */ - /* Check if HKL are first 3 columns */ - if (lookup[0]->type[0] == 'H' && lookup[1]->type[0] == 'H' && - lookup[2]->type[0] == 'H') { - ind[0] = (int) adata[0]; - ind[1] = (int) adata[1]; - ind[2] = (int) adata[2]; - } else { - MtzFindInd(mtz,&ind_xtal,&ind_set,ind_col); - for (l = 0; l < ncol; ++l) { - if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[0]]) - ind[0] = (int) adata[l]; - if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[1]]) - ind[1] = (int) adata[l]; - if (lookup[l] == mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[2]]) - ind[2] = (int) adata[l]; - } - } - - for (i = 0; i < mtz->nxtal; ++i) { - if (mtz->xtal[i]->cell[0] > 0.001) { - MtzHklcoeffs(mtz->xtal[i]->cell, coefhkl); - res = MtzInd2reso(ind, coefhkl); - if (res > 0.0) { - if (res > mtz->xtal[i]->resmax) mtz->xtal[i]->resmax = res; - if (res < mtz->xtal[i]->resmin) mtz->xtal[i]->resmin = res; - if (res > mtz->resmax_out) mtz->resmax_out = res; - if (res < mtz->resmin_out) mtz->resmin_out = res; - } - } - } - } - - /* increment nref if we are adding new reflections */ - if (iref > mtz->nref) - mtz->nref = iref; - - return 1; -} - -int MtzPut(MTZ *mtz, const char *logname) - -{ char hdrrec[81],symline[81],spgname[MAXSPGNAMELENGTH+3]; - CCP4File *fileout; - int i, j, k, l, icol, numbat, isort[5], debug=0; - int ind[3],ind_xtal,ind_set,ind_col[3],length,glob_cell_written=0; - double coefhkl[6]; - float res,refldata[MCOLUMNS]; - int nwords=NBATCHWORDS,nintegers=NBATCHINTEGERS,nreals=NBATCHREALS; - float buf[NBATCHWORDS]; - int *intbuf = (int *) buf; - float *fltbuf = buf + NBATCHINTEGERS; - MTZBAT *batch, *lastoldbatch; - MTZXTAL *xtl; - char colsource[37], *taskenv; - int date3[3], time3[3]; - int32_t tmp_hdrst; - int64_t hdrst; - - if (debug) - printf(" MtzPut: entering \n"); - - /* get data to fill out column source information */ - taskenv = getenv( "CCP4_TASK_ID" ); - if ( taskenv != NULL ) { - strncpy( colsource, taskenv, 36 ); - colsource[36] = '\0'; - } else { - ccp4_utils_idate( date3 ); - ccp4_utils_itime( time3 ); - sprintf( colsource, "CREATED_%02d/%02d/%04d_%02d:%02d:%02d", - date3[0],date3[1],date3[2],time3[0],time3[1],time3[2] ); - } - for ( i = 0; i < strlen(colsource); i++ ) - if ( colsource[i] == ' ' ) colsource[i] = '_'; - for (i = 0; i < mtz->nxtal; ++i) - for (j = 0; j < mtz->xtal[i]->nset; ++j) - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) - if ( mtz->xtal[i]->set[j]->col[k]->source == 0 ) - strncpy(mtz->xtal[i]->set[j]->col[k]->colsource,colsource,36); - - if (!mtz->fileout) { - - if ( !(fileout = MtzOpenForWrite(logname)) ) return 0; - - if (debug) - printf(" MtzPut: file opened \n"); - - } else { - fileout = mtz->fileout; - } - - if (mtz->refs_in_memory) { - /* Write all reflections from memory - make this optional? */ - for (l = 0; l < mtz->nref; ++l) { - icol = 0; - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if (mtz->xtal[i]->set[j]->col[k]->active) { - refldata[icol++] = mtz->xtal[i]->set[j]->col[k]->ref[l]; - } - } - } - } - if (MtzWrefl(fileout, icol, refldata) != icol ) return 0; - } - - if (debug) - printf(" MtzPut: reflections written \n"); - - } - - ccp4_file_setmode(fileout,0); - /* Write header */ - sprintf(hdrrec,"VERS MTZ:V%d.%d",MTZ_MAJOR_VERSN,MTZ_MINOR_VERSN); - /* if MTZ_MAJOR_VERSN,MTZ_MINOR_VERSN get into double figures, - adjust following call to MtzWhdrLine */ - MtzWhdrLine(fileout,13,hdrrec); - strcpy(hdrrec,"TITLE "); - strncpy(hdrrec+6,mtz->title,70); - MtzWhdrLine(fileout,76,hdrrec); - /* if new batch headers have been written, lose the old ones */ - /* mtz->n_orig_bat is original number of batches, MtzNbat(mtz) the current */ - if (MtzNbat(mtz) == mtz->n_orig_bat) { - numbat = mtz->n_orig_bat; - } else { - numbat = MtzNbat(mtz) - mtz->n_orig_bat; - } - sprintf(hdrrec,"NCOL %8d %12d %8d",MtzNumActiveCol(mtz),mtz->nref,numbat); - MtzWhdrLine(fileout,35,hdrrec); - if (debug) printf(" MtzPut: NCOL just written \n"); - - /* Purely for backwards compatibility: output first non-zero cell as - global cell. Also update base dataset cell. */ - for (i = 0; i < mtz->nxtal; ++i) { - if ( !strcmp(mtz->xtal[i]->xname,"HKL_base") ) continue; - if ( (MtzNumActiveSetsInXtal(mtz,mtz->xtal[i]) == 0) ) continue; - if (mtz->xtal[i]->cell[0] > 0.001) { - sprintf(hdrrec,"CELL %9.4f %9.4f %9.4f %9.4f %9.4f %9.4f",mtz->xtal[i]->cell[0], - mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2],mtz->xtal[i]->cell[3], - mtz->xtal[i]->cell[4],mtz->xtal[i]->cell[5]); - MtzWhdrLine(fileout,65,hdrrec); - if ((xtl = MtzXtalLookup(mtz,"HKL_base")) != NULL) - for (j = 0; j < 6; ++j) - xtl->cell[j] = mtz->xtal[i]->cell[j]; - glob_cell_written=1; - break; - } - } - /* if no suitable cell found, then try HKL_base cell */ - if (!glob_cell_written) { - if ((xtl = MtzXtalLookup(mtz,"HKL_base")) != NULL) { - sprintf(hdrrec,"CELL %9.4f %9.4f %9.4f %9.4f %9.4f %9.4f",xtl->cell[0], - xtl->cell[1],xtl->cell[2],xtl->cell[3],xtl->cell[4],xtl->cell[5]); - MtzWhdrLine(fileout,65,hdrrec); - glob_cell_written=1; - } - } - if (debug) printf(" MtzPut: CELL just written \n"); - - ccp4_lrsort(mtz, isort); - sprintf(hdrrec,"SORT %3d %3d %3d %3d %3d",isort[0],isort[1],isort[2], - isort[3],isort[4]); - MtzWhdrLine(fileout,25,hdrrec); - if (debug) printf(" MtzPut: SORT just written \n"); - - spgname[0] = '\''; - length = strlen(mtz->mtzsymm.spcgrpname); - while ((--length >= 0) && mtz->mtzsymm.spcgrpname[length] == ' '); - strncpy(spgname+1,mtz->mtzsymm.spcgrpname,length+1); - spgname[length+2] = '\''; - spgname[length+3] = '\0'; - sprintf(hdrrec,"SYMINF %3d %2d %c %5d %22s %5s %c",mtz->mtzsymm.nsym, - mtz->mtzsymm.nsymp,mtz->mtzsymm.symtyp,mtz->mtzsymm.spcgrp,spgname, - mtz->mtzsymm.pgname,mtz->mtzsymm.spg_confidence); - MtzWhdrLine(fileout,52,hdrrec); - if (debug) printf(" MtzPut: SYMINF just written \n"); - - for (i = 0; i < mtz->mtzsymm.nsym; ++i) { - mat4_to_symop(symline,symline+74,(const float (*)[4])mtz->mtzsymm.sym[i]); - symline[74] = '\0'; - sprintf(hdrrec,"SYMM %74s",symline); - MtzWhdrLine(fileout,79,hdrrec); - } - if (debug) printf(" MtzPut: symmetry just written \n"); - - if (mtz->refs_in_memory) { - /* Find dataset of indices */ - MtzFindInd(mtz,&ind_xtal,&ind_set,ind_col); - - /* Recalculate crystal resolution limits */ - for (i = 0; i < mtz->nxtal; ++i) { - mtz->xtal[i]->resmax = 0.0; - mtz->xtal[i]->resmin = 100.0; - MtzHklcoeffs(mtz->xtal[i]->cell, coefhkl); - for (j = 0; j < mtz->nref; ++j) { - ind[0] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[0]]->ref[j]; - ind[1] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[1]]->ref[j]; - ind[2] = (int) mtz->xtal[ind_xtal]->set[ind_set]->col[ind_col[2]]->ref[j]; - res = MtzInd2reso(ind, coefhkl); - /* crystal limits */ - if (res > 0.0) { - if (res > mtz->xtal[i]->resmax) mtz->xtal[i]->resmax = res; - if (res < mtz->xtal[i]->resmin) mtz->xtal[i]->resmin = res; - if (res > mtz->resmax_out) mtz->resmax_out = res; - if (res < mtz->resmin_out) mtz->resmin_out = res; - } - } - } - } - /* print enough digits to retain precision. C. Flensburg 20080227 */ - sprintf(hdrrec,"RESO %-20.16f %-20.16f",mtz->resmin_out,mtz->resmax_out); - MtzWhdrLine(fileout,46,hdrrec); - - if (debug) - printf(" MtzPut: resolution limts just written \n"); - - if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { - sprintf(hdrrec,"VALM NAN"); - MtzWhdrLine(fileout,8,hdrrec); - } else { - sprintf(hdrrec,"VALM %-20f",mtz->mnf.fmnf); - MtzWhdrLine(fileout,25,hdrrec); - } - - if (debug) - printf(" MtzPut: VALM just written \n"); - - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - if (mtz->xtal[i]->set[j]->col[k]->active) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && - strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { - sprintf(hdrrec,"COLUMN %-30s ","M/ISYM"); - } else { - sprintf(hdrrec,"COLUMN %-30s ",mtz->xtal[i]->set[j]->col[k]->label); - } - /* Check that the column type is set - If it is blank then the COLUMN record will be incomplete */ - if (mtz->xtal[i]->set[j]->col[k]->type[0] == '\0') { - if (ccp4_liberr_verbosity(-1)) - printf("From MtzPut: column type for %s is not set, assume type R\n", - mtz->xtal[i]->set[j]->col[k]->label); - strncpy(mtz->xtal[i]->set[j]->col[k]->type,"R",2); - } - /* catch case when min and max have not been set*/ - if ( mtz->xtal[i]->set[j]->col[k]->min == FLT_MAX ) mtz->xtal[i]->set[j]->col[k]->min = 0.0f; - if ( mtz->xtal[i]->set[j]->col[k]->max == -FLT_MAX ) mtz->xtal[i]->set[j]->col[k]->max = 0.0f; - - sprintf(hdrrec+38,"%c %17.9g %17.9g %4d", - mtz->xtal[i]->set[j]->col[k]->type[0], - mtz->xtal[i]->set[j]->col[k]->min, - mtz->xtal[i]->set[j]->col[k]->max, - mtz->xtal[i]->set[j]->setid); - MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); - - if ( mtz->xtal[i]->set[j]->col[k]->colsource[0] != '\0' ) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && - strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { - sprintf(hdrrec,"COLSRC %-30s %-36s %4d","M/ISYM",mtz->xtal[i]->set[j]->col[k]->colsource,mtz->xtal[i]->set[j]->setid); - } else { - sprintf(hdrrec,"COLSRC %-30s %-36s %4d",mtz->xtal[i]->set[j]->col[k]->label,mtz->xtal[i]->set[j]->col[k]->colsource,mtz->xtal[i]->set[j]->setid); - } - MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); - } - - if ( mtz->xtal[i]->set[j]->col[k]->grpname[0] != '\0' && - mtz->xtal[i]->set[j]->col[k]->grptype[0] != '\0' && - mtz->xtal[i]->set[j]->col[k]->grpposn >= 0 ) { - if (strcmp(mtz->xtal[i]->set[j]->col[k]->type,"Y") == 0 && - strcmp(mtz->xtal[i]->set[j]->col[k]->label,"M_ISYM") == 0) { - sprintf(hdrrec,"COLGRP %-30s %-30s %-4s %1X %4d","M/ISYM",mtz->xtal[i]->set[j]->col[k]->grpname,mtz->xtal[i]->set[j]->col[k]->grptype,mtz->xtal[i]->set[j]->col[k]->grpposn,mtz->xtal[i]->set[j]->setid); - } else { - sprintf(hdrrec,"COLGRP %-30s %-30s %-4s %1X %4d",mtz->xtal[i]->set[j]->col[k]->label,mtz->xtal[i]->set[j]->col[k]->grpname,mtz->xtal[i]->set[j]->col[k]->grptype,mtz->xtal[i]->set[j]->col[k]->grpposn,mtz->xtal[i]->set[j]->setid); - } - MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); - } - } - } - } - } - - if (debug) - printf(" MtzPut: column info just written \n"); - - sprintf(hdrrec,"NDIF %8d",MtzNumActiveSet(mtz)); - MtzWhdrLine(fileout,13,hdrrec); - - if (debug) - printf(" MtzPut: about to write dataset info \n"); - - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* check if dataset contains any active columns or batches */ - if ( (MtzNumActiveColsInSet(mtz->xtal[i]->set[j]) == 0) && - (MtzNbatchesInSet(mtz,mtz->xtal[i]->set[j]) == 0) ) continue; - sprintf(hdrrec,"PROJECT %7d %-64s",mtz->xtal[i]->set[j]->setid, - mtz->xtal[i]->pname); - MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); - sprintf(hdrrec,"CRYSTAL %7d %-64s",mtz->xtal[i]->set[j]->setid, - mtz->xtal[i]->xname); - MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); - sprintf(hdrrec,"DATASET %7d %-64s",mtz->xtal[i]->set[j]->setid, - mtz->xtal[i]->set[j]->dname); - MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); - sprintf(hdrrec,"DCELL %7d %10.4f%10.4f%10.4f%10.4f%10.4f%10.4f", - mtz->xtal[i]->set[j]->setid,mtz->xtal[i]->cell[0], - mtz->xtal[i]->cell[1],mtz->xtal[i]->cell[2], - mtz->xtal[i]->cell[3],mtz->xtal[i]->cell[4], - mtz->xtal[i]->cell[5]); - MtzWhdrLine(fileout,76,hdrrec); - sprintf(hdrrec,"DWAVEL %7d %10.5f",mtz->xtal[i]->set[j]->setid, - mtz->xtal[i]->set[j]->wavelength); - MtzWhdrLine(fileout,26,hdrrec); - } - } - - if (MtzNbat(mtz) > 0) { - batch = mtz->batch; - /* if new batch headers have been written, lose the old ones */ - if (MtzNbat(mtz) > mtz->n_orig_bat) { - for (i=0; i < mtz->n_orig_bat; ++i) { - lastoldbatch = batch; - batch = batch->next; - } - numbat = MtzNbat(mtz) - mtz->n_orig_bat; - batch = sort_batches(batch,numbat); - if (mtz->n_orig_bat > 0) { - lastoldbatch->next = batch; - } else { - mtz->batch = batch; - } - } else { - numbat = mtz->n_orig_bat; - } - if (debug) { - printf(" MtzPut: original number of batches %d \n",mtz->n_orig_bat); - printf(" MtzPut: total number of batches %d \n",MtzNbat(mtz)); - printf(" MtzPut: number of batches to be written %d \n",numbat); - } - - for (i = 0; i < numbat; i += 12) { - sprintf(hdrrec,"BATCH "); - l = 6; - for (j = 0; j < 12 && i+j < numbat; ++j) { - sprintf(hdrrec+6+6*j,"%6d",batch->num); - l += 6; - batch = batch->next; - } - MtzWhdrLine(fileout,l,hdrrec); - } - } - - /* write out unrecognized headers */ - if ( mtz->unknown_headers ) - for (i = 0; i < mtz->n_unknown_headers; ++i) - MtzWhdrLine(fileout,MTZRECORDLENGTH,mtz->unknown_headers+i*MTZRECORDLENGTH); - - sprintf(hdrrec,"END "); - MtzWhdrLine(fileout,4,hdrrec); - - if (debug) - printf(" MtzPut: main header written \n"); - - if (mtz->histlines > 0) { - sprintf(hdrrec,"MTZHIST %3d",mtz->histlines); - MtzWhdrLine(fileout,11,hdrrec); - for (i = 0; i < mtz->histlines; ++i) { - strncpy(hdrrec,mtz->hist + MTZRECORDLENGTH*i,MTZRECORDLENGTH); - MtzWhdrLine(fileout,MTZRECORDLENGTH,hdrrec); - } - } - - if (MtzNbat(mtz) > 0) { - batch = mtz->batch; - /* if new batch headers have been written, lose the old ones */ - if (MtzNbat(mtz) > mtz->n_orig_bat) - for (i=0; i < mtz->n_orig_bat; ++i) - batch = batch->next; - sprintf(hdrrec,"MTZBATS"); - MtzWhdrLine(fileout,7,hdrrec); - while (batch != NULL) { - sprintf(hdrrec,"BH %8d%8d%8d%8d",batch->num,nwords,nintegers,nreals); - MtzWhdrLine(fileout,35,hdrrec); - strcpy(hdrrec,"TITLE "); - strncpy(hdrrec+6,batch->title,70); - MtzWhdrLine(fileout,76,hdrrec); - MtzBatchToArray(batch,intbuf,fltbuf); - intbuf[0] = nwords; - intbuf[1] = nintegers; - intbuf[2] = nreals; - ccp4_file_setmode(fileout,2); - ccp4_file_write(fileout, (uint8 *) buf, nwords); - ccp4_file_setmode(fileout,0); - if (batch->gonlab[0][0] != '\0') { - sprintf(hdrrec,"BHCH %8s%8s%8s",batch->gonlab[0],batch->gonlab[1],batch->gonlab[2]); - } else { - sprintf(hdrrec,"BHCH "); - } - MtzWhdrLine(fileout,29,hdrrec); - batch = batch->next; - } - } - - if (debug) - printf(" MtzPut: batch headers written \n"); - - sprintf(hdrrec,"MTZENDOFHEADERS "); - MtzWhdrLine(fileout,16,hdrrec); - - /* write XML data block */ - if ( mtz->xml != NULL ) { - ccp4_file_setmode(fileout,0); - ccp4_file_writechar(fileout,(const uint8 *)mtz->xml,strlen(mtz->xml)); - } - - /* go back and correct hdrst */ - ccp4_file_setmode(fileout,0); - ccp4_file_seek(fileout, 4, SEEK_SET); - hdrst = (int64_t) mtz->nref * (int64_t) MtzNumActiveCol(mtz) + SIZE1 + 1; - if (hdrst > INT_MAX) { - tmp_hdrst = -1; - } else { - tmp_hdrst = (int32_t) hdrst; - hdrst = 0; - } - ccp4_file_setmode(fileout, 2); - ccp4_file_write(fileout,(uint8 *) &tmp_hdrst, 1); - if (hdrst > 0) { - ccp4_file_seek(fileout, 3, SEEK_SET); - ccp4_file_setmode(fileout, 5); - ccp4_file_write(fileout,(uint8 *) &hdrst, 1); - ccp4_file_setmode(fileout, 2); - } - - /* And close the mtz file: */ - if (!mtz->fileout) - ccp4_file_close(fileout); - - if (debug) - printf(" MtzPut: bye bye \n"); - - return 1; -} - -MTZBAT *sort_batches(MTZBAT *batch, int numbat) - -{ int debug=0; - int i,max_num_bat,isort=0,nmerges,sublistsize=1,sublist1,sublist2; - MTZBAT *cur_batch1, *cur_batch2, *sorted_batch, *tail; - MTZBAT *tmp; - - /* first check if already in order */ - cur_batch1 = batch; - max_num_bat = cur_batch1->num; - for (i=0; i < numbat; ++i) { - cur_batch1 = cur_batch1->next; - /* reached end of list */ - if (!cur_batch1) return batch; - if (cur_batch1->num < max_num_bat) { - isort=1; - break; - } else { - max_num_bat = cur_batch1->num; - } - } - if (!isort) return batch; - - if (ccp4_liberr_verbosity(-1)) - printf("\n Note: Sorting batch headers prior to writing to file... \n\n"); - - /* Sort */ - /* This is Simon Tatham's algorithm, implemented for batches. */ - - if (debug) { - tmp = batch; - for (i=0; i < numbat; ++i) { - printf(" %d",tmp->num); - tmp = tmp->next; - } - printf(" \n"); - } - - while (1) { - - if (debug) printf(" sort_batches: pass with sublist size %d \n",sublistsize); - cur_batch1 = batch; - tail = NULL; - batch = NULL; - nmerges = 0; - while (cur_batch1) { - - ++nmerges; - cur_batch2 = cur_batch1; - sublist1 = 0; - while (cur_batch2 && sublist1 < sublistsize) { - ++sublist1; - cur_batch2 = cur_batch2->next; - } - sublist2 = sublistsize; - - while (sublist1 > 0 || (sublist2 > 0 && cur_batch2)) { - - /* decide whether next batch comes from cur_batch1 or cur_batch2 */ - if (sublist1 == 0) { - /* cur_batch1 is empty; batch must come from cur_batch2. */ - sorted_batch = cur_batch2; cur_batch2 = cur_batch2->next; sublist2--; - } else if (sublist2 == 0 || !cur_batch2) { - /* cur_batch2 is empty; batch must come from cur_batch1. */ - sorted_batch = cur_batch1; cur_batch1 = cur_batch1->next; sublist1--; - } else if (cur_batch1->num <= cur_batch2->num ) { - /* cur_batch1 number is lower (or same); batch must come from cur_batch1. */ - sorted_batch = cur_batch1; cur_batch1 = cur_batch1->next; sublist1--; - } else { - /* cur_batch2 number is lower; batch must come from cur_batch2. */ - sorted_batch = cur_batch2; cur_batch2 = cur_batch2->next; sublist2--; - } - - /* add the next element to the merged list */ - if (tail) { - tail->next = sorted_batch; - } else { - batch = sorted_batch; - } - tail = sorted_batch; - - } - - /* sorted this sub-list - move to next */ - cur_batch1 = cur_batch2; - - } - - tail->next = NULL; - - if (debug) { - tmp = batch; - for (i=0; i < numbat; ++i) { - printf(" %d",tmp->num); - tmp = tmp->next; - } - printf(" \n"); - } - - /* If we have done only one merge, we're finished. */ - if (nmerges <= 1) /* allow for nmerges==0, the empty list case */ - return batch; - - /* Otherwise repeat, merging lists twice the size */ - sublistsize *= 2; - } - -} - -CCP4File *MtzOpenForWrite(const char *logname) - -{ CCP4File *fileout; - int debug=0; - int32_t hdrst; - char *filename; - - if (debug) printf(" MtzOpenForWrite: entering \n"); - /* Open the mtz file: */ - if (getenv(logname) != NULL) { - filename = strdup(getenv(logname)); - } else { - filename = strdup(logname); - } - fileout = ccp4_file_open(filename,O_RDWR | O_TRUNC); - if (! fileout ) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_CantOpenFile),"MtzOpenForWrite",NULL); - return NULL; - } - if (debug) printf(" MtzOpenForWrite: file opened \n"); - - /* Write initial info */ - ccp4_file_setmode(fileout,0); - ccp4_file_writechar(fileout, (uint8 *) "MTZ ",4); - ccp4_file_setmode(fileout,2); - hdrst = SIZE1 + 1; - ccp4_file_write(fileout,(uint8 *) &hdrst,1); - - ccp4_file_setstamp(fileout,2); -/* Write architecture */ - ccp4_file_warch(fileout); - if (debug) printf(" MtzOpenForWrite: stamp written \n"); - - /* Position at start of reflections - intervening gap should be filled - with zeros */ - ccp4_file_seek(fileout, SIZE1, SEEK_SET); - - free(filename); - - if (debug) printf(" MtzOpenForWrite: bye bye \n"); - return fileout; -} - -int MtzBatchToArray(MTZBAT *batch, int *intbuf, float *fltbuf) - -{ int i; - - if (!batch) return 0; - - for (i = 0; i < NBATCHINTEGERS; ++i) - intbuf[i] = 0; - for (i = 0; i < NBATCHREALS; ++i) - fltbuf[i] = 0.0; - - intbuf[3] = batch->iortyp; - for (i = 0; i < 6; ++i) - intbuf[4+i] = batch->lbcell[i]; - intbuf[10] = batch->misflg; - intbuf[11] = batch->jumpax; - intbuf[12] = batch->ncryst; - intbuf[13] = batch->lcrflg; - intbuf[14] = batch->ldtype; - intbuf[15] = batch->jsaxs; - intbuf[16] = batch->nbscal; - intbuf[17] = batch->ngonax; - intbuf[18] = batch->lbmflg; - intbuf[19] = batch->ndet; - intbuf[20] = batch->nbsetid; - - for (i = 0; i < 6; ++i) - fltbuf[i] = batch->cell[i]; - for (i = 0; i < 9; ++i) - fltbuf[6 + i] = batch->umat[i]; - for (i = 0; i < 3; ++i) - fltbuf[15 + i] = batch->phixyz[0][i]; - for (i = 0; i < 3; ++i) - fltbuf[18 + i] = batch->phixyz[1][i]; - for (i = 0; i < 12; ++i) - fltbuf[21 + i] = batch->crydat[i]; - for (i = 0; i < 3; ++i) - fltbuf[33 + i] = batch->datum[i]; - fltbuf[36] = batch->phistt; - fltbuf[37] = batch->phiend; - for (i = 0; i < 3; ++i) - fltbuf[38 + i] = batch->scanax[i]; - fltbuf[41] = batch->time1; - fltbuf[42] = batch->time2; - fltbuf[43] = batch->bscale; - fltbuf[44] = batch->bbfac; - fltbuf[45] = batch->sdbscale; - fltbuf[46] = batch->sdbfac; - fltbuf[47] = batch->phirange; - for (i = 0; i < 3; ++i) - fltbuf[59 + i] = batch->e1[i]; - for (i = 0; i < 3; ++i) - fltbuf[62 + i] = batch->e2[i]; - for (i = 0; i < 3; ++i) - fltbuf[65 + i] = batch->e3[i]; - for (i = 0; i < 3; ++i) - fltbuf[80 + i] = batch->source[i]; - for (i = 0; i < 3; ++i) - fltbuf[83 + i] = batch->so[i]; - fltbuf[86] = batch->alambd; - fltbuf[87] = batch->delamb; - fltbuf[88] = batch->delcor; - fltbuf[89] = batch->divhd; - fltbuf[90] = batch->divvd; - for (i = 0; i < batch->ndet; ++i) - { fltbuf[111 + (i * 6)] = batch->dx[i]; - fltbuf[112 + (i * 6)] = batch->theta[i]; - fltbuf[113 + (i * 6)] = batch->detlm[i][0][0]; - fltbuf[114 + (i * 6)] = batch->detlm[i][0][1]; - fltbuf[115 + (i * 6)] = batch->detlm[i][1][0]; - fltbuf[116 + (i * 6)] = batch->detlm[i][1][1];} - - return 1; -} - -int MtzWhdrLine(CCP4File *fileout, int nitems, char buffer[]) { - - /* write header record to fileout. Record is filled from - nitems to MTZRECORDLENGTH by blanks. - - If a C-style null terminator is encountered before nitems - are copied then the null terminator character is not - copied and the string is padded with blanks from that - point onwards */ - - char hdrrec[MTZRECORDLENGTH]; - int i,j; - - for (i = 0; i < nitems; ++i) { - /* Trap for C-style null character */ - if (buffer[i] == '\0') { - break; - } - hdrrec[i] = buffer[i]; - } - for (j = i; j < MTZRECORDLENGTH; ++j) - hdrrec[j] = ' '; - - return (ccp4_file_writechar(fileout, (uint8 *) hdrrec,MTZRECORDLENGTH)); - -} - -int MtzWrefl(CCP4File *fileout, int ncol, float *refldata) { - - if (!fileout) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_NoFile),"MtzWrefl",NULL); - return 0; - } - return (ccp4_file_write(fileout, (uint8 *) refldata, ncol)); - -} - -MTZ *MtzMalloc(int nxtal, int nset[]) - -{ MTZ *mtz; - int i,j,itime[3]; - float zerocell[6]={0.0}; - char dummy_xname[17]; - - ccp4_utils_itime(itime); - sprintf(dummy_xname,"NULL_xname%2.2d%2.2d%2.2d",itime[0],itime[1],itime[2]); - dummy_xname[16]='\0'; - - /* Allocate main header and symmetry */ - mtz = (MTZ *) ccp4_utils_malloc(sizeof(MTZ)); - if (mtz == NULL) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzMalloc",NULL); - return NULL; - } - memset(mtz,'\0',sizeof(MTZ)); - - mtz->nxtal=0; - ccp4array_new_size(mtz->xtal,5); - /* Allocate crystals and datasets. */ - if (nxtal == 0) { - mtz->xtal[0] = NULL; - } else { - for (i = 0; i < nxtal; ++i) { - /* This adds mtz->xtal[i] */ - if ( ! MtzAddXtal(mtz,dummy_xname,"NULL_pname",zerocell) ) return NULL; - mtz->xtal[i]->nset = 0; - for (j = 0; j < nset[i]; ++j) { - /* This adds mtz->xtal[i]->set[j] */ - if ( ! MtzAddDataset(mtz,mtz->xtal[i],"NULL_dname",0.0) ) return NULL; - } - } - } - - /* initialise main header */ - mtz->filein = NULL; - mtz->fileout = NULL; - mtz->title[0] = '\0'; - mtz->hist = NULL; - mtz->histlines = 0; - mtz->nxtal = nxtal; - mtz->ncol_read = 0; - mtz->nref = 0; - mtz->nref_filein = 0; - mtz->refs_in_memory = 1; - mtz->n_orig_bat = 0; - mtz->resmax_out = 0.0f; - mtz->resmin_out = 999.0f; - sprintf(mtz->mnf.amnf,"NAN"); - mtz->mtzsymm.spcgrp = 0; - mtz->mtzsymm.spcgrpname[0] = '\0'; - mtz->mtzsymm.nsym = 0; - mtz->mtzsymm.nsymp = 0; - mtz->mtzsymm.symtyp = '\0'; - mtz->mtzsymm.pgname[0] = '\0'; - mtz->mtzsymm.spg_confidence = '\0'; - mtz->batch = NULL; - for (i = 0; i < 5; ++i) { - mtz->order[i] = NULL; - } - mtz->xml = NULL; - mtz->unknown_headers = NULL; - mtz->n_unknown_headers = 0; - - return(mtz); -} - -int MtzFree(MTZ *mtz) - -/* Frees the memory reserved for 'mtz' */ - -{ int i,j,k; - - /* Close attached mtz files */ - if (mtz->filein) { - ccp4_file_close(mtz->filein); - mtz->filein = NULL; - } - if (mtz->fileout) { - ccp4_file_close(mtz->fileout); - mtz->fileout = NULL; - } - - /* Loop over crystals */ - for (i = 0; i < mtz->nxtal; ++i) { - /* Loop over datasets for each crystal */ - for (j = 0; j < mtz->xtal[i]->nset; ++j) { - /* Loop over columns for each dataset */ - for (k = 0; k < mtz->xtal[i]->set[j]->ncol; ++k) { - MtzFreeCol(mtz->xtal[i]->set[j]->col[k]); - } - ccp4array_free(mtz->xtal[i]->set[j]->col); - free((void *) mtz->xtal[i]->set[j]); - } - ccp4array_free(mtz->xtal[i]->set); - free((void *) mtz->xtal[i]); - } - ccp4array_free(mtz->xtal); - - if (mtz->batch) { - MtzFreeBatch(mtz->batch); - mtz->batch = NULL; - } - - if (mtz->hist != NULL) - MtzFreeHist(mtz->hist); - - if (mtz->xml != NULL) - free(mtz->xml); - - if (mtz->unknown_headers != NULL) - free(mtz->unknown_headers); - - free((void *) mtz); - return 1; -} - -MTZBAT *MtzMallocBatch() - -/* Allocates memory for a single batch header */ - -{ MTZBAT *batch; - - batch = (MTZBAT *) ccp4_utils_malloc(sizeof(MTZBAT)); - if (batch == NULL) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzMallocBatch",NULL); - return NULL; - } - memset(batch,'\0',sizeof(MTZBAT)); - batch->next = NULL; - - return(batch); -} - -int MtzFreeBatch(MTZBAT *batch) - -/* Frees the memory reserved for 'batch' */ - -{ - MTZBAT* cbatch = batch; - while (cbatch != NULL) - { - MTZBAT* pbatch = cbatch; - cbatch = cbatch->next; - free(pbatch); - pbatch = NULL; - } - - return 1; -} - -MTZCOL *MtzMallocCol(MTZ *mtz, int nref) - -{ MTZCOL *col; - - col = (MTZCOL *) ccp4_utils_malloc(sizeof(MTZCOL)); - if (col == NULL) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzMallocCol",NULL); - return NULL; - } - memset(col,'\0',sizeof(MTZCOL)); - - col->ref = NULL; - if (mtz->refs_in_memory) { - ccp4array_new_size(col->ref,nref); - if (col->ref == NULL) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzMallocCol",NULL); - return NULL; - } - } - - return(col); -} - -int MtzFreeCol(MTZCOL *col) - -{ if (col->ref) ccp4array_free(col->ref); - free((void *) col); - return 1; -} - -char *MtzCallocHist(int nhist) - -/* Allocates memory for the mtz history with 'nhist' lines */ - -{ char *hist; - - hist = (char *) ccp4_utils_calloc(nhist, sizeof(char)*MTZRECORDLENGTH); - return(hist); -} - -int MtzFreeHist(char *hist) - -/* Frees the memory reserved for 'hist' */ - -{ - free((void *) hist); - return 1; -} - -MTZXTAL *MtzAddXtal(MTZ *mtz, const char *xname, const char *pname, - const float cell[6]) -{ - /* add a new crystal to the mtz */ - int i,x; - MTZXTAL *xtal; - - xtal = (MTZXTAL *) ccp4_utils_malloc( sizeof(MTZXTAL) ); - if (! xtal ) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzAddXtal",NULL); - return NULL; - } - memset(xtal,'\0',sizeof(MTZXTAL)); - - /* fill out the data */ - strncpy( xtal->xname, xname, 64 ); - xtal->xname[64] = '\0'; - strncpy( xtal->pname, pname, 64 ); - xtal->pname[64] = '\0'; - xtal->resmin = 100.0; - xtal->resmax = 0.0; - for (i = 0; i < 6; i++) xtal->cell[i] = cell[i]; - /* make new xtalid */ - for (i = x = 0; x < mtz->nxtal; x++) - if (mtz->xtal[x]->xtalid > i) i = mtz->xtal[x]->xtalid; - xtal->xtalid = ++i; - xtal->nset = 0; - /* create initial array of 10 pointers to datasets */ - ccp4array_new_size(xtal->set,10); - - /* add pointer to mtz */ - if ( ++mtz->nxtal > ccp4array_size(mtz->xtal)) - ccp4array_resize(mtz->xtal, mtz->nxtal + 2); - mtz->xtal[ mtz->nxtal - 1 ] = xtal; - - return xtal; -} - -MTZSET *MtzAddDataset(MTZ *mtz, MTZXTAL *xtl, const char *dname, - const float wavelength) -{ - /* add a new dataset to the xtal */ - int i,x,s; - MTZSET *set; - - set = (MTZSET *) ccp4_utils_malloc( sizeof(MTZSET) ); - if ( ! set ) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzAddDataset",NULL); - return NULL; - } - memset(set,'\0',sizeof(MTZSET)); - - /* fill out the data */ - strncpy( set->dname, dname, 64 ); - set->dname[64] = '\0'; - set->wavelength = wavelength; - - /* New setid is one more than greatest current setid. - It must be at least 1, unless it is the base dataset setid=0. */ - if (!strcmp(set->dname,"HKL_base")) { - set->setid = 0; - } else { - i = 0; - for (x = 0; x < mtz->nxtal; x++) - for (s = 0; s < mtz->xtal[x]->nset; s++) - if (mtz->xtal[x]->set[s]->setid > i) i = mtz->xtal[x]->set[s]->setid; - set->setid = ++i; - } - - set->ncol = 0; - /* create initial array of 20 pointers to columns */ - ccp4array_new_size(set->col,20); - - /* add pointer to xtal */ - if ( ++xtl->nset > ccp4array_size(xtl->set)) - ccp4array_resize(xtl->set, xtl->nset + 4); - xtl->set[ xtl->nset - 1 ] = set; - - return set; -} - -MTZCOL *MtzAddColumn(MTZ *mtz, MTZSET *set, const char *label, - const char *type) -{ - /* add a new column to the dataset */ - int i,nref; - union float_uint_uchar uf; - MTZCOL *col; - - if (set->ncol == MCOLUMNS) { - printf("MtzAddColumn: No more columns! \n"); - return NULL; - } - - /* allocate some memory for first column */ - if (!mtz->refs_in_memory) { - nref = 0; - } else if (mtz->nref == 0) { - nref = 2000; - } else { - nref = mtz->nref; - } - col = MtzMallocCol(mtz, nref); - if (col == NULL) { - ccp4_signal(CCP4_ERRLEVEL(3) | CMTZ_ERRNO(CMTZERR_AllocFail),"MtzAddColumn",NULL); - return NULL; - } - - /* fill out the data */ - strncpy( col->label, label, 30 ); - col->label[30] = '\0'; - strncpy( col->type, type, 2); - col->type[2] = '\0'; - col->active = 1; - col->source = 0; - col->min = 1.e06; - col->max = -1.e06; - col->colsource[0] = '\0'; - col->grpname[0] = '\0'; - col->grptype[0] = '\0'; - col->grpposn = -1; - /* add pointer to set */ - if ( ++set->ncol > ccp4array_size(set->col)) - ccp4array_resize(set->col, set->ncol + 9); - set->col[ set->ncol - 1 ] = col; - /* initialise column to MNF */ - if (strncmp (mtz->mnf.amnf,"NAN",3) == 0) { - uf = ccp4_nan(); - } else { - uf.f = mtz->mnf.fmnf; - } - for (i=0; i < nref; i++) col->ref[i] = uf.f; - - return col; -} - -int MtzToggleColumn(MTZCOL *col) -{ - /* Toggle active flag of column */ - if (col->active) { - col->active = 0; - } else { - col->active = 1; - } - return col->active; -} - -MTZSET *MtzColSet(const MTZ *mtz, const MTZCOL *col) -{ - int x,s,c; - for (x=0; x < mtz->nxtal; x++) - for (s=0; s < mtz->xtal[x]->nset; s++) - for (c=0; c < mtz->xtal[x]->set[s]->ncol; c++) - if (mtz->xtal[x]->set[s]->col[c] == col) - return mtz->xtal[x]->set[s]; - printf ("MtzColSet: no such column. \n"); - return NULL; -} - -MTZXTAL *MtzSetXtal(const MTZ *mtz, const MTZSET *set) -{ - int x,s; - for (x=0; x < mtz->nxtal; x++) - for (s=0; s < mtz->xtal[x]->nset; s++) - if (mtz->xtal[x]->set[s] == set) - return mtz->xtal[x]; - printf ("MtzSetXtal: no such dataset. \n"); - return NULL; -} - -int MtzNxtal(const MTZ *mtz) -{ - return mtz->nxtal; -} - -int MtzNumActiveXtal(const MTZ *mtz) -{ - int k,ixtal=0; - - for (k=0; k < mtz->nxtal; k++) - if (MtzNumActiveSetsInXtal(mtz,mtz->xtal[k])) ++ixtal; - return ixtal; -} - -MTZXTAL **MtzXtals(MTZ *mtz) -{ - return mtz->xtal; -} - -MTZXTAL *MtzIxtal(const MTZ *mtz, const int ixtal) -{ - return mtz->xtal[ixtal]; -} - -int MtzNsetsInXtal(const MTZXTAL *xtal) -{ - return xtal->nset; -} - -int MtzNumActiveSetsInXtal(const MTZ *mtz, const MTZXTAL *xtal) -{ - int k,iset=0; - - for (k=0; k < xtal->nset; k++) - if (MtzNumActiveColsInSet(xtal->set[k]) || - MtzNbatchesInSet(mtz, xtal->set[k])) ++iset; - return iset; -} - -MTZSET **MtzSetsInXtal(MTZXTAL *xtal) -{ - return xtal->set; -} - -MTZSET *MtzIsetInXtal(const MTZXTAL *xtal, const int iset) -{ - return xtal->set[iset]; -} - -int MtzNcolsInSet(const MTZSET *set) -{ - return set->ncol; -} - -int MtzNumActiveColsInSet(const MTZSET *set) -{ - int k,icol=0; - - for (k=0; k < set->ncol; k++) - icol += set->col[k]->active; - return icol; -} - -int MtzNumSourceColsInSet(const MTZSET *set) -{ - int k,icol=0; - - for (k=0; k < set->ncol; k++) - if (set->col[k]->source) ++icol; - return icol; -} - -int MtzNbatchesInSet(const MTZ *mtz, const MTZSET *set) -{ - int i,ibatch=0; - MTZBAT *batch; - - batch = mtz->batch; - - /* if new batch headers have been written, lose the old ones */ - if (MtzNbat(mtz) > mtz->n_orig_bat) - for (i=0; i < mtz->n_orig_bat; ++i) - batch = batch->next; - - while (batch) { - if (batch->nbsetid == set->setid) ++ibatch; - batch = batch->next; - } - - return ibatch; -} - -MTZCOL **MtzColsInSet(MTZSET *set) -{ - return set->col; -} - -MTZCOL *MtzIcolInSet(const MTZSET *set, const int icol) -{ - return set->col[icol]; -} - -char *MtzColType(MTZCOL *col) -{ - return col->type; -} - -int MtzNset(const MTZ *mtz) -{ - int x,iset=0; - for (x=0; x < mtz->nxtal; x++) - iset += MtzNsetsInXtal(mtz->xtal[x]); - return iset; -} - -int MtzNumActiveSet(const MTZ *mtz) -{ - int x,iset=0; - for (x=0; x < mtz->nxtal; x++) - iset += MtzNumActiveSetsInXtal(mtz,mtz->xtal[x]); - return iset; -} - -int MtzNcol(const MTZ *mtz) -{ - int x,s,icol=0; - for (x=0; x < mtz->nxtal; x++) - for (s=0; s < mtz->xtal[x]->nset; s++) - icol += MtzNcolsInSet(mtz->xtal[x]->set[s]); - return icol; -} - -int MtzNumActiveCol(const MTZ *mtz) -{ - int x,s,icol=0; - for (x=0; x < mtz->nxtal; x++) - for (s=0; s < mtz->xtal[x]->nset; s++) - icol += MtzNumActiveColsInSet(mtz->xtal[x]->set[s]); - return icol; -} - -int MtzNumSourceCol(const MTZ *mtz) -{ - int x,s,icol=0; - for (x=0; x < mtz->nxtal; x++) - for (s=0; s < mtz->xtal[x]->nset; s++) - icol += MtzNumSourceColsInSet(mtz->xtal[x]->set[s]); - return icol; -} - -int MtzNref(const MTZ *mtz) -{ - /* get the number of reflections in the mtz */ - - return mtz->nref; -} - -int MtzNbat(const MTZ *mtz) -{ - /* get the number of batches in the mtz */ - int cnt=0; - MTZBAT *batch; - - for (batch = mtz->batch ; batch != NULL ; batch = batch->next ) - ++cnt; - - return cnt; -} - -char *MtzXtalPath(const MTZXTAL *xtal) -{ - /* Return the full path name of a crystal */ - char *path; - size_t length; - - length = strlen(xtal->xname)+2; - path = (char *) ccp4_utils_malloc(length*sizeof(char)); - strcpy( path, "/" ); - strcat( path, xtal->xname ); - path[length-1] = '\0'; - return ( path ); -} - -char *MtzSetPath(const MTZ *mtz, const MTZSET *set) -{ - /* Return the full path name of a dataset */ - char *path, *path1; - size_t length; - - path1 = MtzXtalPath( MtzSetXtal( mtz, set ) ); - length = strlen(path1)+strlen(set->dname)+2; - path = ccp4_utils_malloc(length*sizeof(char)); - strcpy( path, path1 ); - free (path1); - strcat( path, "/" ); - strcat( path, set->dname ); - path[length-1] = '\0'; - return ( path ); -} - -char *MtzColPath(const MTZ *mtz, const MTZCOL *col) -{ - /* Return the full path name of a column */ - char *path, *path1; - size_t length; - - path1 = MtzSetPath( mtz, MtzColSet( mtz, col ) ); - length = strlen(path1)+strlen(col->label)+2; - path = (char *) ccp4_utils_malloc(length*sizeof(char)); - strcpy( path, path1 ); - free (path1); - strcat( path, "/" ); - strcat( path, col->label ); - path[length-1] = '\0'; - return ( path ); -} - -int MtzRJustPath(char *path, const char *partial, const int njust) -{ - /* Complete a right-justified path by prefixing with wildcards */ - int i, j; - /* count the slashes */ - for ( i = j = 0; i < strlen(partial); i++ ) if ( partial[i] == '/' ) j++; - - strcpy( path, ""); - if ( j++ < njust ) strcat( path, "/" ); - while ( j++ < njust ) strcat( path, "*/" ); - strcat( path, partial ); - - return 1; -} - -int MtzPathMatch(const char *path1, const char *path2) -{ - /* test for match between two paths, including wildcards */ - /* this version only handles wildcards at the end of name components */ - int p1 = 0, p2 = 0; - while ( path1[p1] != '\0' && path2[p2] != '\0' ) { /* search both paths */ - if ( path1[p1] != path2[p2] ) { - if ( path1[p1] != '*' && path2[p2] != '*' ) - return FALSE; /* non-wild mismatch is terminal */ - while ( path1[p1] != '/' && path1[p1] != '\0' ) p1++; /* skip compnt */ - while ( path2[p2] != '/' && path2[p2] != '\0' ) p2++; /* skip compnt */ - } else { - p1++; p2++; - } - } - return (path1[p1] == path2[p2]); /* true only if both paths ended */ -} - - -MTZCOL *MtzColLookup(const MTZ *mtz, const char *label) -{ - /* Returns a pointer to the column of mtz with the given `label`, or NULL */ - int x,s,c; - char *path1, path2[200]; - - /* complete the right-justified path */ - MtzRJustPath( path2, label, 3 ); - /* now find the matching column */ - for (x=0; x < mtz->nxtal; x++) /* not much point in optimising this */ - for (s=0; s < mtz->xtal[x]->nset; s++) - for (c=0; c < mtz->xtal[x]->set[s]->ncol; c++) { - path1 = MtzColPath(mtz, mtz->xtal[x]->set[s]->col[c]); - if ( MtzPathMatch( path1, path2 ) ) { - free (path1); - return mtz->xtal[x]->set[s]->col[c]; - } - free (path1); - } - return NULL; -} - -MTZSET *MtzSetLookup(const MTZ *mtz, const char *label) -{ - int x,s; - char *path1, path2[200]; - - /* complete the right-justified path */ - MtzRJustPath( path2, label, 2 ); - /* now find the matching column */ - for (x=0; x < mtz->nxtal; x++) - for (s=0; s < mtz->xtal[x]->nset; s++) { - path1 = MtzSetPath(mtz, mtz->xtal[x]->set[s]); - if ( MtzPathMatch( path1, path2 ) ) { - free (path1); - return mtz->xtal[x]->set[s]; - } - free (path1); - } - return NULL; -} - -MTZXTAL *MtzXtalLookup(const MTZ *mtz, const char *label) -{ - /* Returns a pointer to the crystal of mtz with the given `label`, or NULL */ - int x; - char *path1, path2[200]; - - /* complete the right-justified path */ - MtzRJustPath( path2, label, 1 ); - /* now find the matching column */ - for (x=0; x < mtz->nxtal; x++) { - path1 = MtzXtalPath(mtz->xtal[x]); - if ( MtzPathMatch( path1, path2 ) ) { - free (path1); - return mtz->xtal[x]; - } - free (path1); - } - return NULL; -} - diff --git a/ccp4c/ccp4/cmtzlib.h b/ccp4c/ccp4/cmtzlib.h deleted file mode 100644 index 6880d4b7..00000000 --- a/ccp4c/ccp4/cmtzlib.h +++ /dev/null @@ -1,1054 +0,0 @@ -/* - cmtzlib.h: header file for cmtzlib.c - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @page cmtz_page CMTZ library - * - * @verbatim - - - - @endverbatim - * - * @section cmtz_file_list File list - -
    -
  • cmtzlib.h - contains details of the C/C++ API -
  • mtzdata.h - contains details of the MTZ data structure -
- - * @section cmtz_overview Overview - -The CMTZ library is centred around a data structure, defined in -mtzdata.h Reading an MTZ file causes a data structure to be -created and populated from the MTZ header. There are a variety of functions -for manipulating the data structure, for example adding crystals, datasets -or columns. The data structure can be dumped to an output MTZ data file. -

-The library operates in two modes with respect to the reflection data. -If mtz->refs_in_memory = 1 (as set e.g. by the argument to -MtzGet), then all reflection data is read into memory from -the file, and can be manipulated in memory. Else if -mtz->refs_in_memory = 0 then explicit calls to ccp4_lrrefl, -ccp4_lrreff and ccp4_lwrefl are required to read -and write reflections from/to disk. -

-Information on the data structure is given in mtzdata.h - - * @section cmtz_princ_func Principal Functions - * @subsection cmtz_reading Reading MTZ files - -Start by looking at MtzGet and ccp4_lrrefl / ccp4_lrreff. - - * @subsection cmtz_writing Writing MTZ files - -If you have a structure in memory already, use MtzPut followed -by MtzFree to release the memory. -

-If you need to create a structure from scratch (i.e. without reading -from an input file) then use MtzMalloc, MtzOpenForWrite, -ccp4_lwsymm, MtzAddXtal, MtzAddDataset, -MtzAddColumn and ccp4_lwrefl. - - * @section cmtz_symmetry Symmetry Information - -All reflection data in an MTZ file is assumed to belong to the same -spacegroup. The spacegroup is identified in the MTZ file by SYMINF -and SYMM records in the file header. This information is copied -into the in-memory data structure. The list of symmetry operators -(copied from the SYMM header records) is taken to be the definitive -indicator of the spacegroup. -

-The functions ccp4_lrsymi, ccp4_lrsymm and -ccp4_lwsymm read from and write to the symmetry sections -of the data structure. No symmetry manipulations are done within -the CMTZ library itself. Within CCP4, the CSYM library provides -appropriate functions, but other symmetry libraries could be used. - - * @section cmtz_examples Examples - -See examples on ftp area - - */ - -/** @file cmtzlib.h - * - * @brief C-level library for input, output and manipulation of MTZ files. - * - * Functions defining the C-level API for accessing MTZ files. - * MtzGet and MtzPut read and write MTZ files to/from a data - * structure defined in mtzdata.h Other functions allow one - * to access data structure members, and to manipulate the structure - * and the values of structure members. Functions with names - * beginning ccp4_lr or ccp4_lw are primarily - * to support the Fortran API. - * - * @author Martyn Winn - */ - -#ifndef __CMTZLib__ -#define __CMTZLib__ - -/* rcsidhm[100] = "$Id$" */ - -/* defines CCP4::CCP4File */ -#include "ccp4_utils.h" - -#ifdef __cplusplus -namespace CMtz { -extern "C" { -typedef CCP4::CCP4File CCP4File; -#endif - -/* needs to be here for C++ to use CCP4File typedef */ -#include "mtzdata.h" - -/**** MTZ i/o ****/ - -/** Reads the contents of the MTZ file into an MTZ structure. - * @param logname (I) Logical name of MTZ file - * @param read_refs (I) Whether to read reflections into memory (non-zero) or - * to read later from file (zero) - * @return Pointer to MTZ struct - */ -MTZ *MtzGet(const char *logname, int read_refs); - -/** Reads the contents of the MTZ file into an MTZ structure. As for function - * MtzGet except for extra argument cell_tolerance. - * @param logname (I) Logical name of MTZ file - * @param read_refs (I) Whether to read reflections into memory (non-zero) or - * to read later from file (zero) - * @param cell_tolerance (I) User-defined tolerance for ccp4uc_cells_differ. - * Setting this to zero means that a new crystal is generated whenever - * dataset cell dimensions are different. MtzGet allows for a certain - * variation within a single crystal. - * @return Pointer to MTZ struct - */ -MTZ *MtzGetUserCellTolerance(const char *logname, int read_refs, const double cell_tolerance); - -/** Reads reflection data from MTZ file. - * @param filein pointer to input file - * @param ncol number of columns to read - * @param refldata array of reflection data - * @return istat from ccp4_file_read - */ -int MtzRrefl(CCP4File *filein, int ncol, float *refldata); - -/** Writes an MTZ data structure to disk. If file is already open, MtzPut - * uses file pointer in mtz struct, else uses logical name of file. - * @param mtz pointer to MTZ struct. - * @param logname logical name for output file or blank. - * @return 1 on success, 0 on failure - */ -int MtzPut(MTZ *mtz, const char *logname); - -/** Opens a new MTZ file for writing. The output file can be specified - * either with a true filename, or more likely as a logical name - * corresponding to an environment variable or a CCP4 command line - * argument such as HKLOUT. - * @param logname logical name or filename for output file. - * @return pointer to file or NULL on failure - */ -CCP4File *MtzOpenForWrite(const char *logname); - -/** Write header record to fileout. Record is filled from - * buffer and padded by blanks to a total length of MTZRECORDLENGTH. - * @param fileout Pointer to output file. - * @param nitems Number of characters in buffer. - * @param buffer Character buffer containing MTZ header line. - * @return Number of bytes written on success, EOF on failure. - */ -int MtzWhdrLine(CCP4File *fileout, int nitems, char buffer[]); - -/** Write ncol column entries to fileout from refldata. - * @param fileout pointer to output MTZ file. - * @param ncol number of reflection data items to write. - * @param refldata array of reflection data items. - * @return Number of items written. If this is less than ncol, then - * that indicates a write error. - */ -int MtzWrefl(CCP4File *fileout, int ncol, float *refldata); - -/** Delete a reflection from the data structure. Beware, there - * is no going back! - * @param mtz pointer to MTZ struct. - * @param iref index of reflection - * @return 0 if successful, 1 otherwise - */ -int MtzDeleteRefl(MTZ *mtz, int iref); - -/** Position input file at start of reflections. Useful if you need - * to read the reflections a second time. - * @param mtz pointer to MTZ struct. - */ -void MtzRewdInput(MTZ *mtz); - -/**** Memory allocation ****/ - -/** Allocates memory for an MTZ header structure. The structure can - * contain 0, 1 or more crystals, and for each crystal 0, 1 or more - * datasets. Crystals have a name based on the time "NULL_xnameHHMMSS" - * to ensure uniqueness (compared to crystals defined elsewhere - all - * new crystals created here will (probably) have the same name). - * Crystals have the project name "NULL_pname", and datasets have the - * name "NULL_dname". - * @param nxtal Number of crystals to allocate. - * @param nset Number of datasets for each crystal to allocate. - * @return pointer to MTZ header struct - */ -MTZ *MtzMalloc(int nxtal, int nset[]); - -/** Frees the memory reserved for the MTZ header struct. - * @param mtz pointer to MTZ header struct. - * @return 1 on success, 0 on failure - */ -int MtzFree(MTZ *mtz); - -/** Allocates memory for an MTZ column. Space is allocated for - * the reflection data if and only if mtz->refs_in_memory is set. - * @param mtz pointer to MTZ header struct. - * @param nref number of reflections in column. - * @return pointer to MTZ column. - */ -MTZCOL *MtzMallocCol(MTZ *mtz, int nref); - -/** Frees the memory reserved for 'col' - * @param col pointer to MTZ column. - * @return 1 on success, 0 on failure - */ -int MtzFreeCol(MTZCOL *col); - -/** Allocates memory for a single batch header. - * @return pointer to batch - */ -MTZBAT *MtzMallocBatch(void); - -/** Frees the memory reserved for 'batch'. - * @param batch - * @return 1 on success, 0 on failure - */ -int MtzFreeBatch(MTZBAT *batch); - -/** Allocates memory for the mtz history with 'nhist' lines. - * @param nhist - * @return pointer to history - */ -char *MtzCallocHist(int nhist); - -/** Frees the memory reserved for 'hist'. - * @param hist - * @return 1 on success, 0 on failure - */ -int MtzFreeHist(char *hist); - -/** Free all memory malloc'd from static pointers. - * To be called before program exit. The function can be - * registered with atexit. - * @return void - */ -void MtzMemTidy(void); - -/**** Header operations ****/ - -/** Get the number of batches in the mtz. - * @param mtz pointer to MTZ struct - * @return Number of batches. - */ -int MtzNbat(const MTZ *mtz); - -/** Get the number of reflections in the mtz. - * @param mtz pointer to MTZ struct - * @return Number of reflections. - */ -int MtzNref(const MTZ *mtz); - -/** Get the spacegroup number (likely CCP4 convention). - * @param mtz pointer to MTZ struct - * @return Spacegroup number. - */ -int MtzSpacegroupNumber(const MTZ *mtz); - -/** Return the overall resolution limits of the MTZ structure. - * These are the widest limits over all crystals present. - * @param mtz pointer to MTZ struct - * @param minres minimum resolution - * @param maxres maximum resolution - * @return 1 on success, 0 on failure - */ -int MtzResLimits(const MTZ *mtz, float *minres, float *maxres); - -/**** Crystal operations ****/ - -/** Get the total number of crystals in the MTZ structure - * @param mtz pointer to MTZ struct - * @return number of active crystals - */ -int MtzNxtal(const MTZ *mtz); - -/** Get the number of active crystals in the MTZ structure - * @param mtz pointer to MTZ struct - * @return number of active crystals - */ -int MtzNumActiveXtal(const MTZ *mtz); - -/** Return array of pointers to crystals. - * @param mtz pointer to MTZ struct - * @return array of pointers to crystals - */ -MTZXTAL **MtzXtals(MTZ *mtz); - -/** Return pointer to the ixtal'th crystal. - * @param mtz pointer to MTZ struct - * @param ixtal number of the particular crystal (ixtal = 0 ... MtzNxtal(xtal) -1 - * @return pointer to the specified crystal - */ -MTZXTAL *MtzIxtal(const MTZ *mtz, const int ixtal); - -/** Return the full path name of a crystal as "/xname" - * Memory for the path name is assigned with malloc, and can - * be free'd by the calling function. - * @param xtal pointer to the crystal struct - * @return pointer to string containing path name - */ -char *MtzXtalPath(const MTZXTAL *xtal); - -/** Returns a pointer to the crystal of mtz with the given `label`, or NULL. - * @param mtz pointer to MTZ struct - * @param label - * @return pointer to crystal - */ -MTZXTAL *MtzXtalLookup(const MTZ *mtz, const char *label); - -/** Add a crystal to header mtz. - * @param mtz pointer to MTZ struct - * @param xname Crystal name. - * @param pname Name of associated project. - * @param cell Cell dimensions of crystal. - * @return Pointer to crystal. - */ -MTZXTAL *MtzAddXtal(MTZ *mtz, const char *xname, const char *pname, - const float cell[6]); - -/** For a given crystal, return number of datasets in that crystal. - * @param xtal pointer to the crystal struct - * @return number of datasets - */ -int MtzNsetsInXtal(const MTZXTAL *xtal); - -/** For a given crystal, return number of active datasets in that crystal. - * @param xtal pointer to the crystal struct - * @return number of datasets - */ -int MtzNumActiveSetsInXtal(const MTZ *mtz, const MTZXTAL *xtal); - -/** For a given crystal, return array of pointers to datasets - * in that crystal. - * @param xtal pointer to the crystal struct - * @return array of pointers to datasets - */ -MTZSET **MtzSetsInXtal(MTZXTAL *xtal); - -/** For a given crystal, return pointer to the iset'th dataset - * in that crystal. - * @param xtal pointer to the crystal struct - * @param iset number of the particular dataset (iset = 0 ... MtzNsetsInXtal(xtal) -1 - * @return pointer to specified dataset - */ -MTZSET *MtzIsetInXtal(const MTZXTAL *xtal, const int iset); - -/**** Dataset operations ****/ - -/** Get the number of datasets in the MTZ structure - * @param mtz pointer to MTZ struct - * @return total number of datasets - */ -int MtzNset(const MTZ *mtz); - -/** Get the number of active datasets in the MTZ structure - * @param mtz pointer to MTZ struct - * @return total number of datasets - */ -int MtzNumActiveSet(const MTZ *mtz); - -/** Get the crystal associated with a dataset - * The pointer to MTZ is required to do reverse lookup of xname. - * @param mtz pointer to MTZ struct - * @param set pointer to dataset - * @return pointer to parent crystal, or NULL if "set" is - * not present in "mtz". - */ -MTZXTAL *MtzSetXtal(const MTZ *mtz, const MTZSET *set); - -/** Return the full path name of a dataset as "/xname/dname" - * The pointer to MTZ is required to do reverse lookup of xname. - * Memory for the path name is assigned with malloc, and can - * be free'd by the calling function. - * @param mtz pointer to MTZ struct - * @param set pointer to dataset - * @return pointer to string containing path name - */ -char *MtzSetPath(const MTZ *mtz, const MTZSET *set); - -/** Returns a pointer to the dataset of MTZ with the given label. - * @param mtz pointer to MTZ struct. - * @param label Label of desired set. This could be or - * /. - * @return pointer to set or NULL if not found - */ -MTZSET *MtzSetLookup(const MTZ *mtz, const char *label); - -/** Add a dataset to crystal xtl - * @param mtz pointer to MTZ struct. - * @param xtl pointer to crystal struct. - * @param dname Dataset name - * @param wavelength X-ray wavelength of dataset - * @return pointer to set - */ -MTZSET *MtzAddDataset(MTZ *mtz, MTZXTAL *xtl, const char *dname, - const float wavelength); - -/** For a given dataset, return number of columns in that dataset. - * This is simply set->ncol and so includes all columns irrespective - * of col->active - * @param set pointer to dataset - * @return number of columns - */ -int MtzNcolsInSet(const MTZSET *set); - -/** For a given dataset, return number of active columns in that dataset. - * @param set pointer to dataset - * @return number of active columns - */ -int MtzNumActiveColsInSet(const MTZSET *set); - -/** For a given dataset, return number of columns in that dataset - * which have a source in an input file (i.e. non-zero source attribute). - * @param set pointer to dataset - * @return number of source columns - */ -int MtzNumSourceColsInSet(const MTZSET *set); - -/** For a given dataset, return number of batches in that dataset. - * @param mtz pointer to MTZ struct - * @param set pointer to dataset - * @return number of batches - */ -int MtzNbatchesInSet(const MTZ *mtz, const MTZSET *set); - -/** For a given dataset, return array of pointers to columns - * in that dataset. - * @param set pointer to dataset - * @return array of pointers to columns - */ -MTZCOL **MtzColsInSet(MTZSET *set); - -/** For a given dataset, return pointer to the icol'th column - * in that dataset. - * @param set pointer to dataset - * @param icol number of - * the particular column (icol = 0 ... MtzNcolsInSet(set) -1 - * @return pointer to specified column - */ -MTZCOL *MtzIcolInSet(const MTZSET *set, const int icol); - -/**** Column operations ****/ - -/** Add a column to dataset set and create + fill with NAN - * @param mtz pointer to MTZ struct - * @param set pointer to dataset - * @param label Column label - * @param type Column type - * @return pointer to column - */ -MTZCOL *MtzAddColumn(MTZ *mtz, MTZSET *set, const char *label, - const char *type); - -/** Assigns HKL columns to the base dataset. - * @param mtz pointer to MTZ struct - * @return 1 on success, 0 on failure - */ -int MtzAssignHKLtoBase(MTZ *mtz); - -/** Assigns a column to a dataset identified by crystal_name and - * dataset_name. First, the function checks whether the - * column already belongs to this dataset, in which case it does nothing. - * Then it checks if the requested dataset exists. If not, it is created, - * though it is better to explicitly create it beforehand. Finally, the column - * is assigned to the dataset. - * @param mtz pointer to MTZ struct - * @param col pointer to column - * @param crystal_name name of crystal containing dataset - * @param dataset_name name of dataset - * @return 1 on success, 0 on failure - */ -int MtzAssignColumn(MTZ *mtz, MTZCOL *col, const char crystal_name[], - const char dataset_name[]); - -/** Toggle active flag of column. A value of 0 means inactive and will - * not be written out, whereas a value of 1 means active and will - * be written out. - * @param col pointer to column - * @return New value of col->active. - */ -int MtzToggleColumn(MTZCOL *col); - -/** Get the dataset associated with a column. - * @param mtz pointer to MTZ struct - * @param col pointer to column of interest - * @return pointer to set containing column of interest, or NULL - * if "col" is not contained in "mtz". - */ -MTZSET *MtzColSet(const MTZ *mtz, const MTZCOL *col); - -/** Get the number of columns in the MTZ data structure. - * @param mtz pointer to MTZ struct - * @return number of columns - */ -int MtzNcol(const MTZ *mtz); - -/** Get the number of active columns in the MTZ data structure. - * @param mtz pointer to MTZ struct - * @return number of columns - */ -int MtzNumActiveCol(const MTZ *mtz); - -/** Get the number of columns in the MTZ data structure which have - * a source in an input file (i.e. non-zero source attribute). - * @param mtz pointer to MTZ struct - * @return number of columns - */ -int MtzNumSourceCol(const MTZ *mtz); - -/** Return the full path name of a column as "/xname/dname/label" - * Memory for the path name is assigned with malloc, and can - * be free'd by the calling function. - * @param mtz pointer to MTZ struct - * @param col pointer to MTZ column. - * @return full path name of column - */ -char *MtzColPath(const MTZ *mtz, const MTZCOL *col); - -/** Complete a right-justified path by prefixing with wildcards - * @param path Completed path. - * @param partial Partial right-justified path - * @param njust - * @return 1 on success, 0 on failure. - */ -int MtzRJustPath(char *path, const char *partial, const int njust); - -/** Test for match between two paths, including wildcards - * @param path1 First path - * @param path2 Second path - * @return 1 if paths match, else 0. - */ -int MtzPathMatch(const char *path1, const char *path2); - -/** Returns a pointer to the column of mtz with the given `label`, or NULL - * @param mtz pointer to MTZ struct - * @param label Column label. - * @return pointer to column - */ -MTZCOL *MtzColLookup(const MTZ *mtz, const char *label); - -/** Get the MTZ column type of a particular column. - * @param col pointer to MTZ column. - * @return column type - */ -char *MtzColType(MTZCOL *col); - -/** Print summary of current crystal/dataset/column hierarchy. This - * is designed for debugging purposes rather than for the user. - * @param mtz pointer to MTZ struct - * @return void - */ -void MtzDebugHierarchy(const MTZ *mtz); - -/** List of column information: label, type, dataset. - * @param mtz pointer to MTZ struct - * @param clabs List of labels (output). - * @param ctyps List of column types (output). - * @param csetid List of dataset IDs (output). - * @return number of columns in current structure. - */ -int MtzListColumn(const MTZ *mtz, char clabs[][31], char ctyps[][3], int csetid[]); - -/** List of column information from input file: label, type, dataset. - * @param mtz pointer to MTZ struct - * @param clabs List of labels (output). - * @param ctyps List of column types (output). - * @param csetid List of dataset IDs (output). - * @return number of columns in input file. - */ -int MtzListInputColumn(const MTZ *mtz, char clabs[][31], char ctyps[][3], int csetid[]); - -/**** helper functions ****/ - -/** Find where indices h, k, l are in MTZ structure. Usually, they - * will be first 3 columns of 1st dataset, but safest not to assume this. - * @param mtz pointer to MTZ struct - * @param ind_xtal crystal containing indices - * @param ind_set dataset containing indices - * @param ind_col 3 columns containing indices - * @return 1 on success, 0 on failure - */ -int MtzFindInd(const MTZ *mtz, int *ind_xtal, int *ind_set, int ind_col[3]); - -/** Calculate resolution from indices and coefhkl. - * coefhkl is obtained from MtzHklcoeffs. - * @param in integer array of 3 indices - * @param coefhkl double array of 6 coefficients - * @return resolution - */ -float MtzInd2reso(const int in[3], const double coefhkl[6]); - -/** Generate coefhkl coefficients from given cell parameters. - * @param cell cell dimensions to be used for resolution calculation. - * @param coefhkl double array of 6 coefficients - * @return 1 on success, 0 on failure - */ -int MtzHklcoeffs(const float cell[6], double coefhkl[6]); - -/** Reads batch arrays into data structure. - * @param intbuf pointer to integer batch array - * @param fltbuf pointer to float batch array - * @param batch pointer to batch structure - * @return 1 on success, 0 on failure - */ -int MtzArrayToBatch(const int *intbuf, const float *fltbuf, MTZBAT *batch); - -/** Writes data structure to batch arrays. - * @param batch pointer to batch structure - * @param intbuf pointer to integer batch array - * @param fltbuf pointer to float batch array - * @return 1 on success, 0 on failure - */ -int MtzBatchToArray(MTZBAT *batch, int *intbuf, float *fltbuf); - -/** Sort a linked list of batches on batch number. The function - * first checks whether batches are already in order, as they - * will usually be. - * @param batch pointer to beginning of batch list - * @param numbat number of batches to be sorted - * @return Sorted list if batches sorted, original list if batches - * already in order - */ -MTZBAT *sort_batches(MTZBAT *batch, int numbat); - -/**** pseudo-mtzlib routines ****/ - -/** Returns title of MTZ structure 'mtz' - * @param mtz pointer to MTZ struct - * @param title MTZ title as character string - * @return length of title excluding trailing blanks and terminating null - * character. - */ -int ccp4_lrtitl(const MTZ *mtz, char *title); - -/** Get history lines from MTZ structure. - * @param mtz Pointer to MTZ struct. - * @param history Returned history lines. - * @param nlines Requested number of history lines. - * @return Actual number of history lines returned. - */ -int ccp4_lrhist(const MTZ *mtz, char history[][MTZRECORDLENGTH], int nlines); - -/** Get sort order from MTZ structure. - * @param mtz Pointer to MTZ struct. - * @param isort Returned sort order. - * @return 1 on success, 0 on failure - */ -int ccp4_lrsort(const MTZ *mtz, int isort[5]); - -/** Get batch numbers from MTZ structure. - * @param mtz Pointer to MTZ struct. - * @param nbatx Number of batches in input file. - * @param batchx Returned array of batch numbers. - * @return Number of batches. - */ -int ccp4_lrbats(const MTZ *mtz, int *nbatx, int batchx[]); - -/** Get cell dimensions for a particular crystal. - * @param xtl Pointer to crystal. - * @param cell Output cell dimensions. - * @return 1 on success, 0 on failure. - */ -int ccp4_lrcell(const MTZXTAL *xtl, float cell[]); - -/** Get spacegroup information as held in MTZ header. - * @param mtz Pointer to MTZ struct. - * @param nsympx Number of primitive symmetry operators. - * @param ltypex Lattice type (P,A,B,C,I,F,R). - * @param nspgrx Spacegroup number. - * @param spgrnx Spacegroup name. - * @param pgnamx Pointgroup name. - * @return Spacegroup number. - */ -int ccp4_lrsymi(const MTZ *mtz, int *nsympx, char *ltypex, int *nspgrx, - char *spgrnx, char *pgnamx); - -/** Get spacegroup information as held in MTZ header. Extended version of - * ccp4_lrsymi to return confidence flag as well. - * @param mtz Pointer to MTZ struct. - * @param nsympx Number of primitive symmetry operators. - * @param ltypex Lattice type (P,A,B,C,I,F,R). - * @param nspgrx Spacegroup number. - * @param spgrnx Spacegroup name. - * @param pgnamx Pointgroup name. - * @param spgconf One-character flag indicating confidence in nominal spacegroup. - * @return Spacegroup number. - */ -int ccp4_lrsymi_c(const MTZ *mtz, int *nsympx, char *ltypex, int *nspgrx, - char *spgrnx, char *pgnamx, char *spgconf); - -/** Get symmetry matrices from MTZ structure. Note: ordering of matrices - * in rsymx was changed in April 2004. - * @param mtz Pointer to MTZ struct. - * @param nsymx Number of symmetry operators held in MTZ header. - * @param rsymx Symmetry operators as 4 x 4 matrices, in the order they - * are held in the MTZ header. Each matrix has translations in - * elements [*][3]. - * @return Number of symmetry operators. - */ -int ccp4_lrsymm(const MTZ *mtz, int *nsymx, float rsymx[192][4][4]); - -/** Uses LABIN or LABOUT line to convert program labels to user labels. - * This is a helper function, but does not access reflection structure at all. - * @param labin_line (I) LABIN/LABOUT line from Parser. - * @param prog_labels (I) Progam labels. - * @param nlprgi (I) Number of program labels. - * @param user_labels (O) On output, user-supplied file labels in corresponding - * positions. For unassigned program labels, user_labels is empty string. - * @return Number of program labels matched, or -1 if there was an error. - */ -int MtzParseLabin(char *labin_line, const char prog_labels[][31], - const int nlprgi, char user_labels[][2][31]); - -/** Finds columns in an MTZ struct according to column labels. Column types - * are checked for agreement between requested type (in argument 'types') - * and file type. If requested type is blank, file type is returned in - * argument 'types'. Note, this function is different from Fortranic LRASSN, - * in that any conversion from program labels to user labels should have been done - * previously. - * @param mtz Pointer to MTZ struct. - * @param labels Input array of column labels to be found in MTZ struct. - * @param nlabels Number of columns to be found. - * @param types Input array of column types of columns to be found. - * @return Array of pointers to columns in MTZ struct. Array element is - * NULL if column not found. - */ -MTZCOL **ccp4_lrassn(const MTZ *mtz, const char labels[][31], const int nlabels, - char types[][3]); - -/** Report information on a particular dataset. This represents the - * collection of data held in one series of dataset records in the MTZ header. - * It is mainly useful for supporting old Fortran calls. - * @param mtz pointer to MTZ struct - * @param set pointer to dataset - * @param crystal_name Crystal name - * @param dataset_name Dataset name - * @param project_name Project name - * @param isets Dataset ID. - * @param datcell Cell dimensions of crystal that dataset belongs to. - * @param datwave X-ray wavelength associated with dataset. - * @return 1 on success, 0 on failure - */ -int ccp4_lridx(const MTZ *mtz, const MTZSET *set, char crystal_name[64], - char dataset_name[64], char project_name[64], int *isets, - float datcell[6], float *datwave); - -/** Returns iref'th reflection from file held in MTZ struct mtz. Returns - * data for all columns held in input file, in the order that they are - * held in the source file. The value of col->source can be used to find - * particular columns. - * In "in-memory" mode, reflection data is taken from arrays held in - * memory. In the traditional file-based mode, a reflection record is - * read from the input file. - * @param mtz pointer to MTZ struct - * @param resol resolution of reflection (output). - * @param adata array of requested values (output). - * @param logmss array of flags for missing data (output). A value of 1 indicates - * a Missing Number Flag, and a value of 0 indicates usable data. - * @param iref index of requested reflection (starting at 1). - * @return 1 if past last reflection, else 0 - */ -int ccp4_lrrefl(const MTZ *mtz, float *resol, float adata[], int logmss[], int iref); - -/** Returns iref'th reflection from file held in MTZ struct mtz. Returns - * data for certain columns held in input file, as specified by the - * column pointers held in lookup. - * In "in-memory" mode, reflection data is taken from arrays held in - * memory. In the traditional file-based mode, a reflection record is - * read from the input file. - * @param mtz pointer to MTZ struct - * @param resol resolution of reflection (output). - * @param adata array of requested values (output). - * @param logmss array of flags for missing data (output). A value of 1 indicates - * a Missing Number Flag, and a value of 0 indicates usable data. - * @param lookup array of pointers to requested columns - * @param ncols number of requested columns - * @param iref index of requested reflection (starting at 1). - * @return 1 if past last reflection, else 0 - */ -int ccp4_lrreff(const MTZ *mtz, float *resol, float adata[], int logmss[], - const MTZCOL *lookup[], const int ncols, const int iref); - -/** Checks whether a particular reflection value represents missing data. - * @param mtz Pointer to the MTZ struct, which holds the value representing - * missing data (the Missing Number Flag) against which the input datum - * is compared. - * @param datum Reflection value to be checked. - * @return Returns 1 is datum is the MNF, and 0 otherwise. - */ -int ccp4_ismnf(const MTZ *mtz, const float datum); - -/** Function to print header information in traditional format. - * @param mtz Pointer to MTZ struct - * @param iprint Print level - * @return 1 on success, 0 on failure - */ -int ccp4_lhprt(const MTZ *mtz, int iprint); - -/** Function to print header information in format appropriate - * to data structure hierarchy. - * @param mtz Pointer to MTZ struct - * @param iprint Print level - * @return 1 on success, 0 on failure - */ -int ccp4_lhprt_adv(const MTZ *mtz, int iprint); - -/** Function to return batch header data for a specified batch. - * @param batch Pointer to requested batch. - * @param buf On return, real and integer batch data. - * @param charbuf On return, character batch data (title and axes names). - * @param iprint =0 no printing, =1 print title only, >1 print full header. - * @return 1 on success, 0 on failure - */ -int ccp4_lrbat(MTZBAT *batch, float *buf, char *charbuf, int iprint); - -/** Function to print batch header data for a specified batch to stdout. - * @param batch Pointer to requested batch. - * @return 1 on success, 0 on failure - */ -int MtzPrintBatchHeader(const MTZBAT *batch); - -/** Write header title for later output to file. - * @param mtz Pointer to MTZ struct. - * @param ftitle Title string. - * @param flag If 0 overwrite existing title, else append to - * existing title. - * @return 1 on success, 0 on failure - */ -int ccp4_lwtitl(MTZ *mtz, const char *ftitle, int flag); - -/** Sets the sort order in the MTZ header. The sort order is - * a list of columns to be used for sorting, to be applied in - * the order they appear in the list, i.e. sort first on - * colsort[0], then on colsort[1], etc. If there are less than - * 5 columns to be used for sorting, some of colsort[] may be NULL. - * @param mtz Pointer to MTZ struct - * @param colsort Array of pointers to columns. - * @return 1 on success, 0 on failure - */ -int MtzSetSortOrder(MTZ *mtz, MTZCOL *colsort[5]); - -/** Adds history lines to the MTZ header in front of existing history lines. - * @param mtz pointer to MTZ struct - * @param history lines to be added - * @param nlines number of lines to be added - * @return total number of history lines - */ -int MtzAddHistory(MTZ *mtz, const char history[][MTZRECORDLENGTH], const int nlines); - -/** Write or update symmetry information for MTZ header. This provides support - * for the Fortran API, and is not particularly convenient for C programs. - * Note: ordering of matrices in rsymx was changed in November 2003. - * @param mtz Pointer to MTZ struct - * @param nsymx Number of symmetry operators. If zero, symmetry operations - * are not updated. - * @param nsympx Number of primitive symmetry operators. - * @param rsymx Array of symmetry operators (dimensions ordered in C convention, - * with translations in elements [*][3]) - * @param ltypex Lattice type. If blank, not updated. - * @param nspgrx Spacegroup number. If zero, not updated. - * @param spgrnx Spacegroup name. If blank, not updated. - * @param pgnamx Point group name. If blank, not updated. - * @return 1 on success, 0 on failure - */ -int ccp4_lwsymm(MTZ *mtz, int nsymx, int nsympx, float rsymx[192][4][4], - char ltypex[], int nspgrx, char spgrnx[], char pgnamx[]); - -/** Write or update symmetry information for MTZ header. This provides support - * for the Fortran API, and is not particularly convenient for C programs. Extended - * version of ccp4_lwsymm to set confidence flag as well. - * Note: ordering of matrices in rsymx was changed in November 2003. - * @param mtz Pointer to MTZ struct - * @param nsymx Number of symmetry operators. If zero, symmetry operations - * are not updated. - * @param nsympx Number of primitive symmetry operators. - * @param rsymx Array of symmetry operators (dimensions ordered in C convention, - * with translations in elements [*][3]) - * @param ltypex Lattice type. If blank, not updated. - * @param nspgrx Spacegroup number. If zero, not updated. - * @param spgrnx Spacegroup name. If blank, not updated. - * @param pgnamx Point group name. If blank, not updated. - * @param spgconf One-character flag indicating confidence in nominal spacegroup. - * @return 1 on success, 0 on failure - */ -int ccp4_lwsymm_c(MTZ *mtz, int nsymx, int nsympx, float rsymx[192][4][4], - char ltypex[], int nspgrx, char spgrnx[], char pgnamx[], - char spgconf[]); - -/** Write or update symmetry confidence information for MTZ header. - * @param mtz Pointer to MTZ struct - * @param spgconf One-character flag indicating confidence in nominal spacegroup. - * @return 1 on success, 0 on failure - */ -int ccp4_lwsymconf(MTZ *mtz, char spgconf[]); - -/* Assign columns for writing. Check to see if columns already exist, - * else create them. New columns are assigned to the base dataset if it - * exists, else the first dataset. - * @param mtz pointer to MTZ struct - * @param labels Input array of column labels to be assigned. - * @param nlabels Number of columns. - * @param types Input array of column types of columns. - * @param iappnd If iappnd = 0, then deactivate columns which are - * not selected (allows one to write out a subset of columns). Else - * if iappnd = 1, append these columns to existing ones. - * @return Array of pointers to columns in MTZ struct. - */ -MTZCOL **ccp4_lwassn(MTZ *mtz, const char labels[][31], const int nlabels, - const char types[][3], const int iappnd); - -/* Add or update a dataset in the MTZ structure. If the crystal name is - * not recognised, then a new crystal is created containing a single - * dataset. If the crystal name is recognised, then the parameters of - * the crystal are updated. The child dataset is then created if necessary - * or an existing dataset updated. - * Note that this function is used to update crystal parameters, as well - * as add crystals. If a duplicate crystal name is used by mistake, then - * the old crystal parameters are lost. - * @param mtz pointer to MTZ struct - * @param crystal_name Crystal name - * @param dataset_name Dataset name - * @param project_name Project name - * @param datcell Cell dimensions of crystal that dataset belongs to. - * @param datwave X-ray wavelength associated with dataset. - * @return 1 on success, 0 on failure - */ -int ccp4_lwidx(MTZ *mtz, const char crystal_name[], const char dataset_name[], - const char project_name[], const float datcell[6], const float *datwave); - - -/** Function to output reflection values for iref'th reflection. - * The reflection values are provided in an array "adata". The value - * in adata[i] will be assigned to the MTZ column pointed to by lookup[i]. - * Typically, lookup[i] is a pointer returned from an earlier call to - * MtzAddColumn(). - * In "in-memory" mode, values are added/updated to column data held - * in memory. In the traditional file-based mode, a reflection record is - * written to file. - * This function will also update the column ranges and the crystal/file - * resolution limits. - * @param mtz pointer to MTZ struct - * @param adata array of reflection column values. - * @param lookup array of pointers to columns. - * @param ncol number of columns. - * @param iref Reflection number such that 1st reflection is iref=1. - * @return 1 on success, 0 on failure - */ -int ccp4_lwrefl(MTZ *mtz, const float adata[], MTZCOL *lookup[], - const int ncol, const int iref); - -/** Write new batch information to 'batch' or if 'batch' is NULL create - * new batch header with batch number 'batno'. If you try to create more - * than one new batch header with the same batch number, the function will - * complain and return. It is OK to create a new batch with the same - * number as one read from file - this is the mechanism for changing - * batch headers. - * @param mtz pointer to MTZ struct - * @param batch pointer to batch - * @param batno batch number - * @param buf pointer to batch array - * @param charbuf pointer to character batch array - * @return 1 on success, 0 on failure - */ -int ccp4_lwbat(MTZ *mtz, MTZBAT *batch, const int batno, const float *buf, const char *charbuf); - -int ccp4_lwbsetid(MTZ *mtz, MTZBAT *batch, const char xname[], const char dname[]); - -/* -- Below here there are no implementations -- */ - -/* COMPLEX HLToSF(float hla, float hlb, float hlc, float hld, BOOLEAN centric); */ -/* Returns the mean structure factor as a complex number from a structure - factor probability distribution described by Hendrickson/Lattman - coefficients. If `centric == TRUE`, the coefficients describe a centric - distribution. */ - -/* MTZ *MtzSort(MTZ *mtz, char *ident); */ -/* Sorts `mtz` using the identifiers (separated by spaces) in `ident` as - keys. Sorting can be done on up to 200 columns. A pointer to `*mtz` is - returned. */ - -/* MTZ *HLCombine (MTZ *to, float toscale, MTZ *frm, float frmscale); */ -/* Combines extra phase information for common reflections between 'frm' - and 'to' into the phase information of 'to'. The phase probabilities - are described by Hendrickson Lattman coefficients, with the identifiers - "HLA", "HLB", HLC", and "HLD", the indices are identified by "H", "K" - and "L". HL-coeffs from 'to' are scaled by 'toscale', the coeffs from - 'frm' are scaled by 'frmscale'. A pointer to `to` is returned. */ - -/* void MtzPhiFom(MTZ *mtz); */ -/* Calculates the best phase and the figure of from Hendrickson Lattman - coefficients. The following columns should be present in `mtz`: - "H", "K" & "L" (indices); "PHIB" & "FOM" (best phase (degrees) and figure of - merit); "HLA", "HLB", "HLC" & "HLD" (Hendrickson Lattman coefficients). */ - -/* MTZ *MtzCopy(MTZ *frm); */ -/* Produces an exact copy of `frm` and returns a pointer to it. */ - -/* MTZ *MtzColAppend(MTZ *mtz, char *ident, char type); */ -/* Appends a column to `*mtz` with identity `ident` and type `type`, provided - no column with identity `ident` exists. */ - -/* MTZ *MtzColRemove(MTZ *mtz, char *ident); */ -/* Removes a column from `*mtz` with identity `ident`. */ - -/* MTZ *MtzUpdateRanges(MTZ *mtz); */ -/* Updates ranges of all columns in `mtz` and returns `mtz`. */ - -/* MTZCOL *MtzColNewRange(MTZCOL *col, int nref); */ -/* Updates the minimum & maximum values in `col` and returns `col`. */ - -/* int *MtzUnique(MTZ *mtz, char *ident); */ -/* Returns an array (k) of indices: k[j] returns the first occurrence of a set - of idents, eg. MtzUnique(mtz, "H K L") returns an array from which all the - unique reflections can be determined by indexing with k: k[i] is the index - of the last relection of a set which all have the same hkl indices. It is - assumed that `mtz` is sorted, using `ident` as keys. */ - -/* float PhaseProb(float phase, float hla, float hlb, float hlc, float hld, - BOOLEAN centric); */ -/* Returns the probability of `phase` (expressed in radians) as determined by - the Hendrickson-Lattman coefficients `hla`, `hlb`, `hlc` and `hld`. If - `centric == TRUE`, the coefficients describe a centric distribution. */ - -#ifdef __cplusplus -} } -#endif -#endif diff --git a/ccp4c/ccp4/csymlib.c b/ccp4c/ccp4/csymlib.c deleted file mode 100644 index 76bc70bc..00000000 --- a/ccp4c/ccp4/csymlib.c +++ /dev/null @@ -1,2086 +0,0 @@ -/* - csymlib.c: C-level library for symmetry information. - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/* DO NOT put Doxygen comments here - put in csymlib.h */ -/* See csymlib.h for descriptions of functions */ - -#include -#include -#include -#include -#include "ccp4_parser.h" -#include "ccp4_types.h" -#include "ccp4_utils.h" -#include "csymlib.h" -#include "cvecmat.h" -#include "ccp4_errno.h" -#include "ccp4_unitcell.h" -#include "ccp4_general.h" -/* rcsid[] = "$Id$" */ - -/* stuff for error reporting */ -#define CSYM_ERRNO(n) (CCP4_ERR_SYM | (n)) - -/* error defs */ -#define CSYMERR_Ok 0 -#define CSYMERR_ParserFail 1 -#define CSYMERR_NoSyminfoFile 2 -#define CSYMERR_NullSpacegroup 3 -#define CSYMERR_NoAsuDefined 4 -#define CSYMERR_NoLaueCodeDefined 5 -#define CSYMERR_SyminfoTokensMissing 6 - -/* copy of constants from fortran/csymlib_f.c */ -#define MAXSYMOPS 20 -#define MAXLENSYMOPSTR 80 - -CCP4SPG *ccp4spg_load_by_standard_num(const int numspg) -{ - return ccp4spg_load_spacegroup(numspg, 0, NULL, NULL, 0, NULL); -} - -CCP4SPG *ccp4spg_load_by_ccp4_num(const int ccp4numspg) -{ - return ccp4spg_load_spacegroup(0, ccp4numspg, NULL, NULL, 0, NULL); -} - -CCP4SPG *ccp4spg_load_by_spgname(const char *spgname) -{ - return ccp4spg_load_spacegroup(0, 0, spgname, NULL, 0, NULL); -} - -CCP4SPG *ccp4spg_load_by_ccp4_spgname(const char *ccp4spgname) -{ - return ccp4spg_load_spacegroup(0, 0, NULL, ccp4spgname, 0, NULL); -} - -CCP4SPG *ccp4_spgrp_reverse_lookup(const int nsym1, const ccp4_symop *op1) -{ - return ccp4spg_load_spacegroup(0, 0, NULL, NULL, nsym1, op1); -} - -CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg, - const char *spgname, const char *ccp4spgname, - const int nsym1, const ccp4_symop *op1) - -{ CCP4SPG *spacegroup; - int i,j,k,l,debug=0,nsym2,symops_provided=0,ierr,ilaue; - float sg_chb[4][4],limits[2],rot1[4][4],rot2[4][4],det; - FILE *filein; - char *symopfile, *ccp4dir, filerec[80]; - ccp4_symop *op2,*op3,opinv; - - /* spacegroup variables */ - int sg_num, sg_ccp4_num, sg_nsymp, sg_num_cent; - float cent_ops[4][4]; - char sg_symbol_old[20],sg_symbol_Hall[40],sg_symbol_xHM[20], - sg_point_group[20],sg_patt_group[40]; - char sg_basisop[80],sg_symop[192][80],sg_cenop[4][80]; - char sg_asu_descr[80], map_asu_x[12], map_asu_y[12], map_asu_z[12]; - char map_asu_ccp4_x[12], map_asu_ccp4_y[12], map_asu_ccp4_z[12]; - - /* For cparser */ - CCP4PARSERARRAY *parser; - CCP4PARSERTOKEN *token=NULL; - char *key; - int iprint=0; - - /* initialisations */ - sg_nsymp=0; - sg_num_cent=0; - - if (nsym1) symops_provided=1; - - spacegroup = (CCP4SPG *) ccp4_utils_malloc(sizeof(CCP4SPG)); - - if (debug) { - printf(" Entering ccp4spg_load_spacegroup, with arguments %d %d %d \n", - numspg,ccp4numspg,nsym1); - if (spgname) printf(" spgname = %s \n",spgname); - if (ccp4spgname) printf(" ccp4spgname = %s \n",ccp4spgname); - for (i = 0; i < nsym1; ++i) { - printf(" %f %f %f \n",op1[i].rot[0][0],op1[i].rot[0][1],op1[i].rot[0][2]); - printf(" %f %f %f \n",op1[i].rot[1][0],op1[i].rot[1][1],op1[i].rot[1][2]); - printf(" %f %f %f \n",op1[i].rot[2][0],op1[i].rot[2][1],op1[i].rot[2][2]); - printf(" %f %f %f \n\n",op1[i].trn[0],op1[i].trn[1],op1[i].trn[2]); - } - } - - /* if we are searching with symops, make sure translations are modulo 1 */ - if (symops_provided) { - op3 = (ccp4_symop *) ccp4_utils_malloc(nsym1*sizeof(ccp4_symop)); - for (i = 0; i < nsym1; ++i) { - for (k = 0; k < 3; ++k) { - for (l = 0; l < 3; ++l) { - op3[i].rot[k][l]=op1[i].rot[k][l]; - } - op3[i].trn[k] = op1[i].trn[k]; - } - ccp4spg_norm_trans(&op3[i]); - } - } - - /* Open the symop file: */ - if (!(symopfile = getenv("SYMINFO"))) { - if (debug) - printf("Environment variable SYMINFO not set ... guessing location of symmetry file. \n"); - if (!(ccp4dir = getenv("CLIBD"))) { - printf("Environment variable CLIBD not set ... big trouble! \n"); - return NULL; - } - - symopfile = ccp4_utils_malloc((strlen(ccp4dir)+22)*sizeof(char)); - strcpy(symopfile,ccp4_utils_joinfilenames(ccp4dir,"syminfo.lib")); - symopfile[strlen(ccp4dir)+21] = '\0'; - ccp4printf(1," SYMINFO file set to %s \n",symopfile); - } else { - if (debug) { - ccp4printf(1,"\n Spacegroup information obtained from library file: \n"); - ccp4printf(1," Logical Name: SYMINFO Filename: %s\n\n",symopfile); - } - } - - filein = fopen(symopfile,"r"); - if (!filein) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NoSyminfoFile),"ccp4spg_load_spacegroup",NULL); - return NULL; - } - - if (!(getenv("SYMINFO"))) free(symopfile); - - parser = ccp4_parse_start(20); - if (parser == NULL) - ccp4_signal(CSYM_ERRNO(CSYMERR_ParserFail),"ccp4spg_load_spacegroup",NULL); - /* "=" is used in map asu fields, so remove it as delimiter */ - ccp4_parse_delimiters(parser," \t,",","); - /* Set some convenient pointers to members of the parser array */ - key = parser->keyword; - token = parser->token; - - if (debug) - printf(" parser initialised \n"); - - while (fgets(filerec,80,filein)) { - - /* If syminfo.lib comes from a DOS platform, and we are on - unix, need to strip spurious \r character. Note this is - necessary because we have removed \r as parser delimiter. */ - if (strlen(filerec) > 1){ - if (filerec[strlen(filerec)-2]=='\r') { - filerec[strlen(filerec)-2]='\n'; - filerec[strlen(filerec)-1]='\0'; - } - } - - if (strlen(filerec) > 1) { - - ccp4_parser(filerec, 80, parser, iprint); - - if (ccp4_keymatch(key, "number")) { - if (parser->ntokens < 2) { - printf("Current SYMINFO line = %s\n",filerec); - ccp4_signal(CCP4_ERRLEVEL(2) | CSYM_ERRNO(CSYMERR_SyminfoTokensMissing),"ccp4spg_load_spacegroup",NULL); - } else { - sg_num = (int) token[1].value; - } - } - - if (ccp4_keymatch(key, "basisop")) { - strcpy(sg_basisop,filerec+8); - } - - if (ccp4_keymatch(key, "symbol")) { - if (parser->ntokens < 3) { - printf("Current SYMINFO line = %s\n",filerec); - ccp4_signal(CCP4_ERRLEVEL(2) | CSYM_ERRNO(CSYMERR_SyminfoTokensMissing),"ccp4spg_load_spacegroup",NULL); - } else { - if (strcmp(token[1].fullstring,"ccp4") == 0) - sg_ccp4_num = (int) token[2].value; - if (strcmp(token[1].fullstring,"Hall") == 0) - strcpy(sg_symbol_Hall,token[2].fullstring); - if (strcmp(token[1].fullstring,"xHM") == 0) - strcpy(sg_symbol_xHM,token[2].fullstring); - if (strcmp(token[1].fullstring,"old") == 0) - strcpy(sg_symbol_old,token[2].fullstring); - if (strcmp(token[1].fullstring,"patt") == 0) - strcpy(sg_patt_group,token[3].fullstring); - if (strcmp(token[1].fullstring,"pgrp") == 0) - strcpy(sg_point_group,token[3].fullstring); - } - } - - if (ccp4_keymatch(key, "hklasu")) { - if (parser->ntokens < 3) { - printf("Current SYMINFO line = %s\n",filerec); - ccp4_signal(CCP4_ERRLEVEL(2) | CSYM_ERRNO(CSYMERR_SyminfoTokensMissing),"ccp4spg_load_spacegroup",NULL); - } else { - if (strcmp(token[1].fullstring,"ccp4") == 0) - strcpy(sg_asu_descr,token[2].fullstring); - } - } - - if (ccp4_keymatch(key, "mapasu")) { - if (parser->ntokens < 5) { - printf("Current SYMINFO line = %s\n",filerec); - ccp4_signal(CCP4_ERRLEVEL(2) | CSYM_ERRNO(CSYMERR_SyminfoTokensMissing),"ccp4spg_load_spacegroup",NULL); - } else { - if (strcmp(token[1].fullstring,"zero") == 0) { - strcpy(map_asu_x,token[2].fullstring); - strcpy(map_asu_y,token[3].fullstring); - strcpy(map_asu_z,token[4].fullstring); - } else if (strcmp(token[1].fullstring,"ccp4") == 0) { - strcpy(map_asu_ccp4_x,token[2].fullstring); - strcpy(map_asu_ccp4_y,token[3].fullstring); - strcpy(map_asu_ccp4_z,token[4].fullstring); - } - } - } - - if (ccp4_keymatch(key, "symop")) { - strcpy(sg_symop[sg_nsymp++],filerec+6); - } - - if (ccp4_keymatch(key, "cenop")) { - strcpy(sg_cenop[sg_num_cent++],filerec+6); - } - - if (ccp4_keymatch(key, "end_spacegroup")) { - /* end of spacegroup block, so check if right one */ - if (numspg) { - if (sg_num == numspg) - break; - } else if (ccp4numspg) { - if (sg_ccp4_num == ccp4numspg) - break; - } else if (spgname) { - if (ccp4spg_name_equal_to_lib(sg_symbol_xHM,spgname)) - break; - } else if (ccp4spgname) { - if (ccp4spg_name_equal_to_lib(sg_symbol_old,ccp4spgname)) - break; - if (ccp4spg_name_equal_to_lib(sg_symbol_xHM,ccp4spgname)) - break; - } else if (symops_provided) { - nsym2 = sg_nsymp*sg_num_cent; - if (nsym2 == nsym1) { - op2 = (ccp4_symop *) ccp4_utils_malloc(nsym2*sizeof(ccp4_symop)); - for (i = 0; i < sg_num_cent; ++i) { - symop_to_mat4(sg_cenop[i],sg_cenop[i]+strlen(sg_cenop[i]),cent_ops[0]); - for (j = 0; j < sg_nsymp; ++j) { - symop_to_mat4(sg_symop[j],sg_symop[j]+strlen(sg_symop[j]),rot2[0]); - ccp4_4matmul(rot1,(const float (*)[4])cent_ops,(const float (*)[4])rot2); - op2[i*sg_nsymp+j] = mat4_to_rotandtrn((const float (*)[4])rot1); - /* combination of primitive and centering operators can - produce translations greater than one. */ - ccp4spg_norm_trans(&op2[i*sg_nsymp+j]); - } - } - /* op3 are requested operators and op2 are from SYMINFO file */ - if (ccp4_spgrp_equal(nsym1,op3,nsym2,op2)) { - if (debug) printf(" ops match for sg %d ! \n",sg_num); - free(op2); - break; - } - free(op2); - } - } - sg_nsymp = 0; - sg_num_cent = 0; - sg_symbol_xHM[0]='\0'; - sg_symbol_old[0]='\0'; - } - } - } - if (symops_provided) free(op3); - - if (debug) - printf(" parser finished \n"); - - /* Finished with the parser array */ - ccp4_parse_end(parser); - fclose(filein); - - if (!sg_nsymp) { - ccp4printf(0," Failed to find spacegroup in SYMINFO! \n"); - return NULL; - } - - /* extract various symbols for spacegroup */ - spacegroup->spg_num = sg_num; - spacegroup->spg_ccp4_num = sg_ccp4_num; - strcpy(spacegroup->symbol_Hall,sg_symbol_Hall); - strcpy(spacegroup->symbol_xHM,sg_symbol_xHM); - strcpy(spacegroup->symbol_old,sg_symbol_old); - strcpy(spacegroup->point_group,"PG"); - strcpy(spacegroup->point_group+2,sg_point_group); - if (sg_num <= 2) { - strcpy(spacegroup->crystal,"TRICLINIC"); - } else if (sg_num >= 3 && sg_num <= 15) { - strcpy(spacegroup->crystal,"MONOCLINIC"); - } else if (sg_num >= 16 && sg_num <= 74) { - strcpy(spacegroup->crystal,"ORTHORHOMBIC"); - } else if (sg_num >= 75 && sg_num <= 142) { - strcpy(spacegroup->crystal,"TETRAGONAL"); - } else if (sg_num >= 143 && sg_num <= 167) { - strcpy(spacegroup->crystal,"TRIGONAL"); - } else if (sg_num >= 168 && sg_num <= 194) { - strcpy(spacegroup->crystal,"HEXAGONAL"); - } else if (sg_num >= 195 && sg_num <= 230) { - strcpy(spacegroup->crystal,"CUBIC"); - } else { - strcpy(spacegroup->crystal," "); - } - - if (debug) - printf(" Read in details of spacegroup %d %d \n",sg_num,sg_ccp4_num); - - /* change of basis */ - if (debug) - printf(" Change of basis %s \n",sg_basisop); - symop_to_mat4(sg_basisop,sg_basisop+strlen(sg_basisop),sg_chb[0]); - for (i = 0; i < 3; ++i) { - for (j = 0; j < 3; ++j) { - spacegroup->chb[i][j] = sg_chb[i][j]; - } - } - if (debug) - for (k = 0; k < 3; ++k) - printf("chb: %f %f %f\n",spacegroup->chb[k][0], - spacegroup->chb[k][1],spacegroup->chb[k][2]); - - /* symmetry operators */ - spacegroup->nsymop_prim = sg_nsymp; - spacegroup->nsymop = sg_nsymp*sg_num_cent; - spacegroup->symop = (ccp4_symop *) ccp4_utils_malloc(spacegroup->nsymop*sizeof(ccp4_symop)); - spacegroup->invsymop = (ccp4_symop *) ccp4_utils_malloc(spacegroup->nsymop*sizeof(ccp4_symop)); - if (symops_provided) { - for (i = 0; i < nsym1; ++i) { - opinv = ccp4_symop_invert(op1[i]); - for (k = 0; k < 3; ++k) { - for (l = 0; l < 3; ++l) { - spacegroup->symop[i].rot[k][l]=op1[i].rot[k][l]; - spacegroup->invsymop[i].rot[k][l]=opinv.rot[k][l]; - } - spacegroup->symop[i].trn[k] = op1[i].trn[k]; - spacegroup->invsymop[i].trn[k] = opinv.trn[k]; - } - } - } else { - for (i = 0; i < sg_num_cent; ++i) { - symop_to_mat4(sg_cenop[i],sg_cenop[i]+strlen(sg_cenop[i]),cent_ops[0]); - for (j = 0; j < sg_nsymp; ++j) { - strncpy(filerec,sg_symop[j],80); /* symop_to_mat4 overwrites later sg_symop */ - symop_to_mat4(filerec,filerec+strlen(filerec),rot2[0]); - ccp4_4matmul(rot1,(const float (*)[4])cent_ops,(const float (*)[4])rot2); - det=invert4matrix((const float (*)[4])rot1,rot2); - if (debug) printf("symop determinant: %f\n",det); - for (k = 0; k < 3; ++k) { - for (l = 0; l < 3; ++l) { - spacegroup->symop[i*sg_nsymp+j].rot[k][l]=rot1[k][l]; - spacegroup->invsymop[i*sg_nsymp+j].rot[k][l]=rot2[k][l]; - } - spacegroup->symop[i*sg_nsymp+j].trn[k] = rot1[k][3]; - spacegroup->invsymop[i*sg_nsymp+j].trn[k] = rot2[k][3]; - } - /* unless symops have been provided, store normalised operators */ - ccp4spg_norm_trans(&spacegroup->symop[i*sg_nsymp+j]); - ccp4spg_norm_trans(&spacegroup->invsymop[i*sg_nsymp+j]); - } - } - } - if (debug) - for (i = 0; i < sg_num_cent; ++i) - for (j = 0; j < sg_nsymp; ++j) { - for (k = 0; k < 3; ++k) - printf("rot/trn: %f %f %f %f\n",spacegroup->symop[i*sg_nsymp+j].rot[k][0], - spacegroup->symop[i*sg_nsymp+j].rot[k][1], - spacegroup->symop[i*sg_nsymp+j].rot[k][2], - spacegroup->symop[i*sg_nsymp+j].trn[k]); - for (k = 0; k < 3; ++k) - printf("inv rot/trn: %f %f %f %f\n",spacegroup->invsymop[i*sg_nsymp+j].rot[k][0], - spacegroup->invsymop[i*sg_nsymp+j].rot[k][1], - spacegroup->invsymop[i*sg_nsymp+j].rot[k][2], - spacegroup->invsymop[i*sg_nsymp+j].trn[k]); - } - - /* reciprocal asymmetric unit */ - strcpy(spacegroup->asu_descr,sg_asu_descr); - - /* Select ASU function (referred to default basis) from asu desc */ - /* Also infer Laue and Patterson groups. This uses additional - information from spacegroup name. In general, we use Hall symbol - because syminfo.lib is missing a few xHM symbols. However, we - need to use the latter for R vs. H settings. */ - ierr = 1; - ilaue = 1; - - if ( strcmp( sg_asu_descr, "l>0 or (l==0 and (h>0 or (h==0 and k>=0)))" ) == 0 ) { - spacegroup->asufn = &ASU_1b; - ilaue = ccp4spg_load_laue(spacegroup,3); - spacegroup->npatt = 2; - strcpy(spacegroup->patt_name,"P-1"); - ierr = 0; - } - if ( strcmp( sg_asu_descr, "k>=0 and (l>0 or (l=0 and h>=0))" ) == 0 ) { - spacegroup->asufn = &ASU_2_m; - ilaue = ccp4spg_load_laue(spacegroup,4); - if (strchr(spacegroup->symbol_Hall,'P')) { - spacegroup->npatt = 10; - strcpy(spacegroup->patt_name,"P2/m"); - } else if (strchr(spacegroup->symbol_Hall,'C')) { - spacegroup->npatt = 12; - strcpy(spacegroup->patt_name,"C2/m"); - } - ierr = 0; - } - if ( strcmp( sg_asu_descr, "h>=0 and k>=0 and l>=0" ) == 0 ) { - spacegroup->asufn = &ASU_mmm; - ilaue = ccp4spg_load_laue(spacegroup,6); - if (strchr(spacegroup->symbol_Hall,'P')) { - spacegroup->npatt = 47; - strcpy(spacegroup->patt_name,"Pmmm"); - } else if (strchr(spacegroup->symbol_Hall,'C')) { - spacegroup->npatt = 65; - strcpy(spacegroup->patt_name,"Cmmm"); - } else if (strchr(spacegroup->symbol_Hall,'I')) { - spacegroup->npatt = 71; - strcpy(spacegroup->patt_name,"Immm"); - } else if (strchr(spacegroup->symbol_Hall,'F')) { - spacegroup->npatt = 69; - strcpy(spacegroup->patt_name,"Fmmm"); - } - ierr = 0; - } - if ( strcmp( sg_asu_descr, "l>=0 and ((h>=0 and k>0) or (h=0 and k=0))" ) == 0 && - strcmp( sg_patt_group, "4/m" ) == 0 ) { - spacegroup->asufn = &ASU_4_m; - ilaue = ccp4spg_load_laue(spacegroup,7); - spacegroup->nlaue = 7; - strcpy(spacegroup->laue_name,"4/m"); - spacegroup->laue_sampling[0] = 4; - spacegroup->laue_sampling[1] = 4; - spacegroup->laue_sampling[2] = 8; - if (strchr(spacegroup->symbol_Hall,'P')) { - spacegroup->npatt = 83; - strcpy(spacegroup->patt_name,"P4/m"); - } else if (strchr(spacegroup->symbol_Hall,'I')) { - spacegroup->npatt = 87; - strcpy(spacegroup->patt_name,"I4/m"); - } - ierr = 0; - } - if ( strcmp( sg_asu_descr, "h>=k and k>=0 and l>=0" ) == 0 && - strcmp( sg_patt_group, "4/mmm" ) == 0 ) { - spacegroup->asufn = &ASU_4_mmm; - ilaue = ccp4spg_load_laue(spacegroup,8); - if (strchr(spacegroup->symbol_Hall,'P')) { - spacegroup->npatt = 123; - strcpy(spacegroup->patt_name,"P4/mmm"); - } else if (strchr(spacegroup->symbol_Hall,'I')) { - spacegroup->npatt = 139; - strcpy(spacegroup->patt_name,"I4/mmm"); - } - ierr = 0; - } - if ( strcmp( sg_asu_descr, "(h>=0 and k>0) or (h=0 and k=0 and l>=0)" ) == 0 ) { - spacegroup->asufn = &ASU_3b; - ilaue = ccp4spg_load_laue(spacegroup,9); - if (strchr(spacegroup->symbol_Hall,'P')) { - spacegroup->npatt = 147; - strcpy(spacegroup->patt_name,"P-3"); - } else if (strchr(spacegroup->symbol_xHM,'H')) { - /* this is special case, as Hall doesn't specify H */ - spacegroup->npatt = 148; - strcpy(spacegroup->patt_name,"H-3"); - } else if (strchr(spacegroup->symbol_Hall,'R')) { - spacegroup->npatt = 1148; - strcpy(spacegroup->patt_name,"R-3"); - } - ierr = 0; - } - if ( strcmp( sg_asu_descr, "h>=k and k>=0 and (k>0 or l>=0)" ) == 0 ) { - spacegroup->asufn = &ASU_3bm; - ilaue = ccp4spg_load_laue(spacegroup,10); - spacegroup->npatt = 162; - strcpy(spacegroup->patt_name,"P-31m"); - ierr = 0; - } - if ( strcmp( sg_asu_descr, "h>=k and k>=0 and (h>k or l>=0)" ) == 0 ) { - spacegroup->asufn = &ASU_3bmx; - ilaue = ccp4spg_load_laue(spacegroup,11); - if (strchr(spacegroup->symbol_Hall,'P')) { - spacegroup->npatt = 164; - strcpy(spacegroup->patt_name,"P-3m1"); - } else if (strchr(spacegroup->symbol_xHM,'H')) { - /* this is special case, as Hall doesn't specify H */ - spacegroup->npatt = 166; - strcpy(spacegroup->patt_name,"H-3m"); - } else if (strchr(spacegroup->symbol_Hall,'R')) { - spacegroup->npatt = 1166; - strcpy(spacegroup->patt_name,"R-3m"); - } - ierr = 0; - } - if ( strcmp( sg_asu_descr, "l>=0 and ((h>=0 and k>0) or (h=0 and k=0))" ) == 0 && - strcmp( sg_patt_group, "6/m" ) == 0 ) { - spacegroup->asufn = &ASU_6_m; - ilaue = ccp4spg_load_laue(spacegroup,12); - spacegroup->npatt = 175; - strcpy(spacegroup->patt_name,"P6/m"); - ierr = 0; - } - if ( strcmp( sg_asu_descr, "h>=k and k>=0 and l>=0" ) == 0 && - strcmp( sg_patt_group, "6/mmm" ) == 0 ) { - spacegroup->asufn = &ASU_6_mmm; - ilaue = ccp4spg_load_laue(spacegroup,13); - spacegroup->nlaue = 13; - strcpy(spacegroup->laue_name,"6/mmm"); - spacegroup->laue_sampling[0] = 6; - spacegroup->laue_sampling[1] = 6; - spacegroup->laue_sampling[2] = 12; - spacegroup->npatt = 191; - strcpy(spacegroup->patt_name,"P6/mmm"); - ierr = 0; - } - if ( strcmp( sg_asu_descr, "h>=0 and ((l>=h and k>h) or (l=h and k=h))" ) == 0 ) { - spacegroup->asufn = &ASU_m3b; - ilaue = ccp4spg_load_laue(spacegroup,14); - if (strchr(spacegroup->symbol_Hall,'P')) { - spacegroup->npatt = 200; - strcpy(spacegroup->patt_name,"Pm-3"); - } else if (strchr(spacegroup->symbol_Hall,'I')) { - spacegroup->npatt = 204; - strcpy(spacegroup->patt_name,"Im-3"); - } else if (strchr(spacegroup->symbol_Hall,'F')) { - spacegroup->npatt = 202; - strcpy(spacegroup->patt_name,"Fm-3"); - } - ierr = 0; - } - if ( strcmp( sg_asu_descr, "k>=l and l>=h and h>=0" ) == 0 ) { - spacegroup->asufn = &ASU_m3bm; - ilaue = ccp4spg_load_laue(spacegroup,15); - if (strchr(spacegroup->symbol_Hall,'P')) { - spacegroup->npatt = 221; - strcpy(spacegroup->patt_name,"Pm-3m"); - } else if (strchr(spacegroup->symbol_Hall,'I')) { - spacegroup->npatt = 229; - strcpy(spacegroup->patt_name,"Im-3m"); - } else if (strchr(spacegroup->symbol_Hall,'F')) { - spacegroup->npatt = 225; - strcpy(spacegroup->patt_name,"Fm-3m"); - } - ierr = 0; - } - - /* Raise an error if failed to match the ASU description */ - if (ierr) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NoAsuDefined),"ccp4spg_load_spacegroup",NULL); - if (spacegroup) free(spacegroup); - return NULL; - } - - /* Raise an error if failed to match the Laue code */ - if (ilaue) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NoLaueCodeDefined),"ccp4spg_load_spacegroup",NULL); - if (spacegroup) free(spacegroup); - return NULL; - } - - /* real asymmetric unit */ - /* origin-based choice */ - sprintf(spacegroup->mapasu_zero_descr,"%s %s %s",map_asu_x,map_asu_y,map_asu_z); - range_to_limits(map_asu_x, limits); - spacegroup->mapasu_zero[0] = limits[1]; - range_to_limits(map_asu_y, limits); - spacegroup->mapasu_zero[1] = limits[1]; - range_to_limits(map_asu_z, limits); - spacegroup->mapasu_zero[2] = limits[1]; - /* CCP4 choice a la SETLIM - defaults to origin-based choice */ - range_to_limits(map_asu_ccp4_x, limits); - if (limits[1] > 0) { - sprintf(spacegroup->mapasu_ccp4_descr,"%s %s %s",map_asu_ccp4_x,map_asu_ccp4_y,map_asu_ccp4_z); - spacegroup->mapasu_ccp4[0] = limits[1]; - range_to_limits(map_asu_ccp4_y, limits); - spacegroup->mapasu_ccp4[1] = limits[1]; - range_to_limits(map_asu_ccp4_z, limits); - spacegroup->mapasu_ccp4[2] = limits[1]; - } else { - strcpy(spacegroup->mapasu_ccp4_descr,spacegroup->mapasu_zero_descr); - spacegroup->mapasu_ccp4[0] = spacegroup->mapasu_zero[0]; - spacegroup->mapasu_ccp4[1] = spacegroup->mapasu_zero[1]; - spacegroup->mapasu_ccp4[2] = spacegroup->mapasu_zero[2]; - } - if (debug) { - printf(" mapasu limits %f %f %f \n",spacegroup->mapasu_zero[0], - spacegroup->mapasu_zero[1],spacegroup->mapasu_zero[2]); - printf(" CCP4 mapasu limits %f %f %f \n",spacegroup->mapasu_ccp4[0], - spacegroup->mapasu_ccp4[1],spacegroup->mapasu_ccp4[2]); - } - - /* set up centric and epsilon zones for this spacegroup */ - ccp4spg_set_centric_zones(spacegroup); - ccp4spg_set_epsilon_zones(spacegroup); - - if (debug) - printf(" Leaving ccp4spg_load_spacegroup \n"); - - return spacegroup; -} - - -/* symfr_driver - - Convert one or more symop description strings into 4x4 matrix - representations via multiple calls to symop_to_mat4. - - "line" is a string containing one or more symop description - strings to be translated into matrix representations. - Multiple symmetry operations can be specified in a single - input line, and must be separated by * (with spaces either - side). - "rot" is an array of 4x4 matrices in which the symops are - returned. - - On success, symfr returns the number of symops translated and - stored; on failure -1 is returned. - - See comments for SYMFR2 for description of the symop formats. -*/ -int symfr_driver (const char *line, float rot[MAXSYMOPS][4][4]) -{ - CCP4PARSERARRAY *symops=NULL; - int i,j,k,got_symop=0; - int ns=0,nsym=0,maxsymops=MAXSYMOPS; - char *symop=NULL,symopbuf[MAXLENSYMOPSTR]; - float tmp_rot[4][4]; - - //CSYMLIB_DEBUG(puts("CSYMLIB: symfr_driver");) - - /* Set up a parser structure to break the line up into - individual symop strings */ - if ((symops = ccp4_parse_start(maxsymops)) == NULL) { - /* Couldn't set up a parser structure - abort */ - printf(" symfr_driver: failed to set up parser structure for reading symops.\n"); - return -1; - } - - /* Tokenise the line, splitting on spaces */ - ccp4_parse_delimiters(symops," ",""); - if ((ns = ccp4_parse(line,symops)) > 0) { - - /* Initialise */ - got_symop = 0; - symopbuf[0] = '\0'; - - /* Loop over tokens and reconstruct symop strings */ - for (i=0; itoken[i].fullstring; - - /* If there are multiple symop strings then these - will be delimited by asterisks */ - if (strlen(symop) == 1 && symop[0] == '*') { - /* End of symop */ - got_symop = 1; - } else { - /* Append token to symop */ - if (strlen(symopbuf)+strlen(symop)+1 <= MAXLENSYMOPSTR) { - strcat(symopbuf,symop); - } else { - /* Error - symop string is too long */ - printf("SYMFR: symmetry operator string is too long!\n"); - if (symops) ccp4_parse_end(symops); - return -1; - } - /* Check if this is the last token, in which case - flag it to be processed */ - if ((i+1)==ns) got_symop = 1; - } - - /* Process a complete symop */ - if (got_symop && strlen(symopbuf) > 0) { - /* Translate */ - if (!symop_to_mat4(&(symopbuf[0]),&(symopbuf[0])+strlen(symopbuf),tmp_rot[0])) { - /* Error */ - if (symops) ccp4_parse_end(symops); - return -1; - } - /* Load result into the appropriate array location */ - for (j = 0; j < 4; ++j) - for (k = 0; k < 4; ++k) - rot[nsym][j][k] = tmp_rot[j][k]; - nsym++; - /* Reset for next symop */ - got_symop = 0; - symopbuf[0] = '\0'; - } - } - } - - /* Tidy up and return the number of symops */ - if (symops) ccp4_parse_end(symops); - return nsym; -} - -void ccp4spg_free(CCP4SPG **sp) { - free ((*sp)->symop); - free ((*sp)->invsymop); - free (*sp); - *sp=NULL; -} - -int ccp4_spg_get_centering(const char *symbol_Hall, float cent_ops[4][3]) -{ - int debug=0; - int i,j; - - for (i = 0; i < 4; ++i) - for (j = 0; j < 3; ++j) - cent_ops[i][j] = 0.0; - - if (strchr(symbol_Hall,'P')) { - if (debug) printf("Primitive \n"); - return 1; - } else if (strchr(symbol_Hall,'A')) { - if (debug) printf("A centering \n"); - cent_ops[1][1] = 0.5; - cent_ops[1][2] = 0.5; - return 2; - } else if (strchr(symbol_Hall,'B')) { - if (debug) printf("B centering \n"); - cent_ops[1][0] = 0.5; - cent_ops[1][2] = 0.5; - return 2; - } else if (strchr(symbol_Hall,'C')) { - if (debug) printf("C centering \n"); - cent_ops[1][0] = 0.5; - cent_ops[1][1] = 0.5; - return 2; - } else if (strchr(symbol_Hall,'F')) { - if (debug) printf("F centering \n"); - cent_ops[1][1] = 0.5; - cent_ops[1][2] = 0.5; - cent_ops[2][0] = 0.5; - cent_ops[2][2] = 0.5; - cent_ops[3][0] = 0.5; - cent_ops[3][1] = 0.5; - return 4; - } else if (strchr(symbol_Hall,'I')) { - if (debug) printf("I centering \n"); - cent_ops[1][0] = 0.5; - cent_ops[1][1] = 0.5; - cent_ops[1][2] = 0.5; - return 2; - } else if (strchr(symbol_Hall,'H')) { - /* fixme: Hall doesn't specify H, whereas xHM does */ - if (debug) printf("H centering \n"); - cent_ops[1][0] = 2.0/3.0; - cent_ops[1][1] = 1.0/3.0; - cent_ops[1][2] = 1.0/3.0; - cent_ops[2][0] = 1.0/3.0; - cent_ops[2][1] = 2.0/3.0; - cent_ops[2][2] = 2.0/3.0; - return 3; - } else if (strchr(symbol_Hall,'R')) { - if (debug) printf("R centering \n"); - return 1; - } - return 0; -} - -/* standard asu tests for 11 Laue classes */ - -int ASU_1b (const int h, const int k, const int l) - { return (l>0 || (l==0 && (h>0 || (h==0 && k>=0)))); } -int ASU_2_m (const int h, const int k, const int l) - { return (k>=0 && (l>0 || (l==0 && h>=0))); } -int ASU_mmm (const int h, const int k, const int l) - { return (h>=0 && k>=0 && l>=0); } -int ASU_4_m (const int h, const int k, const int l) - { return (l>=0 && ((h>=0 && k>0) || (h==0 && k==0))); } -int ASU_4_mmm(const int h, const int k, const int l) - { return (h>=k && k>=0 && l>=0); } -int ASU_3b (const int h, const int k, const int l) - { return (h>=0 && k>0) || (h==0 && k==0 && l >= 0); } -int ASU_3bm (const int h, const int k, const int l) - { return (h>=k && k>=0 && (k>0 || l>=0)); } -int ASU_3bmx (const int h, const int k, const int l) - { return (h>=k && k>=0 && (h>k || l>=0)); } -int ASU_6_m (const int h, const int k, const int l) - { return (l>=0 && ((h>=0 && k>0) || (h==0 && k==0))); } -int ASU_6_mmm(const int h, const int k, const int l) - { return (h>=k && k>=0 && l>=0); } -int ASU_m3b (const int h, const int k, const int l) - { return (h>=0 && ((l>=h && k>h) || (l==h && k==h))); } -int ASU_m3bm (const int h, const int k, const int l) - { return (h>=0 && k>=l && l>=h); } - -char *ccp4spg_symbol_Hall(CCP4SPG* sp) { - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_symbol_Hall",NULL); - return NULL; - } - return sp->symbol_Hall; -} - -ccp4_symop ccp4_symop_invert( const ccp4_symop op1 ) -{ - float rot1[4][4],rot2[4][4]; - - rotandtrn_to_mat4(rot1,op1); - invert4matrix((const float (*)[4])rot1,rot2); - return (mat4_to_rotandtrn((const float (*)[4])rot2)); -} - -int ccp4spg_name_equal(const char *spgname1, const char *spgname2) { - - char *ch1, *ch2, *spgname1_upper, *spgname2_upper; - - /* create copies of input strings, and convert to upper case */ - spgname1_upper = strdup(spgname1); - strtoupper(spgname1_upper,spgname1); - spgname2_upper = strdup(spgname2); - strtoupper(spgname2_upper,spgname2); - - ch1 = spgname1_upper; - ch2 = spgname2_upper; - while (*ch1 == *ch2) { - if (*ch1 == '\0' && *ch2 == '\0') { - free(spgname1_upper); - free(spgname2_upper); - return 1; - } - ++ch1; - ++ch2; - } - free(spgname1_upper); - free(spgname2_upper); - return 0; -} - -int ccp4spg_name_equal_to_lib(const char *spgname_lib, const char *spgname_match) { - - char *ch1, *ch2, *spgname1_upper, *spgname2_upper, *tmpstr; - int have_one_1=0, have_one_2=0; - - /* create copies of input strings, convert to upper case, and - deal with colons */ - spgname1_upper = strdup(spgname_lib); - strtoupper(spgname1_upper,spgname_lib); - ccp4spg_name_de_colon(spgname1_upper); - spgname2_upper = strdup(spgname_match); - strtoupper(spgname2_upper,spgname_match); - ccp4spg_name_de_colon(spgname2_upper); - - /* see if strings are equal, except for spaces */ - ch1 = spgname1_upper; - ch2 = spgname2_upper; - while (*ch1 == *ch2) { - if (*ch1 == '\0' && *ch2 == '\0') { - free(spgname1_upper); - free(spgname2_upper); - return 1; - } - while (*(++ch1) == ' ') ; - while (*(++ch2) == ' ') ; - } - - /* if that didn't work, and spgname_match is a short name, try removing - " 1 " from spgname_lib, and matching again. This would match P21 to - 'P 1 21 1' for instance. */ - - /* try to identify if "short names" are being used. */ - if (strstr(spgname1_upper," 1 ")) have_one_1 = 1; - if (strstr(spgname2_upper," 1 ")) have_one_2 = 1; - /* if spgname_lib has " 1 " and spgname_match doesn't, then strip - out " 1" to do "short" comparison */ - if (have_one_1 && ! have_one_2) { - tmpstr = strdup(spgname1_upper); - ccp4spg_to_shortname(tmpstr,spgname1_upper); - strcpy(spgname1_upper,tmpstr); - free(tmpstr); - } - - /* see if strings are equal, except for spaces */ - ch1 = spgname1_upper; - ch2 = spgname2_upper; - while (*ch1 == *ch2) { - if (*ch1 == '\0' && *ch2 == '\0') { - free(spgname1_upper); - free(spgname2_upper); - return 1; - } - while (*(++ch1) == ' ') ; - while (*(++ch2) == ' ') ; - } - - free(spgname1_upper); - free(spgname2_upper); - return 0; -} - -char *ccp4spg_to_shortname(char *shortname, const char *longname) { - - const char *ch1; - char *ch2; - int trigonal=0; - - ch1 = longname; - ch2 = shortname; - - /* "P 1" is an exception */ - if (!strcmp(ch1,"P 1")) { - strcpy(ch2,"P1"); - return ch2; - } - - /* trigonal are another exception, don't want to lose significant " 1" */ - if (!strncmp(ch1,"P 3",3) || !strncmp(ch1,"P -3",4) || !strncmp(ch1,"R 3",3) || !strncmp(ch1,"R -3",4)) trigonal=1; - - while (*ch1 != '\0') { - if (!trigonal && !strncmp(ch1," 1",2)) { - ch1 += 2; - } else { - /* take out blanks - note check for " 1" takes precedence */ - while (*ch1 == ' ') ++ch1; - if (*ch1 != '\0') { *ch2 = *ch1; ++ch2; ++ch1; } - } - } - *ch2 = '\0'; - return ch2; -} - -void ccp4spg_name_de_colon(char *name) { - - char *ch1; - - /* various spacegroup names have settings specified by colon. We'll - deal with these on a case-by-case basis. */ - if ((ch1 = strstr(name,":R")) != NULL) { - /* :R spacegroup should be R already so just replace with blanks */ - *ch1 = ' '; - *(ch1+1) = ' '; - } else if ((ch1 = strstr(name,":H")) != NULL) { - /* :H spacegroup should be R so change to H */ - *ch1 = ' '; - *(ch1+1) = ' '; - ch1 = strstr(name,"R"); - if (ch1 != NULL) *ch1 = 'H'; - } - - return; -} - -int ccp4spg_pgname_equal(const char *pgname1, const char *pgname2) { - - char *ch1, *ch2, *pgname1_upper, *pgname2_upper; - - pgname1_upper = strdup(pgname1); - strtoupper(pgname1_upper,pgname1); - pgname2_upper = strdup(pgname2); - strtoupper(pgname2_upper,pgname2); - - ch1 = pgname1_upper; - if (pgname1_upper[0] == 'P' && pgname1_upper[1] == 'G') ch1 += 2; - ch2 = pgname2_upper; - if (pgname2_upper[0] == 'P' && pgname2_upper[1] == 'G') ch2 += 2; - while (*ch1 == *ch2) { - if (*ch1 == '\0' && *ch2 == '\0') { - free(pgname1_upper); - free(pgname2_upper); - return 1; - } - while (*(++ch1) == ' ') ; - while (*(++ch2) == ' ') ; - } - free(pgname1_upper); - free(pgname2_upper); - return 0; -} - -ccp4_symop *ccp4spg_norm_trans(ccp4_symop *op) { - - int i; - - for ( i = 0; i < 3; i++ ) { - while (op->trn[i] < 0.0) op->trn[i] += 1.0; - while (op->trn[i] >= 1.0) op->trn[i] -= 1.0; - } - - return op; -} - -int ccp4_spgrp_equal( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2 ) -{ - int i, n; - int *symcode1, *symcode2; - - /* first check that we have equal number of symops */ - if ( nsym1 != nsym2 ) return 0; - - n = nsym1; - - /* now make the sym code arrays */ - symcode1 = ccp4_utils_malloc( n * sizeof(int) ); - symcode2 = ccp4_utils_malloc( n * sizeof(int) ); - for ( i = 0; i < n; i++ ) { - symcode1[i] = ccp4_symop_code( op1[i] ); - symcode2[i] = ccp4_symop_code( op2[i] ); - } - /* sort the symcodes */ - /* Kevin suggests maybe just compare all pairs rather than sort */ - qsort( symcode1, n, sizeof(int), &ccp4_int_compare ); - qsort( symcode2, n, sizeof(int), &ccp4_int_compare ); - /* compare the symcodes */ - for ( i = 0; i < n; i++ ) { - if ( symcode1[i] != symcode2[i] ) break; - } - /* delete the symcodes */ - free(symcode1); - free(symcode2); - - /* return true if they are equal */ - return ( i == n ); -} - -int ccp4_spgrp_equal_order( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2 ) -{ - int i; - - /* first check that we have equal number of symops */ - if ( nsym1 != nsym2 ) return 0; - - /* compare the symcodes */ - for ( i = 0; i < nsym1; i++ ) { - if ( ccp4_symop_code( op1[i] ) != ccp4_symop_code( op2[i] ) ) break; - } - - /* return true if they are equal */ - return ( i == nsym1 ); -} - -int ccp4_symop_code(ccp4_symop op) -{ - int i, j, code=0; - for ( i=0; i<3; i++ ) - for ( j=0; j<3; j++ ) - code = ( code << 2 ) | ( (int) rint( op.rot[i][j] ) & 0x03 ) ; - for ( i=0; i<3; i++ ) - code = ( code << 4 ) | ( (int) rint( op.trn[i]*12.0 ) & 0x0f ) ; - return code; -} - -int ccp4_int_compare( const void *p1, const void *p2 ) -{ - return ( *((int*)p1) - *((int*)p2) ); -} - -int ccp4spg_is_in_pm_asu(const CCP4SPG* sp, const int h, const int k, const int l) { - if (ccp4spg_is_in_asu(sp,h,k,l)) return (1); - if (ccp4spg_is_in_asu(sp,-h,-k,-l)) return (-1); - return 0; -} - -int ccp4spg_is_in_asu(const CCP4SPG* sp, const int h, const int k, const int l) { - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_is_in_asu",NULL); - return 0; - } - if ( ccp4spg_do_chb(sp->chb) ) return sp->asufn( - (int) rint( h*sp->chb[0][0] + k*sp->chb[1][0] + l*sp->chb[2][0] ), - (int) rint( h*sp->chb[0][1] + k*sp->chb[1][1] + l*sp->chb[2][1] ), - (int) rint( h*sp->chb[0][2] + k*sp->chb[1][2] + l*sp->chb[2][2] ) ); - else - return sp->asufn( h, k, l ); -} - -int ccp4spg_put_in_asu(const CCP4SPG* sp, const int hin, const int kin, const int lin, - int *hout, int *kout, int *lout ) { - - int i, isign; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_put_in_asu",NULL); - return 0; - } - - /* cycle through all primitive symmetry operations until in asu */ - - for (i = 0; i < sp->nsymop_prim; ++i) { - *hout = (int) rint( hin*sp->symop[i].rot[0][0] + kin*sp->symop[i].rot[1][0] + - lin*sp->symop[i].rot[2][0] ); - *kout = (int) rint( hin*sp->symop[i].rot[0][1] + kin*sp->symop[i].rot[1][1] + - lin*sp->symop[i].rot[2][1] ); - *lout = (int) rint( hin*sp->symop[i].rot[0][2] + kin*sp->symop[i].rot[1][2] + - lin*sp->symop[i].rot[2][2] ); - if ((isign = ccp4spg_is_in_pm_asu(sp,*hout,*kout,*lout)) != 0) { - *hout = *hout * isign; - *kout = *kout * isign; - *lout = *lout * isign; - return ( (isign > 0) ? 2*i+1 : 2*i+2 ); - } - } - - printf ("Can't put in asu ! \n"); - return 0; -} - -/* Generate indices according to symmetry operation isym */ - -void ccp4spg_generate_indices(const CCP4SPG* sp, const int isym, - const int hin, const int kin, const int lin, - int *hout, int *kout, int *lout ) { - - int jsym, isign; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_generate_indices",NULL); - return; - } - - jsym = (isym - 1) / 2; - isign = (isym % 2) ? 1 : -1 ; - - *hout = isign * (int) rint(hin*sp->invsymop[jsym].rot[0][0] + - kin*sp->invsymop[jsym].rot[1][0] + lin*sp->invsymop[jsym].rot[2][0]); - *kout = isign * (int) rint(hin*sp->invsymop[jsym].rot[0][1] + - kin*sp->invsymop[jsym].rot[1][1] + lin*sp->invsymop[jsym].rot[2][1]); - *lout = isign * (int) rint(hin*sp->invsymop[jsym].rot[0][2] + - kin*sp->invsymop[jsym].rot[1][2] + lin*sp->invsymop[jsym].rot[2][2]); - -} - -/* shift phase value associated with hin,kin,lin according to translation -and optional sign change. Return in range 0,360 */ - -float ccp4spg_phase_shift(const int hin, const int kin, const int lin, - const float phasin, const float trans[3], const int isign) -{ - double phasout; - - phasout = (double) phasin; - if (isign == -1) phasout = - phasout; - - phasout += (hin*trans[0] + kin*trans[1] + lin*trans[2]) * 360.0; - - phasout = fmod(phasout,360.0); - if (phasout < 0.0) phasout += 360.0; - - return ((float) phasout); - -} - -int ccp4spg_do_chb(const float chb[3][3]) { - - return ( chb[0][0] != 1 || chb[1][1] != 1 || chb[2][2] != 1 || - chb[0][1] != 0 || chb[0][2] != 0 || chb[1][2] != 0 || - chb[1][0] != 0 || chb[2][0] != 0 || chb[2][1] != 0 ); - -} - -/* functions to identify centrics - based on Randy's method */ - -void ccp4spg_set_centric_zones(CCP4SPG* sp) { - - int i,j,hnew,knew,lnew; - int ihkl[12][3]; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_set_centric_zones",NULL); - return; - } - ihkl[0][0] = 0; ihkl[0][1] = 1; ihkl[0][2] = 2; - ihkl[1][0] = 1; ihkl[1][1] = 0; ihkl[1][2] = 2; - ihkl[2][0] = 1; ihkl[2][1] = 2; ihkl[2][2] = 0; - ihkl[3][0] = 1; ihkl[3][1] = 1; ihkl[3][2] = 10; - ihkl[4][0] = 1; ihkl[4][1] = 10; ihkl[4][2] = 1; - ihkl[5][0] = 10; ihkl[5][1] = 1; ihkl[5][2] = 1; - ihkl[6][0] = 1; ihkl[6][1] = -1; ihkl[6][2] = 10; - ihkl[7][0] = 1; ihkl[7][1] = 10; ihkl[7][2] = -1; - ihkl[8][0] = 10; ihkl[8][1] = 1; ihkl[8][2] = -1; - ihkl[9][0] = -1; ihkl[9][1] = 2; ihkl[9][2] = 10; - ihkl[10][0] = 2; ihkl[10][1] = -1; ihkl[10][2] = 10; - ihkl[11][0] = 1; ihkl[11][1] = 4; ihkl[11][2] = 8; - - /* loop over all possible centric zones */ - for (i = 0; i < 12; ++i) { - sp->centrics[i] = 0; - for (j = 0; j < sp->nsymop; ++j) { - hnew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][0] + - ihkl[i][1]*sp->symop[j].rot[1][0] + ihkl[i][2]*sp->symop[j].rot[2][0] ); - if (hnew == -ihkl[i][0]) { - knew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][1] + - ihkl[i][1]*sp->symop[j].rot[1][1] + ihkl[i][2]*sp->symop[j].rot[2][1] ); - if (knew == -ihkl[i][1]) { - lnew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][2] + - ihkl[i][1]*sp->symop[j].rot[1][2] + ihkl[i][2]*sp->symop[j].rot[2][2] ); - if (lnew == -ihkl[i][2]) { - sp->centrics[i] = j+1; - break; - } - } - } - } - } -} - -int ccp4spg_is_centric(const CCP4SPG* sp, const int h, const int k, const int l) { - - int i; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_is_centric",NULL); - return -1; - } - /* loop over all possible centric zones */ - for (i = 0; i < 12; ++i) - if (sp->centrics[i]) - if (ccp4spg_check_centric_zone(i+1,h,k,l) == 0) - return 1; - - return 0; -} - -/* check indices against centric zones - return 0 if in zone "nzone" */ - -int ccp4spg_check_centric_zone(const int nzone, const int h, const int k, const int l) { - - switch (nzone) { - case 1: - return h; - case 2: - return k; - case 3: - return l; - case 4: - return h - k; - case 5: - return h - l; - case 6: - return k - l; - case 7: - return h + k; - case 8: - return h + l; - case 9: - return k + l; - case 10: - return 2*h + k; - case 11: - return h + 2*k; - case 12: - return 0; - } - printf ("Invalid nzone ! \n"); - return 0; -} - -float ccp4spg_centric_phase(const CCP4SPG* sp, const int h, const int k, const int l) { - - int i,isym; - float centric_phase; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_centric_phase",NULL); - return 0.0; - } - /* loop over all possible centric zones */ - for (i = 0; i < 12; ++i) - if (sp->centrics[i]) - if (ccp4spg_check_centric_zone(i+1,h,k,l) == 0) { - isym = sp->centrics[i]; - centric_phase = h*sp->symop[isym-1].trn[0] + - k*sp->symop[isym-1].trn[1] + l*sp->symop[isym-1].trn[2]; - centric_phase = 180.0*(centric_phase - rint(centric_phase)); - if (centric_phase < 0.0) centric_phase = centric_phase + 180.0; - return centric_phase; - } - - return 0; -} - -void ccp4spg_print_centric_zones(const CCP4SPG* sp) { - - int i,j=0; - char centric_zone[8]; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_print_centric_zones",NULL); - return; - } - printf("\n ****** CENTRIC ZONES ****** \n\n"); - - /* loop over all possible centric zones */ - for (i = 0; i < 12; ++i) - if (sp->centrics[i]) { - printf(" CENTRIC Zone %d\n",++j); - printf(" Reflections of type %s \n\n", - ccp4spg_describe_centric_zone(i+1,centric_zone)); - } - - if (!j) printf(" (no centric zones for this spacegroup) \n\n"); -} - -char *ccp4spg_describe_centric_zone(const int nzone, char *centric_zone) { - - switch (nzone) { - case 1: - return ( strcpy(centric_zone,"0kl") ); - case 2: - return ( strcpy(centric_zone,"h0l") ); - case 3: - return ( strcpy(centric_zone,"hk0") ); - case 4: - return ( strcpy(centric_zone,"hhl") ); - case 5: - return ( strcpy(centric_zone,"hkh") ); - case 6: - return ( strcpy(centric_zone,"hkk") ); - case 7: - return ( strcpy(centric_zone,"h -hl") ); - case 8: - return ( strcpy(centric_zone,"hk -h") ); - case 9: - return ( strcpy(centric_zone,"hk -k") ); - case 10: - return ( strcpy(centric_zone,"-h 2h l") ); - case 11: - return ( strcpy(centric_zone,"2h -h l") ); - case 12: - return ( strcpy(centric_zone,"hkl") ); - } - printf ("Invalid nzone ! \n"); - return "null"; -} - -/* functions to identify epsilon zones - based on Randy's method */ - -void ccp4spg_set_epsilon_zones(CCP4SPG* sp) { - - int i,j,hnew,knew,lnew,neps; - int ihkl[13][3]; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_set_epsilon_zones",NULL); - return; - } - ihkl[0][0] = 1; ihkl[0][1] = 0; ihkl[0][2] = 0; - ihkl[1][0] = 0; ihkl[1][1] = 2; ihkl[1][2] = 0; - ihkl[2][0] = 0; ihkl[2][1] = 0; ihkl[2][2] = 2; - ihkl[3][0] = 1; ihkl[3][1] = 1; ihkl[3][2] = 0; - ihkl[4][0] = 1; ihkl[4][1] = 0; ihkl[4][2] = 1; - ihkl[5][0] = 0; ihkl[5][1] = 1; ihkl[5][2] = 1; - ihkl[6][0] = 1; ihkl[6][1] = -1; ihkl[6][2] = 0; - ihkl[7][0] = 1; ihkl[7][1] = 0; ihkl[7][2] = -1; - ihkl[8][0] = 0; ihkl[8][1] = 1; ihkl[8][2] = -1; - ihkl[9][0] = -1; ihkl[9][1] = 2; ihkl[9][2] = 0; - ihkl[10][0] = 2; ihkl[10][1] = -1; ihkl[10][2] = 0; - ihkl[11][0] = 1; ihkl[11][1] = 1; ihkl[11][2] = 1; - ihkl[12][0] = 1; ihkl[12][1] = 2; ihkl[12][2] = 3; - - /* Loop over all possible epsilon zones, except the catch-all 13th. For each - zone, "neps" counts the number of symmetry operators that map a representative - reflection "ihkl" to itself. At least the identity will do this. If any - more do, then this is a relevant epsilon zone. */ - for (i = 0; i < 12; ++i) { - sp->epsilon[i] = 0; - neps = 0; - for (j = 0; j < sp->nsymop_prim; ++j) { - hnew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][0] + - ihkl[i][1]*sp->symop[j].rot[1][0] + ihkl[i][2]*sp->symop[j].rot[2][0] ); - if (hnew == ihkl[i][0]) { - knew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][1] + - ihkl[i][1]*sp->symop[j].rot[1][1] + ihkl[i][2]*sp->symop[j].rot[2][1] ); - if (knew == ihkl[i][1]) { - lnew = (int) rint( ihkl[i][0]*sp->symop[j].rot[0][2] + - ihkl[i][1]*sp->symop[j].rot[1][2] + ihkl[i][2]*sp->symop[j].rot[2][2] ); - if (lnew == ihkl[i][2]) { - ++neps; - } - } - } - } - if (neps > 1) sp->epsilon[i] = neps * (sp->nsymop/sp->nsymop_prim); - } - /* hkl zone covers all with neps of 1 */ - sp->epsilon[12] = sp->nsymop/sp->nsymop_prim; -} - -int ccp4spg_get_multiplicity(const CCP4SPG* sp, const int h, const int k, const int l) { - - int i; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_get_multiplicity",NULL); - return 0; - } - /* loop over all possible epsilon zones */ - for (i = 0; i < 13; ++i) - if (sp->epsilon[i]) - if (ccp4spg_check_epsilon_zone(i+1,h,k,l) == 0) - return sp->epsilon[i]; - - return 0; -} - -int ccp4spg_check_epsilon_zone(const int nzone, const int h, const int k, const int l) { - - int bigfac=1000; /* this needs to be big enough to prevent accidental zeros */ - - switch (nzone) { - case 1: - return bigfac*k + l; - case 2: - return h + bigfac*l; - case 3: - return h + bigfac*k; - case 4: - return h - k + bigfac*l; - case 5: - return h + bigfac*k - l; - case 6: - return bigfac*h + k - l; - case 7: - return h + k + bigfac*l; - case 8: - return h + bigfac*k + l; - case 9: - return bigfac*h + k + l; - case 10: - return 2*h + k + bigfac*l; - case 11: - return h + 2*k + bigfac*l; - case 12: - return h + bigfac*k - (bigfac+1)*l; - case 13: - return 0; - } - printf ("Invalid nzone ! \n"); - return 0; -} - -void ccp4spg_print_epsilon_zones(const CCP4SPG* sp) { - - int i,j=0; - char epsilon_zone[8]; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_print_epsilon_zones",NULL); - return; - } - printf("\n ****** EPSILON ZONES - Reflection Classes and their multiplicity ****** \n"); - - /* loop over all possible epsilon zones */ - for (i = 0; i < 13; ++i) - if (sp->epsilon[i]) { - printf("\n EPSILON Zone %d\n",++j); - printf(" Reflections of type %s \n", - ccp4spg_describe_epsilon_zone(i+1,epsilon_zone)); - printf(" Multiplicity %d\n",sp->epsilon[i]); - } -} - -char *ccp4spg_describe_epsilon_zone(const int nzone, char *epsilon_zone) { - - switch (nzone) { - case 1: - return ( strcpy(epsilon_zone,"h00") ); - case 2: - return ( strcpy(epsilon_zone,"0k0") ); - case 3: - return ( strcpy(epsilon_zone,"00l") ); - case 4: - return ( strcpy(epsilon_zone,"hh0") ); - case 5: - return ( strcpy(epsilon_zone,"h0h") ); - case 6: - return ( strcpy(epsilon_zone,"0kk") ); - case 7: - return ( strcpy(epsilon_zone,"h -h0") ); - case 8: - return ( strcpy(epsilon_zone,"h0 -h") ); - case 9: - return ( strcpy(epsilon_zone,"0k -k") ); - case 10: - return ( strcpy(epsilon_zone,"-h 2h 0") ); - case 11: - return ( strcpy(epsilon_zone,"2h -h 0") ); - case 12: - return ( strcpy(epsilon_zone,"hhh") ); - case 13: - return ( strcpy(epsilon_zone,"hkl") ); - } - printf ("Invalid nzone ! \n"); - return "null"; -} - -int ccp4spg_is_sysabs(const CCP4SPG* sp, const int h, const int k, const int l) -{ - int j,hnew,knew,lnew; - float del_phas; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_is_sysabs",NULL); - return -1; - } - if (sp->nsymop > 1) { - for (j = 1; j < sp->nsymop; ++j) { - hnew = (int) rint( h*sp->invsymop[j].rot[0][0] + k*sp->invsymop[j].rot[1][0] + - l*sp->invsymop[j].rot[2][0] ); - if (hnew == h) { - knew = (int) rint( h*sp->invsymop[j].rot[0][1] + k*sp->invsymop[j].rot[1][1] + - l*sp->invsymop[j].rot[2][1] ); - if (knew == k) { - lnew = (int) rint( h*sp->invsymop[j].rot[0][2] + k*sp->invsymop[j].rot[1][2] + - l*sp->invsymop[j].rot[2][2] ); - if (lnew == l) { - /* phase shift from translational component of sym op */ - del_phas = h*sp->symop[j].trn[0] + k*sp->symop[j].trn[1] + - l*sp->symop[j].trn[2]; - if ( fabs(del_phas - rint( del_phas )) > 0.05 ) return (1); - } - } - } - } - } - return (0); - -} - -int ccp4spg_generate_origins(const char *namspg, const int nsym, const float rsym[][4][4], - float origins[][3], int *polarx, int *polary, int *polarz, - const int iprint) -{ - int i,j,k,norigins,k1,k2,k3,alt_orig,ichk; - int id[6]={0,6,4,8,3,9},is[3]; - float xin=0.13,yin=0.17,zin=0.19,xout,yout,zout,rsymd[3][3]; - - *polarx = *polary = *polarz = 1; - - for (i = 1; i < nsym; ++i) { - xout = rsym[i][0][0]*xin + rsym[i][0][1]*yin + rsym[i][0][2]*zin; - if (fabs(xout-xin) > 0.01) *polarx = 0; - yout = rsym[i][1][0]*xin + rsym[i][1][1]*yin + rsym[i][1][2]*zin; - if (fabs(yout-yin) > 0.01) *polary = 0; - zout = rsym[i][2][0]*xin + rsym[i][2][1]*yin + rsym[i][2][2]*zin; - if (fabs(zout-zin) > 0.01) *polarz = 0; - } - - /* First origin is 0,0,0 */ - norigins=1; - origins[0][0]=0.0; - origins[0][1]=0.0; - origins[0][2]=0.0; - - /* check which points can be an alternate origin. - only six possibilities which are 0 1/2 1/3 2/3 1/4 3/4 - is/id expressed as twelfths */ - for (k1 = 0; k1 < 6; ++k1) { - for (k2 = 0; k2 < 6; ++k2) { - for (k3 = 0; k3 < 6; ++k3) { - if (k1==0 && k2 == 0 && k3 ==0) continue; - is[0]=id[k1]; - is[1]=id[k2]; - is[2]=id[k3]; - if ( *polarx && is[0] ) continue; - if ( *polary && is[1] ) continue; - if ( *polarz && is[2] ) continue; - -/* Let [Si] =[RSYMi] be (3x4) symmetry operator. - Need to Check if the symmetry operator shifts of each alternate origin - [ORx,ORy,ORz) are preserved for each symmetry operator. - Origin (0,0,0) shifts to Ti(1), Ti(2) Ti(3) - == RSYMi(1,4),RSYMi(2,4),RSYMi(3,4) - - [RSYMi] [OR] = [OR] + [Ti] + n[I] = [1 0 0 RSYMi(1,4)] [OR1] + n[I] - [0 1 0 RSYMi(2,4)] [OR2] - [0 0 1 RSYMi(3,4)] [OR3] - - Hence [RSYMi(1,1) -1 RSYMi(1,2) RSYMi(1,3) 0] [OR1] = n[I] - [RSYMi(2,1) RSYMi(2,2) -1 RSYMi(2,3) 0] [OR2] - [RSYMi(3,1) RSYMi(3,2) RSYMi(3,3) -1 0] [OR3] - [ 0 0 0 1] [1 ] - - Use RSYM(..1) to respresent indentity.. Enough to use 3x3 matrix.. */ - - alt_orig=1; - for (i = 1; i < nsym && alt_orig; ++i) { - for (j = 0; j < 3; ++j) - for (k = 0; k < 3; ++k) - rsymd[j][k] = rsym[i][j][k] - rsym[0][j][k]; - for (j = 0; j < 3; ++j) { - ichk = (int) rint( rsymd[j][0]*is[0]+rsymd[j][1]*is[1]+rsymd[j][2]*is[2] ); - if ( ichk % 12 ) { - alt_orig=0; - break; - } - } - } - if (alt_orig) { - norigins+=1; - origins[norigins-1][0]=is[0]/12.0; - origins[norigins-1][1]=is[1]/12.0; - origins[norigins-1][2]=is[2]/12.0; - } - } - } - } - - if (iprint) { - if( *polarx && *polary && *polarz) { - printf(" this is p1: origin anywhere"); - printf("\n %s %s %s \n", - "Number of alternate origins for spacegroup: ",namspg," is infinite."); - } else if( *polarx && *polary) { - printf(" this is a polar+ spacegroup: origin anywhere in a b plane"); - printf("\n %s %s %s %d \n", - "Number of alternate origin containing planes for spacegroup:", - namspg, " is:",norigins); - } else if( *polarx && *polarz) { - printf(" this is a polar+ spacegroup: origin anywhere in a c plane"); - printf("\n %s %s %s %d \n", - "Number of alternate origin containing planes for spacegroup:", - namspg, " is:",norigins); - } else if( *polary && *polarz) { - printf(" this is a polar+ spacegroup: origin anywhere in b c plane"); - printf("\n %s %s %s %d \n", - "Number of alternate origin containing planes for spacegroup:", - namspg, " is:",norigins); - } else if( *polarx) { - printf(" this is a polar spacegroup: origin is not fixed along a axis"); - printf("\n %s %s %s %d \n", - "Number of alternate origin containing lines for spacegroup: ", - namspg, " is:",norigins); - } else if( *polary) { - printf(" this is a polar spacegroup: origin is not fixed along b axis"); - printf("\n %s %s %s %d \n", - "Number of alternate origin containing lines for spacegroup: ", - namspg, " is:",norigins); - } else if( *polarz) { - printf(" this is a polar spacegroup: origin is not fixed along c axis"); - printf("\n %s %s %s %d \n", - "Number of alternate origin containing lines for spacegroup: ", - namspg, " is:",norigins); - } else { - printf("\n %s %s %s %d \n", - "Number of alternate origins for spacegroup: ",namspg, - " is:",norigins); - } - - printf("\n Norigin Ox Oy Oz\n\n"); - for (i = 0; i < norigins; ++i) { - if (*polary && *polarz && *polarx) { - printf("%8d ?? ?? ?? \n", i+1); - } else if(*polarx && *polary) { - printf("%8d ?? ?? %8.4f\n", i+1,origins[i][2]); - } else if(*polarx && *polarz) { - printf("%8d ?? %8.4f ?? \n", i+1,origins[i][1]); - } else if(*polary && *polarz) { - printf("%8d%8.4f ?? ?? \n", i+1,origins[i][0]); - } else if( *polarx) { - printf("%8d ?? %8.4f%8.4f\n", i+1,origins[i][1],origins[i][2]); - } else if(*polary) { - printf("%8d%8.4f ?? %8.4f\n", i+1,origins[i][0],origins[i][2]); - } else if(*polarz) { - printf("%8d%8.4f%8.4f ?? \n", i+1,origins[i][0],origins[i][1]); - } else { - printf("%8d%8.4f%8.4f%8.4f\n", i+1,origins[i][0],origins[i][1],origins[i][2]); - } - } - } - return norigins; -} - -void ccp4spg_print_recip_spgrp(const CCP4SPG* sp) -{ - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_print_recip_spgrp",NULL); - return; - } - - printf("Reciprocal space symmetry: \n"); - printf("Space group: \"%s\" Point group: \"%s\" Laue group: \"%s\" \n", - sp->symbol_xHM,sp->point_group,sp->laue_name); - printf("Reference asymmetric unit: \"%s\" \n",sp->asu_descr); - printf(" (change of basis may be applied) \n"); - ccp4spg_print_recip_ops(sp); -} - -void ccp4spg_print_recip_ops(const CCP4SPG* sp) -{ - int i,j,k,l,nrow, n_in_last_row,rsymop_len=80; - float tmp_symop[4][4]; - char rsymop[80]; - - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"ccp4spg_print_recip_ops",NULL); - return; - } - - nrow = (sp->nsymop_prim + 3)/ 4; - n_in_last_row = sp->nsymop_prim % 4; - if (n_in_last_row == 0) n_in_last_row = 4; - - printf("\n Spacegroup %d \"%s\" \n",sp->spg_ccp4_num,sp->symbol_xHM); - printf(" Original indices for reflection hkl with symmetry number ISYM \n"); - printf("\n Bijvoet positive \n"); - printf(" %-18s%-18s%-18s%-18s\n","ISYM","ISYM","ISYM","ISYM"); - for (i = 0 ; i < nrow-1 ; ++i) { - printf(" ISYM"); - for (j = 0 ; j < 4 ; ++j) { - for (k = 0; k < 3; ++k) { - /* note we use the transpose for reciprocal space operators */ - for (l = 0; l < 3; ++l) - tmp_symop[k][l] = sp->invsymop[4*i+j].rot[l][k]; - tmp_symop[k][3] = 0.0; - tmp_symop[3][k] = 0.0; - } - tmp_symop[3][3] = 1.0; - mat4_to_recip_symop(rsymop,rsymop+rsymop_len,(const float (*)[4])tmp_symop); - rsymop[12] = '\0'; - printf(" %3d %-12s",2*(4*i+j)+1,rsymop); - } - printf("\n"); - } - printf(" ISYM"); - for (j = 0 ; j < n_in_last_row ; ++j) { - for (k = 0; k < 3; ++k) { - for (l = 0; l < 3; ++l) - tmp_symop[k][l] = sp->invsymop[4*i+j].rot[l][k]; - tmp_symop[k][3] = 0.0; - tmp_symop[3][k] = 0.0; - } - tmp_symop[3][3] = 1.0; - mat4_to_recip_symop(rsymop,rsymop+rsymop_len,(const float (*)[4])tmp_symop); - rsymop[12] = '\0'; - printf(" %3d %-12s",2*(4*(nrow-1)+j)+1,rsymop); - } - printf("\n"); - - printf("\n Bijvoet negative \n"); - printf(" %-18s%-18s%-18s%-18s\n","ISYM","ISYM","ISYM","ISYM"); - for (i = 0 ; i < nrow-1 ; ++i) { - printf(" ISYM"); - for (j = 0 ; j < 4 ; ++j) { - for (k = 0; k < 3; ++k) { - for (l = 0; l < 3; ++l) - tmp_symop[k][l] = - sp->invsymop[4*i+j].rot[l][k]; - tmp_symop[k][3] = 0.0; - tmp_symop[3][k] = 0.0; - } - tmp_symop[3][3] = 1.0; - mat4_to_recip_symop(rsymop,rsymop+rsymop_len,(const float (*)[4])tmp_symop); - rsymop[12] = '\0'; - printf(" %3d %-12s",2*(4*i+j)+2,rsymop); - } - printf("\n"); - } - printf(" ISYM"); - for (j = 0 ; j < n_in_last_row ; ++j) { - for (k = 0; k < 3; ++k) { - for (l = 0; l < 3; ++l) - tmp_symop[k][l] = - sp->invsymop[4*i+j].rot[l][k]; - tmp_symop[k][3] = 0.0; - tmp_symop[3][k] = 0.0; - } - tmp_symop[3][3] = 1.0; - mat4_to_recip_symop(rsymop,rsymop+rsymop_len,(const float (*)[4])tmp_symop); - rsymop[12] = '\0'; - printf(" %3d %-12s",2*(4*(nrow-1)+j)+2,rsymop); - } - printf("\n"); -} - -int range_to_limits(const char *range, float limits[2]) -{ - int i,in_value=1,neg=0,frac=0,equal=0; - float value1,value2; - float delta=0.00001; - char ch; - char buf[2]; - buf[1] = 0; - - for (i = 0 ; i < strlen(range) ; ++i) { - ch = range[i]; - if (ch == '<') { - if (in_value) { - /* finishing lower value */ - limits[0] = value1; - if (frac) limits[0] = value1/value2; - if (neg) limits[0] = - limits[0]; - limits[0] += delta; - neg = 0; - frac = 0; - in_value = 0; - } else { - /* starting upper value */ - - in_value = 1; - } - } else if (ch == '-') { - neg = 1; - } else if (ch == '/') { - frac = 1; - } else if (ch == '=') { - if (in_value) { - equal = 1; - } else { - limits[0] -= 2.0*delta; - } - } else if (ch == ';' || ch == ' ') { - ; - } else { - if (in_value) { - buf[0] = ch; - if (frac) { - value2 = (float) atoi(buf); - } else { - value1 = (float) atoi(buf); - } - } - } - } - /* finishing upper value */ - limits[1] = value1; - if (frac) limits[1] = value1/value2; - if (neg) limits[1] = - limits[1]; - limits[1] -= delta; - if (equal) limits[1] += 2.0*delta; - - return 0; -} - -void set_fft_grid(CCP4SPG* sp, const int nxmin, const int nymin, const int nzmin, - const float sample, int *nx, int *ny, int *nz) -{ - if (!sp) { - ccp4_signal(CSYM_ERRNO(CSYMERR_NullSpacegroup),"set_fft_grid",NULL); - return; - } - *nx = get_grid_sample(nxmin, sp->laue_sampling[0], sample); - *ny = get_grid_sample(nymin, sp->laue_sampling[1], sample); - *nz = get_grid_sample(nzmin, sp->laue_sampling[2], sample); -} - -int all_factors_le_19(const int n) -{ - int i,ifact[8]={2,3,5,7,11,13,17,19}; - - int nn = n; - - for (i = 0 ; i < 8 ; ++i) { - while (nn % ifact[i] == 0) { - /* factor found, divide & continue if required */ - nn = nn/ifact[i]; - /* success */ - if (nn == 1) - return 1; - } - } - return 0; -} - -int get_grid_sample(const int minsmp, const int nmul, const float sample) -{ - int n; - float r1min=1.0, r1max=1.6, r2min=1.4, r2max=4.0; - - /* check minsmp <= 0, if so set nsampl = nmul */ - if (minsmp <= 0) - return nmul; - - /* set search limits */ - if (sample >= 1.0) { - r1max = sample; - r2min = sample*0.95 < 1.0 ? 1.0 : sample*0.95; - } - - /* start with multiple of nmul */ - n = (int) rint((r1max*minsmp)/nmul)*nmul; - - while (n > (int) rint(r1min*minsmp)) { - /* suitable sample interval found, accept it */ - if (all_factors_le_19(n)) - return n; - /* decrement trial value & continue if still in range */ - n -= nmul; - } - - /* now try 2nd search if 1st unsuccesful */ - n = (int) rint((r2min*minsmp)/nmul)*nmul; - - while (n < (int) rint(r2max*minsmp)) { - /* suitable sample interval found, accept it */ - if (all_factors_le_19(n)) - return n; - /* increment trial value & continue if still in range */ - n += nmul; - } - - /* failed */ - return -1; -} - -int ccp4spg_load_laue(CCP4SPG *spacegroup, const int nlaue) -{ - int ierr = 1; - - if (!spacegroup) return ierr; - - if ( nlaue == 3 ) { - spacegroup->asufn = &ASU_1b; - spacegroup->nlaue = 3; - strcpy(spacegroup->laue_name,"-1"); - spacegroup->laue_sampling[0] = 2; - spacegroup->laue_sampling[1] = 2; - spacegroup->laue_sampling[2] = 2; - ierr = 0; - } - if ( nlaue == 4 ) { - spacegroup->nlaue = 4; - strcpy(spacegroup->laue_name,"2/m"); - spacegroup->laue_sampling[0] = 2; - spacegroup->laue_sampling[1] = 4; - spacegroup->laue_sampling[2] = 2; - ierr = 0; - } - if ( nlaue == 5 ) { - spacegroup->nlaue = 5; - strcpy(spacegroup->laue_name,"2/m"); - spacegroup->laue_sampling[0] = 2; - spacegroup->laue_sampling[1] = 8; - spacegroup->laue_sampling[2] = 4; - ierr = 0; - } - if ( nlaue == 6 ) { - spacegroup->nlaue = 6; - strcpy(spacegroup->laue_name,"mmm"); - spacegroup->laue_sampling[0] = 4; - spacegroup->laue_sampling[1] = 4; - spacegroup->laue_sampling[2] = 4; - ierr = 0; - } - if ( nlaue == 7 ) { - spacegroup->nlaue = 7; - strcpy(spacegroup->laue_name,"4/m"); - spacegroup->laue_sampling[0] = 4; - spacegroup->laue_sampling[1] = 4; - spacegroup->laue_sampling[2] = 8; - ierr = 0; - } - if ( nlaue == 8 ) { - spacegroup->nlaue = 8; - strcpy(spacegroup->laue_name,"4/mmm"); - spacegroup->laue_sampling[0] = 4; - spacegroup->laue_sampling[1] = 4; - spacegroup->laue_sampling[2] = 8; - ierr = 0; - } - if ( nlaue == 9 ) { - spacegroup->nlaue = 9; - strcpy(spacegroup->laue_name,"-3"); - spacegroup->laue_sampling[0] = 6; - spacegroup->laue_sampling[1] = 6; - spacegroup->laue_sampling[2] = 6; - ierr = 0; - } - if ( nlaue == 10 ) { - spacegroup->nlaue = 10; - strcpy(spacegroup->laue_name,"3bar1m"); - spacegroup->laue_sampling[0] = 6; - spacegroup->laue_sampling[1] = 6; - spacegroup->laue_sampling[2] = 6; - ierr = 0; - } - if ( nlaue == 11 ) { - spacegroup->nlaue = 11; - strcpy(spacegroup->laue_name,"3barm"); - spacegroup->laue_sampling[0] = 6; - spacegroup->laue_sampling[1] = 6; - spacegroup->laue_sampling[2] = 6; - ierr = 0; - } - if ( nlaue == 12 ) { - spacegroup->nlaue = 12; - strcpy(spacegroup->laue_name,"6/m"); - spacegroup->laue_sampling[0] = 6; - spacegroup->laue_sampling[1] = 6; - spacegroup->laue_sampling[2] = 12; - ierr = 0; - } - if ( nlaue == 13 ) { - spacegroup->nlaue = 13; - strcpy(spacegroup->laue_name,"6/mmm"); - spacegroup->laue_sampling[0] = 6; - spacegroup->laue_sampling[1] = 6; - spacegroup->laue_sampling[2] = 12; - ierr = 0; - } - if ( nlaue == 14 ) { - spacegroup->nlaue = 14; - strcpy(spacegroup->laue_name,"m3bar"); - spacegroup->laue_sampling[0] = 4; - spacegroup->laue_sampling[1] = 4; - spacegroup->laue_sampling[2] = 4; - ierr = 0; - } - if ( nlaue == 15 ) { - spacegroup->nlaue = 15; - strcpy(spacegroup->laue_name,"m3barm"); - spacegroup->laue_sampling[0] = 8; - spacegroup->laue_sampling[1] = 8; - spacegroup->laue_sampling[2] = 8; - ierr = 0; - } - return ierr; -} - -int ccp4spg_check_symm_cell(int nsym, float rsym[][4][4], float cell[6]) { - - CCP4SPG *spacegroup; - int i,k,l,status=1; - ccp4_symop *op1; - - if (nsym <= 0) return 0; - - /* identify spacegroup from supplied symops */ - op1 = (ccp4_symop *) ccp4_utils_malloc(nsym*sizeof(ccp4_symop)); - for (i = 0; i < nsym; ++i) { - for (k = 0; k < 3; ++k) { - for (l = 0; l < 3; ++l) { - op1[i].rot[k][l] = rsym[i][k][l]; - } - op1[i].trn[k] = rsym[i][k][3]; - } - } - spacegroup = ccp4_spgrp_reverse_lookup(nsym,op1); - - /* test cell against symmetry on case-by-case basis */ - if (strstr(spacegroup->symbol_xHM,":R")) { - status = ccp4uc_is_rhombohedral(cell,0.01F); - } else if (strstr(spacegroup->symbol_xHM,":H")) { - status = ccp4uc_is_hexagonal(cell,0.01F); - } else if (spacegroup->spg_num >= 168 && spacegroup->spg_num <= 194) { - status = ccp4uc_is_hexagonal(cell,0.01F); - } - - free(op1); - - return status; -} diff --git a/ccp4c/ccp4/csymlib.h b/ccp4c/ccp4/csymlib.h deleted file mode 100644 index 92eb0d0e..00000000 --- a/ccp4c/ccp4/csymlib.h +++ /dev/null @@ -1,645 +0,0 @@ -/* - csymlib.h: header file for csymlib.c - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @page csym_page CSYM library - * - * @verbatim - - - - @endverbatim - * - * @section csym_file_list File list - -

    -
  • csymlib.h - contains details of the C/C++ API -
  • ccp4_spg.h - contains details of the spacegroup data structure -
- * - * @section csym_overview Overview - -The CSYM library is centred around a data file syminfo.lib which is -auto-generated from sgtbx (the Space Group Toolbox of -cctbx). A description of -the contents of this file is given in the -documentation of the Fortran API. - -

A particular spacegroup in a particular setting -is loaded into an in-memory data structure by requesting a particular -spacegroup name, number, or set of operators. See the functions -ccp4spg_load_by_standard_num, ccp4spg_load_by_ccp4_num, -ccp4spg_load_by_spgname, ccp4spg_load_by_ccp4_spgname -and ccp4_spgrp_reverse_lookup. Information on the in-memory -data structure is given in ccp4_spg.h The memory can be freed by the -function ccp4spg_free. - -

Functions are provided to: -

    -
  • Query the data structure, e.g. ccp4spg_symbol_Hall, etc. (members -of the structure can of course be obtained directly) -
  • Check reciprocal space indices for a particular spacegroup, -e.g. ccp4spg_is_in_asu, ccp4spg_is_centric, -ccp4spg_get_multiplicity, ccp4spg_is_sysabs, etc. -
  • Set appropriate grids for FFT, e.g. set_fft_grid -
- * - * @section csym_operators Symmetry operators - -Symmetry operators are expressed in a variety of ways: -
    -
  • Using the struct ccp4_symop, which consists of a 3 x 3 rotation -matrix and a translation vector. -
  • As a 4 x 4 matrix, in which the rotation matrix is in the top-left-hand -corner and the translation vector is in elements [*][3]. Element [3][3] is -set to 1.0 -
  • As a string, such as "-x+1/2,-y,z+1/2" -
-Check the function description for which form is expected. Often, there -are alternative functions if you wish to supply the operators in a -different form. There are also the following conversion functions: -
    -
  • rotandtrn_to_mat4 -
  • rotandtrn_to_symop -
  • mat4_to_rotandtrn -
  • mat4_to_symop -
  • mat4_to_recip_symop -
  • symop_to_rotandtrn -
  • symop_to_mat4 -
-Note that the order of symmetry operators may be important in some cases, for -example in MTZ files with a M/ISYM column where ISYM encodes the symmetry operation -used. - - * @section csym_examples Examples - -See examples on ftp area - -*/ - -/** @file csymlib.h - * - * @brief C-level library for symmetry information. - * - * Functions defining the C-level API for accessing spacegroup properties. - * The primary spacegroup information comes from the data file syminfo.lib - * - * @author Martyn Winn - */ - -#ifndef __CSymLib__ -#define __CSymLib__ - -/* rcsidhs[] = "$Id$" */ - -/* note that definitions in ccp4_spg.h are within the CSym namespace */ -#include "ccp4_spg.h" - -#ifdef __cplusplus -namespace CSym { -extern "C" { -#endif - -/** Look up spacegroup in standard setting by number, and load properties. - * Allocates memory for the spacegroup structure. This can be freed - * later by ccp4spg_free(). - * @param numspg spacegroup number - * @return pointer to spacegroup - */ -CCP4SPG *ccp4spg_load_by_standard_num(const int numspg); - -/** Look up spacegroup by CCP4 number, and load properties. - * Allocates memory for the spacegroup structure. This can be freed - * later by ccp4spg_free(). - * @param ccp4numspg CCP4 spacegroup number - * @return pointer to spacegroup - */ -CCP4SPG *ccp4spg_load_by_ccp4_num(const int ccp4numspg); - -/** Look up spacegroup by the extended Hermann Mauguin symbol. - * Allocates memory for the spacegroup structure. This can be freed - * later by ccp4spg_free(). - * @param spgname Spacegroup name in form of extended Hermann Mauguin symbol. - * @return pointer to spacegroup - */ -CCP4SPG *ccp4spg_load_by_spgname(const char *spgname); - -/** Look up spacegroup by name. This is for use by CCP4 programs - * and is more complicated than ccp4spg_load_by_spgname. For each - * spacegroup in syminfo.lib it checks the CCP4 spacegroup name - * first, and then the extended Hermann Mauguin symbol. - * Allocates memory for the spacegroup structure. This can be freed - * later by ccp4spg_free(). - * @param ccp4spgname Spacegroup name. - * @return pointer to spacegroup - */ -CCP4SPG *ccp4spg_load_by_ccp4_spgname(const char *ccp4spgname); - -/** Look up spacegroup by symmetry operators and load properties. - * Allocates memory for the spacegroup structure. This can be freed - * later by ccp4spg_free(). - * @param nsym1 number of operators (including non-primitive) - * @param op1 pointer to array of operators - * @return pointer to spacegroup - */ -CCP4SPG * ccp4_spgrp_reverse_lookup(const int nsym1, const ccp4_symop *op1); - -/** Look up spacegroup from SYMOP. - * This would not normally be called directly, but via one of - * the wrapping functions. - * Allocates memory for the spacegroup structure. This can be freed - * later by ccp4spg_free(). - * @param numspg spacegroup number - * @param ccp4numspg CCP4 spacegroup number - * @param spgname Spacegroup name. - * @param ccp4spgname Spacegroup name. - * @param nsym1 number of operators (including non-primitive) - * @param op1 pointer to array of operators - * @return pointer to spacegroup - */ -CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg, - const char *spgname, const char *ccp4spgname, - const int nsym1, const ccp4_symop *op1); - -/** Free all memory malloc'd from static pointers. - * To be called before program exit. The function can be - * registered with atexit. - */ -void ccp4spg_mem_tidy(void); - -/** Generate symop matrices from description strings - * This would not normally be called directly, but via one of - * the wrapping functions SYMFR2 and SYMFR3 in the Fortran API. - * @param line null-terminated string containing symop descriptions - * @param rot array of 4x4 matrices - * @return number of symops read, or -1 on failure - */ -int symfr_driver (const char *line, float rot[][4][4]); - -/** Free memory associated with spacegroup. - * @param sp pointer to spacegroup - */ -void ccp4spg_free(CCP4SPG **sp); - -/** Look up spacegroup in standard setting by number and load into - * static storage of csymlib_f. - * @param numspg spacegroup number - * @return void - */ -void ccp4spg_register_by_ccp4_num(int numspg); - -/** Look up spacegroup by set of symmetry operators and load into - * static storage of csymlib_f. - * @param nops number of symops - * @param rsm symmetry operators - * @return void - */ -void ccp4spg_register_by_symops(int nops, float rsm[][4][4]); - -/** Derive centering operators from Hall symbol (deprecated). - * Centering operators are now read from syminfo.lib - * @param symbol_Hall Hall symbol for spacegroup - * @param cent_ops centering operators - * @return number of centering operators (0 if none found) - */ -int ccp4_spg_get_centering(const char *symbol_Hall, float cent_ops[4][3]); - -/** Load Laue data into spacegroup structure. - * @param nlaue CCP4 code for Laue group - * @param spacegroup Pointer to CCP4 spacegroup structure - * @return 0 on success, 1 on failure to load Laue data - */ -int ccp4spg_load_laue(CCP4SPG* spacegroup, const int nlaue); - -/** Test if reflection is in asu of Laue group 1bar. - * @return 1 if in asu else 0 - */ -int ASU_1b (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group 2/m. - * @return 1 if in asu else 0 - */ -int ASU_2_m (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group mmm. - * @return 1 if in asu else 0 - */ -int ASU_mmm (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group 4/m. - * @return 1 if in asu else 0 - */ -int ASU_4_m (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group 4/mmm. - * @return 1 if in asu else 0 - */ -int ASU_4_mmm(const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group 3bar. - * @return 1 if in asu else 0 - */ -int ASU_3b (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group 3bar1m. - * @return 1 if in asu else 0 - */ -int ASU_3bm (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group 3barm. - * @return 1 if in asu else 0 - */ -int ASU_3bmx (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group 6/m. - * @return 1 if in asu else 0 - */ -int ASU_6_m (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group 6/mmm. - * @return 1 if in asu else 0 - */ -int ASU_6_mmm(const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group m3bar. - * @return 1 if in asu else 0 - */ -int ASU_m3b (const int h, const int k, const int l); - -/** Test if reflection is in asu of Laue group m3barm. - * @return 1 if in asu else 0 - */ -int ASU_m3bm (const int h, const int k, const int l); - -/** Function to return Hall symbol for spacegroup. - * @param sp pointer to spacegroup - * @return pointer to Hall symbol for spacegroup - */ -char *ccp4spg_symbol_Hall(CCP4SPG* sp); - -/** inverts a symmetry operator. The input operator is - * converted to a 4 x 4 matrix, inverted, and converted back. - * @param ccp4_symop input symmetry operator - * @return inverted symmetry operator - */ -ccp4_symop ccp4_symop_invert( const ccp4_symop op1 ); - -/** Compare two spacegroup names. Strings are converted to upper - * case before making the comparison, but otherwise match must be - * exact. - * @param spgname1 First spacegroup name. - * @param spgname2 Second spacegroup name. - * @return 1 if they are equal else 0. -*/ -int ccp4spg_name_equal(const char *spgname1, const char *spgname2); - -/** Try to match a spacegroup name to one from SYMINFO. Blanks are - * removed when making the comparison. Strings are converted to upper - * case before making the comparison. If spgname_lib has " 1 " and - * spgname_match doesn't, then strip out " 1" to do "short" comparison. - * @param spgname1 First spacegroup name, assumed to be a standard one - * obtained at some point from SYMINFO - * @param spgname2 Second spacegroup name that you are trying to match - * to a standard SYMINFO one. E.g. it might have been provided by the - * user. - * @return 1 if they are equal else 0. -*/ -int ccp4spg_name_equal_to_lib(const char *spgname_lib, const char *spgname_match); - -/** Function to create "short" name of spacegroup. Blanks - * are removed, as are " 1" elements (except for the special case - * of "P 1"). - * @param shortname String long enough to hold short name. - * @param longname Long version of spacegroup name. - * @return Pointer to shortname. -*/ -char *ccp4spg_to_shortname(char *shortname, const char *longname); - -/** Function to deal with colon-specified spacegroup settings. - * E.g. 'R 3 :H' is converted to 'H 3 '. Note that spaces are - * returned and should be dealt with by the calling function. - * @param name Spacegroup name. - * @return void -*/ -void ccp4spg_name_de_colon(char *name); - -/** Compare two point group names. Blanks are removed when - * making the comparison. Strings are converted to upper - * case before making the comparison. Any initial "PG" is ignored. - * @param pgname1 First point group name. - * @param pgname2 Second point group name. - * @return 1 if they are equal else 0. -*/ -int ccp4spg_pgname_equal(const char *pgname1, const char *pgname2); - -/** Function to normalise translations of a symmetry operator, - * i.e. to ensure 0.0 <= op.trn[i] < 1.0. - * @param op pointer to symmetry operator. - * @return Pointer to normalised symmetry operator. -*/ -ccp4_symop *ccp4spg_norm_trans(ccp4_symop *op); - -/** Sort and compare two symmetry operator lists. - * Kevin's code. The lists are coded as ints, which are then sorted and compared. - * Note that no changes are made to the input operators, so that operators - * differing by an integral number of unit cell translations are considered - * unequal. If this is not what you want, normalise the operators with - * ccp4spg_norm_trans first. - * @param nsym1 number of symmetry operators in first list - * @param op1 first list of symmetry operators - * @param nsym2 number of symmetry operators in second list - * @param op2 second list of symmetry operators - * @return 1 if they are equal else 0. -*/ -int ccp4_spgrp_equal( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2); - -/** Compare two symmetry operator lists. - * Kevin's code. The lists are coded as ints, which are compared. - * Unlike ccp4_spgrp_equal, the lists are not sorted, so the same operators - * in a different order will be considered unequal. - * @param nsym1 number of symmetry operators in first list - * @param op1 first list of symmetry operators - * @param nsym2 number of symmetry operators in second list - * @param op2 second list of symmetry operators - * @return 1 if they are equal else 0. -*/ -int ccp4_spgrp_equal_order( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2); - -/** Make an integer coding of a symmetry operator. - * The coding takes 30 bits: 18 for the rotation and 12 for the translation. - * @param op symmetry operator - * @return int code. - */ -int ccp4_symop_code(ccp4_symop op); - -/** Comparison of symmetry operators encoded as integers. - * In ccp4_spgrp_equal, this is passed to the stdlib qsort. - * @param p1 pointer to first integer - * @param p1 pointer to second integer - * @return difference between integers -*/ -int ccp4_int_compare( const void *p1, const void *p2 ); - -/** Test whether reflection or it's Friedel mate is in asu. - * @param sp pointer to spacegroup - * @param h reflection index - * @param k reflection index - * @param l reflection index - * @return 1 if in asu, -1 if -h -k -l is in asu, 0 otherwise - */ -int ccp4spg_is_in_pm_asu(const CCP4SPG* sp, const int h, const int k, const int l); - -/** Test whether reflection is in asu. - * @param sp pointer to spacegroup - * @param h reflection index - * @param k reflection index - * @param l reflection index - * @return 1 if in asu, 0 otherwise - */ -int ccp4spg_is_in_asu(const CCP4SPG* sp, const int h, const int k, const int l); - -/** Place reflection (hin,kin,lin) in the asymmetric unit of spacegroup "sp". - * Resultant indices are placed in (hout,kout,lout). - * @param sp pointer to spacegroup - * @param hin input reflection index - * @param kin input reflection index - * @param lin input reflection index - * @param hout output reflection index - * @param kout output reflection index - * @param lout output reflection index - * @return "isym" if successful, 0 otherwise. "isym" = 2*isymop - 1 for - * reflections placed in the positive asu, i.e. I+ of a Friedel pair, and - * "isym" = 2*isymop for reflections placed in the negative asu, i.e. I- of - * a Friedel pair. Here "isymop" is the number of the symmetry operator used. - */ -int ccp4spg_put_in_asu(const CCP4SPG* sp, const int hin, const int kin, const int lin, - int *hout, int *kout, int *lout ); - -/** Transform reflection (hin,kin,lin) according to spacegroup "sp" and - * operation "isym". Resultant indices are placed in (hout,kout,lout). - * @param sp pointer to spacegroup - * @param isym required operation, see ccp4spg_put_in_asu - * @param hin input reflection index - * @param kin input reflection index - * @param lin input reflection index - * @param hout output reflection index - * @param kout output reflection index - * @param lout output reflection index - * @return void - */ -void ccp4spg_generate_indices(const CCP4SPG* sp, const int isym, - const int hin, const int kin, const int lin, - int *hout, int *kout, int *lout ); - -/** Shift phase value associated with hin,kin,lin according to translation -and optional sign change. Return in range 0,360. - * @param hin reflection index - * @param kin reflection index - * @param lin reflection index - * @param phasin Input phase. - * @param trans Requested translation - * @param isign If -1, change sign of phase - * @return shifted phase - */ -float ccp4spg_phase_shift(const int hin, const int kin, const int lin, - const float phasin, const float trans[3], const int isign); - -/** Check whether change of basis is necessary, i.e. whether the - * change of basis matrix is not the identity. - * @param chb change of basis matrix - * @return 1 if change of basis is necessary, 0 otherwise - */ -int ccp4spg_do_chb(const float chb[3][3]); - -/** Set up centric zones for a given spacegroup. This is called - * upon loading a spacegroup. - * @param sp pointer to spacegroup - * @return void - */ -void ccp4spg_set_centric_zones(CCP4SPG* sp); - -/** Function to determine whether or not h,k,l is a centric reflection - * in spacegroup "sp". - * @param sp pointer to spacegroup - * @param h input reflection index - * @param k input reflection index - * @param l input reflection index - * @return 1 if h,k,l is centric, 0 if not centric, and -1 if there is - * an error. - */ -int ccp4spg_is_centric(const CCP4SPG* sp, const int h, const int k, const int l); - -/** Check indices against a centric zone for a given spacegroup. - * @param nzone index of centric zone - * @param h reflection index - * @param k reflection index - * @param l reflection index - * @return 0 if in zone "nzone", non-zero otherwise - */ -int ccp4spg_check_centric_zone(const int nzone, const int h, const int k, const int l); - -/** Return phase of a centric reflection in the range 0.0 <= phase < 180.0. - * You should first check that reflection really is centric. - * @param sp pointer to spacegroup - * @param h reflection index - * @param k reflection index - * @param l reflection index - * @return phase of a centric reflection - */ -float ccp4spg_centric_phase(const CCP4SPG* sp, const int h, const int k, const int l); - -/** Print a summary of the centric zones of a spacegroup. - * @param sp pointer to spacegroup - * @return void - */ -void ccp4spg_print_centric_zones(const CCP4SPG* sp); - -/** Obtain string description of centric zone. - * @param nzone index of centric zone - * @param centric_zone string description of centric zone - * @return string description of centric zone - */ -char *ccp4spg_describe_centric_zone(const int nzone, char *centric_zone); - -/** Set up epsilon zones for a given spacegroup. This is called - * upon loading a spacegroup. - * @param sp pointer to spacegroup - * @return void - */ -void ccp4spg_set_epsilon_zones(CCP4SPG* sp); - -/** Return reflection multiplicity factor for a given hkl in a given - * spacegroup. - * @param sp pointer to spacegroup - * @param h reflection index - * @param k reflection index - * @param l reflection index - * @return reflection multiplicity factor - */ -int ccp4spg_get_multiplicity(const CCP4SPG* sp, const int h, const int k, const int l); - -/** Check indices against an epsilon zone for a given spacegroup. - * @param nzone index of epsilon zone (runs from 1 to 13) - * @param h reflection index - * @param k reflection index - * @param l reflection index - * @return 0 if in zone "nzone", non-zero otherwise - */ -int ccp4spg_check_epsilon_zone(const int nzone, const int h, const int k, const int l); - -/** Print a summary of the epsilon zones of a spacegroup. - * @param sp pointer to spacegroup - * @return void - */ -void ccp4spg_print_epsilon_zones(const CCP4SPG* sp); - -/** Obtain string description of epsilon zone. - * @param nzone index of epsilon zone - * @param epsilon_zone string description of epsilon zone - * @return string description of epsilon zone - */ -char *ccp4spg_describe_epsilon_zone(const int nzone, char *epsilon_zone); - - -/** Check if reflection is a systematic absence. - * @param sp pointer to spacegroup - * @param h reflection index - * @param k reflection index - * @param l reflection index - * @return 1 if reflection is a systematic absence, 0 otherwise. - */ -int ccp4spg_is_sysabs(const CCP4SPG* sp, const int h, const int k, const int l); - -/** Translated from Alexei Vagin's CALC_ORIG_PS. - * @param namspg Spacegroup name for printing only. - * @param nsym Input number of symmetry operators. - * @param rsym Input symmetry operators. - * @param origins Array containing alternative origins on output. - * @param polarx Return whether polar along x axis. - * @param polary Return whether polar along y axis. - * @param polarz Return whether polar along z axis. - * @param iprint If true, print out list of alternative origins. - * @return Number of alternate origins for spacegroup. - */ -int ccp4spg_generate_origins(const char *namspg, const int nsym, const float rsym[][4][4], - float origins[][3], int *polarx, int *polary, int *polarz, - const int iprint); - -/** Print details on reciprocal spacegroup. - * @param sp pointer to spacegroup - * @return void - */ -void ccp4spg_print_recip_spgrp(const CCP4SPG* sp); - -/** Print reciprocal symops. - * @param sp pointer to spacegroup - * @return void - */ -void ccp4spg_print_recip_ops(const CCP4SPG* sp); - -/** Convert string of type 0<=y<=1/4 to 0.0-delta, 0.25+delta, where - * delta is set to 0.00001 Makes many assumptions about string. - * @param range input string. - * @param limits output range limits. - * @return 0 on success - */ -int range_to_limits(const char *range, float limits[2]); - -/** Sets an FFT grid for a spacegroup. - * @param sp pointer to spacegroup - * @param nxmin minimum sampling on x - * @param nymin minimum sampling on y - * @param nzmin minimum sampling on z - * @param sample default fineness of sample - * @param nx returns sampling intervals along x - * @param ny returns sampling intervals along y - * @param nz returns sampling intervals along z - * @return void - */ -void set_fft_grid(CCP4SPG* sp, const int nxmin, const int nymin, const int nzmin, - const float sample, int *nx, int *ny, int *nz); - -/** Checks whether all factors of a number n are less than or - * equal to 19. - * @param n Number to be tested. - * @return 1 on success, O on failure. - */ -int all_factors_le_19(const int n); - -/** Sets a grid sample greater than minsmp, which has no prime - * factors greater than 19, and contains the factor nmul. - * @param minsmp - * @param nmul - * @param sample - * @return Grid sample or -1 on failure. - */ -int get_grid_sample(const int minsmp, const int nmul, const float sample); - -/** Check for consistency between cell dimensions and spacegroup. Latter - * is identified from symmetry operators. - * @param nsym No. of symmetry operators. - * @param rsym Symmetry operators. - * @param cell Cell dimensions. - * @return 1 if they are consistent, 0 if there is a problem. - */ -int ccp4spg_check_symm_cell(int nsym, float rsym[][4][4], float cell[6]); - -#ifdef __cplusplus -} } -#endif -#endif diff --git a/ccp4c/ccp4/cvecmat.c b/ccp4c/ccp4/cvecmat.c deleted file mode 100644 index d178f84c..00000000 --- a/ccp4c/ccp4/cvecmat.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - cvecmat.c: C library for vector and matrix manipulations - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file cvecmat.c - * C library for vector and matrix manipulations. - * Martyn Winn - */ - -#include -#include "cvecmat.h" -/* rcsid[] = "$Id$" */ - -/* c = a X b */ - -void ccp4_dcross(const double a[3], const double b[3], double c[3]) -{ - c[0] = a[1]*b[2] - b[1]*a[2]; - c[1] = a[2]*b[0] - b[2]*a[0]; - c[2] = a[0]*b[1] - b[0]*a[1]; -} - -void ccp4_3matmul(double c[3][3], const double a[3][3], const double b[3][3]) -{ - int i,j,k; - - for ( i = 0; i < 3; i++ ) - for ( j = 0; j < 3; j++ ) { - c[i][j] = 0.0; - for ( k = 0; k < 3; k++ ) - c[i][j] += a[i][k]*b[k][j]; - } -} - -void ccp4_4matmul( float c[4][4], const float a[4][4], const float b[4][4]) -{ - int i,j,k; - - for ( i = 0; i < 4; i++ ) - for ( j = 0; j < 4; j++ ) { - c[i][j] = 0.0; - for ( k = 0; k < 4; k++ ) - c[i][j] += a[i][k]*b[k][j]; - } -} - -/* A (I) 3*3 matrix to be inverted */ -/* AI (O) inverse matrix */ -/* returns determinant */ - -double invert3matrix(const double a[3][3], double ai[3][3]) - -{ int i,j; - double c[3][3],d; - - ccp4_dcross(a[1],a[2],c[0]); - ccp4_dcross(a[2],a[0],c[1]); - ccp4_dcross(a[0],a[1],c[2]); - - d = a[0][0]*c[0][0] + a[0][1]*c[0][1] + a[0][2]*c[0][2]; - - if (fabs(d) > 1.0e-30) { - for ( i = 0; i < 3; i++ ) - for ( j = 0; j < 3; j++ ) - ai[i][j] = c[j][i] / d; - } else { - return 0.0; - } - return d; -} - -/* A (I) 4*4 matrix to be inverted */ -/* AI (O) inverse matrix */ -/* returns determinant */ - -float invert4matrix(const float a[4][4], float ai[4][4]) - -{ - double c[4][4], d; - int i, j; - double x[3][3]; - int i1, j1, i2 ; - double am, q; - int ii, jj; - - /* Function Body */ - for (ii = 0; ii < 4; ++ii) { - for (jj = 0; jj < 4; ++jj) { - ai[ii][jj] = 0.0; - i = -1; - for (i1 = 0; i1 < 4; ++i1) { - if (i1 != ii) { - ++i; - j = -1; - for (j1 = 0; j1 < 4; ++j1) { - if (j1 != jj) { - ++j; - x[i][j] = a[i1][j1]; - } - } - } - } - - am = x[0][0]*x[1][1]*x[2][2] - x[0][0]*x[1][2]*x[2][1] + - x[0][1]*x[1][2]*x[2][0] - x[0][1]*x[1][0]*x[2][2] + - x[0][2]*x[1][0]*x[2][1] - x[0][2]*x[1][1]*x[2][0]; - i2 = ii + jj; - c[ii][jj] = ccp4_pow_ii(-1.0, i2) * am; - } - } - -/* ---- Calculate determinant */ - - d = 0.0; - - for (i = 0; i < 4; ++i) { - d = a[i][0] * c[i][0] + d; - } - -/* ---- Get inverse matrix */ - - - if (fabs(d) > 1.0e-30) { - q = 1.0/d; - for (i = 0; i < 4; ++i) { - for (j = 0; j < 4; ++j) { - ai[i][j] = (float) (c[j][i] * q); - } - } - } else { - return 0.0; - } - - return ((float) d); -} - -float ccp4_pow_ii(const float base, const int power) { - - int i = 0; - float pow = 1; - - while (++i <= power) - pow *= base; - - return pow; -} - diff --git a/ccp4c/ccp4/cvecmat.h b/ccp4c/ccp4/cvecmat.h deleted file mode 100644 index d8cc4a81..00000000 --- a/ccp4c/ccp4/cvecmat.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - cvecmat.h: header file for cvecmat.c - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#ifndef __CCP4_VECMAT -#define __CCP4_VECMAT - -#ifdef __cplusplus -extern "C" { -#endif -/* rcsidhv[] = "$Id$" */ - -void ccp4_dcross(const double a[3], const double b[3], double c[3]); -void ccp4_3matmul(double c[3][3], const double a[3][3], const double b[3][3]); -void ccp4_4matmul( float c[4][4], const float a[4][4], const float b[4][4]); -double invert3matrix(const double a[3][3], double ai[3][3]); -float invert4matrix(const float a[4][4], float ai[4][4]); - -float ccp4_pow_ii(const float base, const int power); - -#ifdef __cplusplus -} -#endif - -#endif /*!CCP4_VECMAT */ diff --git a/ccp4c/ccp4/library_err.c b/ccp4c/ccp4/library_err.c deleted file mode 100644 index f6033c07..00000000 --- a/ccp4c/ccp4/library_err.c +++ /dev/null @@ -1,324 +0,0 @@ -/* - library_err.c: Error handling library - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file library_err.c - * Error handling library. - * Charles Ballard - */ - -#include -#include -#include -#include "ccp4_errno.h" -/* rcsid[] = "$Id$" */ - -/** @global ccp4_errno: global to store data -*/ -int ccp4_errno = 0; - -/* error_levels: error level descriptions */ -static const char * const error_levels[] = - { - "Success", /* 0 */ - "Informational", /* 1 */ - "Warning", /* 2 */ - "Error", /* 3 */ - "FATAL ERROR" /* 4 */ -}; - -/* file io errors */ -static const char *const cfile_errlist[] = - { - "Error 0", /* 0 = CIO_Ok */ - "Bad mode", /* 1 = CIO_BadMode */ - "Cannot open file", /* 2 = CIO_CantOpenFile */ - "Too many open files", /* 3 = CIO_MaxFile */ - "Read failed", /* 4 = CIO_ReadFail */ - "Write failed", /* 5 = CIO_WriteFail */ - "Close fail", /* 6 = CIO_CloseFail */ - "Seek fail", /* 7 = CIO_SeekFail */ - "Null pointer passed", /* 8 = CIO_NullPtr */ - "End of File", /* 9 = CIO_EOF */ - "No file" /* 10 = CIO_NoFile */ - "File not open", /* 11 = CIO_NotOpen */ - "Unlink failed" /* 12 = CIO_UnlinkFail */ - }; - -/* map library errors */ -static const char *const cmap_errlist[] = - { - "Error 0", /* 0 = CMERR_Ok */ - "Unassigned unit", /* 1 = CMERR_NoChannel */ - "Unassigned unit or disposed file", /* 2 = CMERR_NoFile */ - "Logical name does not exist", /* 3 = CMERR_NoLogicalName */ - "Cannot open file", /* 4 = CMERR_CantOpenFile */ - "No associated header", /* 5 = CMERR_NoHeader */ - "Read failed", /* 6 = CMERR_ReadFail */ - "Write failed", /* 7 = CMERR_WriteFail */ - "Parameter or dimension is incorrect ", /* 8 = CMERR_ParamError */ - "Unrecognised keyword", /* 9 = CMERR_UnrecognK */ - "File stamp error", /* 10 = CMERR_FileStamp */ - "Symmetry", /* 11 = CMERR_SymErr */ - "Cannot allocate memory", /* 12 = CMERR_AllocFail */ - "Too many open files", /* 13 = CMERR_MaxFile */ - }; - -/* mtz library errrors */ -static const char *const cmtz_errlist[] = - { - "Error 0", /* 0 = CMTZERR_Ok */ - "Unassigned unit", /* 1 = CMTZERR_NoChannel */ - "Null file handle, file not opened", /* 2 = CMTZERR_NoFile */ - "Logical name does not exist", /* 3 = CMTZERR_NoLogicalName */ - "Cannot open file", /* 4 = CMTZERR_CantOpenFile */ - "No associated header", /* 5 = CMTZERR_NoHeader */ - "Read failed", /* 6 = CMTZERR_ReadFail */ - "Write failed", /* 7 = CMTZERR_WriteFail */ - "Function parameter is incorrect", /* 8 = CMTZERR_ParamError */ - "Invalid cell dimensions", /* 9 = CMTZERR_Cellerr */ - "File stamp error", /* 10 = CMTZERR_FileStamp */ - "Symmetry", /* 11 = CMTZERR_SymErr */ - "Cannot allocate memory", /* 12 = CMTZERR_AllocFail */ - "Too many open files", /* 13 = CMTZERR_MaxFile */ - "Failed to initialise parser", /* 14 = CMTZERR_ParserFail */ - "File not identified as MTZ", /* 15 = CMTZERR_NotMTZ */ - "Missing or incomplete dataset information in input file.", /* 16 = CMTZERR_DatasetIncomplete */ - "No architecture information in file.", /* 17 = CMTZERR_NoArch */ - "Attempt to access unallocated dataset", /* 18 = CMTZERR_NullDataset */ - "Input MTZ file has incorrect major version for current library", /* 19 = CMTZERR_BadVersion */ - "MTZ header is corrupted: missing tokens in SYMINF record", /* 20 = CMTZERR_SYMINFIncomplete */ - "MTZ header is corrupted: missing tokens in COLUMN record", /* 21 = CMTZERR_COLUMNIncomplete */ - "Batch headers corrupted", /* 22 = CMTZERR_BadBatchHeader */ - "Input MTZ file has different minor version to that supported by current library", /* 23 = CMTZERR_DifferentVersion */ - "File column type different from type expected by program", /* 24 = CMTZERR_ColTypeMismatch */ - "MTZ header: error in column group specification", /* 25 = CMTZERR_ColGroupError */ - "MTZ header: error in column source specification", /* 26 = CMTZERR_ColSourceError */ - }; - -/* parser library errors */ -static const char *const cpars_errlist[] = - { - "Error 0", /* 0 = CPARSERR_Ok */ - "Maximum number of tokens exceeded", /* 1 = CPARSERR_MaxTokExceeded */ - "Cannot allocate memory", /* 2 = CPARSERR_AllocFail */ - "Null pointer", /* 3 = CPARSERR_NullPointer */ - "Line is longer than allocated length, so truncated", /* 4 = CPARSERR_LongLine */ - "Failed to open external command file", /* 5 = CPARSERR_CantOpenFile */ - "Failed to get name for external file", /* 6 = CPARSERR_NoName */ - "Overflow - exponent is too big to be evaluated", /* 7 = CPARSERR_ExpOverflow */ - "Underflow - exponent is too small to be evaluated", /* 8 = CPARSERR_ExpUnderflow */ - "Problem in mat4_to_symop", /* 9 = CPARSERR_MatToSymop */ - "Failed to interpret symop string", /* 10 = CPARSERR_SymopToMat */ - }; - -/* symmetry library errors */ -static const char *const csym_errlist[] = - { - "Error 0", /* 0 = CSYMERR_Ok */ - "Failed to initialise parser", /* 1 = CSYMERR_ParserFail */ - "Cannot find SYMINFO file - no symmetry information", /* 2 = CSYMERR_NoSyminfoFile */ - "Pointer to spacegroup structure is NULL", /* 3 = CSYMERR_NullSpacegroup */ - "ASU definition not found for this spacegroup", /* 4 = CSYMERR_NoAsuDefined */ - "Undefined Laue code for this spacegroup", /* 5 = CSYMERR_NoLaueCodeDefined */ - "Not enough tokens on SYMINFO line", /* 6 = CSYMERR_SyminfoTokensMissing */ - }; - -static const char *const cgen_errlist[] = - { - "Error 0", /* 0 = CGENERR_Ok */ - "Cannot allocate memory", /* 1 = CGENERR_AllocFail */ - "Cannot set environment variable", /* 2 = CGENERR_CantSetEnvironment */ - "Maximum number of logical names exceeded", /* 3 = CGENERR_MaxNamesExceeded */ - "Use: -e filename", /* 4 = CGENERR_EOptionUseError */ - "Use: -d filename", /* 5 = CGENERR_DOptionUseError */ - "Use: ", /* 6 = CGENERR_LogicalNameUseError */ - "Cannot open environ.def", /* 7 = CGENERR_CantOpenEnvFile */ - "Cannot open default.def", /* 8 = CGENERR_CantOpenDefFile */ - "Cannot parse environ.def file", /* 9 = CGENERR_ParseEnvFail */ - "Cannot parse default.def file", /* 10= CGENERR_ParseDefFail */ - "Cannot find input file", /* 11= CGENERR_CantFindInFile */ - "Failed to set path for environ.def file", /* 12= CGENERR_EnvPathFail */ - "Failed to set path for default.def file", /* 13= CGENERR_DefPathFail */ - "Cannot get CLIBD from environment", /* 14= CGENERR_CantGetClibd */ - "Cannot get CCP4_SCR from environment", /* 15= CGENERR_CantGetCcp4Scr */ - }; - -struct error_system { - char system[32]; - int system_nerr; - const char * const *error_list; -}; - -/* construct error list */ -static const struct error_system ccp4_errlist[] = { - {"system", 0, 0, }, - {"library_file", CCP4_COUNT(cfile_errlist), cfile_errlist,}, - {"mmdb", 0, 0,}, - {"mtz", CCP4_COUNT(cmtz_errlist), cmtz_errlist,}, - {"ccp4_map", CCP4_COUNT(cmap_errlist), cmap_errlist,}, - {"utils", 0, 0}, - {"ccp4_parser", CCP4_COUNT(cpars_errlist), cpars_errlist,}, - {"csym", CCP4_COUNT(csym_errlist), csym_errlist,}, - {"ccp4_general", CCP4_COUNT(cgen_errlist), cgen_errlist,} -}; - -static const int ccp4_system_nerr = CCP4_COUNT(ccp4_errlist); - -/* Obtain character string based upon error code. - Typical use ccp4_strerror(ccp4_errno) - The returned string is statically allocated in the - library_err.c file and should not be freed. - param error code (int) - returns const pointer to error message. -*/ -const char *ccp4_strerror(int error) -{ - int system = CCP4_ERRGETSYS(error); - /* int level = CCP4_ERRGETLEVEL(error); */ - int code = CCP4_ERRGETCODE(error); - - if (error == -1 || system == 0) - return strerror(errno); - - if (system >= ccp4_system_nerr) - return ("bad system error"); - if (code >= ccp4_errlist[system].system_nerr) - return ("bad error code"); - return (ccp4_errlist[system].error_list[code]); -} - -/* Print out passed message and internal message based upon - ccp4_errno - "message : error message " - param message (const char *) - return void -*/ -void ccp4_error (const char *msg) -{ - const char *colon; - - if (msg == 0 || *msg == '\0') - colon = ""; - else - colon = ": "; - - fprintf (stderr, "%s%s%s\n", - msg, colon, ccp4_strerror(ccp4_errno)); - if(ccp4_errno != -1 && CCP4_ERRGETSYS(ccp4_errno)) { - fprintf (stderr, "System: %s\nLevel: %d\n", - ccp4_errlist[CCP4_ERRGETSYS(ccp4_errno)].system, - CCP4_ERRGETLEVEL(ccp4_errno)); - if (errno) - fprintf (stderr, "%s%s\n", - "Last system message: ",strerror(errno)); } -} - -/* Wrapper for ccp4_error which also calls exit(1) - param message (const char *) -*/ -void ccp4_fatal (const char *message) -{ - ccp4_error(message); - exit(1); -} - -int CFile_Perror(const char *msg) -{ - const char * colon; - int error = CCP4_ERRGETCODE(ccp4_errno); - int cfile_nerr = ccp4_errlist[4].system_nerr; - - if (msg == NULL || msg == '\0') colon = ""; - else colon = ": "; - - if (error > 0 && error <= cfile_nerr) { - fprintf(stderr,"%s%s%s \n", - msg,colon,cfile_errlist[error]); - return error; } - fprintf(stderr,"Unknown error code"); - return -1; -} - -int ccp4_liberr_verbosity(int iverb) { - static int verbosity_level=1; - - if (iverb >= 0) - verbosity_level = iverb; - - return verbosity_level; -} - -/* Routine to set ccp4_errno and print out message for - error tracing. This should be the only way in - which ccp4_errno is set. - See error codes above for levels and systems. - A callback with prototype void function(void) - may also be passed to the routine. - Note: FATAL calls exit(1). - param error code (int) - param message (const char * const) - param callback (point to routine) -*/ -void ccp4_signal(const int code, const char * const msg, - void (*callback) ()) -{ - int severity = CCP4_ERRGETLEVEL(code), - system = CCP4_ERRGETSYS(code), - msg_no = CCP4_ERRGETCODE(code), - fatal_err = (severity == 4); - static const char msg_fmt[] = ">>>>>> CCP4 library signal %s:%s (%s)\n\t raised in %s <<<<<<\n"; - static const char sys_fmt[] = ">>>>>> System signal %d:%s (%s)\n\t raised in %s <<<<<<\n"; - ccp4_errno = code; - - /* use this function to control whether error messages are printed */ - if (!ccp4_liberr_verbosity(-1)) return; - - if (system == 0) { - if (msg) - printf(sys_fmt, - errno, - strerror(errno), - error_levels[severity], - msg); - else - printf(">>>>>> System signal %d:%s (%s) <<<<<<", - errno, - strerror(errno), - error_levels[severity]); - ccp4_errno = errno; } - else - if (msg) - printf(msg_fmt, - ccp4_errlist[system].system, - ccp4_errlist[system].error_list[msg_no], - error_levels[severity], - msg); - else - printf(">>>>>> CCP4 library signal %s:%s (%s) <<<<<<\n", - ccp4_errlist[system].system, - ccp4_errlist[system].error_list[msg_no], - error_levels[severity]); - - if (callback) - (*callback)(); - - if (fatal_err) exit(1); -} - - diff --git a/ccp4c/ccp4/library_file.c b/ccp4c/ccp4/library_file.c deleted file mode 100644 index ee42c707..00000000 --- a/ccp4c/ccp4/library_file.c +++ /dev/null @@ -1,2375 +0,0 @@ -/* - library_file.c: functions for file i/o - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file library_file.c - * Functions for file i/o. - * Charles Ballard - */ - -#include -#include -#include -#if defined _MSC_VER -#include -#endif -#include "library_file.h" -#include "ccp4_errno.h" -#include "ccp4_file_err.h" -/* rcsid[] = "$Id: library_file.c,v 1.26 2012/08/20 12:21:16 gxg60988 Exp $" */ - -static uint16 nativeIT = NATIVEIT; /* machine integer type */ -static uint16 nativeFT = NATIVEFT; /* machine float type */ - -static int _item_sizes[] = { - (int) sizeof (char), /* 0: bytes */ - (int) sizeof (short int), /* 1: (integer) half words */ - (int) sizeof (float), /* 2: reals/words */ - (int) sizeof (int), /* 3: `short complex' (pairs of half words). - NB int rather than 2*short since must fit - into fortran integer */ - (int) 2*sizeof (float), /* 4: complex (pairs of words) */ - (int) 2*sizeof (int), /* 5: double integers */ - (int) sizeof (int) /* 6: integers */ -}; - -static int (*_read_mode[])(CCP4File *, uint8 *, size_t) = { - ccp4_file_readchar, - ccp4_file_readshort, - ccp4_file_readfloat, - ccp4_file_readshortcomp, - ccp4_file_readcomp, - ccp4_file_readint64, - ccp4_file_readint -}; - -static int (*_write_mode[])(CCP4File *, const uint8 *, size_t) = { - ccp4_file_writechar, - ccp4_file_writeshort, - ccp4_file_writefloat, - ccp4_file_writeshortcomp, - ccp4_file_writecomp, - ccp4_file_writeint64, - ccp4_file_writeint -}; - -/** - * vaxF2ieeeF: - * @param buffer (float_uint_uchar *) vax order float array - * @param size (unsigned int) number of items - * - * Translation from Vax floating point format to ieee. - * - */ -static void vaxF2ieeeF(union float_uint_uchar *buffer, const unsigned int size) -{ - union float_uint_uchar out; - unsigned char exp; - unsigned int i; - - if ( buffer == NULL || size == 0) return; - - for (i = 0; i < size; i++) { - exp = (buffer[i].c[1] << 1) | (buffer[i].c[0] >> 7); /* extract exponent */ - if (!exp && !buffer[i].c[1]) /* zero value */ - out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; - else if (exp > 2) { /* normal value */ - out.c[0] = buffer[i].c[1] - (uint8)1; /* subtracts 2 from exponent */ - /* copy mantissa, LSB of exponent */ - out.c[1] = buffer[i].c[0]; - out.c[2] = buffer[i].c[3]; - out.c[3] = buffer[i].c[2]; - } else if (exp) { /* denormalized number */ - int shft; - - out.c[0] = buffer[i].c[1] & 0x80; /* keep sign, zero exponent */ - shft = 3 - exp; - /* shift original mant by 1 or 2 to get denormalized mant */ - /* prefix mantissa with '1'b or '01'b as appropriate */ - out.c[1] = (uint8)((buffer[i].c[0] & 0x7f) >> shft) | - (uint8)(0x10 << exp); - out.c[2] = (uint8)(buffer[i].c[0] << (8-shft)) | - (uint8)(buffer[i].c[3] >> shft); - out.c[3] = (uint8)(buffer[i].c[3] << (8-shft)) | - (uint8)(buffer[i].c[2] >> shft); - } else { /* sign=1 -> infinity or NaN */ - out.c[0] = 0xff; /* set exp to 255 */ - /* copy mantissa */ - out.c[1] = buffer[i].c[0] | (uint8)0x80; /* LSB of exp = 1 */ - out.c[2] = buffer[i].c[3]; - out.c[3] = buffer[i].c[2]; - } - buffer[i] = out; /* copy back result */ - } -} - -/** - * ieeeF2vaxF: - * @param buffer (float_uint_uchar *) big endian order float array - * @param size (unsigned int) number of items - * - * Translation from ieee floating point format to vax. - * - */ -static void ieeeF2vaxF(union float_uint_uchar *buffer, const unsigned int size) -{ - union float_uint_uchar out; - unsigned char exp; - unsigned int i; - - if ( buffer == NULL || size == 0) return; - - for (i=0; i>7); /* extract exponent */ - if (exp) { /* non-zero exponent */ - /* copy mantissa, last bit of exponent */ - out.c[0] = buffer[i].c[1]; - out.c[2] = buffer[i].c[3]; - out.c[3] = buffer[i].c[2]; - if (exp < 254) /* normal value */ - out.c[1] = buffer[i].c[0] + (uint8)1; /* actually adds two to exp */ - else { /* infinity or NaN */ - if (exp == 254) /* unrepresentable - OFL */ - /* set mant=0 for overflow */ - out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; - out.c[0] &= 0x7f; /* set last bit of exp to 0 */ - out.c[1] = 0x80; /* sign=1 exp=0 -> OFL or NaN. this will raise - a reserved operand exception if used. */ - } - } else if (buffer[i].c[1] & 0x60) { /* denormalized value */ - int shft; - - shft = (buffer[i].c[1] & 0x40) ? 1 : 2; /* shift needed to normalize */ - /* shift mantissa */ - /* note last bit of exp set to 1 implicitly */ - out.c[0] = (uint8)(buffer[i].c[1] << shft) | - (uint8)(buffer[i].c[2] >> (8-shft)); - out.c[3] = (uint8)(buffer[i].c[2] << shft) | - (uint8)(buffer[i].c[3] >> (8-shft)); - out.c[2] = (uint8)(buffer[i].c[3] << shft); - out.c[1] = (uint8)(buffer[i].c[0] & 0x80); /* sign */ - if (shft==1) { /* set exp to 2 */ - out.c[1] |= 0x01; - out.c[0] &= 0x7f; /* set LSB of exp to 0 */ - } - } else /* zero */ - out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; - buffer[i] = out; /* copy back the result */ - } -} - -/** - * convexF2ieeeF: - * @param buffer (float_uint_uchar *) float array with convex byte ordering - * @param size (unsigned int) number of items - * - * Translation from convex floating point format to ieee. - * - */ -static void convexF2ieeeF(union float_uint_uchar *buffer, const unsigned int size) -{ - union float_uint_uchar out; - unsigned char exp; - unsigned int i; - - if ( buffer == NULL || size == 0) return; - - for (i = 0; i < size; i++) { - exp = (buffer[i].c[0]<<1) | (buffer[i].c[1]>>7); /* extract exponent */ - if (!exp && !buffer[i].c[0]) /* zero value */ - out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; - else if (exp > 2) { /* normal value */ - out.c[0] = buffer[i].c[0] - (uint8)1; /* subtracts 2 from exponent */ - /* copy mantissa, LSB of exponent */ - out.c[1] = buffer[i].c[1]; - out.c[2] = buffer[i].c[2]; - out.c[3] = buffer[i].c[3]; - } else if (exp) { /* denormalized number */ - int shft; - - out.c[0] = buffer[i].c[0] & 0x80; /* keep sign, zero exponent */ - shft = 3 - exp; - /* shift original mant by 1 or 2 to get denormalized mant */ - /* prefix mantissa with '1'b or '01'b as appropriate */ - out.c[1] = (uint8)((buffer[i].c[1] & 0x7f) >> shft) | - (uint8)(0x10 << exp); - out.c[2] = (uint8)(buffer[i].c[1] << (8-shft)) | - (uint8)(buffer[i].c[2] >> shft); - out.c[3] = (uint8)(buffer[i].c[2] << (8-shft)) | - (uint8)(buffer[i].c[3] >> shft); - } else { /* sign=1 -> infinity or NaN */ - out.c[0] = 0xff; /* set exp to 255 */ - /* copy mantissa */ - out.c[1] = buffer[i].c[1] | (uint8)0x80; /* LSB of exp = 1 */ - out.c[2] = buffer[i].c[2]; - out.c[3] = buffer[i].c[3]; - } - buffer[i] = out; /* copy back result */ - } -} - -/** - * ieeeF2convexF: - * @param buffer (float_uint_uchar *) float array with big endian byte ordering - * @param size (const unsigned int) numnber of items - * - * Translation from ieee floating point format to convex. - * - */ -static void ieeeF2convexF(union float_uint_uchar *buffer, const unsigned int size) -{ - union float_uint_uchar out; - unsigned char exp; - unsigned int i; - - if ( buffer == NULL || size == 0) return; - - for (i=0; i < size; i++) { - exp = (uint8)(buffer[i].c[0] << 1) | - (uint8)(buffer[i].c[1] >> 7); /* extract exponent */ - if (exp) { /* non-zero exponent */ - /* copy mantissa, last bit of exponent */ - out.c[1] = buffer[i].c[1]; - out.c[3] = buffer[i].c[3]; - out.c[2] = buffer[i].c[2]; - if (exp < 254) /* normal value */ - out.c[0] = buffer[i].c[0] + (uint8)1; /* actually adds two to exp */ - else { /* infinity or NaN */ - if (exp == 254) /* unrepresentable - OFL */ - /* set mant=0 for overflow */ - out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; - out.c[1] &= 0x7f; /* set last bit of exp to 0 */ - out.c[0] = 0x80; /* sign=1 exp=0 -> OFL or NaN. this will raise - a reserved operand exception if used. */ - } - } else if (buffer[i].c[1] & 0x60) { /* denormalized value */ - int shft; - - shft = (buffer[i].c[1] & 0x40) ? 1 : 2; /* shift needed to normalize */ - /* shift mantissa */ - /* note last bit of exp set to 1 implicitly */ - out.c[1] = (uint8)(buffer[i].c[1] << shft) | - (uint8)(buffer[i].c[2] >> (8-shft)); - out.c[2] = (uint8)(buffer[i].c[2] << shft) | - (uint8)(buffer[i].c[3] >> (8-shft)); - out.c[3] = (uint8)(buffer[i].c[3] << shft); - out.c[0] = (uint8)(buffer[i].c[0] & 0x80); /* sign */ - if (shft==1) { /* set exp to 2 */ - out.c[0] |= 0x01; - out.c[1] &= 0x7f; /* set LSB of exp to 0 */ - } - } else /* zero */ - out.c[0] = out.c[1] = out.c[2] = out.c[3] = 0; - buffer[i] = out; /* copy back the result */ - } -} - -/** - * ccp4_file_raw_read: - * @param cfile * (CCP4File *) - * @param buffer * (char *) input array - * @param n_items (size_t) number of items - * - * reads block of n_items bytes from cfile to buffer via - * FILE struct cfile->stream(fread) or file desc cfile->fd - * read/_read). Increments location value cfile->loc. The - * cfile->iostat flag is set on failure. - * @return number of bytes read. - */ -int ccp4_file_raw_read(CCP4File *cfile, char *buffer, size_t n_items) -{ - int result; - - if (cfile->buffered && cfile->stream) { - result = fread (buffer, (size_t) sizeof(char), n_items, - cfile->stream); - if (result != n_items && feof(cfile->stream)) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_EOF), - "ccp4_file_raw_read", NULL); - cfile->iostat = CIO_EOF; - result = EOF; - } else if (result != n_items && ferror(cfile->stream)) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_raw_read", NULL); - cfile->iostat = CIO_ReadFail; - result = 0; } - } else { -#if defined _MSC_VER - result = _read (cfile->fd, buffer, n_items); -#else - result = read (cfile->fd, buffer, n_items); -#endif - if (n_items && result <= 0) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_ReadFail), - "ccp4_file_raw_read", NULL); - cfile->iostat = CIO_ReadFail; - result = 0; } - } - cfile->last_op = READ_OP; - - cfile->loc += result; - cfile->getbuff = 0; - - return result; -} - -/** - * ccp4_file_raw_write: - * @param cfile (CCP4File *) - * @param buffer (char *) output array - * @param n_items (size_t) number of items - * - * writes block of @n_items bytes from @buffer to @cfile via FILE struct - * @cfile->stream(fwrite) or file desc @cfile->fd(write/_write). Increments - * @cfile->loc on success, or resets on failure, which is then used to - * determine the file length. On failure @cfile->iostat is set. - * @return number of bytes written. - */ -int ccp4_file_raw_write(CCP4File *cfile, const char *buffer, size_t n_items) -{ - int result; - - if (cfile->buffered && cfile->stream) - result = fwrite (buffer, (size_t) sizeof(char), n_items, - cfile->stream); - else -#if defined _MSC_VER - result = _write (cfile->fd, buffer, n_items); -#else - result = write (cfile->fd, buffer, n_items); -#endif - - cfile->last_op = WRITE_OP; - - if (result == n_items) - cfile->loc += n_items; - else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_WriteFail), - "ccp4_file_raw_write", NULL); - cfile->iostat = CIO_WriteFail; - ccp4_file_tell(cfile); } - cfile->length = MAX(cfile->loc,cfile->length); - cfile->getbuff = 0; - - return result; -} - -/** - * ccp4_file_raw_seek: - * @param cfile (CCP4File *) - * @param offset (long) offset in bytes - * @param whence (int) SEEK_SET, SEEK_CUR, or SEEK_END - * - * if the file is "seekable" (not stdin) the function - * seeks on @cfile by offset bytes using fseek/ftell (@cfile->stream) - * or lseek (@cfile->fd). %SEEK_SET is relative - * to start of file, %SEEK_CUR to current, %SEEK_END to - * end. - * @return offset in bytes on success, -1 on failure. - */ -int ccp4_file_raw_seek(CCP4File *cfile, long offset, int whence) -{ - int result = -1; - - if (!cfile->direct) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_raw_seek", NULL); - return result; } - - if (cfile->buffered) { -#if defined (__alpha) && defined (vms) - (void) fflush (cfile->stream); -#endif - if (!(result = (fseek (cfile->stream,offset,whence)))) - result = ftell(cfile->stream); - } else { -#if defined _MSC_VER - result = _lseek(cfile->fd,offset,whence); -#else - result = lseek(cfile->fd, offset, whence); -#endif - } - - cfile->last_op = IRRELEVANT_OP; - - if (result == -1) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_SeekFail), - "ccp4_file_raw_seek", NULL); - cfile->iostat = CIO_SeekFail; - } else - cfile->loc = result; - cfile->getbuff = 0; - - return (result); -} - -/** - * _file_free: - * @param cfile (CCP4File *) - * - * free up @cfile - */ -static void _file_free(CCP4File *cfile) -{ - if(cfile->name) free(cfile->name); - cfile->name = NULL; - free(cfile); -} - -/** - * _file_init: - * @param cfile () - * - * initialise cfile struct - * @return cfile struct - */ -static CCP4File *_file_init() -{ - CCP4File *cfile = (CCP4File *) malloc(sizeof(CCP4File)); - char *foreign = getenv ("CONVERT_FROM"); - char *native = getenv ("NATIVEMTZ"); - - memset(cfile,'\0',sizeof(CCP4File)); - cfile->fd = -1; - cfile->buffered = 1; - cfile->binary = 1; - cfile->last_op = IRRELEVANT_OP; - cfile->mode = DEFMODE; - cfile->itemsize = _item_sizes[DEFMODE]; - if (native == NULL && foreign != NULL) { - if (strcmp (foreign, "BEIEEE") == 0) { - cfile->fconvert = DFNTF_BEIEEE ; - cfile->iconvert = DFNTI_MBO ; } - else if (strcmp (foreign, "LEIEEE") == 0) { - cfile->fconvert = DFNTF_LEIEEE; - cfile->iconvert = DFNTI_IBO ; } - else if (strcmp (foreign, "VAX") == 0) { - cfile->fconvert = DFNTF_VAX ; - cfile->iconvert = DFNTI_IBO ; } - else if (strcmp (foreign, "CONVEXNATIVE") == 0) { - cfile->fconvert = DFNTF_CONVEXNATIVE ; - cfile->iconvert = DFNTI_MBO ; } - } else { - cfile->fconvert = nativeFT; - cfile->iconvert = nativeIT; - } - cfile->_read=_read_mode[DEFMODE]; - cfile->_write=_write_mode[DEFMODE]; - return (cfile); -} - -/** - * _file_open_mode: - * @param cfile (CCP4File *) - * @param flag (const int) mode flag - * - * set file open mode elements of @cfile (see ccp4_sysdep.h) - * O_TMP = 0x0010 - * O_RDONLY = 0x0000 - * O_WRONLY = 0x0001 - * O_RDWR = 0x0002 - * O_APPEND = 0x0008 - */ -static void _file_open_mode(CCP4File * cfile, const int flag) -{ - if (flag & O_TMP) - cfile->scratch = 1; - if (flag & (O_WRONLY | O_RDWR | O_APPEND) ) { - cfile->write = 1; - if (flag & O_RDWR) - cfile->read = 1; - if (flag & O_APPEND) - cfile->append = 1; - } else - cfile->read = 1; -} - -/** - * _file_close: - * @param cfile (CCP4File *) - * - * close @cfile if it is "owned" (@cfile->own) using fclose or close. - * Reset @cfile to some safe value. Note: flush anyway. - * @return 0 on success, -1 on failure. - */ -static int _file_close (CCP4File *cfile) -{ - int result = 0; - - if(cfile->buffered && cfile->stream) { - if (cfile->own) - result = fclose (cfile->stream); - else - result = fflush(cfile->stream); - } else { - if (cfile->own) -#if defined _MSC_VER - result = _close(cfile->fd); -#else - result = close (cfile->fd); -#endif - } - - if (result == EOF) - cfile->iostat = CIO_CloseFail; - else - cfile->stream = NULL; - - return (result); -} - -/** - * ccp4_file_is_write: - * @param cfile (CCP4File *) - * - * is the @cfile writeable - * @return 1 if true - */ -int ccp4_file_is_write(const CCP4File *cfile) -{ - return (cfile->write); -} - -/** - * ccp4_file_is_read: - * @param cfile (CCP4File *) - * - * is the @cfile readable - * @return 1 if true. - */ -int ccp4_file_is_read(const CCP4File *cfile) -{ - return (cfile->read); -} - -/** - * ccp4_file_is_append: - * @param cfile (CCP4File *) - * - * is the @cfile in append mode - * @return 1 if true. - */ -int ccp4_file_is_append(const CCP4File *cfile) -{ - return (cfile->append); -} - -/** - * ccp4_file_is_scratch: - * @param cfile (CCP4File *) - * - * is scratch file - * @return 1 if true. - */ -int ccp4_file_is_scratch(const CCP4File *cfile) -{ - return (cfile->scratch); -} - -/** - * ccp4_file_is_buffered: - * @param cfile (CCP4File *) - * - * is the file buffered - * @return 1 if true - */ -int ccp4_file_is_buffered(const CCP4File *cfile) -{ - return (cfile->buffered); -} - -/** - * ccp4_file_status: - * @param cfile (CCP4File *) - * - * @return @cfile error status - */ -int ccp4_file_status(const CCP4File *cfile) -{ - return (cfile->iostat); -} - -int ccp4_file_raw_setstamp(CCP4File *cfile, const size_t offset) -{ - cfile->stamp_loc = offset; - return 0; -} - -/** - * ccp4_file_setstamp: - * @param cfile (CCP4File *) - * @param stamp_loc (size_t) offset in items - * - * set the machine stamp offset in CCP4 items determined - * by the mode of @cfile. See ccp4_file_setmode(). - * @return 0 on success, %EOF on failure - */ -int ccp4_file_setstamp(CCP4File *cfile, const size_t offset) -{ - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_setstamp", NULL); - return EOF; } - - return ccp4_file_raw_setstamp(cfile, offset*cfile->itemsize); -} - -/** - * ccp4_file_setmode: - * @param cfile (CCP4File *) - * @param mode (int) io_mode - * - * set the data mode of cfile to mode - * (CCP4_BYTE (8 bit) = 0, - * CCP4_INT16 (16 bit) = 1, - * CCP4_INT64 (64 bit) = 5, - * CCP4_INT32 (32 bit) = 6, - * FLOAT32 (32 bit) = 2, - * COMP32 (2*16 bit) = 3, - * COMP64 (2*32 bit) = 4). - * @return 0 on success, EOF on failure. - */ -int ccp4_file_setmode (CCP4File *cfile, const int mode) -{ - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_mode", NULL); - return EOF; } - - if (mode >= 0 && mode <= 6) { - cfile->mode = mode; - cfile->itemsize = _item_sizes[mode]; - cfile->_read=_read_mode[mode]; - cfile->_write=_write_mode[mode]; - } else { - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_BadMode), - "ccp4_file_mode", NULL); - return EOF; } - - return 0; -} - -/** - * ccp4_file_mode: - * @param cfile (CCP4File *) - * - * get data mode of @cfile (CCP4_BYTE =0, CCP4_INT16 =1, CCP4_INT64 =5, CCP4_INT32 =6, - * FLOAT32 =2, COMP32 =3, COMP64 =4) - * @return %mode - */ -int ccp4_file_mode (const CCP4File *cfile) -{ - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_mode", NULL); - return EOF; } - - return (cfile->mode); -} - -/** - * ccp4_file_itemsize: - * @param cfile (CCP4File *) - * - * @return %itemsize of @cfile. - */ -int ccp4_file_itemsize(const CCP4File *cfile) -{ - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_BadMode), - "ccp4_file_itemsize", NULL); - return EOF; } - - return (cfile->itemsize); -} - -/** - * ccp4_file_name: - * @param cfile (CCP4File *) - * - * strdup @cfile->name - * @return name of file as char * - */ -char *ccp4_file_name( CCP4File *cfile) -{ -#if defined _MSC_VER - return ( cfile == NULL ? NULL : _strdup(cfile->name)); -#else - return ( cfile == NULL ? NULL : strdup(cfile->name)); -#endif -} - -/** - * ccp4_file_setbyte: - * @param cfile (CCP4File *) - * @param byte_order (int) - * - * set byte ordering for file - * Return: - */ -int ccp4_file_setbyte(CCP4File *cfile, const int byte_order) -{ - int result = (cfile->fconvert | (cfile->iconvert<<8)); - - switch (byte_order) { - case DFNTF_BEIEEE: - cfile->fconvert = DFNTF_BEIEEE; - cfile->iconvert = DFNTI_MBO; - break; - case DFNTF_LEIEEE: - cfile->fconvert = DFNTF_LEIEEE; - cfile->iconvert = DFNTI_IBO ; - break; - case DFNTF_VAX: - cfile->fconvert = DFNTF_VAX ; - cfile->iconvert = DFNTI_IBO ; - break; - case DFNTF_CONVEXNATIVE: - cfile->fconvert = DFNTF_CONVEXNATIVE ; - cfile->iconvert = DFNTI_MBO ; - break; - default: - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_BadMode), - "ccp4_file_setbyte", NULL); - result = 0; - } - return result; -} - -/** - * ccp4_file_byte: - * @param cfile (CCP4File *) - * - * get byte ordering for file - * @return byte ordering information - */ -int ccp4_file_byte(CCP4File *cfile) -{ - return (cfile->fconvert | (cfile->iconvert<<8)); -} - -/** - * ccp4_file_open_file: - * @param file (const FILE *) FILE struct - * @param flag (const int) io mode (O_RDONLY =0, O_WRONLY =1, O_RDWR =2, - * O_TMP =, O_APPEND =) - * - * open @cfile with existing handle FILE struct file and mode @flag. - * The struct stat is check to determine if file is a regular file, - * if it is, and is not stdin, it is assumed to be direct access. - * @return (CCP4File *) on success, NULL on failure - */ -CCP4File *ccp4_file_open_file (const FILE *file, const int flag) -{ - CCP4File *cfile; -#if defined _MSC_VER - struct _stat st; -#else - struct stat st; -#endif - - if (!file) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_open_file", NULL); - return NULL; } - - if (!(cfile = _file_init() ) ) { - ccp4_signal(CCP4_ERRLEVEL(3), - "ccp4_file_open_file", NULL); - return NULL; } - - /* set values in structure */ - _file_open_mode(cfile,flag); - cfile->stream = (FILE *) file; - cfile->buffered = 1; - cfile->open = 1; - -#if defined _MSC_VER - _fstat(_fileno(cfile->stream), &st); - if ( !(st.st_mode & S_IFREG) || file == stdin) { -#else - fstat(fileno(cfile->stream), &st); - if ( !S_ISREG(st.st_mode) || file == stdin ) { -#endif - cfile->length = INT_MAX; - cfile->direct = 0; - } else { - cfile->length = st.st_size; - cfile->direct = 1; - } - cfile->loc = ftell( (FILE *)file); - - return cfile; -} - -/** - * ccp4_file_open_fd: - * @param fd (const int) file descriptor - * @param flag (const int) io mode (O_RDONLY =0, O_WRONLY =1, O_RDWR =2, - * O_TMP =, O_APPEND =) - * - * initialise CCP4File struct with file descriptor @fd and mode @flag - * The struct stat is check to determine if file is a regular file, - * if it is, and is not stdin, it is assumed to be direct access. - * @return (CCP4File *) on success, NULL on failure - */ -CCP4File *ccp4_file_open_fd (const int fd, const int flag) -{ - CCP4File * cfile; -#if defined _MSC_VER - struct _stat st; -#else - struct stat st; -#endif - - if (!(cfile = _file_init() ) ) { - ccp4_signal(CCP4_ERRLEVEL(3), - "ccp4_file_open_fd", NULL); - return NULL; } - - _file_open_mode(cfile, flag); - cfile->fd = fd; - cfile->open = 1; - cfile->buffered = 0; - -#if defined _MSC_VER - _fstat(fd, &st); - if ( !(st.st_mode & S_IFREG) || fd == 0) { -#else - fstat(fd, &st); - if ( !S_ISREG(st.st_mode) || fd == 0 ) { -#endif - cfile->length = INT_MAX; - cfile->direct = 0; - cfile->loc = 0; - } else { - cfile->length = st.st_size; - cfile->direct = 1; -#if defined _MSC_VER - cfile->loc = _lseek(fd, 0L, SEEK_CUR); -#else - cfile->loc = lseek(fd, 0L, SEEK_CUR); -#endif - } - - return cfile; -} - -/** - * ccp4_file_open: - * @param filename (const char *) filename - * @param flag (const int) i/o mode, possible values are O_RDONLY, O_WRONLY, - * O_RDWR, O_APPEND, O_TMP, O_CREAT, O_TRUNC - see ccp4_sysdep.h - * - * initialise CCP4File struct for file filename with mode @flag. - * If !buffered use open(), otherwise fopen() - * The struct stat is check to determine if file is a regular file, - * if it is, and is not stdin, it is assumed to be direct access. - * - * @return (CCP4File *) on success, NULL on failure - */ -CCP4File *ccp4_file_open (const char *filename, const int flag) -{ - CCP4File *cfile; - int openflags = O_RDONLY; - char fmode[5]; -#if defined _MSC_VER - struct _stat st; -#else - struct stat st; -#endif - - if (!(cfile = _file_init())) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_open", NULL); - return NULL; } - _file_open_mode(cfile, flag); - - if (!cfile->buffered) { - if (cfile->read && cfile->write) openflags = (O_RDWR | O_CREAT); - else if (cfile->write) openflags = (O_WRONLY | O_CREAT); - if (cfile->append) openflags |= O_APPEND; - if (flag & O_TRUNC) openflags |= O_TRUNC; -#if defined _MSC_VER - if (cfile->scratch) openflags |= O_TEMPORARY; -#endif -#if defined(__DECC) && defined(VMS) || defined (_MSC_VER) - openflags |= O_BINARY; -#endif -#if defined _MSC_VER - cfile->fd = _open(filename, openflags); -#else - cfile->fd = open(filename, openflags); -#endif - if (cfile->fd == -1) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_CantOpenFile), - "ccp4_file_open1", NULL); - return NULL; - } else { -#if defined _MSC_VER - _fstat(cfile->fd, &st); } -#else - fstat(cfile->fd, &st); } -#endif - } else { - char *mptr = fmode; - if (cfile->append) { - *mptr++ = 'a'; - if (cfile->read) *mptr++ = '+'; - } else { - if (cfile->read && cfile->write) { - if (flag & O_TRUNC) {*mptr++ = 'w'; } - else *mptr++ = 'r'; - *mptr++ = '+'; - } else if (cfile->write) - *mptr++ = 'w'; - else - *mptr++ = 'r'; - } -#if defined(__DECC) && defined(VMS) || defined (_WIN32) - *mptr++ = 'b'; -#endif - *mptr++ = '\0'; - -#ifdef VMS - if (cfile->scratch) - cfile->stream = fopen (filename, fmode, - "mbc=16", /* bigger blocksize */ - "fop=tmd"); /* temporary, delete on close */ - else - cfile->stream = fopen (filename, fmode, - "mbc=16", /* bigger blocksize */ - "ctx=stm", "mrs=0", "rat=cr", "rfm=stmlf"); -#elif defined(_WIN32) - if (cfile->scratch) { - cfile->stream = tmpfile(); - if (!cfile->stream) { - ccp4_signal(CCP4_ERRLEVEL(2) | CCP4_ERRNO(CIO_CantOpenFile), - "tmpfile() failed, opening normal file instead.", NULL); - cfile->stream = fopen (filename, fmode); - } - } - else - cfile->stream = fopen (filename, fmode); -#else - cfile->stream = fopen (filename, fmode); - if (cfile->stream) - if (cfile->scratch && unlink (filename)!=0) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_UnlinkFail), - "ccp4_file_open(unlink)", NULL); - cfile->iostat = CIO_UnlinkFail; return NULL; } -#endif - if (!cfile->stream) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_CantOpenFile), - "ccp4_file_open2", NULL); - cfile->iostat = CIO_CantOpenFile; - free(cfile); - return NULL; } -#if defined (__alpha) && defined (vms) -(void) fflush (cfile->stream); -#endif -#if defined _MSC_VER - _fstat(_fileno(cfile->stream), &st); -#else - fstat(fileno(cfile->stream), &st); -#endif - } -#if defined _MSC_VER - cfile->name = _strdup(filename); -#else - cfile->name = strdup(filename); -#endif - cfile->open = 1; - cfile->own = 1; -#if defined _MSC_VER - if ( !(st.st_mode & S_IFREG) ) { -#else - if ( !cfile->scratch && !S_ISREG(st.st_mode) ) { -#endif - cfile->length = INT_MAX; - cfile->direct = 0; - } else { - cfile->length = st.st_size; - cfile->direct = 1; - } - cfile->loc = cfile->append ? cfile->length : 0; - - return cfile; -} - -/** - * ccp4_file_close: - * @param cfile (CCP4File *) - * - * close @cfile if owned, close (non-buffered) or - * fclose (buffered), or fflush if stream not owned. - * Free resources. - * @return 0 on success, EOF on failure - */ -int ccp4_file_close (CCP4File *cfile) -{ - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_close", NULL); - return EOF; } - - if (_file_close (cfile) == EOF) { - ccp4_signal(CCP4_ERRLEVEL(3),"ccp4_file_close", NULL); - return EOF; } - - _file_free(cfile); - - return (0); -} - -/** - * ccp4_file_rarch: - * @param cfile (CCP4File *) - * - * read machine stamp from file @cfile->stream. - * The machine stamp is at @cfile->stamp_loc items, set - * by ccp4_file_setstamp() (default 0). - * NB. these values may be overrriden with the environmental - * variable CONVERT_FROM. - * @return fileFT | (fileIT<<8) - */ -int ccp4_file_rarch (CCP4File *cfile) -{ - unsigned char mtstring[4]; /* machine stamp */ - char *native = getenv ("NATIVEMTZ"); - char *foreign = getenv ("CONVERT_FROM"); - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_rarch", NULL); - return EOF; } - - if (native != NULL) return (nativeFT | (nativeIT<<8)); - if (foreign == NULL) { - if (ccp4_file_raw_seek(cfile, cfile->stamp_loc, SEEK_SET) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3),"ccp4_file_rarch", NULL); - return EOF; } - - if (ccp4_file_raw_read(cfile, (char *) mtstring, 4UL) != 4) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_rarch", NULL); - return EOF; } - - cfile->iconvert = (mtstring[1]>>4) & 0x0f; - cfile->fconvert = (mtstring[0]>>4) & 0x0f; - - /* iconvert and fconvert should be one of the DFNTI/DFNTF values listed - in ccp4_sysdep.h and hence non-zero. Some machine stamps can be corrupted - (e.g. mrc files from chimera). We try to trap for this, and revert to - native. */ - if (cfile->iconvert == 0 || cfile->fconvert == 0) { - if (ccp4_liberr_verbosity(-1)) - printf("Warning: Machine stamp corrupted? Assuming native format. \n"); - cfile->iconvert = nativeIT; - cfile->fconvert = nativeFT; - } - } - - return (cfile->fconvert | (cfile->iconvert<<8)); -} - -/** - * ccp4_file_warch: - * @param cfile (CCP4File *) - * - * write machine stamp to file @cfile->stream. - * The machine stamp is placed at @cfile->stamp_loc items, - * set by ccp4_file_setstamp() (defaults to 0). - * - * @return 0 on success, EOF on failure - */ -int ccp4_file_warch (CCP4File *cfile) -{ - unsigned char mtstring[4]; /* machine stamp */ - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3)| CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_warch", NULL); - return EOF; } - - if (ccp4_file_raw_seek(cfile, cfile->stamp_loc, SEEK_SET) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_warch", NULL); - return EOF; } - - mtstring[0] = cfile->fconvert | (cfile->fconvert << 4); - mtstring[1] = 1 | (cfile->iconvert << 4); - mtstring[2] = mtstring[3] = 0; - - if (ccp4_file_raw_write(cfile, (const char *) mtstring, 4) != 4) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_warch", NULL); - return EOF; } - - return 0; -} - -/** - * ccp4_file_read: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * mode dependent read function. Reads @nitems items from stream - * @cfile->stream to @buffer as determined by cfile->mode. - * - * @return number of items read on success, EOF on failure - */ -int ccp4_file_read (CCP4File *cfile, uint8 *buffer, size_t nitems) -{ - int result; - - result = cfile->_read(cfile,(uint8 *) buffer,nitems); - - if (result != nitems) - ccp4_signal(CCP4_ERRLEVEL(3), - "ccp4_file_read", NULL); - return (result); -} - -/** - * ccp4_file_readcomp: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * float complex {float,float} read function. Reads @nitems complex from stream - * @cfile->stream to @buffer. Allows short count when eof is detected ( - * buffered input only). - * - * @return number of complex read on success, EOF on failure - */ -int ccp4_file_readcomp (CCP4File *cfile, uint8 *buffer, size_t nitems) -{ - int i, n, result; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_readcomp", NULL); - return EOF; } - - if ( !cfile->read || cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readcomp", NULL); - return EOF; } - - if (cfile->last_op == WRITE_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readcomp", NULL); - return EOF; } - - n = _item_sizes[COMP64] * nitems; - if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readcomp", NULL); - if (cfile->stream && !feof(cfile->stream)) - return EOF; } /* short count on stream is OK if EOF */ - - result /= _item_sizes[COMP64]; - n = result; - if (cfile->fconvert != nativeFT) { - n *= 2; /* pairs of reals */ - switch (cfile->fconvert) { /* get to BE IEEE */ - case DFNTF_VAX : - vaxF2ieeeF((union float_uint_uchar *) buffer, n); - break; - case DFNTF_CONVEXNATIVE : - convexF2ieeeF((union float_uint_uchar *) buffer, n); - break; - case DFNTF_BEIEEE : - break; - case DFNTF_LEIEEE : - { - char j; - for (i=0; i < n*4; i+=4) { - j = buffer[i]; - buffer[i] = buffer[i+3]; - buffer[i+3] = j; - j = buffer[i+1]; - buffer[i+1] = buffer[i+2]; - buffer[i+2] =j; } - } - break; - default : - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readcomp", NULL); - return EOF; - } - switch (nativeFT) { /* get to Native if not BE IEEE */ - case DFNTF_BEIEEE : - break; - case DFNTF_LEIEEE : - { - char j; - for (i=0; i < n*4; i+=4) { - j = buffer[i]; - buffer[i] = buffer[i+3]; - buffer[i+3] = j; - j = buffer[i+1]; - buffer[i+1] = buffer[i+2]; - buffer[i+2] =j; } - } - break; - case DFNTF_CONVEXNATIVE : - ieeeF2convexF((union float_uint_uchar *) buffer, n); - break; - case DFNTF_VAX : - ieeeF2vaxF((union float_uint_uchar *) buffer, n); - break; - default : - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readcomp", NULL); - return EOF; - } - } - return (result); -} - -/** - * ccp4_file_readshortcomp: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * short complex {short,short} read function. Reads @nitems complex from stream - * @cfile->stream to @buffer. Allows short count when eof is detected ( - * buffered input only). - * - * @return number of complex read on success, EOF on failure - */ -int ccp4_file_readshortcomp (CCP4File *cfile, uint8 *buffer, size_t nitems) -{ - int i, n, result; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_readshortcomp", NULL); - return EOF; } - - if ( !cfile->read || cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readshortcomp", NULL); - return EOF; } - - if (cfile->last_op == WRITE_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readshortcomp", NULL); - return EOF; } - - n = _item_sizes[COMP32] * nitems; - if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readshortcomp", NULL); - if (cfile->stream && !feof(cfile->stream)) - return EOF; } - - result /= _item_sizes[COMP32]; - - n = result; - if (cfile->iconvert != nativeIT) { - n *= 2; /* pairs of ints */ - { - if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || - (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { - char j; - for (i=0; i < n*2; i+=2) { - j = buffer[i]; - buffer[i] = buffer[i+1]; - buffer[i+1] = j; } } - else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readshortcomp", NULL); - return EOF; } - } - } - return (result); -} - -/** - * ccp4_file_readfloat: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * float read function. Reads @nitems floats from stream - * @cfile->stream to @buffer. - * - * @return number of floats read on success, EOF on failure - */ -int ccp4_file_readfloat (CCP4File *cfile, uint8 *buffer, size_t nitems) -{ - int i, n, result; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_readfloat", NULL); - return EOF; } - - if (!cfile->read || cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readfloat", NULL); - return EOF; } - - if (cfile->last_op == WRITE_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readfloat", NULL); - return EOF; } - - n = _item_sizes[FLOAT32] * nitems; - if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readfloat", NULL); - if (cfile->stream && !feof(cfile->stream)) - return EOF; } - - result /= _item_sizes[FLOAT32]; - - n = result; - if (cfile->fconvert != nativeFT) { - switch (cfile->fconvert) { /* get to BE IEEE */ - case DFNTF_VAX : - vaxF2ieeeF((union float_uint_uchar *) buffer, n); - break; - case DFNTF_CONVEXNATIVE : - convexF2ieeeF((union float_uint_uchar *) buffer, n); - break; - case DFNTF_BEIEEE : - break; - case DFNTF_LEIEEE : - { - char j; - for (i=0; i < n*4; i+=4) { - j = buffer[i]; - buffer[i] = buffer[i+3]; - buffer[i+3] = j; - j = buffer[i+1]; - buffer[i+1] = buffer[i+2]; - buffer[i+2] =j; } - } - break; - default : - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readfloat", NULL); - return EOF; - } - switch (nativeFT) { - case DFNTF_BEIEEE : - break; /* done enough */ - case DFNTF_LEIEEE : - { - char j; - for (i=0; i < n*4; i+=4) { - j = buffer[i]; - buffer[i] = buffer[i+3]; - buffer[i+3] = j; - j = buffer[i+1]; - buffer[i+1] = buffer[i+2]; - buffer[i+2] =j; } - } - break; - case DFNTF_CONVEXNATIVE : - ieeeF2convexF((union float_uint_uchar *) buffer, n); - break; - case DFNTF_VAX : - ieeeF2vaxF((union float_uint_uchar *) buffer, n); - break; - default : - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readfloat", NULL); - return EOF; - } - } - return (result); -} - -/** - * ccp4_file_readint64: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * integer read function. Reads @nitems int64 from stream - * @cfile->stream to @buffer. - * - * @return number of int64 read on success, EOF on failure - */ -int ccp4_file_readint64 (CCP4File *cfile, uint8 *buffer, size_t nitems) -{ - int n, result; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_readint64", NULL); - return EOF; } - - if ( !cfile->read || cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readint64", NULL); - return EOF; } - - if (cfile->last_op == WRITE_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readint64", NULL); - return EOF; } - - n = _item_sizes[CCP4_INT64] * nitems; - if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readint64", NULL); - if (cfile->stream && !feof(cfile->stream)) - return EOF; } - - result /= _item_sizes[CCP4_INT64]; - - n = result; - - if (cfile->iconvert != nativeIT) { - if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || - (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { - char j; - int i; - for (i=0; i < n*8; i+=8) { - j = buffer[i]; - buffer[i] = buffer[i+7]; - buffer[i+7] = j; - j = buffer[i+1]; - buffer[i+1] = buffer[i+6]; - buffer[i+6] = j; - j = buffer[i+2]; - buffer[i+2] = buffer[i+5]; - buffer[i+5] = j; - j = buffer[i+3]; - buffer[i+3] = buffer[i+4]; - buffer[i+4] = j; } - } else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readint64", NULL); - return EOF; } - } - return (result); -} - -/** - * ccp4_file_readint: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * integer read function. Reads @nitems int from stream - * @cfile->stream to @buffer. - * - * @return number of int read on success, EOF on failure - */ -int ccp4_file_readint (CCP4File *cfile, uint8 *buffer, size_t nitems) -{ - int n, result; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_readint", NULL); - return EOF; } - - if ( !cfile->read || cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readint", NULL); - return EOF; } - - if (cfile->last_op == WRITE_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readint", NULL); - return EOF; } - - n = _item_sizes[CCP4_INT32] * nitems; - if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readint", NULL); - if (cfile->stream && !feof(cfile->stream)) - return EOF; } - - result /= _item_sizes[CCP4_INT32]; - - n = result; - - if (cfile->iconvert != nativeIT) { - if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || - (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { - char j; - int i; - for (i=0; i < n*4; i+=4) { - j = buffer[i]; - buffer[i] = buffer[i+3]; - buffer[i+3] = j; - j = buffer[i+1]; - buffer[i+1] = buffer[i+2]; - buffer[i+2] =j; } - } else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readint", NULL); - return EOF; } - } - return (result); -} - -/** - * ccp4_file_readshort: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * short read function. Reads @nitems shorts from stream - * @cfile->stream to @buffer. - * - * @return number of shorts read on success, EOF on failure - */ -int ccp4_file_readshort (CCP4File *cfile, uint8 *buffer, size_t nitems) -{ - int n, result; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_readshort", NULL); - return EOF; } - - if (!cfile->read || cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readshort", NULL); - return EOF; } - - if (cfile->last_op == WRITE_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readshort", NULL); - return EOF; } - - n = _item_sizes[CCP4_INT16] * nitems; - if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, n)) != n) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readshort", NULL); - if (cfile->stream && !feof(cfile->stream)) - return EOF; } - - result /= _item_sizes[CCP4_INT16]; - - n = result; - if (cfile->iconvert != nativeIT) { - if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || - (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { - char j; - int i; - for (i=0; i < n*2; i+=2) { - j = buffer[i]; - buffer[i] = buffer[i+1]; - buffer[i+1] = j; } - } else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readshort", NULL); - return EOF; } - } - return (result); -} - -/** - * ccp4_file_readchar: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * character read function. Reads @nitems characters from stream - * @cfile->stream to @buffer. - * - * @return number of characters read on success, EOF on failure - */ -int ccp4_file_readchar (CCP4File *cfile, uint8 *buffer, size_t nitems) -{ - size_t result; - - if (! cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_readchar", NULL); - return EOF; } - - if (!cfile->read || cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readchar", NULL); - return EOF; } - - if (cfile->last_op == WRITE_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readchar", NULL); - return EOF; } - - if ( (result = ccp4_file_raw_read (cfile, (char *) buffer, nitems)) != nitems) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_readchar", NULL); - if (cfile->stream && !feof(cfile->stream)) - return EOF; } - - return (result); -} - -/** - * ccp4_file_write: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * mode dependent write function. Write @nitems items from @buffer - * to @cfile->stream as determined by cfile->mode. - * - * @return number of items written on success, EOF on failure - */ -int ccp4_file_write (CCP4File *cfile, const uint8 *buffer, size_t nitems) -{ - size_t result; - - result = cfile->_write(cfile, buffer, nitems); - - if ( result != nitems) - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_write", NULL); - - return (result); -} - -/** - * ccp4_file_writecomp: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * complex {float,float} write function. Write @nitems items from @buffer - * to @cfile->stream. - * - * @return number of complex items written on success, EOF on failure - */ -int ccp4_file_writecomp (CCP4File *cfile, const uint8 *buffer, size_t nitems) -{ - size_t result = 0, n; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_writecomp", NULL); - return EOF; } - - if (!cfile->write ||cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writecomp", NULL); - return EOF;} - - if (cfile->last_op == READ_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writecomp", NULL); - return EOF; } - - n = nitems * _item_sizes[COMP64]; - - if (cfile->fconvert != nativeFT) { - char out_buffer[8]; - const char *out_ptr = (char *) buffer; - size_t i; - for (i = 0; i != nitems; i++) { - switch (nativeFT) { - case DFNTF_BEIEEE : - memcpy(out_buffer, out_ptr, _item_sizes[COMP64]); - out_ptr += _item_sizes[COMP64]; - break; - case DFNTF_LEIEEE : - out_buffer[3] = *out_ptr++; - out_buffer[2] = *out_ptr++; - out_buffer[1] = *out_ptr++; - out_buffer[0] = *out_ptr++; - out_buffer[7] = *out_ptr++; - out_buffer[6] = *out_ptr++; - out_buffer[5] = *out_ptr++; - out_buffer[4] = *out_ptr++; - break; - case DFNTF_CONVEXNATIVE : - memcpy(out_buffer, out_ptr, _item_sizes[COMP64]); - out_ptr += _item_sizes[COMP64]; - ieeeF2convexF((union float_uint_uchar *) out_buffer, 2); - break; - case DFNTF_VAX : - memcpy(out_buffer, out_ptr, _item_sizes[COMP64]); - out_ptr += _item_sizes[COMP64]; - ieeeF2vaxF((union float_uint_uchar *) out_buffer, 2); - break; - default : - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "CCP4_File::writecomp", NULL); - } - switch (cfile->fconvert) { - case DFNTF_VAX : - vaxF2ieeeF((union float_uint_uchar *) out_buffer, 2); - break; - case DFNTF_CONVEXNATIVE : - convexF2ieeeF((union float_uint_uchar *) out_buffer, 2); - break; - case DFNTF_BEIEEE : - break; - case DFNTF_LEIEEE : - { - char j; - j = out_buffer[0]; - out_buffer[0] = out_buffer[3]; - out_buffer[3] = j; - j = out_buffer[1]; - out_buffer[1] = out_buffer[2]; - out_buffer[2] =j; - j = out_buffer[4]; - out_buffer[4] = out_buffer[7]; - out_buffer[7] = j; - j = out_buffer[5]; - out_buffer[5] = out_buffer[6]; - out_buffer[6] =j; - } - break; - default : - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writecomp", NULL); - return EOF; - } - result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[COMP64]); - } - } else { - result = ccp4_file_raw_write (cfile, (char *) buffer, n); - } - - if (result != n) - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writecomp", NULL); - - return (result / _item_sizes[COMP64]); -} - -/** - * ccp4_file_writeshortcomp: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * short complex {short,short} write function. Write @nitems items from @buffer - * to @cfile->stream. - * - * @return number of complex items written on success, EOF on failure - */ -int ccp4_file_writeshortcomp (CCP4File *cfile, const uint8 *buffer, size_t nitems) -{ - size_t result = 0, n; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_writeshortcomp", NULL); - return EOF; } - - if (!cfile->write ||cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writeshortcomp", NULL); - return EOF;} - - if (cfile->last_op == READ_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeshortcomp", NULL); - return EOF; } - - n = nitems * _item_sizes[COMP32]; - - if (cfile->iconvert != nativeIT) { - char out_buffer[4]; - const char *out_ptr = (char *) buffer; - size_t i; - for (i = 0; i != nitems; i++) { - if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || - (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { - out_buffer[1] = *out_ptr++; - out_buffer[0] = *out_ptr++; - out_buffer[3] = *out_ptr++; - out_buffer[2] = *out_ptr++; - } else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writeshortcomp", NULL); - return EOF; } - result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[COMP32]); - } - } else { - result = ccp4_file_raw_write (cfile, (char *) buffer, n); - } - - if ( result != n) - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeshortcomp", NULL); - - return (result / _item_sizes[COMP32]); -} - -/** - * ccp4_file_writefloat: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * float write function. Write @nitems items from @buffer - * to @cfile->stream. - * - * Returns number of floats written on success, EOF on failure - */ -int ccp4_file_writefloat (CCP4File *cfile, const uint8 *buffer, size_t nitems) -{ - size_t result = 0, n; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_writefloat", NULL); - return EOF; } - - if (!cfile->write ||cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writefloat", NULL); - return EOF;} - - if (cfile->last_op == READ_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writefloat", NULL); - return EOF; } - - n = nitems * _item_sizes[FLOAT32]; - - if (cfile->fconvert != nativeFT) { - char out_buffer[4]; - const char *out_ptr = (char *) buffer; - size_t i; - for (i = 0; i != nitems; i++) { - switch (nativeFT) { - case DFNTF_BEIEEE : - memcpy(out_buffer, out_ptr, _item_sizes[FLOAT32]); - out_ptr += _item_sizes[FLOAT32]; - break; - case DFNTF_LEIEEE : - out_buffer[3] = *out_ptr++; - out_buffer[2] = *out_ptr++; - out_buffer[1] = *out_ptr++; - out_buffer[0] = *out_ptr++; - break; - case DFNTF_CONVEXNATIVE : - memcpy(out_buffer, out_ptr, _item_sizes[FLOAT32]); - out_ptr += _item_sizes[FLOAT32]; - ieeeF2convexF((union float_uint_uchar *) out_buffer, 1); - break; - case DFNTF_VAX : - memcpy(out_buffer, out_ptr, _item_sizes[FLOAT32]); - out_ptr += _item_sizes[FLOAT32]; - ieeeF2vaxF((union float_uint_uchar *) out_buffer, 1); - break; - default : - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "CCP4_File::writefloat", NULL); - } - switch (cfile->fconvert) { - case DFNTF_VAX : - vaxF2ieeeF((union float_uint_uchar *) out_buffer, 1); - break; - case DFNTF_CONVEXNATIVE : - convexF2ieeeF((union float_uint_uchar *) out_buffer, 1); - break; - case DFNTF_BEIEEE : - break; - case DFNTF_LEIEEE : - { - char j; - j = out_buffer[0]; - out_buffer[0] = out_buffer[3]; - out_buffer[3] = j; - j = out_buffer[1]; - out_buffer[1] = out_buffer[2]; - out_buffer[2] =j; - } - break; - default : - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writefloat", NULL); - return EOF; - } - result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[FLOAT32]); - } - } else { - result = ccp4_file_raw_write (cfile, (char *) buffer, n); - } - - if (result != n) - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writefloat", NULL); - - return (result / _item_sizes[FLOAT32]); -} - -/** - * ccp4_file_writeint64: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * int64 write function. Write @nitems items from @buffer - * to @cfile->stream. - * - * @return number of int64 written on success, EOF on failure - */ -int ccp4_file_writeint64 (CCP4File *cfile, const uint8 *buffer, size_t nitems) -{ - size_t result = 0, n; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_writeint64", NULL); - return EOF; } - - if (!cfile->write ||cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writeint64", NULL); - return EOF;} - - if (cfile->last_op == READ_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeint64", NULL); - return EOF; } - - n = nitems * _item_sizes[CCP4_INT64]; - - if (cfile->iconvert != nativeIT) { - char out_buffer[8]; - const char *out_ptr = (char *) buffer; - size_t i; - for (i = 0; i != nitems; i++) { - if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || - (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { - out_buffer[7] = *out_ptr++; - out_buffer[6] = *out_ptr++; - out_buffer[5] = *out_ptr++; - out_buffer[4] = *out_ptr++; - out_buffer[3] = *out_ptr++; - out_buffer[2] = *out_ptr++; - out_buffer[1] = *out_ptr++; - out_buffer[0] = *out_ptr++; - } else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writeint64", NULL); - return EOF; } - result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[CCP4_INT64]); - } - } else { - result = ccp4_file_raw_write (cfile, (char *) buffer, n); - } - - if ( result != n) - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeint64", NULL); - - return (result / _item_sizes[CCP4_INT64]); -} - -/** - * ccp4_file_writeint: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * int write function. Write @nitems items from @buffer - * to @cfile->stream. - * - * @return number of int written on success, EOF on failure - */ -int ccp4_file_writeint (CCP4File *cfile, const uint8 *buffer, size_t nitems) -{ - size_t result = 0, n; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_writeint", NULL); - return EOF; } - - if (!cfile->write ||cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writeint", NULL); - return EOF;} - - if (cfile->last_op == READ_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeint", NULL); - return EOF; } - - n = nitems * _item_sizes[CCP4_INT32]; - - if (cfile->iconvert != nativeIT) { - char out_buffer[4]; - const char *out_ptr = (char *) buffer; - size_t i; - for (i = 0; i != nitems; i++) { - if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || - (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { - out_buffer[3] = *out_ptr++; - out_buffer[2] = *out_ptr++; - out_buffer[1] = *out_ptr++; - out_buffer[0] = *out_ptr++; - } else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writeint", NULL); - return EOF; } - result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[CCP4_INT32]); - } - } else { - result = ccp4_file_raw_write (cfile, (char *) buffer, n); - } - - if ( result != n) - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeint", NULL); - - return (result / _item_sizes[CCP4_INT32]); -} - -/** - * ccp4_file_writeshort: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * short write function. Write @nitems items from @buffer - * to @cfile->stream. - * - * @return number of short written on success, EOF on failure - */ -int ccp4_file_writeshort (CCP4File *cfile, const uint8 *buffer, size_t nitems) -{ - size_t result = 0, n; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_writeshort", NULL); - return EOF; } - - if (!cfile->write ||cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writeshort", NULL); - return EOF;} - - if (cfile->last_op == READ_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeshort", NULL); - return EOF; } - - n = nitems * _item_sizes[CCP4_INT16]; - - if (cfile->iconvert != nativeIT) { - char out_buffer[2]; - const char *out_ptr = (char *) buffer; - size_t i; - for (i = 0; i != nitems; i++) { - if ((cfile->iconvert==DFNTI_MBO && nativeIT==DFNTI_IBO) || - (cfile->iconvert==DFNTI_IBO && nativeIT==DFNTI_MBO)) { - out_buffer[1] = *out_ptr++; - out_buffer[0] = *out_ptr++; - } else { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_readint", NULL); - return EOF; } - result += ccp4_file_raw_write (cfile, out_buffer, _item_sizes[CCP4_INT16]); - } - } else { - result = ccp4_file_raw_write (cfile, (char *) buffer, n); - } - - if ( result != n) - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writeshort", NULL); - - return (result / _item_sizes[CCP4_INT16]); -} - -/** - * ccp4_file_writechar: - * @param cfile (CCP4File *) - * @param buffer (uint8 *) buffer - * @param nitems (size_t) number of items - * - * char write function. Write @nitems items from @buffer - * to @cfile->stream. - * - * @return number of bytes written on success, EOF on failure - */ -int ccp4_file_writechar (CCP4File *cfile, const uint8 *buffer, size_t nitems) -{ - size_t result; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_writechar", NULL); - return EOF; } - - if (!cfile->write ||cfile->iostat) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_BadMode), - "ccp4_file_writechar", NULL); - return EOF;} - - if (cfile->last_op == READ_OP) - if (ccp4_file_raw_seek(cfile,0L,SEEK_CUR) == -1) { - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writechar", NULL); - return EOF; } - - if ( (result = ccp4_file_raw_write (cfile, (char *) buffer, nitems)) != nitems) - ccp4_signal(CCP4_ERRLEVEL(3), "ccp4_file_writechar", NULL); - - return (result); -} - -/** - * ccp4_file_seek: - * @param cfile (CCP4File *) - * @param offset (long) offset in items - * @param whence (int) SEEK_SET, SEEK_CUR, or SEEK_END - * - * seeks on file by offset items. SEEK_SET is relative - * to start of file, SEEK_CUR to current, SEEK_END to - * end. - * - * @return 0 on success, -1 on failure - */ -int ccp4_file_seek (CCP4File *cfile, long offset, int whence) -{ - int result; - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_seek", NULL); - return -1; } - - result = ccp4_file_raw_seek(cfile, offset*cfile->itemsize, whence); - - if (result != -1) ccp4_file_clearerr(cfile); - - return ((result == -1) ? -1 : 0); -} - -/** - * ccp4_file_rewind: - * @param cfile (CCP4File *) - * - * Seek to start of file. Clear error status. - * - * @return 0 on success, EOF on failure - */ -void ccp4_file_rewind (CCP4File *cfile) -{ - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_rewind", NULL); - return ; } - - if (ccp4_file_raw_seek(cfile, 0, SEEK_SET)) { - ccp4_signal(CCP4_ERRLEVEL(3), - "ccp4_file_rewind", NULL); - } else { - ccp4_file_clearerr(cfile); - } -} - -/** - * ccp4_file_length: - * @param cfile (CCP4File *) - * - * Length of file on disk. - * @return length of @cfile on success, EOF on failure - */ -long ccp4_file_length (CCP4File *cfile) -{ -#if defined _MSC_VER - struct _stat st; -#else - struct stat st; -#endif - - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_length", NULL); - return EOF; } - - cfile->last_op = IRRELEVANT_OP; - - if (cfile->buffered && cfile->stream) - fflush (cfile->stream); -#if defined _MSC_VER - _fstat(cfile->stream ? _fileno(cfile->stream) : cfile->fd, &st); -#else - fstat(cfile->stream ? fileno(cfile->stream) : cfile->fd, &st); -#endif - cfile->length = st.st_size; - - return (st.st_size); -} - -/** - * ccp4_file_tell: - * @param cfile (CCP4File *) - * - * Current location in file, uses either ftell or lseek. - * @return current offset of @cfile in bytes. - */ -long ccp4_file_tell (CCP4File *cfile) -{ - long result; - - if (! cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_tell", NULL); - return EOF; } - - cfile->last_op = IRRELEVANT_OP; - - if (cfile->buffered && cfile->stream) { -#if !defined (_MSC_VER) - if ( cfile->last_op == WRITE_OP ) fflush (cfile->stream); -#endif - result = (long) ftell(cfile->stream); - } else -#if defined _MSC_VER - result = _lseek(cfile->fd, 0L, SEEK_CUR); -#else - result = lseek(cfile->fd, 0L, SEEK_CUR); -#endif - - cfile->loc = result; - - return (result); -} - -/** - * ccp4_file_feof: - * @param cfile (CCP4File *) - * - * @return true if @cfile is at EoF. - * - */ -int ccp4_file_feof(CCP4File *cfile) -{ - if (!cfile) { - ccp4_signal(CCP4_ERRLEVEL(3) | CCP4_ERRNO(CIO_NullPtr), - "ccp4_file_feof", NULL); - return EOF; } - - return (cfile->stream) ? feof(cfile->stream) : cfile->loc >= cfile->length; -} - -/** - * ccp4_file_clearerr: - * @param cfile (CCP4File *) - * - * Clears error status of @cfile. - * - */ -void ccp4_file_clearerr(CCP4File *cfile) -{ - if (!cfile || !cfile->stream) - return; - cfile->iostat = CIO_Ok; - clearerr(cfile->stream); -} - -/** - * ccp4_file_fatal: - * @param cfile (CCP4File *) - * - * Die with error message based on @cfile error status. - */ -void ccp4_file_fatal (CCP4File *cfile, char *message) -{ - char *buff; - size_t l; - - if (!cfile) - ccp4_signal(CCP4_ERRLEVEL(4) | CCP4_ERRNO(CIO_NullPtr), "ccp4_file_fatal", - NULL); - - l = strlen (message) + strlen (cfile->name) + 1; - if ( !(buff = malloc(l))) - ccp4_signal(CCP4_ERRLEVEL(4), "ccp4_file_fatal", NULL); - buff[0] = '\0'; - strcat (buff, message); - strcat (buff, cfile->name); - ccp4_fatal(buff); -} - -/** - * ccp4_file_error: - * @param cfile (CCP4File *) - * - * print error mesage. - * @return associated error code - */ -int ccp4_file_error(CCP4File *cfile) -{ - if (!cfile->iostat) - return 0; - fprintf(stderr,"%s %s \n", - cfile->name,ccp4_strerror(cfile->iostat)); - return CCP4_ERRGETCODE(cfile->iostat); -} - -/** - * ccp4_file_flush: - * @param cfile (CCP4File *) - * - * flush buffer contents of @cfile - */ -void ccp4_file_flush(CCP4File *cfile) -{ - if (cfile && cfile->stream && cfile->buffered) - fflush(cfile->stream); -} - -/** - * ccp4_file_print: - * @param cfile (CCP4File *) - * - * @return @cfile information in char array for printing. - */ -char *ccp4_file_print(CCP4File *cfile, char *msg_start, char *msg_end) -{ - char *msg_curr = msg_start; - - if (!cfile) - return msg_start; - - if (cfile->name) - if ((msg_end - msg_curr) > strlen(cfile->name)) { - strcpy(msg_curr,cfile->name); - msg_curr = strrchr(msg_curr,'\0'); } - - if (cfile->open) { - if ((msg_end - msg_curr) > 6 ) { - strcat(msg_start, " opened"); - msg_curr = strrchr(msg_curr,'\0'); } - } else { - if ((msg_end - msg_curr) > 7 ) { - strcat(msg_start, " closed"); - msg_curr = strrchr(msg_curr,'\0'); } - } - - if (cfile->append) { - if ((msg_end - msg_curr) > 13 ) { - strcat(msg_start, ", append mode"); - msg_curr = strrchr(msg_curr,'\0'); } - } else if (cfile->read && cfile->write) { - if ((msg_end - msg_curr) > 17 ) { - strcat(msg_start, ", read-write mode"); - msg_curr = strrchr(msg_curr,'\0'); } - } else if (cfile->write) { - if ((msg_end - msg_curr) > 12 ) { - strcat(msg_start, ", write mode"); - msg_curr = strrchr(msg_curr,'\0'); } - } else { - if ((msg_end - msg_curr) > 11 ) { - strcat(msg_start, ", read mode"); - msg_curr = strrchr(msg_curr,'\0'); } - } - - return msg_curr; -} - diff --git a/ccp4c/ccp4/library_file.h b/ccp4c/ccp4/library_file.h deleted file mode 100644 index e00506ed..00000000 --- a/ccp4c/ccp4/library_file.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - library_file.h: header file for library_file.c - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file library_file.h - * Functions for file i/o. - * Charles Ballard - */ - -#ifndef __CCP4_LIB_FILE -#define __CCP4_LIB_FILE - -#include "ccp4_sysdep.h" -#include "ccp4_types.h" - -#ifdef __cplusplus -namespace CCP4 { -extern "C" { -#endif - -/** Generic CCP4 file. */ -typedef struct _CFileStruct CCP4File; - -struct _CFileStruct { - char *name; - FILE *stream; - int fd; - unsigned int read : 1; - unsigned int write : 1; - unsigned int append : 1; - unsigned int binary : 1; - unsigned int scratch : 1 , : 3; - unsigned int buffered : 1; - unsigned int sync : 1, : 6; - unsigned int direct : 1, : 7; - unsigned int open : 1; - unsigned int own : 1; - unsigned int last_op : 2; - unsigned int getbuff : 1, : 4; - int iostat; - unsigned int mode : 8; - unsigned int itemsize : 8; - unsigned int iconvert : 8; - unsigned int fconvert: 8; - off_t length; - off_t loc; - size_t stamp_loc; - int (*_read) (CCP4File *, uint8 *, size_t); - int (*_write) (CCP4File *, const uint8 *, size_t); - char buff[8]; - void *priv; -}; - - -CCP4File *ccp4_file_open (const char *, const int); - -CCP4File *ccp4_file_open_file (const FILE *, const int); - -CCP4File *ccp4_file_open_fd (const int, const int); - -int ccp4_file_rarch ( CCP4File*); - -int ccp4_file_warch ( CCP4File*); - -int ccp4_file_close ( CCP4File*); - -int ccp4_file_mode ( const CCP4File*); - -int ccp4_file_setmode ( CCP4File*, const int); - -int ccp4_file_setstamp( CCP4File *, const size_t); - -int ccp4_file_itemsize( const CCP4File*); - -int ccp4_file_setbyte( CCP4File *, const int); - -int ccp4_file_byteorder( CCP4File *); - -int ccp4_file_is_write(const CCP4File *); - -int ccp4_file_is_read(const CCP4File *); - -int ccp4_file_is_append(const CCP4File *); - -int ccp4_file_is_scratch(const CCP4File *); - -int ccp4_file_is_buffered(const CCP4File *); - -int ccp4_file_status(const CCP4File *); - -char *ccp4_file_name( CCP4File *); - -int ccp4_file_read ( CCP4File*, uint8 *, size_t); - -int ccp4_file_readcomp ( CCP4File*, uint8 *, size_t); - -int ccp4_file_readshortcomp ( CCP4File*, uint8 *, size_t); - -int ccp4_file_readfloat ( CCP4File*, uint8 *, size_t); - -int ccp4_file_readint64 ( CCP4File*, uint8 *, size_t); - -int ccp4_file_readint ( CCP4File*, uint8 *, size_t); - -int ccp4_file_readshort ( CCP4File*, uint8 *, size_t); - -int ccp4_file_readchar ( CCP4File*, uint8 *, size_t); - -int ccp4_file_write ( CCP4File*, const uint8 *, size_t); - -int ccp4_file_writecomp ( CCP4File*, const uint8 *, size_t); - -int ccp4_file_writeshortcomp ( CCP4File*, const uint8 *, size_t); - -int ccp4_file_writefloat ( CCP4File*, const uint8 *, size_t); - -int ccp4_file_writeint ( CCP4File*, const uint8 *, size_t); - -int ccp4_file_writeint64 ( CCP4File*, const uint8 *, size_t); - -int ccp4_file_writeshort ( CCP4File*, const uint8 *, size_t); - -int ccp4_file_writechar ( CCP4File*, const uint8 *, size_t); - -int ccp4_file_seek ( CCP4File*, long, int); - -void ccp4_file_rewind ( CCP4File*); - -void ccp4_file_flush (CCP4File *); - -long ccp4_file_length ( CCP4File*); - -long ccp4_file_tell ( CCP4File*); - -int ccp4_file_feof(CCP4File *); - -void ccp4_file_clearerr(CCP4File *); - -void ccp4_file_fatal (CCP4File *, char *); - -char *ccp4_file_print(CCP4File *, char *, char *); - -int ccp4_file_raw_seek( CCP4File *, long, int); -int ccp4_file_raw_read ( CCP4File*, char *, size_t); -int ccp4_file_raw_write ( CCP4File*, const char *, size_t); -int ccp4_file_raw_setstamp( CCP4File *, const size_t); -#ifdef __cplusplus -} -} -#endif - -#endif /* __CCP4_LIB_FILE */ diff --git a/ccp4c/ccp4/library_utils.c b/ccp4c/ccp4/library_utils.c deleted file mode 100644 index 92186c4e..00000000 --- a/ccp4c/ccp4/library_utils.c +++ /dev/null @@ -1,674 +0,0 @@ -/* - library_utils.c: CCP4 Library Utilities - Copyright (C) 2001 CCLRC, Charles Ballard - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @page utilities_page CCP4 Library Utilities - * - * @section utilities_list File list - -
    -
  • library_utils.c -
  • ccp4_general.c -
  • ccp4_parser.c -
  • ccp4_program.c -
- - * @section utilities_overview Overview - -The CCP4 C-library provides many utility functions which either give -specific CCP4 functionality (e.g. traditional keyword parsing) or -are just generally useful (platform independent date). - - */ - -/** @file library_utils.c - * @brief Utility functions. - * @author Charles Ballard - */ - -#include "ccp4_sysdep.h" -#include -#include -#include "ccp4_utils.h" -#include "ccp4_errno.h" - -#if defined (_WIN32) -#define WIN32_LEAN_AND_MEAN -#include -#endif - -#define CCP4_ERRNO(y) (CCP4_ERR_UTILS | (y)) - -/* rcsid[] = "$Id$" */ - -/* static uint16 nativeIT = NATIVEIT; */ /* machine integer type - currently unused here */ -static uint16 nativeFT = NATIVEFT; /* machine float type */ - -/** . - * - * @return - */ -int ccp4_utils_translate_mode_float(float *out, const void *buffer, int dim, int mode) -{ - unsigned char *ucp; - unsigned short *usp; - float *fp = out, *ufp, tmp1, tmp2; - register int ctr=0; - - switch(mode) { - case 0: - ucp = (unsigned char *)buffer; - for(ctr = 0; ctr < dim ; ++ctr) - *fp++ = (float) *ucp++; - break; - case 1: - usp = (unsigned short *)buffer; - for(ctr = 0; ctr < dim ; ++ctr) - *fp++ = (float) *usp++; - break; - case 3: - /* complex short (define type ?) */ - usp = (unsigned short *)buffer; - for(ctr = 0; ctr < dim ; ++ctr) { - tmp1 = (float) *usp++; - tmp2 = (float) *usp++; - *fp++ = (float) sqrt(tmp1*tmp1 + tmp2*tmp2); - } - break; - case 4: - /* complex real (define type ?) */ - ufp = (float *)buffer; - for(ctr = 0; ctr < dim ; ++ctr) { - tmp1 = *ufp++; - tmp2 = *ufp++; - *fp++ = (float) sqrt(tmp1*tmp1 + tmp2*tmp2); - } - break; - case 2: - default: - break; - } - - return (ctr); -} - -/** Gets the length of a Fortran string with trailing blanks removed. - * - * @return length of string - */ -size_t ccp4_utils_flength (char *s, int len) -{ - if (len <= 0 ) return 0; - while (s[--len] == ' ') - if (len == 0) return 0; - return (++len); -} - -/** . - * - * @return - */ -void ccp4_utils_print (const char *message) -{ - printf ("%s\n",message); - } - -#if ! defined (VMS) -/** . - * - * @return - */ -int ccp4_utils_setenv (char *str) -{ -#if defined (sgi) || defined (sun) || defined (__hpux) || \ - defined(_AIX) || defined (__OSF1__) || \ - defined (__osf__) || defined (__FreeBSD__) || defined (linux) || \ - defined (_WIN32) || defined __linux__ - /* putenv is the POSIX.1, draft 3 proposed mechanism */ -#if !(defined(__hpux) && defined(__HP_cc)) - int putenv (); -#endif - char *param; - - if ( (param = (char *) ccp4_utils_malloc( (strlen(str)+1)*sizeof(char) )) == NULL) { - ccp4_errno = CCP4_ERRNO(errno); - return -1; } - strcpy(param,str); - return (putenv (param)); - /* note the necessary lack of free() */ -#else - /* setenv is not POSIX, BSD might have to use `index' */ - int setenv (); - char *param1,*param2; - - if ( (param1 = (char *) ccp4_utils_malloc( (strlen(str)+1)*sizeof(char) )) == NULL) { - ccp4_errno = CCP4_ERRNO(errno); - return -1; } - strcpy(param1,str); - if ((param2 = (char *) strchr(param1, '=')) == NULL) { - ccp4_errno = CCP4_ERRNO(errno); - return -1; } - *param2++ = '\0'; - return (setenv (param1, param2, 1)); -#endif -} -#endif - -#if ! defined (VMS) -/** . - * - * @return - */ -int ccp4_utils_outbuf(void) -{ -#if defined (sgi) || defined (sun) || \ - defined (__OSF1__) || \ - defined (__FreeBSD__) - return setlinebuf(stdout); -#else -#if defined(_MSC_VER) - return setvbuf(stdout, NULL, _IONBF, 80); -#else -# if defined (_AIX) - return -1; -# else - /* Windows requires size argument, though 0 works on unix */ - return setvbuf(stdout, NULL, _IOLBF, 80); -# endif -#endif -#endif -} - -/** . - * - * @return - */ -int ccp4_utils_noinpbuf(void) -{ - return setvbuf(stdin, NULL, _IONBF, 0); -} -#endif - -union float_uint_uchar ccp4_nan () - -#if NATIVEFT == DFNTF_BEIEEE || NATIVEFT == DFNTF_LEIEEE -# define CCP4_NAN 0xfffa5a5a -#endif -/* For \idx{Convex} native mode and \idx{VAX} use a \idx{Rop} value: */ -/* */ -/* = */ -#if NATIVEFT == DFNTF_CONVEXNATIVE -# define CCP4_NAN 0x80000000 -#endif -#if NATIVEFT == DFNTF_VAX -# define CCP4_NAN 0x00008000 -#endif -#ifndef CCP4_NAN -# error "CCP4_NAN isn't defined (needs NATIVEFT)" -#endif -{ - union float_uint_uchar realnum; - - realnum.i = CCP4_NAN; - return (realnum); -} - -/** . - * - * @return - */ -int ccp4_utils_isnan (const union float_uint_uchar *realnum) -{ - switch (nativeFT) { - case DFNTF_BEIEEE : - case DFNTF_LEIEEE : - return ((realnum->i & 0x7f800000) == 0x7f800000); /* exponent all 1s */ - case DFNTF_CONVEXNATIVE : - return ((realnum->i & 0xff800000) == 0x80000000); - case DFNTF_VAX : - return ((realnum->i & 0x0000ff80) == 0x00008000); - default : - ccp4_fatal("CCP4_UTILS_ISNAN: bad nativeFT"); - return 0; /* avoid compiler warning */ - } -} - -#define MDFBIG -1.0E10 /* BIOMOL absence flag value */ -/** . - * - * @return - */ -void ccp4_utils_bml (int ncols, union float_uint_uchar cols[]) -{ - int i; - for (i=0; i MDFBIG) { - if (cols[i].f < wminmax[2*i]) wminmax[2*i] = cols[i].f; - if (cols[i].f > wminmax[1+2*i]) wminmax[1+2*i] = cols[i].f; } -} - -/** . - * - * @return - */ -void ccp4_utils_hgetlimits (int *IValueNotDet, float *ValueNotDet) -{ - *IValueNotDet = INT_MAX; - *ValueNotDet = FLT_MAX; -} - -#ifndef _WIN32 -static unsigned parse_mode(const char *cmode) -{ - unsigned mode = 0; -#if defined (__APPLE__) - static const unsigned TBM = 0x07; - - switch (strlen(cmode)) { - case 4: - mode |= (*cmode & TBM) << 9 ; - mode |= (*(cmode+1) & TBM) << 6 ; - mode |= (*(cmode+2) & TBM) << 3 ; - mode |= (*(cmode+3) & TBM) ; - break; - case 3: - mode |= (*cmode & TBM) << 6 ; - mode |= (*(cmode+1) & TBM) << 3 ; - mode |= (*(cmode+2) & TBM) ; - break; - case 2: - mode |= (*cmode & TBM) << 3 ; - mode |= (*(cmode+1) & TBM) ; - break; - case 1: - mode |= (*cmode & TBM) ; - break; - default: - mode = 0x0fff ; - } -#else -/* Possible modes (see stat.h) - Currently pass 3-character string and interpret as octal. - Try also S_IRWXU, S_IRWXG, etc. */ - sscanf(cmode,"%o",&mode); -#endif - return mode; -} -#endif - -/** . - * - * @return - */ -int ccp4_utils_mkdir (const char *path, const char *cmode) -{ - int result; -#if defined(_WIN32) - result = mkdir(path); -#else - unsigned mode = parse_mode(cmode); - result = mkdir(path, (mode_t) mode); -#endif - - if (result == -1) { - if (errno == EEXIST) { - result = 1; - } - } - return (result); -} - -/** . - * - * @return - */ -int ccp4_utils_chmod (const char *path, const char *cmode) -{ -#if defined(_WIN32) - return (chmod(path,0x0fff)); -#else - unsigned mode = parse_mode(cmode); - return (chmod(path, (mode_t) mode)); -#endif -} - -/** This is a wrapper for the malloc function, which adds some - * error trapping. - * - * @return void - */ -void *ccp4_utils_malloc(size_t size) - -{ void *val; - - val = malloc (size); - if (!val && size) - { - perror ("Failure in ccp4_utils_malloc"); - abort (); - } - return val;} - -/** This is a wrapper for the realloc function, which adds some - * error trapping. - * - * @return - */ -void *ccp4_utils_realloc(void *ptr, size_t size) -{ void *val; - - val = realloc (ptr, size); - if (!val && size) - { - perror ("Failure in ccp4_utils_realloc"); - abort (); - } - return val;} - -/** This is a wrapper for the calloc function, which adds some - * error trapping. - * - * @return - */ -void *ccp4_utils_calloc(size_t nelem , size_t elsize) -{ void *val; - - val = calloc (nelem, elsize); - if (!val && elsize) - { - perror ("Failure in ccp4_utils_calloc"); - abort (); - } - return val;} - - -/** Return the user's login name. - * Note that getlogin only works for processes attached to - * a terminal (and hence won't work from the GUI). - * @return pointer to character string containing login name. - */ -char *ccp4_utils_username(void) -{ - static char userid_unknown[] = "unknown"; - char *userid = NULL; -#if defined(_WIN32) - static char windows_username[512]; - DWORD bufsize = sizeof(windows_username); - if (GetUserName(windows_username, &bufsize)) - userid = windows_username; -#else - userid = getlogin(); -#endif - return userid ? userid : userid_unknown; -} - -static int is_sep(char c) -{ -#ifdef _WIN32 - /* allow alternative separator for Windows (for MSYS, Cygwin, Wine) */ - return c == PATH_SEPARATOR || c == '/'; -#else - return c == PATH_SEPARATOR; -#endif -} - -/** Extracts the basename from a full file name. - * Separators for directories and extensions are OS-specific. - * @param filename full file name string. - * @return pointer to basename - */ -char *ccp4_utils_basename(const char *filename) -{ - int i, indx1=-1, length; - char *basename; - - for ( i = strlen(filename)-1; i >= 0; i-- ) { - if (is_sep(filename[i])) { - indx1 = i; - break; - } - } - length = strlen(filename) - indx1; - /* Search for extension separators must be performed backwards - in case filename has multiple extension separators */ - for ( i = strlen(filename)-1; i >= (indx1 < 0 ? 0 : indx1) ; i-- ) { - if (filename[i] == EXT_SEPARATOR) { - length = i - indx1; - break; - } - } - basename = ccp4_utils_malloc(length*sizeof(char)); - strncpy(basename,filename+indx1+1,length-1); - basename[length-1]='\0'; - return basename; -} - -/** Extracts the pathname from a full file name. - * Separators for directories and extensions are OS-specific. - * @param filename full file name string. - * @return pointer to pathname with trailing separator. - */ -char *ccp4_utils_pathname(const char *filename) -{ - int i, indx1=-1, length; - char *pathname; - - for ( i = strlen(filename)-1; i >= 0; i-- ) { - if (is_sep(filename[i])) { - indx1 = i; - break; - } - } - length = indx1+2; - pathname = ccp4_utils_malloc(length*sizeof(char)); - strncpy(pathname,filename,length-1); - pathname[length-1]='\0'; - return pathname; -} - -/** Extracts the extension from a full file name. - * Separators for directories and extensions are OS-specific. - * @param filename full file name string. - * @return pointer to extension - */ -char *ccp4_utils_extension(const char *filename) -{ - int i, indx1=-1, length=1; - char *extension; - - for ( i = strlen(filename)-1; i >= 0; i-- ) { - if (filename[i] == EXT_SEPARATOR) { - indx1 = i; - length = strlen(filename) - indx1; - break; - } else if (is_sep(filename[i])) { - indx1 = i; - length = 1; - break; - } - } - extension = ccp4_utils_malloc(length*sizeof(char)); - strncpy(extension,filename+indx1+1,length-1); - extension[length-1]='\0'; - return extension; -} - -/** Joins a leading directory with a filename. - * Separators for directories and extensions are OS-specific. - * @param dir directory path. - * @param file file name string. - * @return pointer to joined directory-filename path. - */ -char *ccp4_utils_joinfilenames(const char *dir, const char *file) -{ - char *join=NULL; - int lendir,lenfile,lenjoin; - - lendir = strlen(dir); - lenfile = strlen(file); - lenjoin = lendir + lenfile + 2; - - join = (char *) ccp4_utils_malloc(sizeof(char)*lenjoin); - if (!join) { - return NULL; - } - - strncpy(join,dir,lendir); - join[lendir] = PATH_SEPARATOR; - join[lendir+1] = '\0'; - strncat(join,file,lenfile); - join[lenjoin-1] = '\0'; - - return join; -} - -/** . - * - * @return - */ -void ccp4_utils_idate (int iarray[3]) -{ - struct tm *lt=NULL; - time_t tim; - tim = time(NULL); - lt = localtime(&tim); - iarray[0] = lt->tm_mday; - iarray[1] = lt->tm_mon+1; /* need range 1-12 */ - iarray[2] = lt->tm_year + 1900; -} - -/** . - * - * @return - */ -char *ccp4_utils_date(char *date) -{ - int iarray[3]; - - ccp4_utils_idate(iarray); - sprintf(date,"%2d/%2d/%4d",iarray[0],iarray[1],iarray[2]); - date[10] = '\0'; - - return (date); -} - -/** Function to obtain current time. - * @param iarray Array containing hours, minutes and seconds. - * @return void. - */ -void ccp4_utils_itime (int iarray[3]) -{ - struct tm *lt; - time_t tim; - tim = time(NULL); - lt = localtime(&tim); - iarray[0] = lt->tm_hour; - iarray[1] = lt->tm_min; - iarray[2] = lt->tm_sec; -} - -/** Alternative to ccp4_utils_itime with time as character string. - * @param time Character string of form HH:MM:SS - * @return pointer to character string. - */ -char *ccp4_utils_time(char *time) -{ - int iarray[3]; - - ccp4_utils_itime(iarray); - sprintf(time,"%2.2d:%2.2d:%2.2d",iarray[0],iarray[1],iarray[2]); - time[8] = '\0'; - - return (time); -} - -/** Function to obtain User and System times. - * @param tarray Array containing User and System times. - * @return Sum of User and System times. - */ -float ccp4_utils_etime (float tarray[2]) -{ -#ifdef _WIN32 - tarray[0] = tarray[1] = 0.; -#else - static long clk_tck = 0; - - struct tms buffer; - if (! clk_tck) clk_tck = sysconf(_SC_CLK_TCK); - (void) times(&buffer); - tarray[0] = (float) buffer.tms_utime / (float)clk_tck; - tarray[1] = (float) buffer.tms_stime / (float)clk_tck; -#endif - return (tarray[0]+tarray[1]); -} - -#if defined(_MSC_VER) -double ccp4_erfc( double x ) -{ - double t,z,ans; - - z=fabs(x); - t=1.0/(1.0+0.5*z); - ans=t*exp(-z*z-1.26551223+t*(1.00002368+t*(0.37409196+t*(0.09678418+ - t*(-0.18628806+t*(0.27886807+t*(-1.13520398+t*(1.48851587+ - t*(-0.82215223+t*0.17087277))))))))); - return x >= 0.0 ? ans : 2.0-ans; -} -#endif - -#if defined (__APPLE__) && defined (__GNUC__) && ( __GNUC__ < 3 ) -void _carbon_init(int argc, char **argv) {} -void _objcInit(void) {} -#endif - -#if defined (__APPLE__) && defined (__GNUC__) && ( __GNUC__ == 3 ) && (__GNUC_MINOR__ == 1) -float acosf(float x) { - return (float) acos( (double) x); -} - -float atanf(float x) { - return (float) atan( (double) x); -} - -float asinf(float x) { - return (float) asin( (double) x); -} - -#endif - -#if defined(_MSC_VER) && _MSC_VER < 1800 -double rint(double x) { - if (x >= 0.) { - return (double)(int)(x+.5); - } - return (double)(int)(x-.5); -} -#endif diff --git a/ccp4c/ccp4/mtzdata.h b/ccp4c/ccp4/mtzdata.h deleted file mode 100644 index ce9bbf94..00000000 --- a/ccp4c/ccp4/mtzdata.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - mtzdata.h: Definition of MTZ data structure. - Copyright (C) 2001 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -/** @file mtzdata.h - * - * @brief Definition of MTZ data structure. - * - * The file defines a hierarchy of structs which hold the - * MTZ data structure. - * - * @author Martyn Winn - */ - -#ifndef __CMTZData__ -#define __CMTZData__ - -#define MTZVERSN "MTZ:V1.1" /**< traditional version number! */ -#define MTZ_MAJOR_VERSN 1 /**< MTZ file major version - keep to single digit */ -#define MTZ_MINOR_VERSN 1 /**< MTZ file minor version - keep to single digit */ -#define CCP4_MTZDATA 20100630 /**< Date stamp for the cmtz data structure - (update if there are changes to the structs in this file) */ - -/** defines for sizes in MTZ structure */ -#define SIZE1 20 /**< size of pre-reflection block */ -#define MTZRECORDLENGTH 80 /**< length of records */ -#define MAXSPGNAMELENGTH 20 /**< max length of a spacegroup name */ -#define MAXPGNAMELENGTH 10 /**< max length of a pointgroup name */ - -#define NBATCHWORDS 185 /**< total size of batch header buffer */ -#define NBATCHINTEGERS 29 /**< size of integer section of batch header buffer */ -#define NBATCHREALS 156 /**< size of float section of batch header buffer */ - -/* cctbx uses smaller values for these three */ -#ifndef MXTALS -#define MXTALS 100 /**< maximum number of crystals (for a few arrays - to be removed!) */ -#endif -#ifndef MSETS -#define MSETS 1000 /**< maximum number of datasets (for a few arrays - to be removed!) */ -#endif -#ifndef MCOLUMNS -#define MCOLUMNS 10000 /**< maximum number of columns (for a few arrays - to be removed!) */ -#endif - -/** MTZ column struct. */ -typedef struct { char label[31]; /**< column name as given by user */ - char type[3]; /**< column type */ - int active; /**< whether column in active list */ - unsigned int source; /**< column index in input file */ - float min; /**< minimum data element */ - float max; /**< maximum data element */ - float *ref; /**< data array */ - char colsource[37]; /**< column source - originating job */ - char grpname[31]; /**< column group name */ - char grptype[5]; /**< column group type */ - int grpposn; /**< column group position in group */ - } MTZCOL; - -/** MTZ dataset struct. */ -typedef struct { int setid; /**< Dataset id */ - char dname[65]; /**< Dataset name */ - float wavelength; /**< Dataset wavelength */ - int ncol; /**< number of columns */ - MTZCOL **col; /**< columns */ - } MTZSET; - -/** MTZ crystal struct. */ -typedef struct { int xtalid; /**< Crystal id */ - char xname[65]; /**< Crystal name */ - char pname[65]; /**< Project name */ - float cell[6]; /**< Crystal cell */ - float resmin; /**< Low resolution limit */ - float resmax; /**< High resolution limit */ - int nset; /**< number of datasets */ - MTZSET **set; /**< datasets */ - } MTZXTAL; - -/** MTZ batch struct. */ -typedef struct bathead { int num; /**< batch number */ - char title[71]; /**< batch title */ - char gonlab[3][9]; /**< names of the three axes */ - int iortyp; /**< type of orientation block (for - possible future use, now = 0) */ - int lbcell[6]; /**< refinement flags for cell */ - int misflg; /**< number of phixyz used (0, 1, or 2) */ - int jumpax; /**< reciprocal axis closest to rotation - axis */ - int ncryst; /**< crystal number */ - int lcrflg; /**< mosaicity model: 0 = isotropic, - 1 = anisotropic */ - int ldtype; /**< type of data: 2D (1), 3D (2), or - Laue (3) */ - int jsaxs; /**< goniostat scan axis number */ - int nbscal; /**< number of batch scales & Bfactors - (0 if unset) */ - int ngonax; /**< number of goniostat axes */ - int lbmflg; /**< flag for type of beam info: - = 0 for alambd, delamb - = 1 also delcor, divhd, divvd */ - int ndet; /**< number of detectors (current maximum - 2) */ - int nbsetid; /**< dataset id - should be pointer? */ - float cell[6]; /**< cell dimensions */ - float umat[9]; /**< orientation matrix U in Fortranic order, - i.e. U(1,1), U(2,1) ... */ - float phixyz[2][3]; /**< missetting angles at beginning and - end of oscillation */ - float crydat[12]; /**< mosaicity */ - float datum[3]; /**< datum values of goniostat axes */ - float phistt; /**< start of phi relative to datum */ - float phiend; /**< end of phi relative to datum */ - float scanax[3]; /**< rotation axis in lab frame */ - float time1; /**< start time */ - float time2; /**< stop time */ - float bscale; /**< batch scale */ - float bbfac; /**< batch temperature factor */ - float sdbscale; /**< sd bscale */ - float sdbfac; /**< sd bbfac */ - float phirange; /**< phi range */ - float e1[3]; /**< vector 1 ("Cambridge" laboratory axes) - defining ngonax goniostat axes */ - float e2[3]; /**< vector 2 ("Cambridge" laboratory axes) - defining ngonax goniostat axes */ - float e3[3]; /**< vector 3 ("Cambridge" laboratory axes) - defining ngonax goniostat axes */ - float source[3]; /**< idealised source vector */ - float so[3]; /**< source vector */ - float alambd; /**< wavelength (A) */ - float delamb; /**< dispersion (deltalambda / lambda) */ - float delcor; /**< correlated component */ - float divhd; /**< horizontal beam divergence */ - float divvd; /**< vertical beam divergence */ - float dx[2]; /**< xtal to detector distance */ - float theta[2]; /**< detector tilt angle */ - float detlm[2][2][2]; /**< min & max values of detector coords - (pixels) */ - struct bathead *next; /**< next batch in list */ - } MTZBAT; - -/** MTZ symmetry struct. */ -typedef struct { int spcgrp; /**< spacegroup number */ - char spcgrpname[MAXSPGNAMELENGTH+1]; /**< spacegroup name */ - int nsym; /**< number of symmetry operations */ - float sym[192][4][4]; /**< symmetry operations - (translations in [*][3]) */ - int nsymp; /**< number of primitive symmetry ops. */ - char symtyp; /**< lattice type (P,A,B,C,I,F,R) */ - char pgname[MAXPGNAMELENGTH+1]; /**< pointgroup name */ - char spg_confidence; /**< L => Bravais lattice correct - P => pointgroup correct - E => spacegroup or enantiomorph - S => spacegroup is correct - X => flag not set */ - } SYMGRP; - -typedef union { char amnf[4]; - float fmnf; - } MNF; - -/** Top level of MTZ struct. */ -typedef struct { CCP4File *filein; /**< file for reading */ - CCP4File *fileout; /**< file for writing */ - char title[71]; /**< title of mtz structure */ - char *hist; /**< history of mtz file */ - int histlines; /**< number of lines in hist */ - int nxtal; /**< number of crystals */ - int ncol_read; /**< number of columns from file */ - int nref; /**< total number of reflections */ - int nref_filein; /**< number of reflections from input file */ - int refs_in_memory; /**< whether reflections are held in memory */ - int n_orig_bat; /**< original number of batches */ - float resmax_out; /**< output file max res */ - float resmin_out; /**< output file min res */ - MNF mnf; /**< value of missing number flag */ - SYMGRP mtzsymm; /**< symmetry information */ - MTZXTAL **xtal; /**< crystals */ - MTZBAT *batch; /**< first batch header */ - MTZCOL *order[5]; /**< sort order */ - char *xml; /**< xml data block */ - char *unknown_headers;/**< unknown header data */ - int n_unknown_headers;/**< unknown header data */ - } MTZ; - -#endif diff --git a/ccp4c/ccp4/overview.h b/ccp4c/ccp4/overview.h deleted file mode 100644 index 04f1479b..00000000 --- a/ccp4c/ccp4/overview.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - overview.h: overview of CINCH - Crystallography IN C Headers - Copyright (C) 2003 CCLRC, Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -/** @mainpage CINCH - Crystallography IN C Headers - * - * @note I'm fed up of the uninspiring "new library" and here's - * my first attempt at a funky name. Alternatives welcome! - * - * @verbatim - - - - @endverbatim - * - * @section aims Aims - -The CCP4 software suite is based around a library of routines which -cover common tasks, such as file opening, parsing keyworded input, -reading and writing of standard data formats, applying symmetry -operations, etc. Programs in the suite call these routines which, as -well as saving the programmer some effort, ensure that the varied -programs in the suite have a similar look-and-feel. -

-Since 2002, there has been a major effort to re-write -much of the CCP4 library into C/C++. The aims are: - -

    -
  • To implement a better representation of the underlying data model. -For example, Eugene Krissinel's MMDB library acts on a data structure -which represents the various levels of structure of a protein model. -The new MTZ library encapsulates the crystal/dataset hierarchy that -is increasingly being used by programs. -
  • To maintain support for existing programs. In particular, the -existing Fortran APIs will be maintained, although they will now often -be only wrappers to functions in the new library. It is hoped that many -existing programs will be migrated to using the new library directly. -
  • To provide support for scripting. It is possible to generate APIs -for Python, Tcl and Perl automatically from the core C code. Thus, much -of the standard CCP4 functionality wil be available to scripts used -e.g. in ccp4i or the molecular graphics project. -
- -This incremental approach, maintaining the existing suite while -improving the underlying code, puts constraints on what is possible, but -is considered more appropriate for a collaborative project like CCP4. - - * @section start This documentation - -

-This documentation is generated automatically by -Doxygen from -comment sections in the code. It is therefore detailed and extensive. -The library divides roughly into the following sections: -

-
CMTZ library -
See the @ref cmtz_page page for C/C++ programmers, and the -@ref cmtz_f_page page for Fortran programmers. -
CMAP library -
See the @ref cmap_page page for C/C++ programmers, and the -@ref cmap_f_page page for Fortran programmers. -
MMDB library -
See Eugene's documentation. -
CSYM library -
See the @ref csym_page page for C/C++ programmers, and the -@ref csym_f_page page for Fortran programmers. -
CCP4 utility library -
See the @ref utilities_page page for C/C++ programmers. -
Low level disk i/o -
See the @ref diskio_f_page page for Fortran programmers. -
- - */ - diff --git a/ccp4c/ccp4/pack_c.c b/ccp4c/ccp4/pack_c.c deleted file mode 100644 index 0f423da4..00000000 --- a/ccp4c/ccp4/pack_c.c +++ /dev/null @@ -1,1521 +0,0 @@ -/* - pack_c.c: (de)compress diffraction image files - Copyright (C) 1995 Jan P Abrahams - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include -#include -#include "pack_c.h" - - -/* pack_c.c, version 2 (backwards compatible with earlier versions)... - JPA, 26 June 1995 - jpa@mrc-lmb.cam.ac.uk - - This file contains functions capable of compressing and decompressing - images. It is especially suited for X-ray diffraction patterns, or other - image formats in which orthogonal pixels contain "grey-levels" and - vary smoothly accross the image. Clean images measured by a MAR-research - image plate scanner containing two bytes per pixel can be compressed by - a factor of 3.5 to 4.5 . - - Since the images are encoded in a byte-stream, there should be no problem - concerening big- or little ended machines: both will produce an identical - packed image. - - Compression is achieved by first calculating the differences between every - pixel and the truncated value of four of its neighbours. For example: - the difference for a pixel at img[x, y] is: - - img[x, y] - (int) (img[x-1, y-1] + - img[x-1, y] + - img[x-1, y+1] + - img[x, y-1]) / 4 - - After calculating the differences, they are encoded in a packed array. A - packed array consists of consequitive chunks which have the following format: - - Three bits containing the logarithm base 2 of the number of pixels encoded - in the chunk. - - Three bits defining the number of bits used to encode one element of the - chunk. The value of these three bits is used as index in a lookup table - to get the actual number of bits of the elements of the chunk. - Note: in version 2, there are four bits in this position!! This allows - more efficient packing of synchrotron data! The routines in this - sourcefile are backwards compatible. - JPA, 26 June 1995 - - The truncated pixel differences. - - To compress an image, call pack_wordimage_c() or pack_longimage_c(). These - will append the packed image to any header information already written to - disk (take care that the file containing this information is closed before - calling). To decompress an image, call readpack_word_c() or - readpack_long_c(). These functions will find the start of the packed image - themselves, irrespective of the header format. - - In order to provide an interface to fortran programs, the functions - pack_wordimage_f(), pack_longimage_f(), read_wordimage_f() and - read_long_image_f() are provided. They are called by the fortran subroutines - PACK_WORDIMAGE, PACK_LONGIMAGE, READPACK_WORD, and READPACK_LONG, which - can be found in the accompanying sourcefile "pack_f.f". - - - Jan Pieter Abrahams, 6 Jan 1993 */ - - - - -/******************************************************************************/ - - -/* Some fortran compilers require c-functions to end with an underscore. */ - -#if defined(_AIX) || defined (___AIX) || defined(__hpux) -/* no underscore by default */ -#else -# if defined (VMS) || defined (vms) || defined (__vms) || defined (__VMS) || defined(_MSC_VER) -# define pack_wordimage_f PACK_WORDIMAGE_F -# define v2pack_wordimage_f V2PACK_WORDIMAGE_F -# define pack_longimage_f PACK_LONGIMAGE_F -# define v2pack_longimage_f V2PACK_LONGIMAGE_F -# define readpack_word_f READPACK_WORD_F -# define readpack_long_f READPACK_LONG_F -# define mirror_wordimage MIRROR_WORDIMAGE -# define mirror_longimage MIRROR_LONGIMAGE -# define imsiz_f IMSIZ_F -# else -# define pack_wordimage_f pack_wordimage_f_ -# define v2pack_wordimage_f v2pack_wordimage_f_ -# define pack_longimage_f pack_longimage_f_ -# define v2pack_longimage_f v2pack_longimage_f_ -# define readpack_word_f readpack_word_f_ -# define readpack_long_f readpack_long_f_ -# define mirror_wordimage mirror_wordimage_ -# define mirror_longimage mirror_longimage_ -# define imsiz_f imsiz_f_ -# endif -#endif - -/******************************************************************************/ - -/* Prototypes of the functions in this sourcefile, as required by the ANSI - standard. The pack_c.h file contains the functions other routines might - call. Here are functions which will are not really usefull for image - processing programmes, and which are used locally in this file. Also - front-end fortran callable C-functions are not included in the pack_c.h - file. */ - - -#if defined (PROTOTYPE) - -/* Functions required for packing: */ - - -void pack_wordimage_f(WORD *img, LONG *x, LONG *y, LONG *filename); -/* Fortran frontend of pack_wordimage_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -void v2pack_wordimage_f(WORD *img, LONG *x, LONG *y, LONG *filename); -/* Fortran frontend of pack_wordimage_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. This function generates - Version 2 images! */ - -void pack_longimage_f(LONG *img, LONG *x, LONG *y, LONG *filename); -/* Fortran frontend of pack_longimage_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -void v2pack_longimage_f(LONG *img, LONG *x, LONG *y, LONG *filename); -/* Fortran frontend of pack_longimage_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. This function generates - Version 2 images! */ - -void pack_wordimage_c(WORD *img, int x, int y, char *filename); -/* Pack image 'img', containing 'x * y' WORD-sized pixels into 'filename'. - Opens file and wraps pack_wordimage_copen() */ - -void pack_wordimage_copen(WORD *img, int x, int y, FILE *packfile); -/* Pack image 'img', containing 'x * y' WORD-sized pixels into open file - 'packfile'. */ - -void pack_longimage_c(LONG *img, int x, int y, char *filename); -/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. - Opens file and wraps pack_long_image_copen()*/ - -void pack_longimage_copen(LONG *img, int x, int y, FILE *packfile); -/* Pack image 'img', containing 'x * y' LONG-sized pixels into open file - 'packfile'. */ - -LONG *diff_words(WORD *img, int x, int y, LONG *diffs, LONG done); -/* Calculates the difference of WORD-sized pixels of an image with the - truncated mean value of four of its neighbours. 'x' is the number of fast - coordinates of the image 'img', 'y' is the number of slow coordinates, - 'diffs' will contain the differences, 'done' defines the index of the pixel - where calculating the differences should start. A pointer to the last - difference is returned. Maximally DIFFBUFSIZ differences are returned in - 'diffs'.*/ - -LONG *diff_longs(LONG *img, int x, int y, LONG *diffs, LONG done); -/* Calculates the difference of LONG-sized pixels of an image with the - truncated mean value of four of its neighbours. 'x' is the number of fast - coordinates of the image 'img', 'y' is the number of slow coordinates, - 'diffs' will contain the differences, 'done' defines the index of the pixel - where calculating the differences should start. A pointer to the last - difference is returned. Maximally DIFFBUFSIZ differences are returned in - 'diffs'.*/ - -int bits(LONG *chunk, int n); -/* Returns the number of bits neccesary to encode the longword-array 'chunk' - of size 'n' The size in bits of one encoded element can be 0, 4, 5, 6, 7, - 8, 16 or 32. */ - -int v2bits(LONG *chunk, int n); -/* Returns the number of bits neccesary to encode the longword-array 'chunk' - of size 'n' The size in bits of one encoded element can be 0, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16 or 32. */ - -void pack_chunk(LONG *lng, int nmbr, int bitsize, FILE *file); -/* Packs 'nmbr' LONGs starting at 'lng[0]' into a packed array of 'bitsize' - sized elements. If the internal buffer in which the array is packed is full, - it is flushed to 'file', making room for more of the packed array. If - ('lng == NULL'), the buffer is flushed aswell. */ - -void v2pack_chunk(LONG *lng, int nmbr, int bitsize, FILE *file); -/* Packs 'nmbr' LONGs starting at 'lng[0]' into a packed array of 'bitsize' - sized elements. If the internal buffer in which the array is packed is full, - it is flushed to 'file', making room for more of the packed array. If - ('lng == NULL'), the buffer is flushed aswell. This is a new function - included in version 2, but not existing in version 1! */ - -void pack_longs(LONG *lng, int n, BYTE **target, int *bit, int size); -/* Pack 'n' WORDS, starting with 'lng[0]' into the packed array 'target'. The - elements of such a packed array do not obey BYTE-boundaries, but are put one - behind the other without any spacing. Only the 'bitsiz' number of least - significant bits are used, the rest is truncated. The starting bit of - 'target' is 'bit' (bits range from 0 to 7). After completion of - 'pack_words()', both '**target' and '*bit' are updated and define the next - position in 'target' from where packing could continue. */ - - - -/* Functions required for unpacking: */ - - -void readpack_word_f(WORD *img, LONG *filename); -/* Fortran frontend of readpack_word_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -void readpack_long_f(LONG *img, LONG *filename); -/* Fortran frontend of readpack_long_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -void unpack_word(FILE *packfile, int x, int y, WORD *img); -/* Unpacks a packed image into the WORD-array 'img'. The image is stored - in 'packfile'. The file should be properly positioned: the first BYTE - read is assumed to be the first BYTE of the packed image. */ - -void v2unpack_word(FILE *packfile, int x, int y, WORD *img); -/* Unpacks a packed image into the WORD-array 'img'. The image is stored - in 'packfile'. The file should be properly positioned: the first BYTE - read is assumed to be the first BYTE of the packed image. This function - reads Version 2 packed images! */ - -void unpack_long(FILE *packfile, int x, int y, LONG *img); -/* Unpacks a packed image into the LONG-array 'img'. The image is stored - in 'packfile'. The file should be properly positioned: the first BYTE - read is assumed to be the first BYTE of the packed image. */ - -void v2unpack_long(FILE *packfile, int x, int y, LONG *img); -/* Unpacks a packed image into the LONG-array 'img'. The image is stored - in 'packfile'. The file should be properly positioned: the first BYTE - read is assumed to be the first BYTE of the packed image. This function - reads Version 2 packed images! */ - - - - -/* Function required to convert a WORD-array into a char array, required for - both compression and decompression if called from fortran. */ - -char *long_to_char(LONG *lng, char *string); -/* Shrinks an array of LONGs into an array of chars, used in order to translate - an encoded string array passed by fortran into a c-type string. Returns - 'string'. */ - -void imsiz_f(LONG *filename, LONG *x, LONG *y); -/* Fortran frontend of imsiz_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - - - -/* Some other usefull functions for manipulating images. */ - -void mirror_wordimg(WORD *img, LONG *x, LONG *y); -/* Replaces img with its mirror by interchanging rows. '*x' is the fast index, - '*y' is the slow index. */ - -void mirror_longimg(LONG *img, LONG *x, LONG *y); -/* Replaces img with its mirror by interchanging rows. '*x' is the fast index, - '*y' is the slow index. */ - -#endif /* (PROTOTYPE) */ - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void pack_wordimage_f(WORD *img, LONG *x, LONG *y, LONG *filename) -#else - void pack_wordimage_f(img, x, y, filename) - WORD *img; - LONG *x, *y, *filename; -#endif -/* Fortran frontend of pack_wordimage_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -{ char c_filename[1024]; -#if !defined (PROTOTYPE) - void pack_wordimage_c(); - char *long_to_char(); -#endif - - pack_wordimage_c(img, (LONG) *x, (LONG) *y, - long_to_char(filename, c_filename));} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void v2pack_wordimage_f(WORD *img, LONG *x, LONG *y, LONG *filename) -#else - void v2pack_wordimage_f(img, x, y, filename) - WORD *img; - LONG *x, *y, *filename; -#endif -/* Fortran frontend of pack_wordimage_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. This function generates - Version 2 images!*/ - -{ char c_filename[1024]; -#if !defined (PROTOTYPE) - void v2pack_wordimage_c(); - char *long_to_char(); -#endif - - v2pack_wordimage_c(img, (LONG) *x, (LONG) *y, - long_to_char(filename, c_filename));} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void pack_longimage_f(LONG *img, LONG *x, LONG *y, LONG *filename) -#else - void pack_longimage_f(img, x, y, filename) - LONG *img, *x, *y, *filename; -#endif -/* Fortran frontend of pack_longimage_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -{ char c_filename[1024]; -#if !defined (PROTOTYPE) - void pack_longimage_c(); - char *long_to_char(); -#endif - - pack_longimage_c(img, (LONG) *x, (LONG) *y, - long_to_char(filename, c_filename));} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void v2pack_longimage_f(LONG *img, LONG *x, LONG *y, LONG *filename) -#else - void v2pack_longimage_f(img, x, y, filename) - LONG *img, *x, *y, *filename; -#endif -/* Fortran frontend of pack_longimage_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -{ char c_filename[1024]; -#if !defined (PROTOTYPE) - void v2pack_longimage_c(); - char *long_to_char(); -#endif - - v2pack_longimage_c(img, (LONG) *x, (LONG) *y, - long_to_char(filename, c_filename));} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void pack_wordimage_copen(WORD *img, int x, int y, FILE *packfile) -#else - void pack_wordimage_copen(img, x, y, packfile) - WORD *img; - int x, y; - FILE *packfile; -#endif -/* Pack image 'img', containing 'x * y' WORD-sized pixels into 'filename'. */ - -{ int chunksiz, packsiz, nbits, next_nbits, tot_nbits; - LONG buffer[DIFFBUFSIZ]; - LONG *diffs = buffer; - LONG *end = diffs - 1; - LONG done = 0; -#if !defined (PROTOTYPE) - LONG *diff_words(); - int bits(); - void pack_chunk(); -#endif - - fprintf(packfile, PACKIDENTIFIER, x, y); - while (done < (x * y)) - { end = diff_words(img, x, y, buffer, done); - done += (end - buffer) + 1; - diffs = buffer; - while (diffs <= end) - { packsiz = 0; - chunksiz = 1; - nbits = bits(diffs, 1); - while (packsiz == 0) - { if (end <= (diffs + chunksiz * 2)) - packsiz = chunksiz; - else - { next_nbits = bits(diffs + chunksiz, chunksiz); - tot_nbits = 2 * max(nbits, next_nbits); - if (tot_nbits >= (nbits + next_nbits + 6)) - packsiz = chunksiz; - else - { nbits = tot_nbits; - if (chunksiz == 64) - packsiz = 128; - else - chunksiz *= 2;}}} - pack_chunk(diffs, packsiz, nbits / packsiz, packfile); - diffs += packsiz;}} - pack_chunk(NULL, 0, 0, packfile); -} - - -#if defined (PROTOTYPE) - void pack_wordimage_c(WORD *img, int x, int y, char *filename) -#else - void pack_wordimage_c(img, x, y, filename) - WORD *img; - int x, y; - char *filename; -#endif -{ - FILE *packfile = fopen(filename, "a"); - if (packfile == NULL) { - fprintf(stderr,"The file %s cannot be created!\n ...giving up...\n", - filename); - exit(1); - } else { - pack_wordimage_copen(img, x, y, packfile); - fclose(packfile); - } -} - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void v2pack_wordimage_c(WORD *img, int x, int y, char *filename) -#else - void v2pack_wordimage_c(img, x, y, filename) - WORD *img; - int x, y; - char *filename; -#endif -/* Pack image 'img', containing 'x * y' WORD-sized pixels into 'filename'. */ - -{ int chunksiz, packsiz, nbits, next_nbits, tot_nbits; - LONG buffer[DIFFBUFSIZ]; - LONG *diffs = buffer; - LONG *end = diffs - 1; - LONG done = 0; - FILE *packfile; -#if !defined (PROTOTYPE) - LONG *diff_words(); - int v2bits(); - void v2pack_chunk(); -#endif - - packfile = fopen(filename, "a"); - if (packfile == NULL) - { fprintf(stderr,"The file %s cannot be created!\n ...giving up...\n", - filename); - exit(1);} - else - { fprintf(packfile, V2IDENTIFIER, x, y); - while (done < (x * y)) - { end = diff_words(img, x, y, buffer, done); - done += (end - buffer) + 1; - diffs = buffer; - while (diffs <= end) - { packsiz = 0; - chunksiz = 1; - nbits = v2bits(diffs, 1); - while (packsiz == 0) - { if (end <= (diffs + chunksiz * 2)) - packsiz = chunksiz; - else - { next_nbits = v2bits(diffs + chunksiz, chunksiz); - tot_nbits = 2 * max(nbits, next_nbits); - if (tot_nbits >= (nbits + next_nbits + 7)) - packsiz = chunksiz; - else - { nbits = tot_nbits; - if (chunksiz == 64) - packsiz = 128; - else - chunksiz *= 2;}}} - v2pack_chunk(diffs, packsiz, nbits / packsiz, packfile); - diffs += packsiz;}} - v2pack_chunk(NULL, 0, 0, packfile); - fclose(packfile);}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void pack_longimage_copen(LONG *img, int x, int y, FILE *packfile) -#else - void pack_longimage_copen(img, x, y, packfile) - LONG *img; - int x, y; - FILE *packfile; -#endif -/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. */ -{ int chunksiz, packsiz, nbits, next_nbits, tot_nbits; - LONG buffer[DIFFBUFSIZ]; - LONG *diffs = buffer; - LONG *end = diffs - 1; - LONG done = 0; -#if !defined (PROTOTYPE) - LONG *diff_longs(); - int bits(); - void pack_chunk(); -#endif - - fprintf(packfile, PACKIDENTIFIER, x, y); - while (done < (x * y)) - { end = diff_longs(img, x, y, buffer, done); - done += (end - buffer) + 1; - diffs = buffer; - while (diffs <= end) - { packsiz = 0; - chunksiz = 1; - nbits = bits(diffs, 1); - while (packsiz == 0) - { if (end <= (diffs + chunksiz * 2)) - packsiz = chunksiz; - else - { next_nbits = bits(diffs + chunksiz, chunksiz); - tot_nbits = 2 * max(nbits, next_nbits); - if (tot_nbits >= (nbits + next_nbits + 6)) - packsiz = chunksiz; - else - { nbits = tot_nbits; - if (chunksiz == 64) - packsiz = chunksiz * 2; - else - chunksiz *= 2;}}} - pack_chunk(diffs, packsiz, nbits / packsiz, packfile); - diffs += packsiz;}} - pack_chunk(NULL, 0, 0, packfile); -} - - -#if defined (PROTOTYPE) - void pack_longimage_c(LONG *img, int x, int y, char *filename) -#else - void pack_longimage_c(img, x, y, filename) - LONG *img; - int x, y; - char *filename; -#endif -/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. */ -{ - FILE *packfile = fopen(filename, "a"); - if (packfile == NULL) - { fprintf(stderr,"The file %s cannot be created!\n ...giving up...\n", - filename); - exit(1);} - else - { pack_longimage_copen(img, x, y, packfile); - fclose(packfile); - } -} - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void v2pack_longimage_c(LONG *img, int x, int y, char *filename) -#else - void v2pack_longimage_c(img, x, y, filename) - LONG *img; - int x, y; - char *filename; -#endif -/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. */ - -{ int chunksiz, packsiz, nbits, next_nbits, tot_nbits; - LONG buffer[DIFFBUFSIZ]; - LONG *diffs = buffer; - LONG *end = diffs - 1; - LONG done = 0; - FILE *packfile; -#if !defined (PROTOTYPE) - LONG *diff_longs(); - int v2bits(); - void v2pack_chunk(); -#endif - - packfile = fopen(filename, "a"); - if (packfile == NULL) - { fprintf(stderr,"The file %s cannot be created!\n ...giving up...\n", - filename); - exit(1);} - else - { fprintf(packfile, V2IDENTIFIER, x, y); - while (done < (x * y)) - { end = diff_longs(img, x, y, buffer, done); - done += (end - buffer) + 1; - diffs = buffer; - while (diffs <= end) - { packsiz = 0; - chunksiz = 1; - nbits = v2bits(diffs, 1); - while (packsiz == 0) - { if (end <= (diffs + chunksiz * 2)) - packsiz = chunksiz; - else - { next_nbits = v2bits(diffs + chunksiz, chunksiz); - tot_nbits = 2 * max(nbits, next_nbits); - if (tot_nbits >= (nbits + next_nbits + 7)) - packsiz = chunksiz; - else - { nbits = tot_nbits; - if (chunksiz == 64) - packsiz = chunksiz * 2; - else - chunksiz *= 2;}}} - v2pack_chunk(diffs, packsiz, nbits / packsiz, packfile); - diffs += packsiz;}} - v2pack_chunk(NULL, 0, 0, packfile); - fclose(packfile);}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - LONG *diff_words(WORD *word, int x, int y, LONG *diffs, LONG done) -#else - LONG *diff_words(word, x, y, diffs, done) - WORD *word; - int x, y; - LONG *diffs, done; -#endif -/* Calculates the difference of WORD-sized pixels of an image with the - truncated mean value of four of its neighbours. 'x' is the number of fast - coordinates of the image 'img', 'y' is the number of slow coordinates, - 'diffs' will contain the differences, 'done' defines the index of the pixel - where calculating the differences should start. A pointer to the last - difference is returned. Maximally DIFFBUFSIZ differences are returned in - 'diffs'.*/ - -{ LONG i = 0; - LONG tot = x * y; - - if (done == 0) - { *diffs = word[0]; - ++diffs; - ++done; - ++i;} - while ((done <= x) && (i < DIFFBUFSIZ)) - { *diffs = word[done] - word[done - 1]; - ++diffs; - ++done; - ++i;} - while ((done < tot) && (i < DIFFBUFSIZ)) - { *diffs = word[done] - (word[done - 1] + word[done - x + 1] + - word[done - x] + word[done - x - 1] + 2) / 4; - ++diffs; - ++done; - ++i;} - return(--diffs);} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - LONG *diff_longs(LONG *lng, int x, int y, LONG *diffs, LONG done) -#else - LONG *diff_longs(lng, x, y, diffs, done) - LONG *lng, *diffs, done; - int x, y; -#endif -/* Calculates the difference of LONG-sized pixels of an image with the - truncated mean value of four of its neighbours. 'x' is the number of fast - coordinates of the image 'img', 'y' is the number of slow coordinates, - 'diffs' will contain the differences, 'done' defines the index of the pixel - where calculating the differences should start. A pointer to the last - difference is returned. Maximally DIFFBUFSIZ differences are returned in - 'diffs'.*/ - -{ LONG i = 0, d; - LONG tot = x * y; - LONG huge = shift_left(1, 30); - - if (done == 0) - { *diffs = min(max(-huge, lng[0]), huge); - ++diffs; - ++done; - ++i;} - while ((done <= x) && (i < DIFFBUFSIZ)) - { d = lng[done] - lng[done - 1]; - *diffs = min(max(-huge, d), huge); - ++diffs; - ++done; - ++i;} - while ((done < tot) && (i < DIFFBUFSIZ)) - { d = lng[done] - (lng[done - 1] + lng[done - x + 1] + - lng[done - x] + lng[done - x - 1] + 2) / 4; - *diffs = min(max(-huge, d), huge); - ++diffs; - ++done; - ++i;} - return(--diffs);} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - int bits(LONG *chunk, int n) -#else - int bits(chunk, n) - LONG *chunk; - int n; -#endif -/* Returns the number of bits neccesary to encode the longword-array 'chunk' - of size 'n' The size in bits of one encoded element can be 0, 4, 5, 6, 7, - 8, 16 or 32. */ - -{ int size, maxsize, i; - - for (i = 1, maxsize = abs(chunk[0]); i < n; ++i) - maxsize = max(maxsize, abs(chunk[i])); - if (maxsize == 0) - size = 0; - else if (maxsize < 8) - size = 4 * n; - else if (maxsize < 16) - size = 5 * n; - else if (maxsize < 32) - size = 6 * n; - else if (maxsize < 64) - size = 7 * n; - else if (maxsize < 128) - size = 8 * n; - else if (maxsize < 32768) - size = 16 * n; - else - size = 32 * n; - return(size);} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - int v2bits(LONG *chunk, int n) -#else - int v2bits(chunk, n) - LONG *chunk; - int n; -#endif -/* Returns the number of bits neccesary to encode the longword-array 'chunk' - of size 'n' The size in bits of one encoded element can be 0, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16 or 32. */ - -{ int size, maxsize, i; - - for (i = 1, maxsize = abs(chunk[0]); i < n; ++i) - maxsize = max(maxsize, abs(chunk[i])); - if (maxsize == 0) - size = 0; - else if (maxsize < 4) - size = 3 * n; - else if (maxsize < 8) - size = 4 * n; - else if (maxsize < 16) - size = 5 * n; - else if (maxsize < 32) - size = 6 * n; - else if (maxsize < 64) - size = 7 * n; - else if (maxsize < 128) - size = 8 * n; - else if (maxsize < 256) - size = 9 * n; - else if (maxsize < 512) - size = 10 * n; - else if (maxsize < 1024) - size = 11 * n; - else if (maxsize < 2048) - size = 12 * n; - else if (maxsize < 4096) - size = 13 * n; - else if (maxsize < 8192) - size = 14 * n; - else if (maxsize < 16384) - size = 15 * n; - else if (maxsize < 32768) - size = 16 * n; - else - size = 32 * n; - return(size);} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void pack_chunk(LONG *lng, int nmbr, int bitsize, FILE *packfile) -#else - void pack_chunk(lng, nmbr, bitsize, packfile) - LONG *lng; - int nmbr, bitsize; - FILE *packfile; -#endif -/* Packs 'nmbr' LONGs starting at 'lng[0]' into a packed array of 'bitsize' - sized elements. If the internal buffer in which the array is packed is full, - it is flushed to 'file', making room for more of the packed array. If - ('lng == NULL'), the buffer is flushed aswell. */ - -{ static LONG bitsize_encode[33] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}; - LONG descriptor[2], i, j; - static BYTE *buffer = NULL; - static BYTE *buffree = NULL; - static int bitmark; -#if !defined (PROTOTYPE) - void pack_longs(); -#endif - - if (buffer == NULL) - { buffree = buffer = (BYTE *) malloc(PACKBUFSIZ); - bitmark = 0;} - if (lng != NULL) - { for (i = nmbr, j = 0; i > 1; i /= 2, ++j); - descriptor[0] = j; - descriptor[1] = bitsize_encode[bitsize]; - if ((buffree - buffer) > (PACKBUFSIZ - (130 * 4))) - { fwrite(buffer, sizeof(BYTE), buffree - buffer, packfile); - buffer[0] = buffree[0]; - buffree = buffer;} - pack_longs(descriptor, 2, &buffree, &bitmark, 3); - pack_longs(lng, nmbr, &buffree, &bitmark, bitsize);} - else - { int len=buffree-buffer; - if (bitmark!=0) len++; - fwrite(buffer, sizeof(BYTE), len, packfile); - free((void *) buffer); - buffer = NULL;}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void v2pack_chunk(LONG *lng, int nmbr, int bitsize, FILE *packfile) -#else - void v2pack_chunk(lng, nmbr, bitsize, packfile) - LONG *lng; - int nmbr, bitsize; - FILE *packfile; -#endif -/* Packs 'nmbr' LONGs starting at 'lng[0]' into a packed array of 'bitsize' - sized elements. If the internal buffer in which the array is packed is full, - it is flushed to 'file', making room for more of the packed array. If - ('lng == NULL'), the buffer is flushed aswell. This is a new function - included in version 2, but not existing in version 1! */ - -{ static LONG bitsize_encode[33] = {0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15}; - LONG descriptor[2], i, j; - static BYTE *buffer = NULL; - static BYTE *buffree = NULL; - static int bitmark; -#if !defined (PROTOTYPE) - void pack_longs(); -#endif - - if (buffer == NULL) - { buffree = buffer = (BYTE *) malloc(PACKBUFSIZ); - bitmark = 0;} - if (lng != NULL) - { for (i = nmbr, j = 0; i > 1; i /= 2, ++j); - descriptor[0] = j; - descriptor[1] = bitsize_encode[bitsize]; - if ((buffree - buffer) > (PACKBUFSIZ - (130 * 4))) - { fwrite(buffer, sizeof(BYTE), buffree - buffer, packfile); - buffer[0] = buffree[0]; - buffree = buffer;} - pack_longs(descriptor, 1, &buffree, &bitmark, 3); - pack_longs(descriptor + 1, 1, &buffree, &bitmark, 4); - pack_longs(lng, nmbr, &buffree, &bitmark, bitsize);} - else - { int len=buffree-buffer; - if (bitmark!=0) len++; - fwrite(buffer, sizeof(BYTE), len, packfile); - free((void *) buffer); - buffer = NULL;}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void pack_longs(LONG *lng, int n, BYTE **target, int *bit, int size) -#else - void pack_longs(lng, n, target, bit, size) - LONG *lng; - int n, *bit, size; - BYTE **target; -#endif -/* Pack 'n' WORDS, starting with 'lng[0]' into the packed array 'target'. The - elements of such a packed array do not obey BYTE-boundaries, but are put one - behind the other without any spacing. Only the 'bitsiz' number of least - significant bits are used. The starting bit of 'target' is 'bit' (bits range - from 0 to 7). After completion of 'pack_words()', both '**target' and '*bit' - are updated and define the next position in 'target' from which packing - could continue. */ - -{ LONG mask, window; - int valids, i, temp; - int temp_bit = *bit; - BYTE *temp_target = *target; - - if (size > 0) - { mask = setbits[size]; - for (i = 0; i < n; ++i) - { window = lng[i] & mask; - valids = size; - if (temp_bit == 0) - *temp_target = (BYTE) window; - else - { temp = shift_left(window, temp_bit); - *temp_target |= temp;} - window = shift_right(window, 8 - temp_bit); - valids = valids - (8 - temp_bit); - if (valids < 0) - temp_bit += size; - else - { while (valids > 0) - { *++temp_target = (BYTE) window; - window = shift_right(window, 8); - valids -= 8;} - temp_bit = 8 + valids;} - if (valids == 0) - { temp_bit = 0; - ++temp_target;}} - *target = temp_target; - *bit = (*bit + (size * n)) % 8;}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void readpack_word_f(WORD *img, LONG *filename) -#else - void readpack_word_f(img, filename) - WORD *img; - LONG *filename; -#endif -/* Fortran frontend of readpack_word_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -{ char c_filename[1024]; -#if !defined (PROTOTYPE) - void readpack_word_c(); - char *long_to_char(); -#endif - - readpack_word_c(img, long_to_char(filename, c_filename));} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void readpack_long_f(LONG *img, LONG *filename) -#else - void readpack_long_f(img, filename) - LONG *img, *filename; -#endif -/* Fortran frontend of readpack_long_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -{ char c_filename[1024]; -#if !defined (PROTOTYPE) - void readpack_long_c(); - char *long_to_char(); -#endif - - readpack_long_c(img, long_to_char(filename, c_filename));} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void readpack_word_c(WORD *img, char *filename) -#else - void readpack_word_c(img, filename) - WORD *img; - char *filename; -#endif -/* Unpacks packed image from 'filename' into the WORD-array 'img'. Scans the - file defined by 'filename' until the PACKIDENTIFIER is found, then unpacks - starting from there. */ - -{ FILE *packfile; - int x = 0, y = 0, i = 0, c = 0, version = 0; - char header[BUFSIZ]; -#if !defined (PROTOTYPE) - void unpack_word(); - void v2unpack_word(); -#endif - - packfile = fopen(filename, "r"); - if (packfile == NULL) - printf("%s does not exist.\n", filename); - else - { header[0] = '\n'; - header[1] = 0; - while ((c != EOF) && ((x == 0) || (y == 0))) - { c = i = x = y = 0; - while ((++i < BUFSIZ) && (c != EOF) && (c != '\n') && (x==0) && (y==0)) - if ((header[i] = c = getc(packfile)) == '\n') - { if (sscanf(header, PACKIDENTIFIER, &x, &y) == 2) - version = 1; - else if (sscanf(header, V2IDENTIFIER, &x, &y) == 2) - version = 2;}} - if (version == 1) - unpack_word(packfile, x, y, img); - else if (version == 2) - v2unpack_word(packfile, x, y, img); - fclose(packfile);}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void readpack_long_c(LONG *img, char *filename) -#else - void readpack_long_c(img, filename) - LONG *img; - char *filename; -#endif -/* Unpacks packed image from 'filename' into the LONG-array 'img'. Scans the - file defined by 'filename' until the PACKIDENTIFIER is found, then unpacks - starting from there. */ - -{ FILE *packfile; - int x = 0, y = 0, i = 0, c = 0, version = 0; - char header[BUFSIZ]; -#if !defined (PROTOTYPE) - void unpack_long(); - void v2unpack_long(); -#endif - - packfile = fopen(filename, "r"); - if (packfile == NULL) - printf("%s does not exist.", filename); - else - { header[0] = '\n'; - header[1] = 0; - while ((c != EOF) && ((x == 0) || (y == 0))) - { c = i = x = y = 0; - while ((++i < BUFSIZ) && (c != EOF) && (c != '\n') && (x==0) && (y==0)) - if ((header[i] = c = getc(packfile)) == '\n') - { if (sscanf(header, PACKIDENTIFIER, &x, &y) == 2) - version = 1; - else if (sscanf(header, V2IDENTIFIER, &x, &y) == 2) - version = 2;}} - if (version == 1) - unpack_long(packfile, x, y, img); - else if (version == 2) - v2unpack_long(packfile, x, y, img); - fclose(packfile);}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void unpack_word(FILE *packfile, int x, int y, WORD *img) -#else - void unpack_word(packfile, x, y, img) - FILE *packfile; - int x, y; - WORD *img; -#endif -/* Unpacks a packed image into the WORD-array 'img'. The image is stored - in 'packfile'. The file should be properly positioned: the first BYTE - read is assumed to be the first BYTE of the packed image. */ - -{ int valids = 0, spillbits = 0, usedbits, total = x * y; - LONG window = 0L, spill = 0, pixel = 0, nextint, bitnum, pixnum; - static int bitdecode[8] = {0, 4, 5, 6, 7, 8, 16, 32}; - - while (pixel < total) - { if (valids < 6) - { if (spillbits > 0) - { window |= shift_left(spill, valids); - valids += spillbits; - spillbits = 0;} - else - { spill = (LONG) getc(packfile); - spillbits = 8;}} - else - { pixnum = 1 << (window & setbits[3]); - window = shift_right(window, 3); - bitnum = bitdecode[window & setbits[3]]; - window = shift_right(window, 3); - valids -= 6; - while ((pixnum > 0) && (pixel < total)) - { if (valids < bitnum) - { if (spillbits > 0) - { window |= shift_left(spill, valids); - if ((32 - valids) > spillbits) - { valids += spillbits; - spillbits = 0;} - else - { usedbits = 32 - valids; - spill = shift_right(spill, usedbits); - spillbits -= usedbits; - valids = 32;}} - else - { spill = (LONG) getc(packfile); - spillbits = 8;}} - else - { --pixnum; - if (bitnum == 0) - nextint = 0; - else - { nextint = window & setbits[bitnum]; - valids -= bitnum; - window = shift_right(window, bitnum); - if ((nextint & (1 << (bitnum - 1))) != 0) - nextint |= ~setbits[bitnum];} - if (pixel > x) - { img[pixel] = (WORD) (nextint + - (img[pixel-1] + img[pixel-x+1] + - img[pixel-x] + img[pixel-x-1] + 2) / 4); - ++pixel;} - else if (pixel != 0) - { img[pixel] = (WORD) (img[pixel - 1] + nextint); - ++pixel;} - else - img[pixel++] = (WORD) nextint;}}}}} - - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void v2unpack_word(FILE *packfile, int x, int y, WORD *img) -#else - void v2unpack_word(packfile, x, y, img) - FILE *packfile; - int x, y; - WORD *img; -#endif -/* Unpacks a packed image into the WORD-array 'img'. The image is stored - in 'packfile'. The file should be properly positioned: the first BYTE - read is assumed to be the first BYTE of the packed image. */ - -{ int valids = 0, spillbits = 0, usedbits, total = x * y; - LONG window = 0L, spill = 0, pixel = 0, nextint, bitnum, pixnum; - static int bitdecode[16] = {0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 32}; - - while (pixel < total) - { if (valids < 7) - { if (spillbits > 0) - { window |= shift_left(spill, valids); - valids += spillbits; - spillbits = 0;} - else - { spill = (LONG) getc(packfile); - spillbits = 8;}} - else - { pixnum = 1 << (window & setbits[3]); - window = shift_right(window, 3); - bitnum = bitdecode[window & setbits[4]]; - window = shift_right(window, 4); - valids -= 7; - while ((pixnum > 0) && (pixel < total)) - { if (valids < bitnum) - { if (spillbits > 0) - { window |= shift_left(spill, valids); - if ((32 - valids) > spillbits) - { valids += spillbits; - spillbits = 0;} - else - { usedbits = 32 - valids; - spill = shift_right(spill, usedbits); - spillbits -= usedbits; - valids = 32;}} - else - { spill = (LONG) getc(packfile); - spillbits = 8;}} - else - { --pixnum; - if (bitnum == 0) - nextint = 0; - else - { nextint = window & setbits[bitnum]; - valids -= bitnum; - window = shift_right(window, bitnum); - if ((nextint & (1 << (bitnum - 1))) != 0) - nextint |= ~setbits[bitnum];} - if (pixel > x) - { img[pixel] = (WORD) (nextint + - (img[pixel-1] + img[pixel-x+1] + - img[pixel-x] + img[pixel-x-1] + 2) / 4); - ++pixel;} - else if (pixel != 0) - { img[pixel] = (WORD) (img[pixel - 1] + nextint); - ++pixel;} - else - img[pixel++] = (WORD) nextint;}}}}} - - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void unpack_long(FILE *packfile, int x, int y, LONG *img) -#else - void unpack_long(packfile, x, y, img) - FILE *packfile; - int x, y; - LONG *img; -#endif -/* Unpacks a packed image into the LONG-array 'img'. The image is stored - in 'packfile'. The file should be properly positioned: the first BYTE - read is assumed to be the first BYTE of the packed image. */ - -{ int valids = 0, spillbits = 0, usedbits, total = x * y; - LONG window = 0L, spill = 0, pixel = 0, nextint, bitnum, pixnum; - static int bitdecode[8] = {0, 4, 5, 6, 7, 8, 16, 32}; - - while (pixel < total) - { if (valids < 6) - { if (spillbits > 0) - { window |= shift_left(spill, valids); - valids += spillbits; - spillbits = 0;} - else - { spill = (LONG) getc(packfile); - spillbits = 8;}} - else - { pixnum = 1 << (window & setbits[3]); - window = shift_right(window, 3); - bitnum = bitdecode[window & setbits[3]]; - window = shift_right(window, 3); - valids -= 6; - while ((pixnum > 0) && (pixel < total)) - { if (valids < bitnum) - { if (spillbits > 0) - { window |= shift_left(spill, valids); - if ((32 - valids) > spillbits) - { valids += spillbits; - spillbits = 0;} - else - { usedbits = 32 - valids; - spill = shift_right(spill, usedbits); - spillbits -= usedbits; - valids = 32;}} - else - { spill = (LONG) getc(packfile); - spillbits = 8;}} - else - { --pixnum; - if (bitnum == 0) - nextint = 0; - else - { nextint = window & setbits[bitnum]; - valids -= bitnum; - window = shift_right(window, bitnum); - if ((nextint & (1 << (bitnum - 1))) != 0) - nextint |= ~setbits[bitnum];} - if (pixel > x) - { img[pixel] = (LONG) (nextint + - (img[pixel-1] + img[pixel-x+1] + - img[pixel-x] + img[pixel-x-1] + 2) / 4); - ++pixel;} - else if (pixel != 0) - { img[pixel] = (LONG) (img[pixel - 1] + nextint); - ++pixel;} - else - img[pixel++] = (LONG) nextint;}}}}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void v2unpack_long(FILE *packfile, int x, int y, LONG *img) -#else - void v2unpack_long(packfile, x, y, img) - FILE *packfile; - int x, y; - LONG *img; -#endif -/* Unpacks a packed image into the LONG-array 'img'. The image is stored - in 'packfile'. The file should be properly positioned: the first BYTE - read is assumed to be the first BYTE of the packed image. */ - -{ int valids = 0, spillbits = 0, usedbits, total = x * y; - LONG window = 0L, spill = 0, pixel = 0, nextint, bitnum, pixnum; - static int bitdecode[16] = {0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 32}; - - while (pixel < total) - { if (valids < 7) - { if (spillbits > 0) - { window |= shift_left(spill, valids); - valids += spillbits; - spillbits = 0;} - else - { spill = (LONG) getc(packfile); - spillbits = 8;}} - else - { pixnum = 1 << (window & setbits[3]); - window = shift_right(window, 3); - bitnum = bitdecode[window & setbits[4]]; - window = shift_right(window, 4); - valids -= 7; - while ((pixnum > 0) && (pixel < total)) - { if (valids < bitnum) - { if (spillbits > 0) - { window |= shift_left(spill, valids); - if ((32 - valids) > spillbits) - { valids += spillbits; - spillbits = 0;} - else - { usedbits = 32 - valids; - spill = shift_right(spill, usedbits); - spillbits -= usedbits; - valids = 32;}} - else - { spill = (LONG) getc(packfile); - spillbits = 8;}} - else - { --pixnum; - if (bitnum == 0) - nextint = 0; - else - { nextint = window & setbits[bitnum]; - valids -= bitnum; - window = shift_right(window, bitnum); - if ((nextint & (1 << (bitnum - 1))) != 0) - nextint |= ~setbits[bitnum];} - if (pixel > x) - { img[pixel] = (LONG) (nextint + - (img[pixel-1] + img[pixel-x+1] + - img[pixel-x] + img[pixel-x-1] + 2) / 4); - ++pixel;} - else if (pixel != 0) - { img[pixel] = (LONG) (img[pixel - 1] + nextint); - ++pixel;} - else - img[pixel++] = (LONG) nextint;}}}}} - - - -/******************************************************************************/ - -#if defined (PROTOTYPES) - char *long_to_char(LONG *lng, char *string) -#else - char *long_to_char(lng, string) - LONG *lng; - char *string; -#endif -/* Shrinks an array of LONGs into an array of chars, used in order to translate - an encoded string array passed by fortran into a c-type string. Returns - 'string'. */ - -{ char *s = string; - - do - *(s++) = (char) *lng; - while (*(lng++) != 0); - return(string);} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void imsiz_c(char *filename, LONG *x, LONG *y) -#else - void imsiz_c(filename, x, y) - char *filename; - LONG *x, *y; -#endif -/* Determines the size of the the packed image "filename" after unpacking. The - dimensions are returned in x and y. */ - -{ FILE *packfile; - int i = 0, c = 0; - char header[BUFSIZ]; - - packfile = fopen(filename, "r"); - header[0] = '\n'; - header[1] = 0; - *x = *y = 0; - if (packfile != NULL) - { while ((c != EOF) && ((*x == 0) || (*y == 0))) - { c = i = *x = *y = 0; - while ((++i < BUFSIZ) && (c != EOF) && (c != '\n') && (*x==0) && (*y==0)) - { if ((header[i] = c = getc(packfile)) == '\n') - { if (sscanf(header, PACKIDENTIFIER, x, y) == 2) { -/* version = 1; */ - } - else if (sscanf(header, V2IDENTIFIER, x, y) == 2) { -/* version = 2; */ - } - } - } - } - } - fclose(packfile); -} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void imsiz_f(LONG *filename, LONG *x, LONG *y) -#else - void imsiz_f(filename, x, y) - LONG *filename, *x, *y; -#endif -/* Fortran frontend of imsiz_c. Because the way in which fortran - passes strings is not defined, it passes the filename in which the - packed image should be stored as an array of LONGs. */ - -{ char c_filename[1024]; -#if !defined (PROTOTYPE) - void imsiz_c(); - char *long_to_char(); -#endif - - imsiz_c(long_to_char(filename, c_filename), x, y);} - - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void mirror_wordimg(WORD *img, LONG *x, LONG *y) -#else - void mirror_wordimg(img, x, y) - WORD *img; - LONG *x, *y; -#endif -/* Replaces img with its mirror by interchanging rows. 'x' is the fast index, - 'y' is the slow index. */ - -{ WORD *buff; - int i, j; - - buff = (WORD *)malloc(sizeof(WORD) * *x); - for (i = 0, j = *y - 1; i < j; ++i, --j) - { memcpy(buff, img + (i * *x), sizeof(WORD) * *x); - memcpy(img + (i * *x), img + (j * *x), sizeof(WORD) * *x); - memcpy(img + (j * *x), buff, sizeof(WORD) * *x);} - free((void *) buff);} - - - -/******************************************************************************/ - -#if defined (PROTOTYPE) - void mirror_longimg(LONG *img, LONG *x, LONG *y) -#else - void mirror_longimg(img, x, y) - LONG *img, *x, *y; -#endif -/* Replaces img with its mirror by interchanging rows. 'x' is the fast index, - 'y' is the slow index. */ - -{ LONG *buff; - int i, j; - - buff = (LONG *)malloc(sizeof(LONG) * *x); - for (i = 0, j = *y - 1; i < j; ++i, --j) - { memcpy(buff, img + (i * *x), sizeof(LONG) * *x); - memcpy(img + (i * *x), img + (j * *x), sizeof(LONG) * *x); - memcpy(img + (j * *x), buff, sizeof(LONG) * *x);} - free((void *) buff);} - - - -/******************************************************************************/ - - - diff --git a/ccp4c/ccp4/pack_c.h b/ccp4c/ccp4/pack_c.h deleted file mode 100644 index e05664be..00000000 --- a/ccp4c/ccp4/pack_c.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Some general defines: */ - - -#define PACKIDENTIFIER "\nCCP4 packed image, X: %04d, Y: %04d\n" -/* This string defines the start of a packed image. An image file is scanned - until this string is encountered, the size of the unpacked image is - determined from the values of X and Y (which are written out as formatted - ascii numbers), and the packed image is expected to start immediately after - the null-character ending the string. */ - -#define V2IDENTIFIER "\nCCP4 packed image V2, X: %04d, Y: %04d\n" -/* This string defines the start of a packed image. An image file is scanned - until this string is encountered, the size of the unpacked image is - determined from the values of X and Y (which are written out as formatted - ascii numbers), and the packed image is expected to start immediately after - the null-character ending the string. */ - -#define PACKBUFSIZ BUFSIZ -/* Size of internal buffer in which the packed array is stored during transit - form an unpacked image to a packed image on disk. It is set to the size - used by the buffered io-routines given in , but it could be - anything. */ - -#define DIFFBUFSIZ 16384L -/* Size of the internal buffer in which the differences between neighbouring - pixels are stored prior to compression. The image is therefore compressed - in DIFFBUFSIZ chunks. Decompression does not need to know what DIFFBUFSIZ - was when the image was compressed. By increasing this value, the image - can be compressed into a packed image which is a few bytes smaller. Do - not decrease the value of DIFFBUFSIZ below 128L. */ - -#define BYTE char -/* BYTE is a one byte integer. */ - -#define WORD short int -/* WORD is a two-byte integer. */ - -#define LONG int -/* LONG is a four byte integer. */ -/* Dave Love 5/7/94: using `int' gets you 4 bytes on the 32-bit Unix - (and VAX) systems I know of and also on (64-bit) OSF/1 Alphas which - have 64-bit longs. (This definition previously used `long'.) */ - - - -/******************************************************************************/ - -/* Some usefull macros used in the code of this sourcefile: */ - - -#define max(x, y) (((x) > (y)) ? (x) : (y)) -/* Returns maximum of x and y. */ - -#define min(x, y) (((x) < (y)) ? (x) : (y)) -/* Returns minimum of x and y. */ - -#undef abs /* avoid complaint from DEC C, at least */ -#define abs(x) (((x) < 0) ? (-(x)) : (x)) -/* Returns the absolute value of x. */ - -/* Used to be 'static const LONG' but const declaration gives trouble on HPs */ -#ifndef SKIP_SETBITS -static LONG setbits[33] = - {0x00000000L, 0x00000001L, 0x00000003L, 0x00000007L, - 0x0000000FL, 0x0000001FL, 0x0000003FL, 0x0000007FL, - 0x000000FFL, 0x000001FFL, 0x000003FFL, 0x000007FFL, - 0x00000FFFL, 0x00001FFFL, 0x00003FFFL, 0x00007FFFL, - 0x0000FFFFL, 0x0001FFFFL, 0x0003FFFFL, 0x0007FFFFL, - 0x000FFFFFL, 0x001FFFFFL, 0x003FFFFFL, 0x007FFFFFL, - 0x00FFFFFFL, 0x01FFFFFFL, 0x03FFFFFFL, 0x07FFFFFFL, - 0x0FFFFFFFL, 0x1FFFFFFFL, 0x3FFFFFFFL, 0x7FFFFFFFL, - 0xFFFFFFFFL}; -/* This is not a macro really, but I've included it here anyway. Upon indexing, - it returns a LONG with the lower (index) number of bits set. It is equivalent - to the following macro: - #define setbits(n) (((n) == 32) : ((1L << (n)) - 1) : (-1L)) - Indexing the const array should usually be slightly faster. */ -#endif - -#define shift_left(x, n) (((x) & setbits[32 - (n)]) << (n)) -/* This macro is included because the C standard does not properly define a - left shift: on some machines the bits which are pushed out at the left are - popped back in at the right. By masking, the macro prevents this behaviour. - If you are sure that your machine does not pops bits back in, you can speed - up the code insignificantly by taking out the masking. */ - -#define shift_right(x, n) (((x) >> (n)) & setbits[32 - (n)]) -/* See comment on left shift. */ - - - -/******************************************************************************/ - - -#if __STDC__ && !defined(PROTOTYPE) -#define PROTOTYPE 1 -#endif - -/* Functions required for packing: */ - -#if defined (PROTOTYPE) -void v2pack_wordimage_c(WORD *img, int x, int y, char *filename); -/* Pack image 'img', containing 'x * y' WORD-sized pixels into 'filename'. - This function generates Version 2 images! */ - -void v2pack_longimage_c(LONG *img, int x, int y, char *filename); -/* Pack image 'img', containing 'x * y' LONG-sized pixels into 'filename'. - This function generates Version 2 images! */ - - -/* Functions required for unpacking: */ - - -void readpack_word_c(WORD *img, char *filename); -/* Unpacks packed image from 'filename' into the WORD-array 'img'. Scans the - file defined by 'filename' until the PACKIDENTIFIER is found, then unpacks - starting from there. */ - -void readpack_long_c(LONG *img, char *filename); -/* Unpacks packed image from 'filename' into the LONG-array 'img'. Scans the - file defined by 'filename' until the PACKIDENTIFIER is found, then unpacks - starting from there. */ - -void imsiz_c(char *filename, LONG *x, LONG *y); -/* Determines the size of the the packed image "filename" after unpacking. The - dimensions are returned in x and y. */ - -#endif /* (PROTOTYPE) */ - diff --git a/ccp4c/ccp4/vmslibrary.c b/ccp4c/ccp4/vmslibrary.c deleted file mode 100644 index 91e02728..00000000 --- a/ccp4c/ccp4/vmslibrary.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - vmslibrary.c - Copyright (C) 1999 Martyn Winn - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAXFLEN 500 /* the maximum length of a filename in CCP4 */ - -/* prototype definitions */ -void HGETLIMITS (int *IValueNotDet, float *ValueNotDet); -static size_t flength (char *s, int len); -void CMKDIR (struct dsc$descriptor_s *path, struct dsc$descriptor_s *cmode, - int *result); -void CCHMOD (struct dsc$descriptor_s *path, struct dsc$descriptor_s *cmode, - int *result); - -void HGETLIMITS (int *IValueNotDet, float *ValueNotDet) -{ - *IValueNotDet = INT_MAX; - *ValueNotDet = FLT_MAX; -} - -static size_t flength (char *s, int len) -{ - while (s[--len] == ' '); - return (++len); -} - -/* Wrap-around for mkdir function. Returns 0 if successful, 1 if directory already exists, */ -/* and -1 if other error. */ -void CMKDIR (struct dsc$descriptor_s *path, struct dsc$descriptor_s *cmode, - int *result) -{ size_t Length; - char name[MAXFLEN]; - mode_t mode; - - /* truncate path to MAXFLEN - 1 characters, MAXFLEN defined in library.h */ - Length = flength (path->dsc$a_pointer, path->dsc$w_length); - if (Length > (size_t) MAXFLEN) Length = (size_t) MAXFLEN - 1; - (void) strncpy (name, path->dsc$a_pointer, Length); - name[Length] = '\0'; - -/* Possible modes (see stat.h) - Currently pass 3-character string and interpret as octal. - Try also S_IRWXU, S_IRWXG, etc. */ - sscanf(cmode->dsc$a_pointer,"%o",&mode); - - *result = mkdir(name,mode); - - if (*result == -1) { -/* Distinguish directory-exists error from others, since usually not a problem. */ - if (errno == EEXIST) { - *result = 1; - } - } - -} - -void CCHMOD (struct dsc$descriptor_s *path, struct dsc$descriptor_s *cmode, - int *result) -{ size_t Length; - char name[MAXFLEN]; - mode_t mode; - - /* truncate path to MAXFLEN - 1 characters, MAXFLEN defined in library.h */ - Length = flength (path->dsc$a_pointer, path->dsc$w_length); - if (Length > (size_t) MAXFLEN) Length = (size_t) MAXFLEN - 1; - (void) strncpy (name, path->dsc$a_pointer, Length); - name[Length] = '\0'; - -/* Possible modes (see stat.h) - Currently pass 3-character string and interpret as octal. - Try also S_IRWXU, S_IRWXG, etc. */ - sscanf(cmode->dsc$a_pointer,"%o",&mode); - - *result = chmod(name,mode); -} diff --git a/ccp4c/ccp4/w32mvs.c b/ccp4c/ccp4/w32mvs.c deleted file mode 100644 index 9d8f2f96..00000000 --- a/ccp4c/ccp4/w32mvs.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - w32mvs.c: functions required by MVS - Copyright (C) 2003 Alun Ashton - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -#ifdef _MSC_VER - -#include "w32mvs.h" - - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg = 0; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -int optind = 0; - -/* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - -static char *nextchar; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Describe how to deal with options that follow non-option ARGV-elements. - - UNSPECIFIED means the caller did not specify anything; - the default is then REQUIRE_ORDER if the environment variable - _OPTIONS_FIRST is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options. - Stop option processing when the first non-option is seen. - This is what Unix does. - - PERMUTE is the default. We permute the contents of `argv' as we scan, - so that eventually all the options are at the end. This allows options - to be given in any order, even with programs that were not written to - expect this. - - RETURN_IN_ORDER is an option available to programs that were written - to expect options and other ARGV-elements in any order and that care about - the ordering of the two. We describe each non-option ARGV-element - as if it were the argument of an option with character code zero. - Using `-' as the first character of the list of option characters - requests this mode of operation. - - The special argument `--' forces an end of option-scanning regardless - of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return EOF with `optind' != ARGC. */ - -static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; - -static void exchange (char **argv) -{ - int nonopts_size - = (last_nonopt - first_nonopt) * sizeof (char *); - char **temp = (char **) alloca (nonopts_size); - - /* Interchange the two blocks of data in argv. */ - - bcopy (&argv[first_nonopt], temp, nonopts_size); - bcopy (&argv[last_nonopt], &argv[first_nonopt], - (optind - last_nonopt) * sizeof (char *)); - bcopy (temp, &argv[first_nonopt + optind - last_nonopt], - nonopts_size); - - /* Update records for the slots the non-options now occupy. */ - - first_nonopt += (optind - last_nonopt); - last_nonopt = optind; -} - -int getopt (int argc,char **argv,char *optstring) -{ - /* Initialize the internal data when the first call is made. - Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - if (optind == 0) - { - first_nonopt = last_nonopt = optind = 1; - - nextchar = 0; - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - ordering = RETURN_IN_ORDER; - else if (getenv ("_POSIX_OPTION_ORDER") != 0) - ordering = REQUIRE_ORDER; - else - ordering = PERMUTE; - } - - if (nextchar == 0 || *nextchar == 0) - { - if (ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange (argv); - else if (last_nonopt != optind) - first_nonopt = optind; - - /* Now skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (optind < argc - && (argv[optind][0] != '-' - || argv[optind][1] == 0)) - optind++; - last_nonopt = optind; - } - - /* Special ARGV-element `--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (optind != argc && !strcmp (argv[optind], "--")) - { - optind++; - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange (argv); - else if (first_nonopt == last_nonopt) - first_nonopt = optind; - last_nonopt = argc; - - optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (first_nonopt != last_nonopt) - optind = first_nonopt; - return EOF; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if (argv[optind][0] != '-' || argv[optind][1] == 0) - { - if (ordering == REQUIRE_ORDER) - return EOF; - optarg = argv[optind++]; - return 0; - } - - /* We have found another option-ARGV-element. - Start decoding its characters. */ - - nextchar = argv[optind] + 1; - } - - /* Look at and handle the next option-character. */ - - { - char c = *nextchar++; - char *temp = (char *) strchr (optstring, c); - - /* Increment `optind' when we start to process its last character. */ - if (*nextchar == 0) - optind++; - - if (temp == 0 || c == ':') - { - if (opterr != 0) - { - if (c < 040 || c >= 0177) - fprintf (stderr, "%s: unrecognized option, character code 0%o\n", - argv[0], c); - else - fprintf (stderr, "%s: unrecognized option `-%c'\n", - argv[0], c); - } - return '?'; - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*nextchar != 0) - { - optarg = nextchar; - optind++; - } - else - optarg = 0; - nextchar = 0; - } - else - { - /* This is an option that requires an argument. */ - if (*nextchar != 0) - { - optarg = nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - optind++; - } - else if (optind == argc) - { - if (opterr != 0) - fprintf (stderr, "%s: no argument for `-%c' option\n", - argv[0], c); - optarg = 0; - } - else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ - optarg = argv[optind++]; - nextchar = 0; - } - } - return c; - } -} -#endif diff --git a/ccp4c/ccp4/w32mvs.h b/ccp4c/ccp4/w32mvs.h deleted file mode 100644 index 549c26e0..00000000 --- a/ccp4c/ccp4/w32mvs.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - w32mvs.h: function prototypes for w32mvs.c functions - Copyright (C) 2003 Alun Ashton - - This library is free software: you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 3, modified in accordance with the provisions of the - license to address the requirements of UK law. - - You should have received a copy of the modified GNU Lesser General - Public License along with this library. If not, copies may be - downloaded from http://www.ccp4.ac.uk/ccp4license.php - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. -*/ - -#ifdef _MSC_VER -#define WIN32_LEAN_AND_MEAN -#include -#include -#include - -/* Getopt for GNU. - Copyright (C) 1987 Free Software Foundation, Inc. - - NO WARRANTY - - BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY -NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT -WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, -RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS" -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE -DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR -CORRECTION. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. -STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY -WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE -LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR -OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR -DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR -A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS -PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. - - GENERAL PUBLIC LICENSE TO COPY - - 1. You may copy and distribute verbatim copies of this source file -as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy a valid copyright notice "Copyright - (C) 1987 Free Software Foundation, Inc."; and include following the -copyright notice a verbatim copy of the above disclaimer of warranty -and of this License. You may charge a distribution fee for the -physical act of transferring a copy. - - 2. You may modify your copy or copies of this source file or -any portion of it, and copy and distribute such modifications under -the terms of Paragraph 1 above, provided that you also do the following: - - a) cause the modified files to carry prominent notices stating - that you changed the files and the date of any change; and - - b) cause the whole of any work that you distribute or publish, - that in whole or in part contains or is a derivative of this - program or any part thereof, to be licensed at no charge to all - third parties on terms identical to those contained in this - License Agreement (except that you may choose to grant more - extensive warranty protection to third parties, at your option). - - c) You may charge a distribution fee for the physical act of - transferring a copy, and you may at your option offer warranty - protection in exchange for a fee. - - 3. You may copy and distribute this program or any portion of it in -compiled, executable or object code form under the terms of Paragraphs -1 and 2 above provided that you do the following: - - a) cause each such copy to be accompanied by the - corresponding machine-readable source code, which must - be distributed under the terms of Paragraphs 1 and 2 above; or, - - b) cause each such copy to be accompanied by a - written offer, with no time limit, to give any third party - free (except for a nominal shipping charge) a machine readable - copy of the corresponding source code, to be distributed - under the terms of Paragraphs 1 and 2 above; or, - - c) in the case of a recipient of this program in compiled, executable - or object code form (without the corresponding source code) you - shall cause copies you distribute to be accompanied by a copy - of the written offer of source code which you received along - with the copy you received. - - 4. You may not copy, sublicense, distribute or transfer this program -except as expressly provided under this License Agreement. Any attempt -otherwise to copy, sublicense, distribute or transfer this program is void and -your rights to use the program under this License agreement shall be -automatically terminated. However, parties who have received computer -software programs from you with this License Agreement will not have -their licenses terminated so long as such parties remain in full compliance. - - 5. If you wish to incorporate parts of this program into other free -programs whose distribution conditions are different, write to the Free -Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet -worked out a simple rule that can be stated here, but we will often permit -this. We will be guided by the two goals of preserving the free status of -all derivatives of our free software and of promoting the sharing and reuse of -software. - - -In other words, you are welcome to use, share and improve this program. -You are forbidden to forbid anyone else to use, share and improve -what you give them. Help stamp out software-hoarding! */ - -/* This version of `getopt' appears to the caller like standard Unix `getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. - - As `getopt' works, it permutes the elements of `argv' so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Setting the environment variable _POSIX_OPTION_ORDER disables permutation. - Then the behavior is completely standard. - - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ - -#include -#include -#include -#define bcopy memmove - -/* Handle permutation of arguments. */ - -/* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first of them; - `last_nonopt' is the index after the last of them. */ - -static int first_nonopt; -static int last_nonopt; - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements [last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - `first_nonopt' and `last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -static void exchange (char **argv); - -/* Scan elements of ARGV (whose length is ARGC) for option characters - given in OPTSTRING. - - If an element of ARGV starts with '-', and is not exactly "-" or "--", - then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If `getopt' - is called repeatedly, it returns successively each of theoption characters - from each of the option elements. - - If `getopt' finds another option character, it returns that character, - updating `optind' and `nextchar' so that the next call to `getopt' can - resume the scan with the following option character or ARGV-element. - - If there are no more option characters, `getopt' returns `EOF'. - Then `optind' is the index in ARGV of the first ARGV-element - that is not an option. (The ARGV-elements have been permuted - so that those that are not options now come last.) - - OPTSTRING is a string containing the legitimate option characters. - A colon in OPTSTRING means that the previous character is an option - that wants an argument. The argument is taken from the rest of the - current ARGV-element, or from the following ARGV-element, - and returned in `optarg'. - - If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set `opterr' to - zero, the error message is suppressed but we still return '?'. - - If a char in OPTSTRING is followed by a colon, that means it wants an arg, - so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in `optarg. Two colons mean an option that - wants an optional arg; if there is text in the current ARGV-element, - it is returned in `optarg'. - - If OPTSTRING starts with `-', it requests a different method of handling the - non-option ARGV-elements. See the comments about RETURN_IN_ORDER, above. */ - -int getopt (int argc,char **argv,char *optstring); - -#endif diff --git a/ccp4c/data/README b/ccp4c/data/README deleted file mode 100644 index d1b01c92..00000000 --- a/ccp4c/data/README +++ /dev/null @@ -1,39 +0,0 @@ - -* symop.lib: symmetry operators -- see symlib code. Contains symmetry - operators for the 230 spacegroups listed in (and following the conventions - of) the International Tables Vol A and non-standard settings used by various - CCP4 programs. Each space group has a header line comprising - space-separated values of: - * SG number - * number of lines of symmetry equivalents (`positions' in Int Tab) (N) - * number of lines of primitive equivalents (P) - * SG `short' name; subscripts are typed as-is and a prefix `-' represents - an overbar e.g. P21/m, P-1 - * point group name; the Int. Tab. name is prefixed by `PG'; contrary to the - SG name, an overbar is represented by a trailing `bar' e.g. PG4bar3m - * crystal system - * possible comments about non-standard settings - Following are N lines of symmetry equivalents, of which the first P are the - primitive ones. - - * Layout: - * The symmetry operator lines are limited to 80 characters - * The elements of operator triplets are separated by commas, and triplets - are separated by `*' or newline; the translations may be before or - after the coordinate e.g. `1/2+X' or `X+1/2' - * The header lines should start in the first column and the other lines be - indented (for ease of locating the headers) - -* font84.ascii: Used directly by plot84lib.f. Previously: data for creating - the binary plot84 font file in $CCP4/lib with fontpack. - -* atomsf.lib, atomsf_neutron.lib: formfactors for every known atom (for SFALL, - MLPHARE, VECREF). The format of the atomsf.lib file is as follows. - 1) atom type - 2) atomic number, number of electrons, `c' constant for the scattering - factor - 3) a(1) ... a(4) - 4) b(1) ... b(4) - 5) f'(Cu) f"(Cu) f'(Mo) f"(Mo) - See the sfall documentation for the equations containing the as, bs and c. - diff --git a/ccp4c/data/atomsf.lib b/ccp4c/data/atomsf.lib deleted file mode 100644 index b5a8f139..00000000 --- a/ccp4c/data/atomsf.lib +++ /dev/null @@ -1,1121 +0,0 @@ -AD - This file contains the following information: -AD - BEWARE: This file has a FIXED FORMAT! -AD This contains for each element: -AD ID -AD IWT IELEC C -AD A(4) -AD B(4) -AD CU(2) MO(2) -AD -AD -AD Formfactor: a1*exp(-b1*s*s) + a2*exp(-b2*s*s) + a3*exp(-b3*s*s) -AD + a4*exp(-b4*s*s) + c -AD This is applicable at CuKa wavelength. -AD -AD This is the 5 Gaussian approximation -AD Ref: Int.Tab. vol 4 pp. 99-101 (Table 2.2B) for values a1-a4, b1-b4,c -AD -AD ID atom identifier -AD IWT atomic weight -AD IELEC number of electrons -AD C coefficient for structure factor calculation -AD A(4) coefficient for structure factor calculation -AD B(4) coefficient for structure factor calculation -AD CU(2) delta F' and delta F'' for Cu -AD MO(2) delta F' and delta F'' for Mo -AD Example: -AD U+6 -AD 92 86 13.166500 -AD 34.850899 22.758400 14.009900 1.214570 -AD 0.507079 2.890300 13.176700 25.201700 -AD -5.359000 13.409000 -10.673000 9.653999 -H - 1 1 0.003038 - 0.493002 0.322912 0.140191 0.040810 - 10.510900 26.125700 3.142360 57.799698 - 0.000000 0.000000 0.000000 0.000000 -D - 1 1 0.003038 - 0.493002 0.322912 0.140191 0.040810 - 10.510900 26.125700 3.142360 57.799698 - 0.000000 0.000000 0.000000 0.000000 -H-1 - 1 2 0.002389 - 0.897661 0.565616 0.415815 0.116973 - 53.136799 15.187000 186.575989 3.567090 - 0.000000 0.000000 0.000000 0.000000 -He - 2 2 0.006400 - 0.873400 0.630900 0.311200 0.178000 - 9.103700 3.356800 22.927601 0.982100 - 0.000000 0.000000 0.000000 0.000000 -Li - 3 3 0.037700 - 1.128200 0.750800 0.617500 0.465300 - 3.954600 1.052400 85.390503 168.261002 - 0.001000 0.000000 0.000000 0.000000 -Li+1 - 3 2 0.016700 - 0.696800 0.788800 0.341400 0.156300 - 4.623700 1.955700 0.631600 10.095300 - 0.001000 0.000000 0.000000 0.000000 -Be - 4 4 0.038500 - 1.591900 1.127800 0.539100 0.702900 - 43.642700 1.862300 103.483002 0.542000 - 0.003000 0.001000 0.000000 0.000000 -Be+2 - 4 2 -6.109200 - 6.260300 0.884900 0.799300 0.164700 - 0.002700 0.831300 2.275800 5.114600 - 0.003000 0.001000 0.000000 0.000000 -B - 5 5 -0.193200 - 2.054500 1.332600 1.097900 0.706800 - 23.218500 1.021000 60.349800 0.140300 - 0.008000 0.004000 0.000000 0.001000 -C - 6 6 0.215600 - 2.310000 1.020000 1.588600 0.865000 - 20.843899 10.207500 0.568700 51.651199 - 0.017000 0.009000 0.002000 0.002000 -Cv - 6 6 0.286977 - 2.260690 1.561650 1.050750 0.839259 - 22.690701 0.656665 9.756180 55.594898 - 0.017000 0.009000 0.002000 0.002000 -N - 7 7 -11.528999 - 12.212600 3.132200 2.012500 1.166300 - 0.005700 9.893300 28.997499 0.582600 - 0.029000 0.018000 0.004000 0.003000 -O - 8 8 0.250800 - 3.048500 2.286800 1.546300 0.867000 - 13.277100 5.701100 0.323900 32.908897 - 0.047000 0.032000 0.008000 0.006000 -O-1 - 8 9 21.941200 - 4.191600 1.639690 1.526730 -20.306999 - 12.857300 4.172360 47.017899 -0.014040 - 0.047000 0.032000 0.008000 0.006000 -F - 9 9 0.277600 - 3.539200 2.641200 1.517000 1.024300 - 10.282499 4.294400 0.261500 26.147600 - 0.069000 0.053000 0.014000 0.010000 -F-1 - 9 10 0.653396 - 3.632200 3.510570 1.260640 0.940706 - 5.277560 14.735300 0.442258 47.343700 - 0.069000 0.053000 0.014000 0.010000 -Ne - 10 10 0.351500 - 3.955300 3.112500 1.454600 1.125100 - 8.404200 3.426200 0.230600 21.718399 - 0.097000 0.083000 0.021000 0.016000 -Na - 11 11 0.676000 - 4.762600 3.173600 1.267400 1.112800 - 3.285000 8.842199 0.313600 129.423996 - 0.129000 0.124000 0.030000 0.025000 -Na+1 - 11 10 0.404000 - 3.256500 3.936200 1.399800 1.003200 - 2.667100 6.115300 0.200100 14.039000 - 0.129000 0.124000 0.030000 0.025000 -Mg - 12 12 0.858400 - 5.420400 2.173500 1.226900 2.307300 - 2.827500 79.261101 0.380800 7.193700 - 0.165000 0.177000 0.042000 0.036000 -Mg+2 - 12 10 0.485300 - 3.498800 3.837800 1.328400 0.849700 - 2.167600 4.754200 0.185000 10.141100 - 0.165000 0.177000 0.042000 0.036000 -Al - 13 13 1.115100 - 6.420200 1.900200 1.593600 1.964600 - 3.038700 0.742600 31.547199 85.088600 - 0.204000 0.246000 0.056000 0.052000 -Al+3 - 13 10 0.706786 - 4.174480 3.387600 1.202960 0.528137 - 1.938160 4.145530 0.228753 8.285240 - 0.204000 0.246000 0.056000 0.052000 -Si - 14 14 1.140700 - 6.291500 3.035300 1.989100 1.541000 - 2.438600 32.333698 0.678500 81.693695 - 0.244000 0.330000 0.072000 0.071000 -Siv - 14 14 1.247070 - 5.662690 3.071640 2.624460 1.393200 - 2.665200 38.663399 0.916946 93.545799 - 0.244000 0.330000 0.072000 0.071000 -Si+4 - 14 10 0.746297 - 4.439180 3.203450 1.194530 0.416530 - 1.641670 3.437570 0.214900 6.653650 - 0.244000 0.330000 0.072000 0.071000 -P - 15 15 1.114900 - 6.434500 4.179100 1.780000 1.490800 - 1.906700 27.157000 0.526000 68.164497 - 0.283000 0.434000 0.090000 0.095000 -S - 16 16 0.866900 - 6.905300 5.203400 1.437900 1.586300 - 1.467900 22.215099 0.253600 56.172001 - 0.319000 0.557000 0.110000 0.124000 -Cl - 17 17 -9.557400 - 11.460400 7.196400 6.255600 1.645500 - 0.010400 1.166200 18.519400 47.778400 - 0.348000 0.702000 0.132000 0.159000 -Cl-1 - 17 18 -16.378000 - 18.291500 7.208400 6.533700 2.338600 - 0.006600 1.171700 19.542400 60.448601 - 0.348000 0.702000 0.132000 0.159000 -Ar - 18 18 1.444500 - 7.484500 6.772300 0.653900 1.644200 - 0.907200 14.840700 43.898300 33.392899 - 0.366000 0.872000 0.155000 0.201000 -K - 19 19 1.422800 - 8.218599 7.439800 1.051900 0.865900 - 12.794900 0.774800 213.186996 41.684097 - 0.365000 1.066000 0.179000 0.250000 -K+1 - 19 18 -4.997800 - 7.957800 7.491700 6.359000 1.191500 - 12.633100 0.767400 -0.002000 31.912800 - 0.365000 1.066000 0.179000 0.250000 -Ca - 20 20 1.375100 - 8.626600 7.387300 1.589900 1.021100 - 10.442100 0.659900 85.748398 178.436996 - 0.341000 1.286000 0.203000 0.306000 -Ca+2 - 20 18 -14.875000 - 15.634800 7.951800 8.437200 0.853700 - -0.007400 0.608900 10.311600 25.990499 - 0.341000 1.286000 0.203000 0.306000 -Sc - 21 21 1.332900 - 9.189000 7.367900 1.640900 1.468000 - 9.021299 0.572900 136.108002 51.353100 - 0.285000 1.533000 0.226000 0.372000 -Sc+3 - 21 18 -6.666700 - 13.400800 8.027300 1.659430 1.579360 - 0.298540 7.962900 -0.286040 16.066200 - 0.285000 1.533000 0.226000 0.372000 -Ti - 22 22 1.280700 - 9.759500 7.355800 1.699100 1.902100 - 7.850800 0.500000 35.633801 116.104996 - 0.189000 1.807000 0.248000 0.446000 -Ti+2 - 22 20 0.897155 - 9.114230 7.621740 2.279300 0.087899 - 7.524300 0.457585 19.536100 61.655800 - 0.189000 1.807000 0.248000 0.446000 -Ti+3 - 22 19 -14.652000 - 17.734400 8.738160 5.256910 1.921340 - 0.220610 7.047160 -0.157620 15.976800 - 0.189000 1.807000 0.248000 0.446000 -Ti+4 - 22 18 -13.280000 - 19.511400 8.234730 2.013410 1.520800 - 0.178847 6.670180 -0.292630 12.946400 - 0.189000 1.807000 0.248000 0.446000 -V - 23 23 1.219900 - 10.297100 7.351100 2.070300 2.057100 - 6.865700 0.438500 26.893799 102.477997 - 0.035000 2.110000 0.267000 0.530000 -V+2 - 23 21 1.229800 - 10.106000 7.354100 2.288400 0.022300 - 6.881800 0.440900 20.300400 115.122002 - 0.035000 2.110000 0.267000 0.530000 -V+3 - 23 20 0.656565 - 9.431410 7.741900 2.153430 0.016865 - 6.395350 0.383349 15.190800 63.969002 - 0.035000 2.110000 0.267000 0.530000 -V+5 - 23 18 1.714300 - 15.688700 8.142080 2.030810 -9.576000 - 0.679003 5.401350 9.972780 0.940464 - 0.035000 2.110000 0.267000 0.530000 -Cr - 24 24 1.183200 - 10.640600 7.353700 3.324000 1.492200 - 6.103800 0.392000 20.262600 98.739899 - -0.198000 2.443000 0.284000 0.624000 -Cr+2 - 24 22 0.616898 - 9.540340 7.750900 3.582740 0.509107 - 5.660780 0.344261 13.307500 32.422401 - -0.198000 2.443000 0.284000 0.624000 -Cr+3 - 24 21 0.518275 - 9.680900 7.811360 2.876030 0.113575 - 5.594630 0.334393 12.828800 32.876099 - -0.198000 2.443000 0.284000 0.624000 -Mn - 25 25 1.089600 - 11.281900 7.357300 3.019300 2.244100 - 5.340900 0.343200 17.867399 83.754303 - -0.568000 2.808000 0.295000 0.729000 -Mn+2 - 25 23 1.087400 - 10.806100 7.362000 3.526800 0.218400 - 5.279600 0.343500 14.343000 41.323502 - -0.568000 2.808000 0.295000 0.729000 -Mn+3 - 25 22 0.393974 - 9.845210 7.871940 3.565310 0.323613 - 4.917970 0.294393 10.817100 24.128099 - -0.568000 2.808000 0.295000 0.729000 -Mn+4 - 25 21 0.251877 - 9.962530 7.970570 2.760670 0.054447 - 4.848500 0.283303 10.485200 27.573000 - -0.568000 2.808000 0.295000 0.729000 -Fe - 26 26 1.036900 - 11.769500 7.357300 3.522200 2.304500 - 4.761100 0.307200 15.353500 76.880501 - -1.179000 3.204000 0.301000 0.845000 -Fe+2 - 26 24 1.009700 - 11.042400 7.374000 4.134600 0.439900 - 4.653800 0.305300 12.054600 31.280899 - -1.179000 3.204000 0.301000 0.845000 -Fe+3 - 26 23 0.970700 - 11.176400 7.386300 3.394800 0.072400 - 4.614700 0.300500 11.672900 38.556599 - -1.179000 3.204000 0.301000 0.845000 -Co - 27 27 1.011800 - 12.284100 7.340900 4.003400 2.348800 - 4.279100 0.278400 13.535900 71.169197 - -2.464000 3.608000 0.299000 0.973000 -Co+2 - 27 25 0.932400 - 11.229600 7.388300 4.739300 0.710800 - 4.123100 0.272600 10.244300 25.646599 - -2.464000 3.608000 0.299000 0.973000 -Co+3 - 27 24 0.286667 - 10.337999 7.881730 4.767950 0.725591 - 3.909690 0.238668 8.355830 18.349100 - -2.464000 3.608000 0.299000 0.973000 -Ni - 28 28 1.034100 - 12.837600 7.292000 4.443800 2.380000 - 3.878500 0.256500 12.176300 66.342102 - -2.956000 0.509000 0.285000 1.113000 -Ni+2 - 28 26 0.861400 - 11.416600 7.400500 5.344200 0.977300 - 3.676600 0.244900 8.873000 22.162600 - -2.956000 0.509000 0.285000 1.113000 -Ni+3 - 28 25 0.386044 - 10.780600 7.758680 5.227460 0.847114 - 3.547700 0.223140 7.644680 16.967300 - -2.956000 0.509000 0.285000 1.113000 -Cu - 29 29 1.191000 - 13.337999 7.167600 5.615800 1.673500 - 3.582800 0.247000 11.396600 64.812599 - -2.019000 0.589000 0.263000 1.266000 -Cu+1 - 29 28 0.890000 - 11.947500 7.357300 6.245500 1.557800 - 3.366900 0.227400 8.662500 25.848700 - -2.019000 0.589000 0.263000 1.266000 -Cu+2 - 29 27 1.144310 - 11.816800 7.111810 5.781350 1.145230 - 3.374840 0.244078 7.987600 19.896999 - -2.019000 0.589000 0.263000 1.266000 -Zn - 30 30 1.304100 - 14.074300 7.031800 5.165200 2.410000 - 3.265500 0.233300 10.316299 58.709702 - -1.612000 0.678000 0.222000 1.431000 -Zn+2 - 30 28 0.780700 - 11.971900 7.386200 6.466800 1.394000 - 2.994600 0.203100 7.082600 18.099499 - -1.612000 0.678000 0.222000 1.431000 -Ga - 31 31 1.718900 - 15.235400 6.700600 4.359100 2.962300 - 3.066900 0.241200 10.780500 61.413498 - -1.354000 0.777000 0.163000 1.609000 -Ga+3 - 31 28 1.535450 - 12.691999 6.698830 6.066920 1.006600 - 2.812620 0.227890 6.364410 14.412200 - -1.354000 0.777000 0.163000 1.609000 -Ge - 32 32 2.131300 - 16.081600 6.374700 3.706800 3.683000 - 2.850900 0.251600 11.446800 54.762501 - -1.163000 0.886000 0.081000 1.801000 -Ge+4 - 32 28 1.455720 - 12.917200 6.700030 6.067910 0.859041 - 2.537180 0.205855 5.479130 11.603000 - -1.163000 0.886000 0.081000 1.801000 -As - 33 33 2.531000 - 16.672300 6.070100 3.431300 4.277900 - 2.634500 0.264700 12.947900 47.797199 - -1.011000 1.006000 -0.030000 2.007000 -Se - 34 34 2.840900 - 17.000599 5.819600 3.973100 4.354300 - 2.409800 0.272600 15.237200 43.816299 - -0.879000 1.139000 -0.178000 2.223000 -Br - 35 35 2.955700 - 17.178900 5.235800 5.637700 3.985100 - 2.172300 16.579599 0.260900 41.432800 - -0.767000 1.283000 -0.374000 2.456000 -Br-1 - 35 36 3.177600 - 17.171799 6.333800 5.575400 3.727200 - 2.205900 19.334499 0.287100 58.153500 - -0.767000 1.283000 -0.374000 2.456000 -Kr - 36 36 2.825000 - 17.355499 6.728600 5.549300 3.537500 - 1.938400 16.562300 0.226100 39.397202 - -0.665000 1.439000 -0.652000 2.713000 -Rb - 37 37 3.487300 - 17.178400 9.643499 5.139900 1.529200 - 1.788800 17.315100 0.274800 164.933990 - -0.574000 1.608000 -1.044000 2.973000 -Rb+1 - 37 36 2.078200 - 17.581600 7.659800 5.898100 2.781700 - 1.713900 14.795700 0.160300 31.208700 - -0.574000 1.608000 -1.044000 2.973000 -Sr - 38 38 2.506400 - 17.566299 9.818399 5.422000 2.669400 - 1.556400 14.098800 0.166400 132.376007 - -0.465000 1.820000 -1.657000 3.264000 -Sr+2 - 38 36 41.402500 - 18.087400 8.137300 2.565400 -34.193001 - 1.490700 12.696300 24.565100 -0.013800 - -0.465000 1.820000 -1.657000 3.264000 -Y - 39 39 1.912130 - 17.775999 10.294600 5.726290 3.265880 - 1.402900 12.800600 0.125599 104.353996 - -0.386000 2.025000 -2.951000 3.542000 -Y+3 - 39 36 40.260201 - 17.926800 9.153100 1.767950 -33.108002 - 1.354170 11.214500 22.659901 -0.013190 - -0.386000 2.025000 -2.951000 3.542000 -Zr - 40 40 2.069290 - 17.876499 10.948000 5.417320 3.657210 - 1.276180 11.916000 0.117622 87.662697 - -0.314000 2.245000 -2.965000 0.560000 -Zr+4 - 40 36 9.414539 - 18.166800 10.056200 1.011180 -2.647900 - 1.214800 10.148300 21.605400 -0.102760 - -0.314000 2.245000 -2.965000 0.560000 -Nb - 41 41 3.755910 - 17.614201 12.014400 4.041830 3.533460 - 1.188650 11.766000 0.204785 69.795700 - -0.248000 2.482000 -2.197000 0.621000 -Nb+3 - 41 38 -12.912000 - 19.881199 18.065300 11.017700 1.947150 - 0.019175 1.133050 10.162100 28.338900 - -0.248000 2.482000 -2.197000 0.621000 -Nb+5 - 41 36 -6.393400 - 17.916300 13.341700 10.799000 0.337905 - 1.124460 0.028781 9.282060 25.722799 - -0.248000 2.482000 -2.197000 0.621000 -Mo - 42 42 4.387500 - 3.702500 17.235600 12.887600 3.742900 - 0.277200 1.095800 11.004000 61.658401 - -0.191000 2.735000 -1.825000 0.688000 -Mo+3 - 42 39 -14.421000 - 21.166401 18.201700 11.742300 2.309510 - 0.014734 1.030310 9.536590 26.630699 - -0.191000 2.735000 -1.825000 0.688000 -Mo+5 - 42 37 -14.316000 - 21.014900 18.099199 11.463200 0.740625 - 0.014345 1.022380 8.788090 23.345200 - -0.191000 2.735000 -1.825000 0.688000 -Mo+6 - 42 36 0.344941 - 17.887100 11.175000 6.578910 0.000000 - 1.036490 8.480610 0.058881 0.000000 - -0.191000 2.735000 -1.825000 0.688000 -Tc - 43 43 5.404280 - 19.130100 11.094800 4.649010 2.712630 - 0.864132 8.144870 21.570700 86.847198 - -0.145000 3.005000 -0.590000 0.759000 -Ru - 44 44 5.378740 - 19.267399 12.918200 4.863370 1.567560 - 0.808520 8.434669 24.799700 94.292801 - -0.105000 3.296000 -1.420000 0.836000 -Ru+3 - 44 41 -3.189200 - 18.563801 13.288500 9.326019 3.009640 - 0.847329 8.371640 0.017662 22.886999 - -0.105000 3.296000 -1.420000 0.836000 -Ru+4 - 44 40 1.423570 - 18.500299 13.178699 4.713040 2.185350 - 0.844582 8.125340 0.364950 20.850399 - -0.105000 3.296000 -1.420000 0.836000 -Rh - 45 45 5.328000 - 19.295700 14.350100 4.734250 1.289180 - 0.751536 8.217580 25.874901 98.606201 - -0.077000 3.605000 -1.287000 0.919000 -Rh+3 - 45 42 11.867800 - 18.878500 14.125900 3.325150 -6.198900 - 0.764252 7.844380 21.248699 -0.010360 - -0.077000 3.605000 -1.287000 0.919000 -Rh+4 - 45 41 11.283500 - 18.854500 13.980600 2.534640 -5.652600 - 0.760825 7.624360 19.331699 -0.010200 - -0.077000 3.605000 -1.287000 0.919000 -Pd - 46 46 5.265930 - 19.331900 15.501699 5.295370 0.605844 - 0.698655 7.989290 25.205200 76.898598 - -0.059000 3.934000 -1.177000 1.007000 -Pd+2 - 46 44 5.291600 - 19.170099 15.209600 4.322340 0.000000 - 0.696219 7.555730 22.505699 0.000000 - -0.059000 3.934000 -1.177000 1.007000 -Pd+4 - 46 42 13.017400 - 19.249300 14.790000 2.892890 -7.949200 - 0.683839 7.148330 17.914400 0.005127 - -0.059000 3.934000 -1.177000 1.007000 -Ag - 47 47 5.179000 - 19.280800 16.688499 4.804500 1.046300 - 0.644600 7.472600 24.660500 99.815598 - -0.060000 4.282000 -1.085000 1.101000 -Ag+1 - 47 46 5.215720 - 19.181200 15.971900 5.274750 0.357534 - 0.646179 7.191230 21.732599 66.114700 - -0.060000 4.282000 -1.085000 1.101000 -Ag+2 - 47 45 5.214040 - 19.164299 16.245600 4.370900 0.000000 - 0.645643 7.185440 21.407200 0.000000 - -0.060000 4.282000 -1.085000 1.101000 -Cd - 48 48 5.069400 - 19.221399 17.644400 4.461000 1.602900 - 0.594600 6.908900 24.700800 87.482498 - -0.079000 4.653000 -1.005000 1.202000 -Cd+2 - 48 46 5.119370 - 19.151400 17.253500 4.471280 0.000000 - 0.597922 6.806390 20.252100 0.000000 - -0.079000 4.653000 -1.005000 1.202000 -In - 49 49 4.939100 - 19.162399 18.559601 4.294800 2.039600 - 0.547600 6.377600 25.849899 92.802902 - -0.126000 5.045000 -0.936000 1.310000 -In+3 - 49 46 4.996350 - 19.104500 18.110800 3.788970 0.000000 - 0.551522 6.324700 17.359501 0.000000 - -0.126000 5.045000 -0.936000 1.310000 -Sn - 50 50 4.782100 - 19.188900 19.100500 4.458500 2.466300 - 5.830300 0.503100 26.890900 83.957100 - -0.194000 5.459000 -0.873000 1.424000 -Sn+2 - 50 48 4.786100 - 19.109400 19.054800 4.564800 0.487000 - 0.503600 5.837800 23.375200 62.206100 - -0.194000 5.459000 -0.873000 1.424000 -Sn+4 - 50 46 3.918200 - 18.933300 19.713100 3.418200 0.019300 - 5.764000 0.465500 14.004900 -0.758300 - -0.194000 5.459000 -0.873000 1.424000 -Sb - 51 51 4.590900 - 19.641800 19.045500 5.037100 2.682700 - 5.303400 0.460700 27.907400 75.282501 - -0.287000 5.894000 -0.816000 1.546000 -Sb+3 - 51 48 4.696260 - 18.975500 18.932999 5.107890 0.288753 - 0.467196 5.221260 19.590200 55.511299 - -0.287000 5.894000 -0.816000 1.546000 -Sb+5 - 51 46 4.692630 - 19.868500 19.030199 2.412530 0.000000 - 5.448530 0.467973 14.125900 0.000000 - -0.287000 5.894000 -0.816000 1.546000 -Te - 52 52 4.352000 - 19.964399 19.013800 6.144870 2.523900 - 4.817420 0.420885 28.528400 70.840302 - -0.418000 6.352000 -0.772000 1.675000 -I - 53 53 4.071200 - 20.147200 18.994900 7.513800 2.273500 - 4.347000 0.381400 27.765999 66.877602 - -0.579000 6.835000 -0.726000 1.812000 -I-1 - 53 54 4.071400 - 20.233200 18.997000 7.806900 2.886800 - 4.357900 0.381500 29.525900 84.930397 - -0.579000 6.835000 -0.726000 1.812000 -Xe - 54 54 3.711800 - 20.293301 19.029800 8.976700 1.990000 - 3.928200 0.344000 26.465900 64.265800 - -0.783000 7.348000 -0.684000 1.958000 -Cs - 55 55 3.335200 - 20.389200 19.106199 10.662000 1.495300 - 3.569000 0.310700 24.387899 213.903992 - -1.022000 7.904000 -0.644000 2.119000 -Cs+1 - 55 54 3.279100 - 20.352400 19.127800 10.282100 0.961500 - 3.552000 0.308600 23.712799 59.456497 - -1.022000 7.904000 -0.644000 2.119000 -Ba - 56 56 2.773100 - 20.336100 19.297001 10.888000 2.695900 - 3.216000 0.275600 20.207300 167.201996 - -1.334000 8.460000 -0.613000 2.282000 -Ba+2 - 56 54 3.029020 - 20.180700 19.113600 10.905399 0.776340 - 3.213670 0.283310 20.055799 51.745998 - -1.334000 8.460000 -0.613000 2.282000 -La - 57 57 2.146780 - 20.577999 19.598999 11.372700 3.287190 - 2.948170 0.244475 18.772600 133.123993 - -1.716000 9.035999 -0.588000 2.452000 -La+3 - 57 54 2.408600 - 20.248899 19.376301 11.632299 0.336048 - 2.920700 0.250698 17.821100 54.945297 - -1.716000 9.035999 -0.588000 2.452000 -Ce - 58 58 1.862640 - 21.167099 19.769501 11.851299 3.330490 - 2.812190 0.226836 17.608299 127.112999 - -2.170000 9.648000 -0.564000 2.632000 -Ce+3 - 58 55 2.090130 - 20.803600 19.559000 11.936900 0.612376 - 2.776910 0.231540 16.540800 43.169201 - -2.170000 9.648000 -0.564000 2.632000 -Ce+4 - 58 54 1.591800 - 20.323500 19.818600 12.123300 0.144583 - 2.659410 0.218850 15.799200 62.235500 - -2.170000 9.648000 -0.564000 2.632000 -Pr - 59 59 2.058300 - 22.043999 19.669701 12.385600 2.824280 - 2.773930 0.222087 16.766899 143.643997 - -2.939000 10.535000 -0.530000 2.845000 -Pr+3 - 59 56 1.771320 - 21.372700 19.749100 12.132900 0.975180 - 2.645200 0.214299 15.323000 36.406502 - -2.939000 10.535000 -0.530000 2.845000 -Pr+4 - 59 55 1.242850 - 20.941299 20.053900 12.466800 0.296689 - 2.544670 0.202481 14.813700 45.464298 - -2.939000 10.535000 -0.530000 2.845000 -Nd - 60 60 1.984860 - 22.684500 19.684700 12.774000 2.851370 - 2.662480 0.210628 15.885000 137.903000 - -3.431000 10.933000 -0.535000 3.018000 -Nd+3 - 60 57 1.475880 - 21.961000 19.933899 12.120000 1.510310 - 2.527220 0.199237 14.178300 30.871700 - -3.431000 10.933000 -0.535000 3.018000 -Pm - 61 61 2.028760 - 23.340500 19.609501 13.123500 2.875160 - 2.562700 0.202088 15.100900 132.720993 - -4.357000 11.614000 -0.530000 3.225000 -Pm+3 - 61 58 1.194990 - 22.552700 20.110800 12.067100 2.074920 - 2.417400 0.185769 13.127500 27.449100 - -4.357000 11.614000 -0.530000 3.225000 -Sm - 62 62 2.209630 - 24.004200 19.425800 13.439600 2.896040 - 2.472740 0.196451 14.399600 128.007004 - -5.696000 12.320000 -0.533000 3.442000 -Sm+3 - 62 59 0.954586 - 23.150400 20.259899 11.920200 2.714880 - 2.316410 0.174081 12.157100 24.824200 - -5.696000 12.320000 -0.533000 3.442000 -Eu - 63 63 2.574500 - 24.627399 19.088600 13.760300 2.922700 - 2.387900 0.194200 13.754600 123.173996 - -7.718000 11.276000 -0.542000 3.669000 -Eu+2 - 63 61 1.363890 - 24.006300 19.950399 11.803400 3.872430 - 2.277830 0.173530 11.609600 26.515600 - -7.718000 11.276000 -0.542000 3.669000 -Eu+3 - 63 60 0.759344 - 23.749699 20.374500 11.850900 3.265030 - 2.222580 0.163940 11.311000 22.996599 - -7.718000 11.276000 -0.542000 3.669000 -Gd - 64 64 2.419600 - 25.070900 19.079800 13.851800 3.545450 - 2.253410 0.181951 12.933100 101.397995 - -9.242000 11.946000 -0.564000 3.904000 -Gd+3 - 64 61 0.645089 - 24.346600 20.420799 11.870800 3.714900 - 2.135530 0.155525 10.578199 21.702900 - -9.242000 11.946000 -0.564000 3.904000 -Tb - 65 65 3.582240 - 25.897600 18.218500 14.316700 2.953540 - 2.242560 0.196143 12.664800 115.362000 - -9.498000 9.242000 -0.591000 4.151000 -Tb+3 - 65 62 0.691967 - 24.955900 20.327099 12.247100 3.773000 - 2.056010 0.149525 10.049900 21.277300 - -9.498000 9.242000 -0.591000 4.151000 -Dy - 66 66 4.297280 - 26.507000 17.638300 14.559600 2.965770 - 2.180200 0.202172 12.189899 111.874001 - -10.423000 9.748000 -0.619000 4.410000 -Dy+3 - 66 63 0.689690 - 25.539499 20.286100 11.981200 4.500730 - 1.980400 0.143384 9.349720 19.580999 - -10.423000 9.748000 -0.619000 4.410000 -Ho - 67 67 4.567960 - 26.904900 17.293999 14.558300 3.638370 - 2.070510 0.197940 11.440700 92.656601 - -12.255000 3.704000 -0.666000 4.678000 -Ho+3 - 67 64 0.852795 - 26.129601 20.099400 11.978800 4.936760 - 1.910720 0.139358 8.800180 18.590799 - -12.255000 3.704000 -0.666000 4.678000 -Er - 68 68 5.920460 - 27.656300 16.428499 14.977900 2.982330 - 2.073560 0.223545 11.360400 105.703003 - -9.733000 3.937000 -0.723000 4.958000 -Er+3 - 68 65 1.176130 - 26.722000 19.774799 12.150600 5.173790 - 1.846590 0.137290 8.362249 17.897400 - -9.733000 3.937000 -0.723000 4.958000 -Tm - 69 69 6.756210 - 28.181900 15.885099 15.154200 2.987060 - 2.028590 0.238849 10.997499 102.960999 - -8.488000 4.181000 -0.795000 5.248000 -Tm+3 - 69 66 1.639290 - 27.308300 19.332001 12.333900 5.383480 - 1.787110 0.136974 7.967780 17.292200 - -8.488000 4.181000 -0.795000 5.248000 -Yb - 70 70 7.566720 - 28.664101 15.434500 15.308700 2.989630 - 1.988900 0.257119 10.664700 100.417000 - -7.701000 4.432000 -0.884000 5.548000 -Yb+2 - 70 68 3.709830 - 28.120899 17.681700 13.333500 5.146570 - 1.785030 0.159970 8.183040 20.389999 - -7.701000 4.432000 -0.884000 5.548000 -Yb+3 - 70 67 2.260010 - 27.891700 18.761400 12.607200 5.476470 - 1.732720 0.138790 7.644120 16.815300 - -7.701000 4.432000 -0.884000 5.548000 -Lu - 71 71 7.976280 - 28.947599 15.220800 15.100000 3.716010 - 1.901820 9.985189 0.261033 84.329803 - -7.133000 4.693000 -0.988000 5.858000 -Lu+3 - 71 68 2.975730 - 28.462799 18.121000 12.842899 5.594150 - 1.682160 0.142292 7.337270 16.353500 - -7.133000 4.693000 -0.988000 5.858000 -Hf - 72 72 8.581540 - 29.143999 15.172600 14.758600 4.300130 - 1.832620 9.599899 0.275116 72.028999 - -6.715000 4.977000 -1.118000 6.185000 -Hf+4 - 72 68 2.396990 - 28.813099 18.460100 12.728500 5.599270 - 1.591360 0.128903 6.762320 14.036600 - -6.715000 4.977000 -1.118000 6.185000 -Ta - 73 73 9.243540 - 29.202400 15.229300 14.513500 4.764920 - 1.773330 9.370460 0.295977 63.364399 - -6.351000 5.271000 -1.258000 6.523000 -Ta+5 - 73 68 1.785550 - 29.158699 18.840700 12.826799 5.386950 - 1.507110 0.116741 6.315240 12.424400 - -6.351000 5.271000 -1.258000 6.523000 -W - 74 74 9.887500 - 29.081800 15.430000 14.432700 5.119820 - 1.720290 9.225900 0.321703 57.056000 - -6.048000 5.577000 -1.421000 6.872000 -W+6 - 74 68 1.010740 - 29.493599 19.376301 13.054399 5.064120 - 1.427550 0.104621 5.936670 11.197200 - -6.048000 5.577000 -1.421000 6.872000 -Re - 75 75 10.472000 - 28.762100 15.718900 14.556400 5.441740 - 1.671910 9.092270 0.350500 52.086098 - -5.790000 5.891000 -1.598000 7.232000 -Os - 76 76 11.000500 - 28.189400 16.154999 14.930500 5.675890 - 1.629030 8.979480 0.382661 48.164700 - -5.581000 6.221000 -1.816000 7.605000 -Os+4 - 76 72 6.498040 - 30.418999 15.263700 14.745800 5.067950 - 1.371130 6.847060 0.165191 18.003000 - -5.581000 6.221000 -1.816000 7.605000 -Ir - 77 77 11.472200 - 27.304899 16.729599 15.611500 5.833770 - 1.592790 8.865530 0.417916 45.001099 - -5.391000 6.566000 -2.066000 7.990000 -Ir+3 - 77 74 8.279030 - 30.415600 15.862000 13.614500 5.820080 - 1.343230 7.109090 0.204633 20.325399 - -5.391000 6.566000 -2.066000 7.990000 -Ir+4 - 77 73 6.968240 - 30.705799 15.551200 14.232600 5.536720 - 1.309230 6.719830 0.167252 17.491100 - -5.391000 6.566000 -2.066000 7.990000 -Pt - 78 78 11.688300 - 27.005899 17.763901 15.713100 5.783700 - 1.512930 8.811740 0.424593 38.610298 - -5.233000 6.925000 -2.352000 8.388000 -Pt+2 - 78 76 9.853290 - 29.842899 16.722401 13.215300 6.352340 - 1.329270 7.389790 0.263297 22.942600 - -5.233000 6.925000 -2.352000 8.388000 -Pt+4 - 78 74 7.395340 - 30.961201 15.982900 13.734800 5.920340 - 1.248130 6.608340 0.168640 16.939199 - -5.233000 6.925000 -2.352000 8.388000 -Au - 79 79 12.065800 - 16.881901 18.591299 25.558201 5.860000 - 0.461100 8.621600 1.482600 36.395599 - -5.096000 7.297000 -2.688000 8.798000 -Au+1 - 79 78 11.229900 - 28.010899 17.820400 14.335899 6.580770 - 1.353210 7.739500 0.356752 26.404301 - -5.096000 7.297000 -2.688000 8.798000 -Au+3 - 79 76 9.096800 - 30.688599 16.902901 12.780100 6.523540 - 1.219900 6.828720 0.212867 18.659000 - -5.096000 7.297000 -2.688000 8.798000 -Hg - 80 80 12.608900 - 20.680901 19.041700 21.657499 5.967600 - 0.545000 8.448400 1.572900 38.324600 - -4.990000 7.686000 -3.084000 9.223000 -Hg+1 - 80 79 12.020500 - 25.085300 18.497299 16.888300 6.482160 - 1.395070 7.651050 0.443378 28.226200 - -4.990000 7.686000 -3.084000 9.223000 -Hg+2 - 80 78 10.626800 - 29.564100 18.059999 12.837400 6.899120 - 1.211520 7.056390 0.284738 20.748199 - -4.990000 7.686000 -3.084000 9.223000 -Tl - 81 81 13.174600 - 27.544600 19.158400 15.538000 5.525930 - 0.655150 8.707510 1.963470 45.814899 - -4.883000 8.089000 -3.556000 9.659000 -Tl+1 - 81 80 12.525800 - 21.398500 20.472300 18.747799 6.828470 - 1.471100 0.517394 7.434630 28.848200 - -4.883000 8.089000 -3.556000 9.659000 -Tl+3 - 81 78 9.802700 - 30.869499 18.384100 11.932800 7.005740 - 1.100800 6.538520 0.219074 17.211399 - -4.883000 8.089000 -3.556000 9.659000 -Pb - 82 82 13.411800 - 31.061699 13.063700 18.441999 5.969600 - 0.690200 2.357600 8.618000 47.257900 - -4.818000 8.505000 -4.133000 10.102000 -Pb+2 - 82 80 12.473400 - 21.788601 19.568199 19.140600 7.011070 - 1.336600 0.488383 6.772700 23.813200 - -4.818000 8.505000 -4.133000 10.102000 -Pb+4 - 82 78 8.084280 - 32.124397 18.800301 12.017500 6.968860 - 1.005660 6.109260 0.147041 14.714000 - -4.818000 8.505000 -4.133000 10.102000 -Bi - 83 83 13.578199 - 33.368900 12.951000 16.587700 6.469200 - 0.704000 2.923800 8.793700 48.009300 - -4.776000 8.930000 -4.861000 10.559000 -Bi+3 - 83 80 12.471100 - 21.805300 19.502600 19.105301 7.102950 - 1.235600 6.241490 0.469999 20.318501 - -4.776000 8.930000 -4.861000 10.559000 -Bi+5 - 83 78 -6.799400 - 33.536400 25.094601 19.249699 6.915550 - 0.916540 0.390420 5.714140 12.828500 - -4.776000 8.930000 -4.861000 10.559000 -Po - 84 84 13.677000 - 34.672600 15.473300 13.113800 7.025880 - 0.700999 3.550780 9.556419 47.004501 - -4.756000 9.382999 -5.924000 11.042000 -At - 85 85 13.710800 - 35.316299 19.021099 9.498870 7.425180 - 0.685870 3.974580 11.382400 45.471500 - -4.772000 9.843000 -7.444000 9.961000 -Rn - 86 86 13.690500 - 35.563099 21.281601 8.003700 7.443300 - 0.663100 4.069100 14.042200 44.247299 - -4.787000 10.316999 -8.862000 10.403000 -Fr - 87 87 13.724700 - 35.929901 23.054699 12.143900 2.112530 - 0.646453 4.176190 23.105200 150.644989 - -4.833000 10.802999 -7.912000 7.754000 -Ra - 88 88 13.621099 - 35.763000 22.906399 12.473900 3.210970 - 0.616341 3.871350 19.988701 142.324997 - -4.898000 11.296000 -7.620000 8.105000 -Ra+2 - 88 86 13.543100 - 35.215000 21.670000 7.913420 7.650780 - 0.604909 3.576700 12.601000 29.843599 - -4.898000 11.296000 -7.620000 8.105000 -Ac - 89 89 13.526600 - 35.659698 23.103199 12.597700 4.086550 - 0.589092 3.651550 18.598999 117.019997 - -4.994000 11.799000 -7.725000 8.472000 -Ac+3 - 89 86 13.463699 - 35.173599 22.111200 8.192160 7.055450 - 0.579689 3.414370 12.918700 25.944300 - -4.994000 11.799000 -7.725000 8.472000 -Th - 90 90 13.431400 - 35.564499 23.421900 12.747300 4.807030 - 0.563359 3.462040 17.830900 99.172195 - -5.091000 12.330000 -8.127000 8.870000 -Th+4 - 90 86 13.375999 - 35.100700 22.441799 9.785540 5.294440 - 0.555054 3.244980 13.466100 23.953300 - -5.091000 12.330000 -8.127000 8.870000 -Pa - 91 91 13.428699 - 35.884701 23.294800 14.189100 4.172870 - 0.547751 3.415190 16.923500 105.250999 - -5.216000 12.868000 -8.960000 9.284000 -U - 92 92 13.396600 - 36.022800 23.412800 14.949100 4.188000 - 0.529300 3.325300 16.092699 100.612999 - -5.359000 13.409000 -10.673000 9.653999 -U+3 - 92 89 13.309200 - 35.574699 22.525900 12.216499 5.370730 - 0.520480 3.122930 12.714800 26.339399 - -5.359000 13.409000 -10.673000 9.653999 -U+4 - 92 88 13.267099 - 35.371498 22.532600 12.029100 4.798400 - 0.516598 3.050530 12.572300 23.458200 - -5.359000 13.409000 -10.673000 9.653999 -U+6 - 92 86 13.166500 - 34.850899 22.758400 14.009900 1.214570 - 0.507079 2.890300 13.176700 25.201700 - -5.359000 13.409000 -10.673000 9.653999 -Np - 93 93 13.357300 - 36.187401 23.596399 15.640200 4.185500 - 0.511929 3.253960 15.362200 97.490799 - -5.529000 13.967000 -11.158000 4.148000 -Np+3 - 93 90 13.254400 - 35.707397 22.612999 12.989799 5.432270 - 0.502322 3.038070 12.144899 25.492800 - -5.529000 13.967000 -11.158000 4.148000 -Np+4 - 93 89 13.211599 - 35.510300 22.578699 12.776600 4.921590 - 0.498626 2.966270 11.948400 22.750200 - -5.529000 13.967000 -11.158000 4.148000 -Np+6 - 93 87 13.113000 - 35.013599 22.728600 14.388400 1.756690 - 0.489810 2.810990 12.330000 22.658100 - -5.529000 13.967000 -11.158000 4.148000 -Pu - 94 94 13.381200 - 36.525398 23.808300 16.770700 3.479470 - 0.499384 3.263710 14.945499 105.979996 - -5.712000 14.535999 -9.725000 4.330000 -Pu+3 - 94 91 13.199100 - 35.840000 22.716900 13.580700 5.660160 - 0.484936 2.961180 11.533100 24.399200 - -5.712000 14.535999 -9.725000 4.330000 -Pu+4 - 94 90 13.155500 - 35.649300 22.646000 13.359500 5.188310 - 0.481422 2.890200 11.316000 21.830099 - -5.712000 14.535999 -9.725000 4.330000 -Pu+6 - 94 88 13.058200 - 35.173599 22.718100 14.763500 2.286780 - 0.473204 2.738480 11.552999 20.930300 - -5.712000 14.535999 -9.725000 4.330000 -Am - 95 95 13.359200 - 36.670601 24.099199 17.341499 3.493310 - 0.483629 3.206470 14.313600 102.272995 - -5.930000 15.087000 -8.926000 4.511000 -Cm - 96 96 13.288700 - 36.648800 24.409599 17.399000 4.216650 - 0.465154 3.089970 13.434600 88.483398 - -6.176000 15.634000 -8.416000 4.697000 -Bk - 97 97 13.275400 - 36.788101 24.773600 17.891899 4.232840 - 0.451018 3.046190 12.894600 86.002998 - -6.498000 16.316999 -7.990000 4.908000 -Cf - 98 98 13.267400 - 36.918499 25.199499 18.331699 4.243910 - 0.437533 3.007750 12.404400 83.788101 - -6.798000 16.930000 -7.683000 5.107000 -H 2 - 1 1 0.000000 - 0.793200 0.194900 0.000000 0.000000 - 24.215700 2.108900 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -C 2 - 6 6 0.000000 - 2.997200 2.979100 0.000000 0.000000 - 30.016701 2.888600 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -N 2 - 7 7 0.000000 - 2.992400 3.998600 0.000000 0.000000 - 25.376600 3.500400 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -O 2 - 8 8 0.000000 - 2.448500 5.558900 0.000000 0.000000 - 24.756199 4.137200 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -S 2 - 16 16 0.000000 - 5.548000 10.424100 0.000000 0.000000 - 33.710800 1.903400 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ano 2 - 1 1 0.000000 - 1.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 1.000000 0.000000 1.000000 diff --git a/ccp4c/data/atomsf_electron.lib b/ccp4c/data/atomsf_electron.lib deleted file mode 100644 index 77bb9241..00000000 --- a/ccp4c/data/atomsf_electron.lib +++ /dev/null @@ -1,514 +0,0 @@ -AD - This file contains the following information: -AD - BEWARE: This file has a FIXED FORMAT! -AD This contains for each element: -AD ID -AD IWT IELEC C -AD A(5) -AD B(5) -AD CU(2) MO(2) -AD -AD -AD Formfactor: a1*exp(-b1*s*s) + a2*exp(-b2*s*s) + a3*exp(-b3*s*s) -AD + a4*exp(-b4*s*s) + a5*exp(-b4*s*s) -AD -AD This is the 5 Gaussian approximation -AD Ref: Int.Tab. vol C pp. 282-283 (Table 4.3.2.2) for values a1-a5, b1-b5 -AD -AD ID atom identifier -AD IWT atomic weight -AD IELEC number of electrons -AD C it is 0 -AD A(5) coefficient for structure factor calculation -AD B(5) coefficient for structure factor calculation -AD CU(2) these are 0-s -AD MO(2) these are 0-s -H - 1 1 0.000000 - 0.034900 0.120100 0.197000 0.057300 0.119500 - 0.534700 3.586700 12.347100 18.952499 38.626900 - 0.000000 0.000000 0.000000 0.000000 -He - 2 2 0.000000 - 0.031700 0.083800 0.152600 0.133400 0.016400 - 0.250700 1.475100 4.493800 12.664600 31.165300 - 0.000000 0.000000 0.000000 0.000000 -Li - 3 3 0.000000 - 0.075000 0.224900 0.554800 1.495400 0.935400 - 0.386400 2.938300 15.382900 53.554501 138.733704 - 0.000000 0.000000 0.000000 0.000000 -Be - 4 4 0.000000 - 0.078000 0.221000 0.674000 1.386700 0.692500 - 0.313100 2.238100 10.151700 30.906099 78.327301 - 0.000000 0.000000 0.000000 0.000000 -B - 5 5 0.000000 - 0.090900 0.255100 0.773800 1.213600 0.460600 - 0.299500 2.115500 8.381600 24.129200 63.131401 - 0.000000 0.000000 0.000000 0.000000 -C - 6 6 0.000000 - 0.089300 0.256300 0.757000 1.048700 0.357500 - 0.246500 1.710000 6.409400 18.611300 50.252300 - 0.000000 0.000000 0.000000 0.000000 -N - 7 7 0.000000 - 0.102200 0.321900 0.798200 0.819700 0.171500 - 0.245100 1.748100 6.192500 17.389400 48.143101 - 0.000000 0.000000 0.000000 0.000000 -O - 8 8 0.000000 - 0.097400 0.292100 0.691000 0.699000 0.203900 - 0.206700 1.381500 4.694300 12.710500 32.472599 - 0.000000 0.000000 0.000000 0.000000 -F - 9 9 0.000000 - 0.108300 0.317500 0.648700 0.584600 0.142100 - 0.205700 1.343900 4.278800 11.393200 28.788099 - 0.000000 0.000000 0.000000 0.000000 -Ne - 10 10 0.000000 - 0.126900 0.353500 0.558200 0.467400 0.146000 - 0.220000 1.377900 4.020300 9.493400 23.127800 - 0.000000 0.000000 0.000000 0.000000 -Na - 11 11 0.000000 - 0.214200 0.685300 0.769200 1.658900 1.448200 - 0.333400 2.344600 10.083000 48.303699 138.270004 - 0.000000 0.000000 0.000000 0.000000 -Mg - 12 12 0.000000 - 0.231400 0.686600 0.967700 2.188200 1.133900 - 0.327800 2.272000 10.924100 39.289799 101.974800 - 0.000000 0.000000 0.000000 0.000000 -Al - 13 13 0.000000 - 0.239000 0.657300 1.201100 2.558600 1.231200 - 0.313800 2.106300 10.416300 34.455200 98.534401 - 0.000000 0.000000 0.000000 0.000000 -Si - 14 14 0.000000 - 0.251900 0.637200 1.379500 2.508200 1.050000 - 0.307500 2.017400 9.674600 29.374399 80.473198 - 0.000000 0.000000 0.000000 0.000000 -P - 15 15 0.000000 - 0.254800 0.610600 1.454100 2.320400 0.847700 - 0.290800 1.874000 8.517600 24.343399 63.299599 - 0.000000 0.000000 0.000000 0.000000 -S - 16 16 0.000000 - 0.249700 0.562800 1.389900 2.186500 0.771500 - 0.268100 1.671100 7.026700 19.537701 50.388802 - 0.000000 0.000000 0.000000 0.000000 -Cl - 17 17 0.000000 - 0.244300 0.539700 1.391900 2.019700 0.662100 - 0.246800 1.524200 6.153700 16.668699 42.308601 - 0.000000 0.000000 0.000000 0.000000 -Ar - 18 18 0.000000 - 0.238500 0.501700 1.342800 1.889900 0.607900 - 0.228900 1.369400 5.256100 14.092800 35.536098 - 0.000000 0.000000 0.000000 0.000000 -K - 19 19 0.000000 - 0.411500 1.403100 2.278400 2.674200 2.216200 - 0.370300 3.387400 13.102900 68.959198 194.432907 - 0.000000 0.000000 0.000000 0.000000 -Ca - 20 20 0.000000 - 0.405400 1.388000 2.160200 3.753200 2.206300 - 0.349900 3.099100 11.960800 53.935299 142.389206 - 0.000000 0.000000 0.000000 0.000000 -Sc - 21 21 0.000000 - 0.378700 1.218100 2.059400 3.261800 2.387000 - 0.313300 2.585600 9.581300 41.768799 116.728203 - 0.000000 0.000000 0.000000 0.000000 -Ti - 22 22 0.000000 - 0.382500 1.259800 2.000800 3.061700 2.069400 - 0.304000 2.486300 9.278300 39.075100 109.458298 - 0.000000 0.000000 0.000000 0.000000 -V - 23 23 0.000000 - 0.387600 1.275000 1.910900 2.831400 1.897900 - 0.296700 2.378000 8.798100 35.952801 101.720100 - 0.000000 0.000000 0.000000 0.000000 -Cr - 24 24 0.000000 - 0.404600 1.369600 1.894100 2.080000 1.219600 - 0.298600 2.395800 9.140600 37.470100 113.712097 - 0.000000 0.000000 0.000000 0.000000 -Mn - 25 25 0.000000 - 0.379600 1.209400 1.781500 2.542000 1.593700 - 0.269900 2.045500 7.472600 31.060400 91.562202 - 0.000000 0.000000 0.000000 0.000000 -Fe - 26 26 0.000000 - 0.394600 1.272500 1.703100 2.314000 1.479500 - 0.271700 2.044300 7.600700 29.971399 86.226501 - 0.000000 0.000000 0.000000 0.000000 -Co - 27 27 0.000000 - 0.411800 1.316100 1.649300 2.193000 1.283000 - 0.274200 2.037200 7.720500 29.968000 84.938301 - 0.000000 0.000000 0.000000 0.000000 -Ni - 28 28 0.000000 - 0.386000 1.176500 1.545100 2.073000 1.381400 - 0.247800 1.766000 6.310700 25.220400 74.314598 - 0.000000 0.000000 0.000000 0.000000 -Cu - 29 29 0.000000 - 0.431400 1.320800 1.523600 1.467100 0.856200 - 0.269400 1.922300 7.347400 28.989201 90.624603 - 0.000000 0.000000 0.000000 0.000000 -Zn - 30 30 0.000000 - 0.428800 1.264600 1.447200 1.829400 1.093400 - 0.259300 1.799800 6.750000 25.586000 73.528397 - 0.000000 0.000000 0.000000 0.000000 -Ga - 31 31 0.000000 - 0.481800 1.403200 1.656100 2.460500 1.105400 - 0.282500 1.978500 8.754600 32.523800 98.552299 - 0.000000 0.000000 0.000000 0.000000 -Ge - 32 32 0.000000 - 0.465500 1.301400 1.608800 2.699800 1.300300 - 0.264700 1.792600 7.607100 26.554100 77.523804 - 0.000000 0.000000 0.000000 0.000000 -As - 33 33 0.000000 - 0.451700 1.222900 1.585200 2.795800 1.263800 - 0.249300 1.643600 6.815400 22.368099 62.039001 - 0.000000 0.000000 0.000000 0.000000 -Se - 34 34 0.000000 - 0.447700 1.167800 1.584300 2.808700 1.195600 - 0.240500 1.544200 6.323100 19.461000 52.023300 - 0.000000 0.000000 0.000000 0.000000 -Br - 35 35 0.000000 - 0.479800 1.194800 1.869500 2.695300 0.820300 - 0.250400 1.596300 6.965300 19.849199 50.323299 - 0.000000 0.000000 0.000000 0.000000 -Kr - 36 36 0.000000 - 0.454600 1.099300 1.769600 2.706800 0.867200 - 0.230900 1.427900 5.944900 16.675200 42.224300 - 0.000000 0.000000 0.000000 0.000000 -Rb - 37 37 0.000000 - 1.016000 2.852800 3.546600 -7.780400 12.114800 - 0.485300 5.092500 25.785101 130.451508 138.677505 - 0.000000 0.000000 0.000000 0.000000 -Sr - 38 38 0.000000 - 0.670300 1.492600 3.336800 4.460000 3.150100 - 0.319000 2.228700 10.350400 52.329102 151.221603 - 0.000000 0.000000 0.000000 0.000000 -Y - 39 39 0.000000 - 0.689400 1.547400 3.245000 4.212600 2.976400 - 0.318900 2.290400 10.006200 44.077099 125.012001 - 0.000000 0.000000 0.000000 0.000000 -Zr - 40 40 0.000000 - 0.671900 1.468400 3.166800 3.955700 2.892000 - 0.303600 2.124900 8.923600 36.845798 108.204903 - 0.000000 0.000000 0.000000 0.000000 -Nb - 41 41 0.000000 - 0.612300 1.267700 3.034800 3.384100 2.368300 - 0.270900 1.768300 7.248900 27.946501 98.562401 - 0.000000 0.000000 0.000000 0.000000 -Mo - 42 42 0.000000 - 0.677300 1.479800 3.178800 3.082400 1.838400 - 0.292000 2.060600 8.112900 30.533600 100.065804 - 0.000000 0.000000 0.000000 0.000000 -Tc - 43 43 0.000000 - 0.708200 1.639200 3.199300 3.432700 1.871100 - 0.297600 2.210600 8.524600 33.145599 96.637703 - 0.000000 0.000000 0.000000 0.000000 -Ru - 44 44 0.000000 - 0.673500 1.493400 3.096600 2.725400 1.559700 - 0.277300 1.971600 7.324900 26.689100 90.558098 - 0.000000 0.000000 0.000000 0.000000 -Rh - 45 45 0.000000 - 0.641300 1.369000 2.985400 2.695200 1.543300 - 0.258000 1.772100 6.385400 23.254900 85.151703 - 0.000000 0.000000 0.000000 0.000000 -Pd - 46 46 0.000000 - 0.590400 1.177500 2.651900 2.287500 0.868900 - 0.232400 1.501900 5.159100 15.542800 46.821301 - 0.000000 0.000000 0.000000 0.000000 -Ag - 47 47 0.000000 - 0.637700 1.379000 2.829400 2.363100 1.455300 - 0.246600 1.697400 5.765600 20.094299 76.737198 - 0.000000 0.000000 0.000000 0.000000 -Cd - 48 48 0.000000 - 0.636400 1.424700 2.780200 2.597300 1.788600 - 0.240700 1.682300 5.658800 20.721901 69.110901 - 0.000000 0.000000 0.000000 0.000000 -In - 49 49 0.000000 - 0.676800 1.658900 2.774000 3.183500 2.132600 - 0.252200 1.854500 6.293600 25.145700 84.544800 - 0.000000 0.000000 0.000000 0.000000 -Sn - 50 50 0.000000 - 0.722400 1.961000 2.716100 3.560300 1.897200 - 0.265100 2.060400 7.301100 27.549299 81.334900 - 0.000000 0.000000 0.000000 0.000000 -Sb - 51 51 0.000000 - 0.710600 1.924700 2.614900 3.832200 1.889900 - 0.256200 1.964600 6.885200 24.764799 68.916801 - 0.000000 0.000000 0.000000 0.000000 -Te - 52 52 0.000000 - 0.694700 1.869000 2.535600 4.001300 1.895500 - 0.245900 1.854200 6.441100 22.173000 59.220600 - 0.000000 0.000000 0.000000 0.000000 -I - 53 53 0.000000 - 0.704700 1.948400 2.594000 4.152600 1.505700 - 0.245500 1.863800 6.763900 21.800699 56.439499 - 0.000000 0.000000 0.000000 0.000000 -Xe - 54 54 0.000000 - 0.673700 1.790800 2.412900 4.210000 1.705800 - 0.230500 1.689000 5.821800 18.392799 47.249599 - 0.000000 0.000000 0.000000 0.000000 -Cs - 55 55 0.000000 - 1.270400 3.801800 5.661800 0.920500 4.810500 - 0.435600 4.205800 23.434200 136.778305 171.756104 - 0.000000 0.000000 0.000000 0.000000 -Ba - 56 56 0.000000 - 0.904900 2.607600 4.849800 5.160300 4.738800 - 0.306600 2.436300 12.182100 54.613499 161.997803 - 0.000000 0.000000 0.000000 0.000000 -La - 57 57 0.000000 - 0.840500 2.386300 4.613900 5.151400 4.794900 - 0.279100 2.141000 10.340000 41.914799 132.020401 - 0.000000 0.000000 0.000000 0.000000 -Ce - 58 58 0.000000 - 0.855100 2.391500 4.577200 5.027800 4.511800 - 0.280500 2.120000 10.180800 42.063301 130.989304 - 0.000000 0.000000 0.000000 0.000000 -Pr - 59 59 0.000000 - 0.909600 2.531300 4.526600 4.637600 4.369000 - 0.293900 2.247100 10.826600 48.884201 147.602005 - 0.000000 0.000000 0.000000 0.000000 -Nd - 60 60 0.000000 - 0.880700 2.418300 4.444800 4.685800 4.172500 - 0.280200 2.083600 10.035700 47.450600 146.997604 - 0.000000 0.000000 0.000000 0.000000 -Pm - 61 61 0.000000 - 0.947100 2.546300 4.352300 4.478900 3.908000 - 0.297700 2.227600 10.576200 49.361900 145.358002 - 0.000000 0.000000 0.000000 0.000000 -Sm - 62 62 0.000000 - 0.969900 2.583700 4.277800 4.457500 3.598500 - 0.300300 2.244700 10.648700 50.799400 146.417892 - 0.000000 0.000000 0.000000 0.000000 -Eu - 63 63 0.000000 - 0.869400 2.241300 3.919600 3.969400 4.549800 - 0.265300 1.859000 8.399800 36.739700 125.708900 - 0.000000 0.000000 0.000000 0.000000 -Gd - 64 64 0.000000 - 0.967300 2.470200 4.114800 4.497200 3.209900 - 0.290900 2.101400 9.706700 43.426998 125.947403 - 0.000000 0.000000 0.000000 0.000000 -Tb - 65 65 0.000000 - 0.932500 2.367300 3.879100 3.967400 3.799600 - 0.276100 1.951100 8.929600 41.593700 131.012207 - 0.000000 0.000000 0.000000 0.000000 -Dy - 66 66 0.000000 - 0.950500 2.370500 3.821800 4.047100 3.445100 - 0.277300 1.946900 8.886200 43.093800 133.139603 - 0.000000 0.000000 0.000000 0.000000 -Ho - 67 67 0.000000 - 0.924800 2.242800 3.618200 3.791000 3.791200 - 0.266000 1.818300 7.965500 33.112900 101.813904 - 0.000000 0.000000 0.000000 0.000000 -Er - 68 68 0.000000 - 1.037300 2.482400 3.655800 3.892500 3.005600 - 0.294400 2.079700 9.415600 45.805599 132.772003 - 0.000000 0.000000 0.000000 0.000000 -Tm - 69 69 0.000000 - 1.007500 2.378700 3.544000 3.693200 3.175900 - 0.281600 1.948600 8.716200 41.841999 125.031998 - 0.000000 0.000000 0.000000 0.000000 -Yb - 70 70 0.000000 - 1.034700 2.391100 3.461900 3.655600 3.005200 - 0.285500 1.967900 8.761900 42.330399 125.649902 - 0.000000 0.000000 0.000000 0.000000 -Lu - 71 71 0.000000 - 0.992700 2.243600 3.355400 3.781300 3.099400 - 0.270100 1.807300 7.811200 34.484901 103.352600 - 0.000000 0.000000 0.000000 0.000000 -Hf - 72 72 0.000000 - 1.029500 2.291100 3.411000 3.949700 2.492500 - 0.276100 1.862500 8.096100 34.271198 98.529503 - 0.000000 0.000000 0.000000 0.000000 -Ta - 73 73 0.000000 - 1.019000 2.229100 3.409700 3.925200 2.267900 - 0.269400 1.796200 7.694400 31.094200 91.108902 - 0.000000 0.000000 0.000000 0.000000 -W - 74 74 0.000000 - 0.985300 2.116700 3.357000 3.798100 2.279800 - 0.256900 1.674500 7.009800 26.923401 81.390999 - 0.000000 0.000000 0.000000 0.000000 -Re - 75 75 0.000000 - 0.991400 2.085800 3.453100 3.881200 1.852600 - 0.254800 1.651800 6.884500 26.723400 81.721497 - 0.000000 0.000000 0.000000 0.000000 -Os - 76 76 0.000000 - 0.981300 2.032200 3.366500 3.623500 1.974100 - 0.248700 1.597300 6.473700 23.281700 70.925400 - 0.000000 0.000000 0.000000 0.000000 -Ir - 77 77 0.000000 - 1.019400 2.064500 3.442500 3.491400 1.697600 - 0.255400 1.647500 6.596600 23.226900 70.027199 - 0.000000 0.000000 0.000000 0.000000 -Pt - 78 78 0.000000 - 0.914800 1.809600 3.213400 3.295300 1.575400 - 0.226300 1.381300 5.324300 17.598700 60.017101 - 0.000000 0.000000 0.000000 0.000000 -Au - 79 79 0.000000 - 0.967400 1.891600 3.399300 3.052400 1.260700 - 0.235800 1.471200 5.675800 18.711901 61.528599 - 0.000000 0.000000 0.000000 0.000000 -Hg - 80 80 0.000000 - 1.003300 1.946900 3.439600 3.154800 1.418000 - 0.241300 1.529800 5.800900 19.452000 60.575298 - 0.000000 0.000000 0.000000 0.000000 -Tl - 81 81 0.000000 - 1.068900 2.103800 3.603900 3.492700 1.828300 - 0.254000 1.671500 6.350900 23.153099 78.709900 - 0.000000 0.000000 0.000000 0.000000 -Pb - 82 82 0.000000 - 1.089100 2.186700 3.616000 3.803100 1.899400 - 0.255200 1.717400 6.513100 23.917000 74.703903 - 0.000000 0.000000 0.000000 0.000000 -Bi - 83 83 0.000000 - 1.100700 2.230600 3.568900 4.154900 2.038200 - 0.254600 1.735100 6.494800 23.646400 70.377998 - 0.000000 0.000000 0.000000 0.000000 -Po - 84 84 0.000000 - 1.156800 2.435300 3.645900 4.406400 1.717900 - 0.264800 1.878600 7.174900 25.176600 69.282097 - 0.000000 0.000000 0.000000 0.000000 -At - 85 85 0.000000 - 1.090900 2.197600 3.383100 4.670000 2.127700 - 0.246600 1.670700 6.019700 20.765699 57.266300 - 0.000000 0.000000 0.000000 0.000000 -Rn - 86 86 0.000000 - 1.075600 2.163000 3.317800 4.885200 2.048900 - 0.240200 1.616900 5.764400 19.456800 52.500900 - 0.000000 0.000000 0.000000 0.000000 -Fr - 87 87 0.000000 - 1.428200 3.508100 5.676700 4.196400 3.894600 - 0.318300 2.688900 13.481600 54.386600 200.832108 - 0.000000 0.000000 0.000000 0.000000 -Ra - 88 88 0.000000 - 1.312700 3.124300 5.298800 5.389100 5.413300 - 0.288700 2.289700 10.827600 43.538898 145.610901 - 0.000000 0.000000 0.000000 0.000000 -Ac - 89 89 0.000000 - 1.312800 3.102100 5.338500 5.961100 4.756200 - 0.286100 2.250900 10.528700 41.779598 128.297302 - 0.000000 0.000000 0.000000 0.000000 -Th - 90 90 0.000000 - 1.255300 2.917800 5.086200 6.120600 4.712200 - 0.270100 2.063600 9.305100 34.597698 107.919998 - 0.000000 0.000000 0.000000 0.000000 -Pa - 91 91 0.000000 - 1.321800 3.144400 5.437100 5.644400 4.010700 - 0.282700 2.225000 10.245400 41.116199 124.444901 - 0.000000 0.000000 0.000000 0.000000 -U - 92 92 0.000000 - 1.338200 3.204300 5.455800 5.483900 3.634200 - 0.283800 2.245200 10.251900 41.725101 124.902298 - 0.000000 0.000000 0.000000 0.000000 -Np - 93 93 0.000000 - 1.519300 4.005300 6.532700 -0.140200 6.748900 - 0.321300 2.820600 14.887800 68.910301 81.725700 - 0.000000 0.000000 0.000000 0.000000 -Pu - 94 94 0.000000 - 1.351700 3.293700 5.321300 4.646600 3.571400 - 0.281300 2.241800 9.995200 42.793900 132.173904 - 0.000000 0.000000 0.000000 0.000000 -Am - 95 95 0.000000 - 1.213500 2.796200 4.754500 4.573100 4.478600 - 0.248300 1.843700 7.542100 29.384100 112.457901 - 0.000000 0.000000 0.000000 0.000000 -Cm - 96 96 0.000000 - 1.293700 3.110000 5.039300 4.754600 3.503100 - 0.263800 2.034100 8.710100 35.299198 109.497200 - 0.000000 0.000000 0.000000 0.000000 -Bk - 97 97 0.000000 - 1.291500 3.102300 4.930900 4.600900 3.466100 - 0.261100 2.002300 8.437700 34.155899 105.891098 - 0.000000 0.000000 0.000000 0.000000 -Cf - 98 98 0.000000 - 1.208900 2.739100 4.348200 4.004700 4.649700 - 0.242100 1.748700 6.726200 23.215300 80.310799 - 0.000000 0.000000 0.000000 0.000000 diff --git a/ccp4c/data/atomsf_neutron.lib b/ccp4c/data/atomsf_neutron.lib deleted file mode 100644 index 5817edb1..00000000 --- a/ccp4c/data/atomsf_neutron.lib +++ /dev/null @@ -1,1002 +0,0 @@ -AD -AD Form factors for neutron diffraction. These are also known as -AD "bound coherent scattering length" -AD These values have been taken from the website: -AD https://www.ncnr.nist.gov/resources/n-lengths/list.html -AD -AD Varley F. Sears, Neutron scattering lengths and cross sections (1992) -AD Vol. 3, No. 3, pp. 29-37 -AD -AD Note: not all atoms have formfactors. Hopefully they will not be needed -AD in macromolecular crystallography -AD -H - 1 1 0.000000 - -0.374000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -D - 1 1 0.000000 - 0.667000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -H-1 - 1 1 0.000000 - -0.374000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -He - 2 2 0.000000 - 0.326000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Li - 3 3 0.000000 - -0.190000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Li+1 - 3 2 0.000000 - -0.190000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Be - 4 4 0.00000 - 0.779000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Be+2 - 4 2 0.0000 - 0.779000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -B - 5 5 0.0000 - 0.530000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.021300 0.000000 0.000000 -C - 6 6 0.000000 - 0.665000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cv - 6 6 0.000000 - 0.665000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -N - 7 7 0.000000 - 0.936000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -O - 8 8 0.000000 - 0.581000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -O-1 - 8 9 0.000000 - 0.581000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -F - 9 9 0.0000 - 0.565400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -F-1 - 9 10 0.0000 - 0.565400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ne - 10 10 0.000 - 0.456600 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Na - 11 11 0.00000 - 0.363000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Na+1 - 11 10 0.0000 - 0.363000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mg - 12 12 0.0000 - 0.537500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mg+2 - 12 10 0.0000 - 0.537500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Al - 13 13 0.00000 - 0.344900 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Al+3 - 13 10 0.00000 - 0.344900 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Si - 14 14 0.0000 - 0.414910 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Siv - 14 14 0.00000 - 0.414910 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Si+4 - 14 10 0.00000 - 0.414910 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -P - 15 15 0.000000 - 0.513000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -S - 16 16 0.000000 - 0.284700 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cl - 17 17 0.0000 - 0.957700 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cl-1 - 17 18 0.0000 - 0.957700 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ar - 18 18 0.0000 - 0.190900 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -K - 19 19 0.0000 - 0.367000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -K+1 - 19 18 0.0000 - 0.367000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ca - 20 20 0.0000 - 0.470000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ca+2 - 20 18 0.00000 - 0.470000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sc - 21 21 0.00000 - 1.229000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sc+3 - 21 18 0.0000 - 1.229000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ti - 22 22 0.0000 - -0.343800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ti+2 - 22 20 0.00000 - -0.343800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ti+3 - 22 19 0.0000 - -0.343800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ti+4 - 22 18 0.0000 - -0.343800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -V - 23 23 0.0000 - -0.382400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -V+2 - 23 21 0.0000 - -0.382400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -V+3 - 23 19 0.00000 - -0.382400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -V+5 - 23 18 0.0000 - -0.382400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cr - 24 24 0.0000 - 0.363500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cr+2 - 24 22 0.00000 - 0.363500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cr+3 - 24 21 0.000000 - 0.363500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mn - 25 25 0.00000 - -0.373000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mn+2 - 25 23 0.00000 - -0.373000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mn+3 - 25 22 0.00000 - -0.373000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mn+4 - 25 21 0.00000 - -0.373000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Fe - 26 26 0.00000 - 0.945000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Fe+2 - 26 24 0.00000 - 0.945000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Fe+3 - 26 23 0.00000 - 0.945000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Co - 27 27 0.000000 - 0.249000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Co+2 - 27 25 0.000000 - 0.249000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Co+3 - 27 24 0.000000 - 0.249000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ni - 28 28 0.000000 - 1.030000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ni+2 - 28 26 0.000000 - 1.030000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ni+3 - 28 25 0.000000 - 1.030000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cu - 29 29 0.0000 - 0.771800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cu+1 - 29 28 0.0000 - 0.771800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cu+2 - 29 27 0.0000 - 0.771800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Zn - 30 30 0.0000 - 0.578000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Zn+2 - 30 28 0.0000 - 0.578000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ga - 31 31 0.0000 - 0.728800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ga+3 - 31 28 0.0000 - 0.728800 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ge - 32 32 0.0000 - 0.818500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ge+4 - 32 28 0.0000 - 0.818500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -As - 33 33 0.0000 - 0.658000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Se - 34 34 0.0000 - 0.797000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Br - 35 35 0.0000 - 0.679500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Br-1 - 35 36 0.0000 - 0.679500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Rb - 37 37 0.0000 - 0.709000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Rb+1 - 37 36 0.0000 - 0.709000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sr - 38 38 0.0000 - 0.702000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sr+2 - 38 36 0.0000 - 0.702000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Y - 39 39 0.0000 - 0.775000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Y+3 - 39 36 0.0000 - 0.775000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Zr - 40 40 0.0000 - 0.716000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Zr+4 - 40 36 0.0000 - 0.716000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Nb - 41 41 0.0000 - 0.795400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Nb+3 - 41 38 0.0000 - 0.795400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Nb+5 - 41 36 0.0000 - 0.795400 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mo - 42 42 0.0000 - 0.671500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mo+3 - 42 39 0.0000 - 0.671500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mo+5 - 42 37 0.0000 - 0.671500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Mo+6 - 42 36 0.0000 - 0.671500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Tc - 43 43 0.0000 - 0.680000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ru - 44 44 0.0000 - 0.703000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ru+3 - 44 41 0.0000 - 0.703000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ru+4 - 44 40 0.0000 - 0.703000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Rh - 45 45 0.0000 - 0.588000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Rh+3 - 45 42 0.0000 - 0.588000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Rh+4 - 45 41 0.0000 - 0.588000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pd - 46 46 0.0000 - 0.591000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pd+2 - 46 44 0.0000 - 0.591000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pd+4 - 46 42 0.0000 - 0.592200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ag - 47 47 0.0000 - 0.591000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ag+1 - 47 46 0.0000 - 0.592200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ag+2 - 47 45 0.0000 - 0.592200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cd - 48 48 0.0000 - 0.487000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.070000 0.000000 0.000000 -Cd+2 - 48 46 0.0000 - 0.487000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.070000 0.000000 0.000000 -In - 49 49 0.0000 - 0.406500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.005390 0.000000 0.000000 -In+3 - 49 46 0.0000 - 0.406500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.005390 0.000000 0.000000 -Sn - 50 50 0.0000 - 0.622500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sn+2 - 50 48 0.0000 - 0.622500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sn+4 - 50 46 0.0000 - 0.622500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sb - 51 51 0.0000 - 0.557000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sb+3 - 51 48 0.0000 - 0.557000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sb+5 - 51 46 0.0000 - 0.557000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Te - 52 52 0.0000 - 0.580000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -I - 53 53 0.0000 - 0.528000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -I-1 - 53 54 0.0000 - 0.528000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Xe - 54 54 0.0000 - 0.492000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cs - 55 55 0.0000 - 0.542000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Cs+1 - 55 54 0.0000 - 0.542000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ba - 56 56 0.0000 - 0.507000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ba+2 - 56 54 0.0000 - 0.507000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -La - 57 57 0.0000 - 0.824000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -La+3 - 57 54 0.0000 - 0.824000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ce - 58 58 0.0000 - 0.484000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ce+3 - 58 55 0.0000 - 0.484000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ce+4 - 58 54 0.0000 - 0.484000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pr - 59 59 0.0000 - 0.458000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pr+3 - 59 56 0.0000 - 0.458000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pr+4 - 59 55 0.0000 - 0.458000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Nd - 60 60 0.0000 - 0.769000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Nd+3 - 60 57 0.0000 - 0.769000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pm - 61 61 0.0000 - 1.260000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pm+3 - 61 58 0.0000 - 1.260000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Sm - 62 62 0.0000 - 0.08000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.165000 0.000000 0.000000 -Sm+3 - 62 58 0.0000 - 0.080000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.165000 0.000000 0.000000 -Eu - 63 63 0.0000 - 0.722000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.126000 0.000000 0.000000 -Eu+2 - 63 61 0.0000 - 0.722000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.126000 0.000000 0.000000 -Eu+3 - 63 60 0.0000 - 0.722000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.126000 0.000000 0.000000 -Gd - 64 64 0.0000 - 0.650000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -1.382000 0.000000 0.000000 -Gd+3 - 64 61 0.0000 - 0.650000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -1.382000 0.000000 0.000000 -Tb - 65 65 0.0000 - 0.738000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Tb+3 - 65 62 0.0000 - 0.738000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Dy - 66 66 0.0000 - 1.690000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.027600 0.000000 0.000000 -Dy+3 - 66 63 0.0000 - 1.690000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 -0.027600 0.000000 0.000000 -Ho - 67 67 0.0000 - 0.801000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ho+3 - 67 64 0.0000 - 0.801000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Er - 68 68 0.0000 - 0.779000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Er+3 - 68 65 0.0000 - 0.779000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Tm - 69 69 0.0000 - 0.707000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Tm+3 - 69 66 0.0000 - 0.707000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Yb - 70 70 0.0000 - 1.243000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Yb+2 - 70 68 0.0000 - 1.243000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Yb+3 - 70 67 0.0000 - 1.243000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Lu - 71 71 0.0000 - 0.721000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Lu+3 - 71 68 0.0000 - 0.721000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Hf - 72 72 0.0000 - 0.770000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Hf+4 - 72 68 0.0000 - 0.770000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ta - 73 73 0.0000 - 0.691000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ta+5 - 73 68 0.0000 - 0.691000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -W - 74 74 0.0000 - 0.486000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -W+6 - 74 68 0.0000 - 0.486000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Re - 75 75 0.0000 - 0.920000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Os - 76 76 0.0000 - 1.070000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Os+4 - 76 72 0.0000 - 1.070000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ir - 77 77 0.0000 - 1.060000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ir+3 - 77 74 0.0000 - 1.060000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ir+4 - 77 73 0.0000 - 1.060000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pt - 78 78 0.0000 - 0.960000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pt+2 - 78 76 0.0000 - 0.960000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pt+4 - 78 74 0.0000 - 0.960000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Au - 79 79 0.0000 - 0.763000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Au+1 - 79 78 0.0000 - 0.763000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Au+3 - 79 76 0.0000 - 0.763000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Hg - 80 80 0.0000 - 1.269200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Hg+1 - 80 79 0.0000 - 1.269200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Hg+2 - 80 78 0.0000 - 1.269200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Tl - 81 81 0.0000 - 0.877600 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Tl+1 - 81 80 0.0000 - 0.877600 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Tl+3 - 81 78 0.0000 - 0.877600 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pb - 82 82 0.0000 - 0.940500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pb+2 - 82 80 0.0000 - 0.940500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pb+4 - 82 78 0.0000 - 0.940500 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Bi - 83 83 0.0000 - 0.853200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Bi+3 - 83 80 0.0000 - 0.853200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Bi+5 - 83 78 0.0000 - 0.853200 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ra - 88 88 0.0000 - 1.00000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Ra+2 - 88 86 0.0000 - 1.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Th - 90 90 0.0000 - 1.031000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Th+4 - 90 86 0.0000 - 1.031000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Pa - 91 91 0.0000 - 0.910000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -U - 92 92 0.0000 - 1.010000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -U+3 - 92 89 0.0000 - 1.010000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -U+4 - 92 88 0.0000 - 1.010000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -U+6 - 92 86 0.0000 - 1.010000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Np - 93 93 0.0000 - 1.055000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Np+3 - 93 90 0.0000 - 1.055000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Np+4 - 93 89 0.0000 - 1.055000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Np+6 - 93 87 0.0000 - 1.055000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 -Am - 95 95 0.0000 - 0.830000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 diff --git a/ccp4c/data/font84.ascii b/ccp4c/data/font84.ascii deleted file mode 100644 index 0b2e9dd0..00000000 --- a/ccp4c/data/font84.ascii +++ /dev/null @@ -1,5160 +0,0 @@ - 0 1222 1259 1867 1833 1716 1742 1257 1279 1295 - 1275 1363 1198 1362 1194 1278 889 923 928 965 - 1004 1009 1038 1080 1101 1152 1204 1212 1394 1386 - 1396 1231 1785 1 7 40 68 90 100 108 - 138 147 151 165 174 180 190 197 235 254 - 308 339 369 377 392 397 405 412 420 1311 - 2132 1315 1445 2133 1475 428 459 482 506 530 - 555 569 617 631 639 656 665 669 693 707 - 737 761 784 797 825 835 849 854 862 869 - 881 1319 1359 1337 1425 0 1263 1355 1357 1360 - 1365 1371 1373 1377 1388 1391 1398 1402 1406 1449 - 1452 1455 1469 1475 1481 1487 1493 1497 1508 1519 - 1530 1541 1553 1558 1563 1568 1573 1611 1616 1620 - 1648 1692 1871 1909 1927 1961 1965 1993 2022 2041 - 2060 2094 2128 0 0 0 0 0 0 0 - 0 2033 2334 0 2194 0 2134 2329 2240 2264 - 2288 2313 1965 2309 1953 2236 1564 1612 1622 1662 - 1714 1721 1756 1807 1832 1902 1981 2005 0 2321 - 0 2055 0 1 15 59 94 129 159 185 - 230 257 270 299 323 340 364 379 425 455 - 517 559 597 615 641 654 677 695 714 0 - 0 0 0 2368 0 727 765 803 831 873 - 900 937 982 1007 1030 1063 1094 1110 1153 1183 - 1219 1263 1298 1320 1357 1372 1402 1425 1461 1502 - 1539 0 0 0 0 0 2344 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 2102 2118 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 1873 2047 0 1971 0 1922 2045 2005 2021 - 2037 2041 1850 2040 1846 2004 1543 1579 1586 1620 - 1662 1666 1695 1735 1755 1806 1856 1863 0 2043 - 0 1882 0 1 31 89 126 165 206 244 - 289 336 365 395 442 478 515 545 575 620 - 659 712 744 776 807 839 868 914 948 0 - 0 0 0 0 0 986 1011 1028 1046 1071 - 1090 1113 1143 1163 1176 1194 1213 1224 1257 1281 - 1306 1326 1353 1369 1385 1397 1416 1433 1459 1489 - 1513 0 0 0 0 0 2051 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1910 1916 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 256 0 0 0 - 0 477 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 305 1 4 145 24 27 128 22 - 34 58 0 59 62 64 68 74 94 37 - 97 107 111 113 147 161 71 0 31 0 - 0 0 0 0 0 176 196 496 234 541 - 572 221 290 330 0 337 350 355 370 403 - 419 553 426 589 459 463 506 522 380 0 - 271 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 9 4 4 34 26 43 2 16 16 - 3 2 6 1 4 1 34 5 37 39 - 5 29 42 21 51 42 8 10 2 2 - 2 26 48 6 33 28 22 10 8 30 - 9 4 14 9 6 10 7 38 19 54 - 31 30 8 15 5 8 7 8 8 4 - 1 4 4 1 6 31 23 24 24 25 - 14 48 14 8 17 9 4 24 14 30 - 24 23 13 28 10 14 5 8 7 12 - 8 18 1 18 20 0 12 2 2 2 - 3 2 4 9 3 3 4 4 19 3 - 3 14 6 6 6 6 4 11 11 11 - 11 12 5 5 5 5 38 5 4 28 - 44 24 38 18 34 4 28 29 19 19 - 34 34 4 0 0 0 0 0 0 0 - 0 22 10 0 42 0 60 5 24 24 - 21 8 16 4 12 4 48 10 40 52 - 7 35 51 25 70 51 24 28 0 8 - 0 47 0 14 44 35 35 30 26 45 - 27 13 29 24 17 24 15 46 30 62 - 42 38 18 26 13 23 18 19 13 0 - 0 0 0 1 0 38 38 28 42 27 - 37 45 25 23 33 31 16 43 30 36 - 44 35 22 37 15 30 23 36 41 37 - 25 0 0 0 0 0 24 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 16 16 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 9 4 0 33 0 49 2 16 16 - 3 2 6 1 4 1 36 7 34 42 - 4 29 40 20 51 40 7 10 0 2 - 0 28 0 30 58 37 39 41 38 45 - 47 29 30 47 36 37 30 30 45 39 - 53 32 32 31 32 29 46 34 38 0 - 0 0 0 0 0 25 17 18 25 19 - 23 30 20 13 18 19 11 33 24 25 - 20 27 16 16 12 19 17 26 30 24 - 30 0 0 0 0 0 12 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 6 6 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 15 0 0 0 - 0 19 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 25 3 18 2 3 4 17 2 - 3 1 0 3 2 4 3 20 3 21 - 10 4 2 15 14 15 3 0 3 0 - 0 0 0 0 0 20 25 10 22 12 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 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 10 16 21 20 24 25 8 14 14 - 16 26 10 26 10 22 20 20 20 20 - 20 20 20 20 20 20 10 10 24 26 - 24 18 27 20 22 21 22 21 20 23 - 24 11 15 22 18 25 23 22 22 22 - 22 20 19 24 20 24 20 21 20 14 - 22 14 22 21 10 20 21 19 21 19 - 13 19 22 11 11 21 11 33 22 20 - 21 20 17 17 15 22 18 24 20 19 - 18 14 8 14 24 0 14 14 14 14 - 24 22 10 26 26 26 24 24 25 12 - 12 20 10 10 10 10 22 24 24 24 - 24 24 26 16 26 16 19 20 33 24 - 24 25 16 16 16 19 20 23 22 22 - 33 33 11 0 0 0 0 0 0 0 - 0 11 20 0 21 0 26 10 16 16 - 17 25 11 25 11 23 21 21 21 21 - 21 21 21 21 21 21 11 11 0 25 - 0 21 0 20 24 21 23 23 22 22 - 26 14 19 23 20 28 25 22 23 22 - 24 23 22 25 20 26 22 22 22 0 - 0 0 0 21 0 22 19 18 22 18 - 16 21 22 13 13 22 12 35 24 20 - 22 21 18 17 14 24 20 30 22 22 - 20 0 0 0 0 0 15 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 11 11 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 11 18 0 21 0 26 9 15 15 - 17 26 11 26 11 22 21 21 21 21 - 21 21 21 21 21 21 11 11 0 26 - 0 21 0 23 24 21 23 19 21 22 - 24 16 17 24 18 28 23 21 23 21 - 24 20 18 22 21 23 20 22 21 0 - 0 0 0 0 0 16 14 12 16 12 - 9 16 15 8 8 14 8 25 18 14 - 15 16 14 12 8 16 15 21 16 16 - 13 0 0 0 0 0 15 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 11 11 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 16 0 0 0 - 0 22 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 21 18 21 20 18 19 20 17 - 22 8 0 21 18 24 22 22 22 22 - 21 18 16 18 22 20 18 0 20 0 - 0 0 0 0 0 21 19 18 18 16 - 20 19 20 11 0 18 16 21 18 17 - 22 17 18 18 20 20 23 23 16 0 - 15 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 12 12 12 16 12 12 12 16 16 - 12 9 -7 0 -7 16 12 12 12 12 - 12 12 12 12 12 12 5 5 9 3 - 9 12 12 12 12 12 12 12 12 12 - 12 12 12 12 12 12 12 12 12 12 - 12 12 12 12 12 12 12 12 12 16 - 16 16 3 -13 12 5 12 5 12 5 - 12 5 12 12 12 12 12 5 5 5 - 5 5 5 5 12 5 5 5 5 5 - 5 16 16 16 3 0 12 16 16 16 - 8 7 1 9 9 5 12 12 5 12 - 12 12 12 12 12 12 16 8 8 8 - 8 8 5 9 5 9 12 12 24 16 - 16 4 12 12 12 12 9 12 12 12 - 12 12 5 0 0 0 0 0 0 0 - 0 12 12 0 16 0 12 12 16 16 - 12 9 -6 1 -6 16 12 12 12 12 - 12 12 12 12 12 12 5 5 0 5 - 0 12 0 12 12 12 12 12 12 12 - 12 12 12 12 12 12 12 12 12 12 - 12 12 12 12 12 12 12 12 12 0 - 0 0 0 -13 0 5 12 5 12 5 - 12 5 12 12 12 12 12 5 5 5 - 5 5 5 5 12 5 5 5 5 5 - 5 0 0 0 0 0 12 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 12 12 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 12 12 0 16 0 12 12 16 16 - 12 9 -7 0 -7 16 12 12 12 12 - 12 12 12 12 12 12 5 5 0 3 - 0 12 0 12 12 12 12 12 12 12 - 12 12 12 12 12 12 12 12 12 12 - 12 12 12 12 12 12 12 12 12 0 - 0 0 0 0 0 0 12 0 12 0 - 12 0 12 6 6 12 12 0 0 0 - 6 0 0 1 12 0 0 0 0 0 - 0 0 0 0 0 0 12 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 12 12 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 5 0 0 0 - 0 5 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 12 12 12 12 12 12 12 12 - 12 12 0 12 12 12 12 12 12 12 - 12 12 12 12 12 12 12 0 12 0 - 0 0 0 0 0 5 12 5 12 5 - 12 5 5 5 0 5 12 5 5 5 - 5 12 5 5 5 5 12 5 12 0 - 12 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 10 22 3 1 10 22 17 1 10 19 - 16 1 5 7 14 7 1 1 7 1 - 13 1 19 1 4 22 4 1 5 22 - 5 1 1 22 13 22 13 22 16 21 - 16 21 17 20 17 20 18 18 18 18 - 18 16 18 16 17 14 17 14 16 13 - 16 13 13 12 13 22 15 21 15 21 - 16 20 16 20 17 18 17 18 17 16 - 17 16 16 14 16 14 15 13 15 13 - 13 12 5 12 13 12 13 12 16 11 - 16 11 17 10 17 10 18 8 18 8 - 18 5 18 5 17 3 17 3 16 2 - 16 2 13 1 13 1 1 1 13 12 - 15 11 15 11 16 10 16 10 17 8 - 17 8 17 5 17 5 16 3 16 3 - 15 2 15 2 13 1 15 19 16 16 - 16 16 16 22 16 22 15 19 15 19 - 13 21 13 21 10 22 10 22 8 22 - 8 22 5 21 5 21 3 19 3 19 - 2 17 2 17 1 14 1 14 1 9 - 1 9 2 6 2 6 3 4 3 4 - 5 2 5 2 8 1 8 1 10 1 - 10 1 13 2 13 2 15 4 15 4 - 16 6 8 22 6 21 6 21 4 19 - 4 19 3 17 3 17 2 14 2 14 - 2 9 2 9 3 6 3 6 4 4 - 4 4 6 2 6 2 8 1 4 22 - 4 1 5 22 5 1 1 22 11 22 - 11 22 14 21 14 21 16 19 16 19 - 17 17 17 17 18 14 18 14 18 9 - 18 9 17 6 17 6 16 4 16 4 - 14 2 14 2 11 1 11 1 1 1 - 11 22 13 21 13 21 15 19 15 19 - 16 17 16 17 17 14 17 14 17 9 - 17 9 16 6 16 6 15 4 15 4 - 13 2 13 2 11 1 4 22 4 1 - 5 22 5 1 11 16 11 8 1 22 - 17 22 17 22 17 16 17 16 16 22 - 5 12 11 12 1 1 17 1 17 1 - 17 7 17 7 16 1 4 22 4 1 - 5 22 5 1 11 16 11 8 1 22 - 17 22 17 22 17 16 17 16 16 22 - 5 12 11 12 1 1 8 1 15 19 - 16 16 16 16 16 22 16 22 15 19 - 15 19 13 21 13 21 10 22 10 22 - 8 22 8 22 5 21 5 21 3 19 - 3 19 2 17 2 17 1 14 1 14 - 1 9 1 9 2 6 2 6 3 4 - 3 4 5 2 5 2 8 1 8 1 - 10 1 10 1 13 2 13 2 15 4 - 8 22 6 21 6 21 4 19 4 19 - 3 17 3 17 2 14 2 14 2 9 - 2 9 3 6 3 6 4 4 4 4 - 6 2 6 2 8 1 15 9 15 1 - 16 9 16 1 12 9 19 9 4 22 - 4 1 5 22 5 1 17 22 17 1 - 18 22 18 1 1 22 8 22 14 22 - 21 22 5 12 17 12 1 1 8 1 - 14 1 21 1 4 22 4 1 5 22 - 5 1 1 22 8 22 1 1 8 1 - 9 22 9 5 9 5 8 2 8 2 - 6 1 6 1 4 1 4 1 2 2 - 2 2 1 4 1 4 1 6 1 6 - 2 7 2 7 3 6 3 6 2 5 - 8 22 8 5 8 5 7 2 7 2 - 6 1 5 22 12 22 4 22 4 1 - 5 22 5 1 18 22 5 9 10 13 - 18 1 9 13 17 1 1 22 8 22 - 14 22 20 22 1 1 8 1 14 1 - 20 1 4 22 4 1 5 22 5 1 - 1 22 8 22 1 1 16 1 16 1 - 16 7 16 7 15 1 4 22 4 1 - 5 22 11 4 4 22 11 1 18 22 - 11 1 18 22 18 1 19 22 19 1 - 1 22 5 22 18 22 22 22 1 1 - 7 1 15 1 22 1 4 22 4 1 - 5 22 17 3 5 20 17 1 17 22 - 17 1 1 22 5 22 14 22 20 22 - 1 1 7 1 8 22 5 21 5 21 - 3 19 3 19 2 17 2 17 1 13 - 1 13 1 10 1 10 2 6 2 6 - 3 4 3 4 5 2 5 2 8 1 - 8 1 10 1 10 1 13 2 13 2 - 15 4 15 4 16 6 16 6 17 10 - 17 10 17 13 17 13 16 17 16 17 - 15 19 15 19 13 21 13 21 10 22 - 10 22 8 22 8 22 6 21 6 21 - 4 19 4 19 3 17 3 17 2 13 - 2 13 2 10 2 10 3 6 3 6 - 4 4 4 4 6 2 6 2 8 1 - 10 1 12 2 12 2 14 4 14 4 - 15 6 15 6 16 10 16 10 16 13 - 16 13 15 17 15 17 14 19 14 19 - 12 21 12 21 10 22 4 22 4 1 - 5 22 5 1 1 22 13 22 13 22 - 16 21 16 21 17 20 17 20 18 18 - 18 18 18 15 18 15 17 13 17 13 - 16 12 16 12 13 11 13 11 5 11 - 13 22 15 21 15 21 16 20 16 20 - 17 18 17 18 17 15 17 15 16 13 - 16 13 15 12 15 12 13 11 1 1 - 8 1 8 27 5 26 5 26 3 24 - 3 24 2 22 2 22 1 18 1 18 - 1 15 1 15 2 11 2 11 3 9 - 3 9 5 7 5 7 8 6 8 6 - 10 6 10 6 13 7 13 7 15 9 - 15 9 16 11 16 11 17 15 17 15 - 17 18 17 18 16 22 16 22 15 24 - 15 24 13 26 13 26 10 27 10 27 - 8 27 8 27 6 26 6 26 4 24 - 4 24 3 22 3 22 2 18 2 18 - 2 15 2 15 3 11 3 11 4 9 - 4 9 6 7 6 7 8 6 10 6 - 12 7 12 7 14 9 14 9 15 11 - 15 11 16 15 16 15 16 18 16 18 - 15 22 15 22 14 24 14 24 12 26 - 12 26 10 27 5 8 5 9 5 9 - 6 11 6 11 8 12 8 12 9 12 - 9 12 11 11 11 11 12 9 12 9 - 13 2 13 2 14 1 14 1 16 1 - 16 1 17 3 17 3 17 4 12 9 - 13 5 13 5 14 3 14 3 15 2 - 15 2 16 2 16 2 17 3 4 22 - 4 1 5 22 5 1 1 22 13 22 - 13 22 16 21 16 21 17 20 17 20 - 18 18 18 18 18 16 18 16 17 14 - 17 14 16 13 16 13 13 12 13 12 - 5 12 13 22 15 21 15 21 16 20 - 16 20 17 18 17 18 17 16 17 16 - 16 14 16 14 15 13 15 13 13 12 - 1 1 8 1 10 12 12 11 12 11 - 13 10 13 10 16 3 16 3 17 2 - 17 2 18 2 18 2 19 3 12 11 - 13 9 13 9 15 2 15 2 16 1 - 16 1 18 1 18 1 19 3 19 3 - 19 4 14 19 15 22 15 22 15 16 - 15 16 14 19 14 19 12 21 12 21 - 9 22 9 22 6 22 6 22 3 21 - 3 21 1 19 1 19 1 17 1 17 - 2 15 2 15 3 14 3 14 5 13 - 5 13 11 11 11 11 13 10 13 10 - 15 8 1 17 3 15 3 15 5 14 - 5 14 11 12 11 12 13 11 13 11 - 14 10 14 10 15 8 15 8 15 4 - 15 4 13 2 13 2 10 1 10 1 - 7 1 7 1 4 2 4 2 2 4 - 2 4 1 7 1 7 1 1 1 1 - 2 4 8 22 8 1 9 22 9 1 - 2 22 1 16 1 16 1 22 1 22 - 16 22 16 22 16 16 16 16 15 22 - 5 1 12 1 4 22 4 7 4 7 - 5 4 5 4 7 2 7 2 10 1 - 10 1 12 1 12 1 15 2 15 2 - 17 4 17 4 18 7 18 7 18 22 - 5 22 5 7 5 7 6 4 6 4 - 8 2 8 2 10 1 1 22 8 22 - 15 22 21 22 3 22 10 1 4 22 - 10 4 17 22 10 1 1 22 7 22 - 13 22 19 22 4 22 8 1 5 22 - 8 6 12 22 8 1 12 22 16 1 - 13 22 16 6 20 22 16 1 1 22 - 8 22 17 22 23 22 3 22 16 1 - 4 22 17 1 17 22 3 1 1 22 - 7 22 13 22 19 22 1 1 7 1 - 13 1 19 1 3 22 10 11 10 11 - 10 1 4 22 11 11 11 11 11 1 - 18 22 11 11 1 22 7 22 14 22 - 20 22 7 1 14 1 14 22 1 1 - 15 22 2 1 2 22 1 16 1 16 - 1 22 1 22 15 22 1 1 15 1 - 15 1 15 7 15 7 14 1 3 13 - 3 12 3 12 2 12 2 12 2 13 - 2 13 3 14 3 14 5 15 5 15 - 9 15 9 15 11 14 11 14 12 13 - 12 13 13 11 13 11 13 4 13 4 - 14 2 14 2 15 1 12 13 12 4 - 12 4 13 2 13 2 15 1 15 1 - 16 1 12 11 11 10 11 10 5 9 - 5 9 2 8 2 8 1 6 1 6 - 1 4 1 4 2 2 2 2 5 1 - 5 1 8 1 8 1 10 2 10 2 - 12 4 5 9 3 8 3 8 2 6 - 2 6 2 4 2 4 3 2 3 2 - 5 1 4 22 4 1 5 22 5 1 - 5 12 7 14 7 14 9 15 9 15 - 11 15 11 15 14 14 14 14 16 12 - 16 12 17 9 17 9 17 7 17 7 - 16 4 16 4 14 2 14 2 11 1 - 11 1 9 1 9 1 7 2 7 2 - 5 4 11 15 13 14 13 14 15 12 - 15 12 16 9 16 9 16 7 16 7 - 15 4 15 4 13 2 13 2 11 1 - 1 22 5 22 13 12 12 11 12 11 - 13 10 13 10 14 11 14 11 14 12 - 14 12 12 14 12 14 10 15 10 15 - 7 15 7 15 4 14 4 14 2 12 - 2 12 1 9 1 9 1 7 1 7 - 2 4 2 4 4 2 4 2 7 1 - 7 1 9 1 9 1 12 2 12 2 - 14 4 7 15 5 14 5 14 3 12 - 3 12 2 9 2 9 2 7 2 7 - 3 4 3 4 5 2 5 2 7 1 - 13 22 13 1 14 22 14 1 13 12 - 11 14 11 14 9 15 9 15 7 15 - 7 15 4 14 4 14 2 12 2 12 - 1 9 1 9 1 7 1 7 2 4 - 2 4 4 2 4 2 7 1 7 1 - 9 1 9 1 11 2 11 2 13 4 - 7 15 5 14 5 14 3 12 3 12 - 2 9 2 9 2 7 2 7 3 4 - 3 4 5 2 5 2 7 1 10 22 - 14 22 13 1 17 1 2 9 14 9 - 14 9 14 11 14 11 13 13 13 13 - 12 14 12 14 10 15 10 15 7 15 - 7 15 4 14 4 14 2 12 2 12 - 1 9 1 9 1 7 1 7 2 4 - 2 4 4 2 4 2 7 1 7 1 - 9 1 9 1 12 2 12 2 14 4 - 13 9 13 12 13 12 12 14 7 15 - 5 14 5 14 3 12 3 12 2 9 - 2 9 2 7 2 7 3 4 3 4 - 5 2 5 2 7 1 9 21 8 20 - 8 20 9 19 9 19 10 20 10 20 - 10 21 10 21 9 22 9 22 7 22 - 7 22 5 21 5 21 4 19 4 19 - 4 1 7 22 6 21 6 21 5 19 - 5 19 5 1 1 15 9 15 1 1 - 8 1 7 22 5 21 5 21 4 20 - 4 20 3 18 3 18 3 16 3 16 - 4 14 4 14 5 13 5 13 7 12 - 7 12 9 12 9 12 11 13 11 13 - 12 14 12 14 13 16 13 16 13 18 - 13 18 12 20 12 20 11 21 11 21 - 9 22 9 22 7 22 5 21 4 19 - 4 19 4 15 4 15 5 13 11 13 - 12 15 12 15 12 19 12 19 11 21 - 12 20 13 21 13 21 15 22 15 22 - 15 21 15 21 13 21 4 14 3 13 - 3 13 2 11 2 11 2 10 2 10 - 3 8 3 8 6 7 6 7 11 7 - 11 7 14 6 14 6 15 5 2 10 - 3 9 3 9 6 8 6 8 11 8 - 11 8 14 7 14 7 15 5 15 5 - 15 4 15 4 14 2 14 2 11 1 - 11 1 5 1 5 1 2 2 2 2 - 1 4 1 4 1 5 1 5 2 7 - 2 7 5 8 4 22 4 1 5 22 - 5 1 5 12 7 14 7 14 10 15 - 10 15 12 15 12 15 15 14 15 14 - 16 12 16 12 16 1 12 15 14 14 - 14 14 15 12 15 12 15 1 1 22 - 5 22 1 1 8 1 12 1 19 1 - 4 22 3 21 3 21 4 20 4 20 - 5 21 5 21 4 22 4 15 4 1 - 5 15 5 1 1 15 5 15 1 1 - 8 1 6 29 5 28 5 28 6 27 - 6 27 7 28 7 28 6 29 7 22 - 7 4 7 4 6 2 6 2 4 1 - 4 1 2 1 2 1 1 2 1 2 - 1 3 1 3 2 4 2 4 3 3 - 3 3 2 2 6 22 6 4 6 4 - 5 2 5 2 4 1 3 22 7 22 - 4 22 4 1 5 22 5 1 15 15 - 5 5 10 9 16 1 9 9 15 1 - 1 22 5 22 12 15 18 15 1 1 - 8 1 12 1 18 1 4 22 4 1 - 5 22 5 1 1 22 5 22 1 1 - 8 1 4 15 4 1 5 15 5 1 - 5 12 7 14 7 14 10 15 10 15 - 12 15 12 15 15 14 15 14 16 12 - 16 12 16 1 12 15 14 14 14 14 - 15 12 15 12 15 1 16 12 18 14 - 18 14 21 15 21 15 23 15 23 15 - 26 14 26 14 27 12 27 12 27 1 - 23 15 25 14 25 14 26 12 26 12 - 26 1 1 15 5 15 1 1 8 1 - 12 1 19 1 23 1 30 1 4 15 - 4 1 5 15 5 1 5 12 7 14 - 7 14 10 15 10 15 12 15 12 15 - 15 14 15 14 16 12 16 12 16 1 - 12 15 14 14 14 14 15 12 15 12 - 15 1 1 15 5 15 1 1 8 1 - 12 1 19 1 7 15 4 14 4 14 - 2 12 2 12 1 9 1 9 1 7 - 1 7 2 4 2 4 4 2 4 2 - 7 1 7 1 9 1 9 1 12 2 - 12 2 14 4 14 4 15 7 15 7 - 15 9 15 9 14 12 14 12 12 14 - 12 14 9 15 9 15 7 15 7 15 - 5 14 5 14 3 12 3 12 2 9 - 2 9 2 7 2 7 3 4 3 4 - 5 2 5 2 7 1 9 1 11 2 - 11 2 13 4 13 4 14 7 14 7 - 14 9 14 9 13 12 13 12 11 14 - 11 14 9 15 4 22 4 1 5 22 - 5 1 5 19 7 21 7 21 9 22 - 9 22 11 22 11 22 14 21 14 21 - 16 19 16 19 17 16 17 16 17 14 - 17 14 16 11 16 11 14 9 14 9 - 11 8 11 8 9 8 9 8 7 9 - 7 9 5 11 11 22 13 21 13 21 - 15 19 15 19 16 16 16 16 16 14 - 16 14 15 11 15 11 13 9 13 9 - 11 8 1 22 5 22 1 1 8 1 - 13 22 13 1 14 22 14 1 13 19 - 11 21 11 21 9 22 9 22 7 22 - 7 22 4 21 4 21 2 19 2 19 - 1 16 1 16 1 14 1 14 2 11 - 2 11 4 9 4 9 7 8 7 8 - 9 8 9 8 11 9 11 9 13 11 - 7 22 5 21 5 21 3 19 3 19 - 2 16 2 16 2 14 2 14 3 11 - 3 11 5 9 5 9 7 8 10 1 - 17 1 4 15 4 1 5 15 5 1 - 5 9 6 12 6 12 8 14 8 14 - 10 15 10 15 13 15 13 15 14 14 - 14 14 14 13 14 13 13 12 13 12 - 12 13 12 13 13 14 1 15 5 15 - 1 1 8 1 11 13 12 15 12 15 - 12 11 12 11 11 13 11 13 10 14 - 10 14 8 15 8 15 4 15 4 15 - 2 14 2 14 1 13 1 13 1 11 - 1 11 2 10 2 10 4 9 4 9 - 9 7 9 7 11 6 11 6 12 5 - 1 12 2 11 2 11 4 10 4 10 - 9 8 9 8 11 7 11 7 12 6 - 12 6 12 3 12 3 11 2 11 2 - 9 1 9 1 5 1 5 1 3 2 - 3 2 2 3 2 3 1 5 1 5 - 1 1 1 1 2 3 4 22 4 5 - 4 5 5 2 5 2 7 1 7 1 - 9 1 9 1 11 2 11 2 12 4 - 5 22 5 5 5 5 6 2 6 2 - 7 1 1 15 9 15 4 15 4 4 - 4 4 5 2 5 2 8 1 8 1 - 10 1 10 1 13 2 13 2 15 4 - 5 15 5 4 5 4 6 2 6 2 - 8 1 15 15 15 1 16 15 16 1 - 1 15 5 15 12 15 16 15 15 1 - 19 1 3 15 9 1 4 15 9 3 - 15 15 9 1 1 15 7 15 11 15 - 17 15 4 15 8 1 5 15 8 4 - 12 15 8 1 12 15 16 1 13 15 - 16 4 20 15 16 1 1 15 8 15 - 17 15 23 15 3 15 14 1 4 15 - 15 1 15 15 3 1 1 15 7 15 - 11 15 17 15 1 1 7 1 11 1 - 17 1 3 22 9 8 4 22 9 10 - 15 22 9 8 9 8 7 4 7 4 - 5 2 5 2 3 1 3 1 2 1 - 2 1 1 2 1 2 2 3 2 3 - 3 2 1 22 7 22 11 22 17 22 - 12 15 1 1 13 15 2 1 2 15 - 1 11 1 11 1 15 1 15 13 15 - 1 1 13 1 13 1 13 5 13 5 - 12 1 7 22 4 21 4 21 2 18 - 2 18 1 13 1 13 1 10 1 10 - 2 5 2 5 4 2 4 2 7 1 - 7 1 9 1 9 1 12 2 12 2 - 14 5 14 5 15 10 15 10 15 13 - 15 13 14 18 14 18 12 21 12 21 - 9 22 9 22 7 22 7 22 5 21 - 5 21 4 20 4 20 3 18 3 18 - 2 13 2 13 2 10 2 10 3 5 - 3 5 4 3 4 3 5 2 5 2 - 7 1 9 1 11 2 11 2 12 3 - 12 3 13 5 13 5 14 10 14 10 - 14 13 14 13 13 18 13 18 12 20 - 12 20 11 21 11 21 9 22 1 18 - 3 19 3 19 6 22 6 22 6 1 - 5 21 5 1 1 1 10 1 2 18 - 3 17 3 17 2 16 2 16 1 17 - 1 17 1 18 1 18 2 20 2 20 - 3 21 3 21 6 22 6 22 10 22 - 10 22 13 21 13 21 14 20 14 20 - 15 18 15 18 15 16 15 16 14 14 - 14 14 11 12 11 12 6 10 6 10 - 4 9 4 9 2 7 2 7 1 4 - 1 4 1 1 10 22 12 21 12 21 - 13 20 13 20 14 18 14 18 14 16 - 14 16 13 14 13 14 10 12 10 12 - 6 10 1 3 2 4 2 4 4 4 - 4 4 9 2 9 2 12 2 12 2 - 14 3 14 3 15 4 4 4 9 1 - 9 1 13 1 13 1 14 2 14 2 - 15 4 15 4 15 6 2 18 3 17 - 3 17 2 16 2 16 1 17 1 17 - 1 18 1 18 2 20 2 20 3 21 - 3 21 6 22 6 22 10 22 10 22 - 13 21 13 21 14 19 14 19 14 16 - 14 16 13 14 13 14 10 13 10 13 - 7 13 10 22 12 21 12 21 13 19 - 13 19 13 16 13 16 12 14 12 14 - 10 13 10 13 12 12 12 12 14 10 - 14 10 15 8 15 8 15 5 15 5 - 14 3 14 3 13 2 13 2 10 1 - 10 1 6 1 6 1 3 2 3 2 - 2 3 2 3 1 5 1 5 1 6 - 1 6 2 7 2 7 3 6 3 6 - 2 5 13 11 14 8 14 8 14 5 - 14 5 13 3 13 3 12 2 12 2 - 10 1 11 20 11 1 12 22 12 1 - 12 22 1 7 1 7 17 7 8 1 - 15 1 3 22 1 12 1 12 3 14 - 3 14 6 15 6 15 9 15 9 15 - 12 14 12 14 14 12 14 12 15 9 - 15 9 15 7 15 7 14 4 14 4 - 12 2 12 2 9 1 9 1 6 1 - 6 1 3 2 3 2 2 3 2 3 - 1 5 1 5 1 6 1 6 2 7 - 2 7 3 6 3 6 2 5 9 15 - 11 14 11 14 13 12 13 12 14 9 - 14 9 14 7 14 7 13 4 13 4 - 11 2 11 2 9 1 3 22 13 22 - 3 21 8 21 8 21 13 22 13 19 - 12 18 12 18 13 17 13 17 14 18 - 14 18 14 19 14 19 13 21 13 21 - 11 22 11 22 8 22 8 22 5 21 - 5 21 3 19 3 19 2 17 2 17 - 1 13 1 13 1 7 1 7 2 4 - 2 4 4 2 4 2 7 1 7 1 - 9 1 9 1 12 2 12 2 14 4 - 14 4 15 7 15 7 15 8 15 8 - 14 11 14 11 12 13 12 13 9 14 - 9 14 8 14 8 14 5 13 5 13 - 3 11 3 11 2 8 8 22 6 21 - 6 21 4 19 4 19 3 17 3 17 - 2 13 2 13 2 7 2 7 3 4 - 3 4 5 2 5 2 7 1 9 1 - 11 2 11 2 13 4 13 4 14 7 - 14 7 14 8 14 8 13 11 13 11 - 11 13 11 13 9 14 1 22 1 16 - 1 18 2 20 2 20 4 22 4 22 - 6 22 6 22 11 19 11 19 13 19 - 13 19 14 20 14 20 15 22 2 20 - 4 21 4 21 6 21 6 21 11 19 - 15 22 15 19 15 19 14 16 14 16 - 10 11 10 11 9 9 9 9 8 6 - 8 6 8 1 14 16 9 11 9 11 - 8 9 8 9 7 6 7 6 7 1 - 6 22 3 21 3 21 2 19 2 19 - 2 16 2 16 3 14 3 14 6 13 - 6 13 10 13 10 13 13 14 13 14 - 14 16 14 16 14 19 14 19 13 21 - 13 21 10 22 10 22 6 22 6 22 - 4 21 4 21 3 19 3 19 3 16 - 3 16 4 14 4 14 6 13 10 13 - 12 14 12 14 13 16 13 16 13 19 - 13 19 12 21 12 21 10 22 6 13 - 3 12 3 12 2 11 2 11 1 9 - 1 9 1 5 1 5 2 3 2 3 - 3 2 3 2 6 1 6 1 10 1 - 10 1 13 2 13 2 14 3 14 3 - 15 5 15 5 15 9 15 9 14 11 - 14 11 13 12 13 12 10 13 6 13 - 4 12 4 12 3 11 3 11 2 9 - 2 9 2 5 2 5 3 3 3 3 - 4 2 4 2 6 1 10 1 12 2 - 12 2 13 3 13 3 14 5 14 5 - 14 9 14 9 13 11 13 11 12 12 - 12 12 10 13 14 15 13 12 13 12 - 11 10 11 10 8 9 8 9 7 9 - 7 9 4 10 4 10 2 12 2 12 - 1 15 1 15 1 16 1 16 2 19 - 2 19 4 21 4 21 7 22 7 22 - 9 22 9 22 12 21 12 21 14 19 - 14 19 15 16 15 16 15 10 15 10 - 14 6 14 6 13 4 13 4 11 2 - 11 2 8 1 8 1 5 1 5 1 - 3 2 3 2 2 4 2 4 2 5 - 2 5 3 6 3 6 4 5 4 5 - 3 4 7 9 5 10 5 10 3 12 - 3 12 2 15 2 15 2 16 2 16 - 3 19 3 19 5 21 5 21 7 22 - 9 22 11 21 11 21 13 19 13 19 - 14 16 14 16 14 10 14 10 13 6 - 13 6 12 4 12 4 10 2 10 2 - 8 1 2 3 1 2 1 2 2 1 - 2 1 3 2 3 2 2 3 2 5 - 1 6 1 6 2 7 2 7 3 6 - 3 6 3 4 3 4 2 2 2 2 - 1 1 2 15 1 14 1 14 2 13 - 2 13 3 14 3 14 2 15 2 3 - 1 2 1 2 2 1 2 1 3 2 - 3 2 2 3 2 19 1 18 1 18 - 2 17 2 17 3 18 3 18 2 19 - 2 5 1 6 1 6 2 7 2 7 - 3 6 3 6 3 4 3 4 2 2 - 2 2 1 1 2 22 1 20 1 20 - 2 8 2 8 3 20 3 20 2 22 - 2 20 2 14 2 3 1 2 1 2 - 2 1 2 1 3 2 3 2 2 3 - 2 18 3 17 3 17 2 16 2 16 - 1 17 1 17 1 18 1 18 2 20 - 2 20 3 21 3 21 5 22 5 22 - 8 22 8 22 11 21 11 21 12 20 - 12 20 13 18 13 18 13 16 13 16 - 12 14 12 14 11 13 11 13 7 11 - 7 11 7 8 8 22 10 21 10 21 - 11 20 11 20 12 18 12 18 12 16 - 12 16 11 14 11 14 9 12 7 3 - 6 2 6 2 7 1 7 1 8 2 - 8 2 7 3 2 8 1 1 3 8 - 1 1 2 8 1 1 3 8 1 1 - 10 8 9 1 11 8 9 1 4 9 - 2 8 2 8 1 6 1 6 1 4 - 1 4 2 2 2 2 4 1 4 1 - 6 1 6 1 8 2 8 2 9 4 - 9 4 9 6 9 6 8 8 8 8 - 6 9 6 9 4 9 6 13 6 1 - 1 10 11 4 11 10 1 4 19 33 - 1 1 8 33 6 31 6 31 4 28 - 4 28 2 24 2 24 1 19 1 19 - 1 15 1 15 2 10 2 10 4 6 - 4 6 6 3 6 3 8 1 6 31 - 4 27 4 27 3 24 3 24 2 19 - 2 19 2 15 2 15 3 10 3 10 - 4 7 4 7 6 3 1 33 3 31 - 3 31 5 28 5 28 7 24 7 24 - 8 19 8 19 8 15 8 15 7 10 - 7 10 5 6 5 6 3 3 3 3 - 1 1 3 31 5 27 5 27 6 24 - 6 24 7 19 7 19 7 15 7 15 - 6 10 6 10 5 7 5 7 3 3 - 1 33 1 1 2 33 2 1 1 33 - 8 33 1 1 8 1 7 33 7 1 - 8 33 8 1 1 33 8 33 1 1 - 8 1 5 33 2 30 2 30 1 27 - 1 27 1 25 1 25 2 22 2 22 - 5 19 3 31 2 28 2 28 2 24 - 2 24 3 21 5 19 2 17 2 17 - 5 15 5 15 2 12 2 12 1 9 - 1 9 1 7 1 7 2 4 2 4 - 5 1 3 13 2 10 2 10 2 6 - 2 6 3 3 1 33 4 30 4 30 - 5 27 5 27 5 25 5 25 4 22 - 4 22 1 19 3 31 4 28 4 28 - 4 24 4 24 3 21 1 19 4 17 - 4 17 1 15 1 15 4 12 4 12 - 5 9 5 9 5 7 5 7 4 4 - 4 4 1 1 3 13 4 10 4 10 - 4 6 4 6 3 3 8 33 1 17 - 1 17 8 1 1 33 8 17 8 17 - 1 1 1 33 1 1 1 33 1 1 - 7 33 7 1 1 1 19 1 10 19 - 10 1 1 10 19 10 9 18 9 1 - 1 10 17 10 1 1 17 1 9 18 - 9 1 1 18 17 18 1 10 17 10 - 1 15 15 1 15 15 1 1 2 3 - 1 2 1 2 2 1 2 1 3 2 - 3 2 2 3 10 19 9 18 9 18 - 10 17 10 17 11 18 11 18 10 19 - 1 10 19 10 10 3 9 2 9 2 - 10 1 10 1 11 2 11 2 10 3 - 1 7 19 7 1 1 19 1 17 19 - 3 1 1 13 19 13 1 7 19 7 - 1 11 19 11 1 6 19 6 1 1 - 19 1 17 19 1 10 1 10 17 1 - 1 19 17 10 17 10 1 1 17 22 - 1 15 1 15 17 8 1 6 17 6 - 1 1 17 1 1 22 17 15 17 15 - 1 8 1 6 17 6 1 1 17 1 - 18 1 16 1 16 1 14 2 14 2 - 12 4 12 4 9 8 9 8 8 9 - 8 9 6 10 6 10 4 10 4 10 - 2 9 2 9 1 7 1 7 1 5 - 1 5 2 3 2 3 4 2 4 2 - 6 2 6 2 8 3 8 3 9 4 - 9 4 12 8 12 8 14 10 14 10 - 16 11 16 11 18 11 1 1 1 3 - 1 3 2 6 2 6 4 7 4 7 - 6 7 6 7 8 6 8 6 12 3 - 12 3 14 2 14 2 16 2 16 2 - 18 3 18 3 19 5 1 3 2 5 - 2 5 4 6 4 6 6 6 6 6 - 8 5 8 5 12 2 12 2 14 1 - 14 1 16 1 16 1 18 2 18 2 - 19 5 19 5 19 7 1 1 9 6 - 9 6 17 1 1 1 9 5 9 5 - 17 1 6 7 1 1 6 7 7 6 - 7 6 1 1 2 7 7 1 2 7 - 1 6 1 6 7 1 1 7 2 5 - 2 5 4 3 4 3 7 2 7 2 - 9 2 9 2 12 3 12 3 14 5 - 14 5 15 7 1 7 2 4 2 4 - 4 2 4 2 7 1 7 1 9 1 - 9 1 12 2 12 2 14 4 14 4 - 15 7 2 5 1 6 1 6 2 7 - 2 7 3 6 3 6 3 4 3 4 - 2 2 2 2 1 1 3 7 2 6 - 2 6 1 4 1 4 1 2 1 2 - 2 1 2 1 3 2 3 2 2 3 - 2 5 3 6 3 6 2 7 2 7 - 1 6 1 6 1 4 1 4 2 2 - 2 2 3 1 1 7 2 6 2 6 - 3 4 3 4 3 2 3 2 2 1 - 2 1 1 2 1 2 2 3 1 15 - 5 15 5 15 11 3 4 15 11 1 - 20 26 11 1 17 17 10 17 10 17 - 6 16 6 16 4 15 4 15 2 13 - 2 13 1 10 1 10 1 8 1 8 - 2 5 2 5 4 3 4 3 6 2 - 6 2 10 1 10 1 17 1 1 17 - 1 10 1 10 2 6 2 6 3 4 - 3 4 5 2 5 2 8 1 8 1 - 10 1 10 1 13 2 13 2 15 4 - 15 4 16 6 16 6 17 10 17 10 - 17 17 1 17 8 17 8 17 12 16 - 12 16 14 15 14 15 16 13 16 13 - 17 10 17 10 17 8 17 8 16 5 - 16 5 14 3 14 3 12 2 12 2 - 8 1 8 1 1 1 1 1 1 8 - 1 8 2 12 2 12 3 14 3 14 - 5 16 5 16 8 17 8 17 10 17 - 10 17 13 16 13 16 15 14 15 14 - 16 12 16 12 17 8 17 8 17 1 - 17 17 10 17 10 17 6 16 6 16 - 4 15 4 15 2 13 2 13 1 10 - 1 10 1 8 1 8 2 5 2 5 - 4 3 4 3 6 2 6 2 10 1 - 10 1 17 1 1 9 13 9 16 8 - 19 6 19 6 16 4 13 11 18 6 - 18 6 13 1 1 6 18 6 4 16 - 6 19 6 19 8 16 1 13 6 18 - 6 18 11 13 6 18 6 1 4 8 - 1 6 1 6 4 4 7 11 2 6 - 2 6 7 1 2 6 19 6 4 4 - 6 1 6 1 8 4 1 7 6 2 - 6 2 11 7 6 19 6 2 13 10 - 12 13 12 13 11 14 11 14 9 15 - 9 15 7 15 7 15 4 14 4 14 - 2 11 2 11 1 8 1 8 1 5 - 1 5 2 3 2 3 3 2 3 2 - 5 1 5 1 7 1 7 1 10 2 - 10 2 12 4 12 4 13 7 13 7 - 14 12 14 12 14 17 14 17 13 20 - 13 20 12 21 12 21 10 22 10 22 - 7 22 7 22 5 21 5 21 4 20 - 4 20 4 19 4 19 5 19 5 19 - 5 20 7 15 5 14 5 14 3 11 - 3 11 2 8 2 8 2 4 2 4 - 3 2 7 1 9 2 9 2 11 4 - 11 4 12 7 12 7 13 12 13 12 - 13 17 13 17 12 20 12 20 10 22 - 1 22 9 1 2 22 9 3 17 22 - 9 1 1 22 17 22 2 21 16 21 - 1 15 6 15 6 15 15 3 5 14 - 15 1 31 34 15 1 20 32 19 31 - 19 31 20 30 20 30 21 31 21 31 - 21 32 21 32 20 33 20 33 18 33 - 18 33 16 32 16 32 14 30 14 30 - 13 28 13 28 12 25 12 25 11 21 - 11 21 9 9 9 9 8 5 8 5 - 7 3 15 31 14 29 14 29 13 25 - 13 25 11 13 11 13 10 9 10 9 - 9 6 9 6 8 4 8 4 6 2 - 6 2 4 1 4 1 2 1 2 1 - 1 2 1 2 1 3 1 3 2 4 - 2 4 3 3 3 3 2 2 20 32 - 19 31 19 31 20 30 20 30 21 31 - 21 31 21 32 21 32 20 33 20 33 - 18 33 18 33 16 32 16 32 14 30 - 14 30 13 28 13 28 12 25 12 25 - 11 21 11 21 9 9 9 9 8 5 - 8 5 7 3 15 31 14 29 14 29 - 13 25 13 25 11 13 11 13 10 9 - 10 9 9 6 9 6 8 4 8 4 - 6 2 6 2 4 1 4 1 2 1 - 2 1 1 2 1 2 1 3 1 3 - 2 4 2 4 3 3 3 3 2 2 - 10 24 7 23 7 23 5 21 5 21 - 4 18 4 18 4 16 4 16 5 13 - 5 13 7 11 7 11 10 10 10 10 - 12 10 12 10 15 11 15 11 17 13 - 17 13 18 16 18 16 18 18 18 18 - 17 21 17 21 15 23 15 23 12 24 - 12 24 10 24 20 4 19 2 19 2 - 17 1 17 1 15 1 15 1 13 2 - 13 2 12 3 12 3 9 7 9 7 - 8 8 8 8 6 9 6 9 4 9 - 4 9 2 8 2 8 1 6 1 6 - 1 4 1 4 2 2 2 2 4 1 - 4 1 6 1 6 1 8 2 8 2 - 9 3 9 3 12 7 12 7 13 8 - 13 8 15 9 15 9 17 9 17 9 - 19 8 19 8 20 6 20 6 20 4 - 19 22 1 1 6 22 8 20 8 20 - 8 18 8 18 7 16 7 16 5 15 - 5 15 3 15 3 15 1 17 1 17 - 1 19 1 19 2 21 2 21 4 22 - 4 22 6 22 6 22 8 21 8 21 - 11 20 11 20 14 20 14 20 17 21 - 17 21 19 22 15 8 13 7 13 7 - 12 5 12 5 12 3 12 3 14 1 - 14 1 16 1 16 1 18 2 18 2 - 19 4 19 4 19 6 19 6 17 8 - 17 8 15 8 19 14 18 13 18 13 - 19 12 19 12 20 13 20 13 20 14 - 20 14 19 15 19 15 18 15 18 15 - 17 14 17 14 16 12 16 12 14 7 - 14 7 12 4 12 4 10 2 10 2 - 8 1 8 1 5 1 5 1 2 2 - 2 2 1 4 1 4 1 7 1 7 - 2 9 2 9 8 13 8 13 10 15 - 10 15 11 17 11 17 11 19 11 19 - 10 21 10 21 8 22 8 22 6 21 - 6 21 5 19 5 19 5 17 5 17 - 6 14 6 14 8 11 8 11 13 4 - 13 4 15 2 15 2 18 1 18 1 - 19 1 19 1 20 2 20 2 20 3 - 5 1 3 2 3 2 2 4 2 4 - 2 7 2 7 3 9 3 9 5 11 - 5 17 6 15 6 15 14 4 14 4 - 16 2 16 2 18 1 16 14 15 16 - 15 16 13 17 13 17 10 17 10 17 - 8 16 8 16 7 15 7 15 6 12 - 6 12 6 9 6 9 7 7 7 7 - 9 6 9 6 12 6 12 6 14 7 - 14 7 15 9 10 17 8 15 8 15 - 7 12 7 12 7 9 7 9 8 7 - 8 7 9 6 16 17 15 9 15 9 - 15 7 15 7 17 6 17 6 19 6 - 19 6 21 8 21 8 22 11 22 11 - 22 13 22 13 21 16 21 16 20 18 - 20 18 18 20 18 20 16 21 16 21 - 13 22 13 22 10 22 10 22 7 21 - 7 21 5 20 5 20 3 18 3 18 - 2 16 2 16 1 13 1 13 1 10 - 1 10 2 7 2 7 3 5 3 5 - 5 3 5 3 7 2 7 2 10 1 - 10 1 13 1 13 1 16 2 16 2 - 18 3 18 3 19 4 17 17 16 9 - 16 9 16 7 16 7 17 6 6 30 - 6 1 10 30 10 1 14 23 13 22 - 13 22 14 21 14 21 15 22 15 22 - 15 23 15 23 13 25 13 25 10 26 - 10 26 6 26 6 26 3 25 3 25 - 1 23 1 23 1 21 1 21 2 19 - 2 19 3 18 3 18 5 17 5 17 - 11 15 11 15 13 14 13 14 15 12 - 1 21 3 19 3 19 5 18 5 18 - 11 16 11 16 13 15 13 15 14 14 - 14 14 15 12 15 12 15 8 15 8 - 13 6 13 6 10 5 10 5 6 5 - 6 5 3 6 3 6 1 8 1 8 - 1 9 1 9 2 10 2 10 3 9 - 3 9 2 8 9 29 2 1 15 29 - 8 1 2 18 16 18 1 12 15 12 - 9 26 8 25 8 25 9 24 9 24 - 10 25 10 25 10 26 10 26 9 28 - 9 28 7 29 7 29 5 29 5 29 - 3 28 3 28 2 26 2 26 2 24 - 2 24 3 22 3 22 5 20 5 20 - 10 17 3 22 8 19 8 19 10 17 - 10 17 11 15 11 15 11 13 11 13 - 10 11 10 11 8 9 4 21 2 19 - 2 19 1 17 1 17 1 15 1 15 - 2 13 2 13 4 11 4 11 9 8 - 2 13 7 10 7 10 9 8 9 8 - 10 6 10 6 10 4 10 4 9 2 - 9 2 7 1 7 1 5 1 5 1 - 3 2 3 2 2 4 2 4 2 5 - 2 5 3 6 3 6 4 5 4 5 - 3 4 7 29 6 27 6 27 7 25 - 7 25 8 27 8 27 7 29 7 29 - 7 1 7 18 6 15 6 15 7 1 - 7 1 8 15 8 15 7 18 1 22 - 3 21 3 21 5 22 5 22 3 23 - 3 23 1 22 1 22 13 22 9 22 - 11 21 11 21 13 22 13 22 11 23 - 11 23 9 22 7 29 6 27 6 27 - 7 25 7 25 8 27 8 27 7 29 - 7 29 7 15 7 19 6 17 6 17 - 8 13 8 13 7 11 7 11 6 13 - 6 13 8 17 8 17 7 19 7 15 - 7 1 7 5 6 3 6 3 7 1 - 7 1 8 3 8 3 7 5 1 22 - 3 21 3 21 5 22 5 22 3 23 - 3 23 1 22 1 22 13 22 9 22 - 11 21 11 21 13 22 13 22 11 23 - 11 23 9 22 1 8 3 7 3 7 - 5 8 5 8 3 9 3 9 1 8 - 1 8 13 8 9 8 11 7 11 7 - 13 8 13 8 11 9 11 9 9 8 - 14 22 14 1 1 22 14 22 6 12 - 14 12 1 1 14 1 1 19 2 17 - 2 17 14 5 14 5 15 3 15 3 - 15 1 2 16 14 4 1 19 1 17 - 1 17 2 15 2 15 14 3 14 3 - 15 1 6 12 2 8 2 8 1 6 - 1 6 1 4 1 4 2 2 2 2 - 1 1 1 6 3 2 2 8 2 6 - 2 6 3 4 3 4 3 2 3 2 - 1 1 9 9 14 14 12 19 12 16 - 12 16 13 14 13 14 15 14 15 14 - 15 16 15 16 13 17 13 17 12 19 - 12 19 13 16 13 16 15 14 14 21 - 13 20 13 20 14 19 14 19 15 20 - 15 20 15 21 15 21 13 22 13 22 - 10 22 10 22 7 21 7 21 5 19 - 5 19 4 16 4 16 4 1 10 22 - 8 21 8 21 6 19 6 19 5 16 - 5 16 5 1 20 21 19 20 19 20 - 20 19 20 19 21 20 21 20 21 21 - 21 21 20 22 20 22 18 22 18 22 - 16 21 16 21 15 19 15 19 15 1 - 18 22 17 21 17 21 16 19 16 19 - 16 1 1 15 19 15 1 1 8 1 - 12 1 19 1 15 21 14 20 14 20 - 15 19 15 19 16 20 16 20 15 21 - 15 21 13 22 13 22 10 22 10 22 - 7 21 7 21 5 19 5 19 4 16 - 4 16 4 1 10 22 8 21 8 21 - 6 19 6 19 5 16 5 16 5 1 - 15 15 15 1 16 15 16 1 1 15 - 16 15 1 1 8 1 12 1 19 1 - 14 21 13 20 13 20 14 19 14 19 - 15 20 15 20 15 21 15 21 13 22 - 16 22 10 22 10 22 7 21 7 21 - 5 19 5 19 4 16 4 16 4 1 - 10 22 8 21 8 21 6 19 6 19 - 5 16 5 16 5 1 15 20 15 1 - 16 22 16 1 1 15 15 15 1 1 - 8 1 12 1 19 1 15 21 14 20 - 14 20 15 19 15 19 16 20 16 20 - 15 21 15 21 13 22 13 22 10 22 - 10 22 7 21 7 21 5 19 5 19 - 4 16 4 16 4 1 10 22 8 21 - 8 21 6 19 6 19 5 16 5 16 - 5 1 26 21 25 20 25 20 26 19 - 26 19 27 20 27 20 26 21 26 21 - 24 22 24 22 21 22 21 22 18 21 - 18 21 16 19 16 19 15 16 15 16 - 15 1 21 22 19 21 19 21 17 19 - 17 19 16 16 16 16 16 1 26 15 - 26 1 27 15 27 1 1 15 27 15 - 1 1 8 1 12 1 19 1 23 1 - 30 1 15 21 14 20 14 20 15 19 - 15 19 16 20 16 20 15 21 15 21 - 13 22 13 22 10 22 10 22 7 21 - 7 21 5 19 5 19 4 16 4 16 - 4 1 10 22 8 21 8 21 6 19 - 6 19 5 16 5 16 5 1 25 21 - 24 20 24 20 25 19 25 19 26 20 - 26 20 26 21 26 21 24 22 27 22 - 21 22 21 22 18 21 18 21 16 19 - 16 19 15 16 15 16 15 1 21 22 - 19 21 19 21 17 19 17 19 16 16 - 16 16 16 1 26 20 26 1 27 22 - 27 1 1 15 26 15 1 1 8 1 - 12 1 19 1 23 1 30 1 4 15 - 4 1 5 15 5 1 1 15 5 15 - 1 1 8 1 1 33 19 1 1 1 - 22 1 0 0 0 0 0 0 0 0 - 0 0 0 0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 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 16 22 4 2 14 18 15 1 15 20 - 16 2 16 22 16 20 16 20 17 3 - 17 3 17 1 7 7 15 7 1 1 - 7 1 12 1 19 1 4 2 2 1 - 4 2 6 1 15 2 13 1 15 3 - 14 1 17 3 18 1 10 22 4 1 - 11 22 5 1 12 22 6 1 7 22 - 18 22 18 22 21 21 21 21 22 19 - 22 19 22 17 22 17 21 14 21 14 - 20 13 20 13 17 12 20 21 21 19 - 21 19 21 17 21 17 20 14 20 14 - 19 13 18 22 19 21 19 21 20 19 - 20 19 20 17 20 17 19 14 19 14 - 17 12 9 12 17 12 17 12 19 11 - 19 11 20 9 20 9 20 7 20 7 - 19 4 19 4 17 2 17 2 13 1 - 13 1 1 1 18 11 19 9 19 9 - 19 7 19 7 18 4 18 4 16 2 - 17 12 18 10 18 10 18 7 18 7 - 17 4 17 4 15 2 15 2 13 1 - 8 22 11 21 9 22 10 20 13 22 - 11 20 14 22 11 21 5 2 2 1 - 5 3 3 1 6 3 7 1 5 2 - 8 1 16 20 17 20 17 20 18 22 - 18 22 17 16 17 16 17 18 17 18 - 16 20 16 20 15 21 15 21 13 22 - 13 22 10 22 10 22 7 21 7 21 - 5 19 5 19 3 16 3 16 2 13 - 2 13 1 9 1 9 1 6 1 6 - 2 3 2 3 3 2 3 2 6 1 - 6 1 9 1 9 1 11 2 11 2 - 13 4 13 4 14 6 7 20 5 18 - 5 18 4 16 4 16 3 13 3 13 - 2 9 2 9 2 5 2 5 3 3 - 10 22 8 21 8 21 6 18 6 18 - 5 16 5 16 4 13 4 13 3 9 - 3 9 3 4 3 4 4 2 4 2 - 6 1 10 22 4 1 11 22 5 1 - 12 22 6 1 7 22 16 22 16 22 - 19 21 19 21 20 20 20 20 21 17 - 21 17 21 13 21 13 20 9 20 9 - 18 5 18 5 16 3 16 3 14 2 - 14 2 10 1 10 1 1 1 18 21 - 19 20 19 20 20 17 20 17 20 13 - 20 13 19 9 19 9 17 5 17 5 - 15 3 16 22 18 20 18 20 19 17 - 19 17 19 13 19 13 18 9 18 9 - 16 5 16 5 13 2 13 2 10 1 - 8 22 11 21 9 22 10 20 13 22 - 11 20 14 22 11 21 5 2 2 1 - 5 3 3 1 6 3 7 1 5 2 - 8 1 10 22 4 1 11 22 5 1 - 12 22 6 1 16 16 14 8 7 22 - 22 22 22 22 21 16 9 12 15 12 - 1 1 16 1 16 1 18 6 8 22 - 11 21 9 22 10 20 13 22 11 20 - 14 22 11 21 18 22 21 21 19 22 - 21 20 20 22 21 19 21 22 21 16 - 16 16 14 12 14 12 14 8 15 14 - 13 12 13 12 14 10 15 13 12 12 - 12 12 14 11 5 2 2 1 5 3 - 3 1 6 3 7 1 5 2 8 1 - 11 1 16 2 13 1 16 3 16 3 - 18 6 10 22 4 1 11 22 5 1 - 12 22 6 1 16 16 14 8 7 22 - 22 22 22 22 21 16 9 12 15 12 - 1 1 9 1 8 22 11 21 9 22 - 10 20 13 22 11 20 14 22 11 21 - 18 22 21 21 19 22 21 20 20 22 - 21 19 21 22 21 16 16 16 14 12 - 14 12 14 8 15 14 13 12 13 12 - 14 10 15 13 12 12 12 12 14 11 - 5 2 2 1 5 3 3 1 6 3 - 7 1 5 2 8 1 16 20 17 20 - 17 20 18 22 18 22 17 16 17 16 - 17 18 17 18 16 20 16 20 15 21 - 15 21 13 22 13 22 10 22 10 22 - 7 21 7 21 5 19 5 19 3 16 - 3 16 2 13 2 13 1 9 1 9 - 1 6 1 6 2 3 2 3 3 2 - 3 2 6 1 6 1 8 1 8 1 - 11 2 11 2 13 4 13 4 15 8 - 7 20 5 18 5 18 4 16 4 16 - 3 13 3 13 2 9 2 9 2 5 - 2 5 3 3 12 4 13 5 13 5 - 14 8 10 22 8 21 8 21 6 18 - 6 18 5 16 5 16 4 13 4 13 - 3 9 3 9 3 4 3 4 4 2 - 4 2 6 1 8 1 10 2 10 2 - 12 5 12 5 13 8 10 8 18 8 - 11 8 13 7 12 8 13 5 16 8 - 14 6 17 8 14 7 10 22 4 1 - 11 22 5 1 12 22 6 1 22 22 - 16 1 23 22 17 1 24 22 18 1 - 7 22 15 22 19 22 27 22 8 12 - 20 12 1 1 9 1 13 1 21 1 - 8 22 11 21 9 22 10 20 13 22 - 11 20 14 22 11 21 20 22 23 21 - 21 22 22 20 25 22 23 20 26 22 - 23 21 5 2 2 1 5 3 3 1 - 6 3 7 1 5 2 8 1 17 2 - 14 1 17 3 15 1 18 3 19 1 - 17 2 20 1 10 22 4 1 11 22 - 5 1 12 22 6 1 7 22 15 22 - 1 1 9 1 8 22 11 21 9 22 - 10 20 13 22 11 20 14 22 11 21 - 5 2 2 1 5 3 3 1 6 3 - 7 1 5 2 8 1 14 22 9 5 - 9 5 8 3 8 3 6 1 15 22 - 11 9 11 9 10 6 10 6 9 4 - 16 22 12 9 12 9 10 4 10 4 - 8 2 8 2 6 1 6 1 4 1 - 4 1 2 2 2 2 1 4 1 4 - 1 6 1 6 2 7 2 7 3 7 - 3 7 4 6 4 6 4 5 4 5 - 3 4 3 4 2 4 2 6 2 5 - 2 5 3 5 3 5 3 6 3 6 - 2 6 11 22 19 22 12 22 15 21 - 13 22 14 20 17 22 15 20 18 22 - 15 21 10 22 4 1 11 22 5 1 - 12 22 6 1 23 21 8 10 12 13 - 16 1 13 13 17 1 14 14 18 2 - 7 22 15 22 20 22 26 22 1 1 - 9 1 13 1 20 1 8 22 11 21 - 9 22 10 20 13 22 11 20 14 22 - 11 21 21 22 23 21 25 22 23 21 - 5 2 2 1 5 3 3 1 6 3 - 7 1 5 2 8 1 16 2 14 1 - 16 3 15 1 17 3 19 1 10 22 - 4 1 11 22 5 1 12 22 6 1 - 7 22 15 22 1 1 16 1 16 1 - 18 7 8 22 11 21 9 22 10 20 - 13 22 11 20 14 22 11 21 5 2 - 2 1 5 3 3 1 6 3 7 1 - 5 2 8 1 11 1 16 2 13 1 - 17 4 15 1 18 7 10 22 4 2 - 10 21 11 3 11 3 11 1 11 22 - 12 3 12 22 13 4 24 22 13 4 - 13 4 11 1 24 22 18 1 25 22 - 19 1 26 22 20 1 7 22 12 22 - 24 22 29 22 1 1 7 1 15 1 - 23 1 8 22 10 21 9 22 10 20 - 27 22 25 20 28 22 25 21 4 2 - 2 1 4 2 6 1 19 2 16 1 - 19 3 17 1 20 3 21 1 19 2 - 22 1 10 22 4 2 10 22 17 1 - 11 22 17 4 12 22 18 4 23 21 - 18 4 18 4 17 1 7 22 12 22 - 20 22 26 22 1 1 7 1 8 22 - 11 21 9 22 11 20 21 22 23 21 - 25 22 23 21 4 2 2 1 4 2 - 6 1 10 22 7 21 7 21 5 19 - 5 19 3 16 3 16 2 13 2 13 - 1 9 1 9 1 6 1 6 2 3 - 2 3 3 2 3 2 5 1 5 1 - 8 1 8 1 11 2 11 2 13 4 - 13 4 15 7 15 7 16 10 16 10 - 17 14 17 14 17 17 17 17 16 20 - 16 20 15 21 15 21 13 22 13 22 - 10 22 6 19 4 16 4 16 3 13 - 3 13 2 9 2 9 2 5 2 5 - 3 3 12 4 14 7 14 7 15 10 - 15 10 16 14 16 14 16 18 16 18 - 15 20 10 22 8 21 8 21 6 18 - 6 18 5 16 5 16 4 13 4 13 - 3 9 3 9 3 4 3 4 4 2 - 4 2 5 1 8 1 10 2 10 2 - 12 5 12 5 13 7 13 7 14 10 - 14 10 15 14 15 14 15 19 15 19 - 14 21 14 21 13 22 10 22 4 1 - 11 22 5 1 12 22 6 1 7 22 - 19 22 19 22 22 21 22 21 23 19 - 23 19 23 17 23 17 22 14 22 14 - 20 12 20 12 16 11 16 11 8 11 - 21 21 22 19 22 19 22 17 22 17 - 21 14 21 14 19 12 19 22 20 21 - 20 21 21 19 21 19 21 17 21 17 - 20 14 20 14 18 12 18 12 16 11 - 1 1 9 1 8 22 11 21 9 22 - 10 20 13 22 11 20 14 22 11 21 - 5 2 2 1 5 3 3 1 6 3 - 7 1 5 2 8 1 10 27 7 26 - 7 26 5 24 5 24 3 21 3 21 - 2 18 2 18 1 14 1 14 1 11 - 1 11 2 8 2 8 3 7 3 7 - 5 6 5 6 8 6 8 6 11 7 - 11 7 13 9 13 9 15 12 15 12 - 16 15 16 15 17 19 17 19 17 22 - 17 22 16 25 16 25 15 26 15 26 - 13 27 13 27 10 27 6 24 4 21 - 4 21 3 18 3 18 2 14 2 14 - 2 10 2 10 3 8 12 9 14 12 - 14 12 15 15 15 15 16 19 16 19 - 16 23 16 23 15 25 10 27 8 26 - 8 26 6 23 6 23 5 21 5 21 - 4 18 4 18 3 14 3 14 3 9 - 3 9 4 7 4 7 5 6 8 6 - 10 7 10 7 12 10 12 10 13 12 - 13 12 14 15 14 15 15 19 15 19 - 15 24 15 24 14 26 14 26 13 27 - 3 9 4 11 4 11 6 12 6 12 - 7 12 7 12 9 11 9 11 10 9 - 10 9 11 4 11 4 12 3 12 3 - 13 3 13 3 14 4 11 3 12 2 - 12 2 13 2 10 9 10 2 10 2 - 11 1 11 1 13 1 13 1 14 4 - 14 4 14 5 10 22 4 1 11 22 - 5 1 12 22 6 1 7 22 18 22 - 18 22 21 21 21 21 22 19 22 19 - 22 17 22 17 21 14 21 14 20 13 - 20 13 17 12 17 12 9 12 20 21 - 21 19 21 19 21 17 21 17 20 14 - 20 14 19 13 18 22 19 21 19 21 - 20 19 20 19 20 17 20 17 19 14 - 19 14 17 12 13 12 15 11 15 11 - 16 10 16 10 18 4 18 4 19 3 - 19 3 20 3 20 3 21 4 18 3 - 19 2 19 2 20 2 16 10 17 2 - 17 2 18 1 18 1 20 1 20 1 - 21 4 21 4 21 5 1 1 9 1 - 8 22 11 21 9 22 10 20 13 22 - 11 20 14 22 11 21 5 2 2 1 - 5 3 3 1 6 3 7 1 5 2 - 8 1 18 20 19 20 19 20 20 22 - 20 22 19 16 19 16 19 18 19 18 - 18 20 18 20 17 21 17 21 14 22 - 14 22 10 22 10 22 7 21 7 21 - 5 19 5 19 5 16 5 16 6 14 - 6 14 8 12 8 12 14 9 14 9 - 15 7 15 7 15 4 15 4 14 2 - 6 16 7 14 7 14 14 10 14 10 - 15 8 7 21 6 19 6 19 6 17 - 6 17 7 15 7 15 13 12 13 12 - 15 10 15 10 16 8 16 8 16 5 - 16 5 15 3 15 3 14 2 14 2 - 11 1 11 1 7 1 7 1 4 2 - 4 2 3 3 3 3 2 5 2 5 - 2 7 2 7 1 1 1 1 2 3 - 2 3 3 3 10 22 4 1 11 22 - 5 1 12 22 6 1 3 22 1 16 - 19 22 18 16 3 22 19 22 1 1 - 9 1 4 22 1 16 6 22 2 19 - 8 22 3 21 15 22 18 21 16 22 - 18 20 17 22 18 19 18 22 18 16 - 5 2 2 1 5 3 3 1 6 3 - 7 1 5 2 8 1 5 22 2 11 - 2 11 1 7 1 7 1 4 1 4 - 2 2 2 2 5 1 5 1 9 1 - 9 1 12 2 12 2 14 4 14 4 - 15 7 15 7 19 21 6 22 3 11 - 3 11 2 7 2 7 2 3 2 3 - 3 2 7 22 4 11 4 11 3 7 - 3 7 3 3 3 3 5 1 2 22 - 10 22 16 22 22 22 3 22 6 21 - 4 22 5 20 8 22 6 20 9 22 - 6 21 17 22 19 21 21 22 19 21 - 3 22 3 20 3 20 4 3 4 3 - 4 1 4 21 5 4 5 22 6 5 - 16 21 4 1 1 22 8 22 13 22 - 19 22 2 22 3 20 6 22 5 20 - 7 22 4 21 14 22 16 21 18 22 - 16 21 4 22 4 20 4 20 2 3 - 2 3 2 1 5 21 3 4 6 22 - 4 5 12 22 4 5 4 5 2 1 - 12 22 12 20 12 20 10 3 10 3 - 10 1 13 21 11 4 14 22 12 5 - 20 21 12 5 12 5 10 1 1 22 - 9 22 12 22 14 22 17 22 23 22 - 2 22 5 21 3 22 4 20 7 22 - 5 19 8 22 5 21 18 22 20 21 - 22 22 20 21 9 22 15 1 10 22 - 16 1 11 22 17 1 22 21 4 2 - 7 22 14 22 19 22 25 22 1 1 - 7 1 12 1 19 1 8 22 10 20 - 12 22 11 20 13 22 11 21 20 22 - 22 21 24 22 22 21 4 2 2 1 - 4 2 6 1 15 2 13 1 15 3 - 14 1 16 3 18 1 3 22 7 12 - 7 12 4 1 4 22 8 12 8 12 - 5 1 5 22 9 12 9 12 6 1 - 18 21 9 12 1 22 8 22 15 22 - 21 22 1 1 9 1 2 22 4 21 - 6 22 5 20 7 22 4 21 16 22 - 18 21 20 22 18 21 5 2 2 1 - 5 3 3 1 6 3 7 1 5 2 - 8 1 19 22 1 1 20 22 2 1 - 21 22 3 1 21 22 7 22 7 22 - 5 16 1 1 15 1 15 1 17 7 - 8 22 5 16 9 22 6 19 11 22 - 7 21 11 1 15 2 13 1 16 4 - 14 1 17 7 14 15 12 8 12 8 - 12 4 12 4 13 2 13 2 14 1 - 14 1 16 1 16 1 18 3 18 3 - 19 5 15 15 13 8 13 8 13 2 - 14 15 16 15 16 15 14 8 14 8 - 13 4 12 8 12 11 12 11 11 14 - 11 14 9 15 9 15 7 15 7 15 - 4 14 4 14 2 11 2 11 1 8 - 1 8 1 6 1 6 2 3 2 3 - 3 2 3 2 5 1 5 1 7 1 - 7 1 9 2 9 2 10 3 10 3 - 11 5 11 5 12 8 5 14 3 11 - 3 11 2 8 2 8 2 5 2 5 - 3 3 7 15 5 13 5 13 4 11 - 4 11 3 8 3 8 3 5 3 5 - 4 2 4 2 5 1 4 22 2 15 - 2 15 1 9 1 9 1 5 1 5 - 2 3 2 3 3 2 3 2 5 1 - 5 1 7 1 7 1 10 2 10 2 - 12 5 12 5 13 8 13 8 13 10 - 13 10 12 13 12 13 11 14 11 14 - 9 15 9 15 7 15 7 15 5 14 - 5 14 4 13 4 13 3 11 3 11 - 2 8 5 22 3 15 3 15 2 11 - 2 11 2 5 2 5 3 2 10 3 - 11 5 11 5 12 8 12 8 12 11 - 12 11 11 13 1 22 6 22 6 22 - 4 15 4 15 2 8 7 1 9 3 - 9 3 10 5 10 5 11 8 11 8 - 11 11 11 11 10 14 10 14 9 15 - 2 22 5 21 3 22 4 20 12 11 - 12 12 12 12 11 12 11 12 11 10 - 11 10 13 10 13 10 13 12 13 12 - 12 14 12 14 10 15 10 15 7 15 - 7 15 4 14 4 14 2 11 2 11 - 1 8 1 8 1 6 1 6 2 3 - 2 3 3 2 3 2 5 1 5 1 - 7 1 7 1 10 2 10 2 12 5 - 4 13 3 11 3 11 2 8 2 8 - 2 5 2 5 3 3 7 15 5 13 - 5 13 4 11 4 11 3 8 3 8 - 3 5 3 5 4 2 4 2 5 1 - 16 22 13 11 13 11 12 7 12 7 - 12 4 12 4 13 2 13 2 14 1 - 14 1 16 1 16 1 18 3 18 3 - 19 5 17 22 14 11 14 11 13 7 - 13 7 13 2 13 22 18 22 18 22 - 14 8 14 8 13 4 12 8 12 11 - 12 11 11 14 11 14 9 15 9 15 - 7 15 7 15 4 14 4 14 2 11 - 2 11 1 8 1 8 1 6 1 6 - 2 3 2 3 3 2 3 2 5 1 - 5 1 7 1 7 1 9 2 9 2 - 10 3 10 3 11 5 11 5 12 8 - 4 13 3 11 3 11 2 8 2 8 - 2 5 2 5 3 3 7 15 5 13 - 5 13 4 11 4 11 3 8 3 8 - 3 5 3 5 4 2 4 2 5 1 - 14 22 17 21 15 22 16 20 2 6 - 6 7 6 7 9 8 9 8 12 10 - 12 10 13 12 13 12 12 14 12 14 - 10 15 10 15 7 15 7 15 4 14 - 4 14 2 11 2 11 1 8 1 8 - 1 6 1 6 2 3 2 3 3 2 - 3 2 5 1 5 1 7 1 7 1 - 10 2 10 2 12 4 4 13 3 11 - 3 11 2 8 2 8 2 5 2 5 - 3 3 7 15 5 13 5 13 4 11 - 4 11 3 8 3 8 3 5 3 5 - 4 2 4 2 5 1 19 27 19 28 - 19 28 18 28 18 28 18 26 18 26 - 20 26 20 26 20 28 20 28 19 29 - 19 29 17 29 17 29 15 28 15 28 - 13 26 13 26 12 24 12 24 11 21 - 11 21 10 17 10 17 8 8 8 8 - 7 5 7 5 6 3 6 3 4 1 - 13 25 12 22 12 22 11 17 11 17 - 9 8 9 8 8 5 17 29 15 27 - 15 27 14 25 14 25 13 22 13 22 - 12 17 12 17 10 9 10 9 9 6 - 9 6 8 4 8 4 6 2 6 2 - 4 1 4 1 2 1 2 1 1 2 - 1 2 1 4 1 4 3 4 3 4 - 3 2 3 2 2 2 2 2 2 3 - 7 22 18 22 16 22 12 8 12 8 - 11 5 11 5 9 2 9 2 7 1 - 17 22 13 8 13 8 11 4 16 22 - 18 22 18 22 14 8 14 8 12 4 - 12 4 10 2 10 2 7 1 7 1 - 4 1 4 1 2 2 2 2 1 3 - 1 3 1 5 1 5 3 5 3 5 - 3 3 3 3 2 3 2 3 2 4 - 14 15 14 18 14 18 13 21 13 21 - 11 22 11 22 9 22 9 22 6 21 - 6 21 4 18 4 18 3 15 3 15 - 3 13 3 13 4 10 4 10 5 9 - 5 9 7 8 7 8 9 8 9 8 - 11 9 11 9 12 10 12 10 13 12 - 13 12 14 15 6 20 5 18 5 18 - 4 15 4 15 4 12 4 12 5 10 - 9 22 7 20 7 20 6 18 6 18 - 5 15 5 15 5 12 5 12 6 9 - 6 9 7 8 7 22 1 1 1 1 - 3 1 8 22 2 1 4 22 9 22 - 9 22 3 1 5 8 7 12 7 12 - 9 14 9 14 11 15 11 15 13 15 - 13 15 15 14 15 14 16 12 16 12 - 16 9 16 9 14 4 15 14 15 10 - 15 10 14 6 14 6 14 2 15 12 - 13 7 13 7 13 4 13 4 14 2 - 14 2 15 1 15 1 17 1 17 1 - 19 3 19 3 20 5 5 22 8 21 - 6 22 7 20 8 22 8 20 8 20 - 10 20 10 20 10 22 10 22 8 22 - 9 22 9 20 8 21 10 21 1 11 - 2 13 2 13 4 15 4 15 6 15 - 6 15 7 14 7 14 8 12 8 12 - 8 9 8 9 6 4 7 14 7 10 - 7 10 6 6 6 6 6 2 7 12 - 5 7 5 7 5 4 5 4 6 2 - 6 2 7 1 7 1 9 1 9 1 - 11 3 11 3 12 5 13 29 13 27 - 13 27 15 27 15 27 15 29 15 29 - 13 29 14 29 14 27 13 28 15 28 - 5 18 6 20 6 20 8 22 8 22 - 10 22 10 22 11 21 11 21 12 19 - 12 19 12 16 12 16 10 9 10 9 - 9 6 9 6 8 4 8 4 6 2 - 6 2 4 1 4 1 2 1 2 1 - 1 2 1 2 1 4 1 4 3 4 - 3 4 3 2 3 2 2 2 2 2 - 2 3 11 21 11 16 11 16 9 9 - 9 9 8 6 8 6 7 4 11 19 - 10 15 10 15 8 8 8 8 7 5 - 7 5 6 3 6 3 4 1 7 22 - 1 1 1 1 3 1 8 22 2 1 - 4 22 9 22 9 22 3 1 17 13 - 17 14 17 14 16 14 16 14 16 12 - 16 12 18 12 18 12 18 14 18 14 - 17 15 17 15 15 15 15 15 13 14 - 13 14 9 10 9 10 7 9 5 9 - 7 9 7 9 9 8 9 8 10 7 - 10 7 12 3 12 3 13 2 13 2 - 15 2 9 7 11 3 11 3 12 2 - 7 9 8 8 8 8 10 2 10 2 - 11 1 11 1 13 1 13 1 15 2 - 15 2 17 5 5 22 8 21 6 22 - 7 20 5 22 2 11 2 11 1 7 - 1 7 1 4 1 4 2 2 2 2 - 3 1 3 1 5 1 5 1 7 3 - 7 3 8 5 6 22 3 11 3 11 - 2 7 2 7 2 2 2 22 7 22 - 7 22 3 8 3 8 2 4 3 22 - 6 21 4 22 5 20 1 11 2 13 - 2 13 4 15 4 15 6 15 6 15 - 7 14 7 14 8 12 8 12 8 9 - 8 9 6 1 7 14 7 9 7 9 - 5 1 7 12 6 8 6 8 4 1 - 4 1 6 1 8 9 10 12 10 12 - 12 14 12 14 14 15 14 15 16 15 - 16 15 18 14 18 14 19 12 19 12 - 19 9 19 9 17 1 18 14 18 9 - 18 9 16 1 18 12 17 8 17 8 - 15 1 15 1 17 1 19 9 21 12 - 21 12 23 14 23 14 25 15 25 15 - 27 15 27 15 29 14 29 14 30 12 - 30 12 30 9 30 9 28 4 29 14 - 29 10 29 10 28 6 28 6 28 2 - 29 12 27 7 27 7 27 4 27 4 - 28 2 28 2 29 1 29 1 31 1 - 31 1 33 3 33 3 34 5 1 11 - 2 13 2 13 4 15 4 15 6 15 - 6 15 7 14 7 14 8 12 8 12 - 8 9 8 9 6 1 7 14 7 9 - 7 9 5 1 7 12 6 8 6 8 - 4 1 4 1 6 1 8 9 10 12 - 10 12 12 14 12 14 14 15 14 15 - 16 15 16 15 18 14 18 14 19 12 - 19 12 19 9 19 9 17 4 18 14 - 18 10 18 10 17 6 17 6 17 2 - 18 12 16 7 16 7 16 4 16 4 - 17 2 17 2 18 1 18 1 20 1 - 20 1 22 3 22 3 23 5 7 15 - 4 14 4 14 2 11 2 11 1 8 - 1 8 1 6 1 6 2 3 2 3 - 3 2 3 2 6 1 6 1 9 1 - 9 1 12 2 12 2 14 5 14 5 - 15 8 15 8 15 10 15 10 14 13 - 14 13 13 14 13 14 10 15 10 15 - 7 15 4 13 3 11 3 11 2 8 - 2 8 2 5 2 5 3 3 12 3 - 13 5 13 5 14 8 14 8 14 11 - 14 11 13 13 7 15 5 13 5 13 - 4 11 4 11 3 8 3 8 3 5 - 3 5 4 2 4 2 6 1 9 1 - 11 3 11 3 12 5 12 5 13 8 - 13 8 13 11 13 11 12 14 12 14 - 10 15 3 18 4 20 4 20 6 22 - 6 22 8 22 8 22 9 21 9 21 - 10 19 10 19 10 16 10 16 9 12 - 9 12 6 1 9 21 9 16 9 16 - 8 12 8 12 5 1 9 19 8 15 - 8 15 4 1 10 15 11 18 11 18 - 12 20 12 20 13 21 13 21 15 22 - 15 22 17 22 17 22 19 21 19 21 - 20 20 20 20 21 17 21 17 21 15 - 21 15 20 12 20 12 18 9 18 9 - 15 8 15 8 13 8 13 8 11 9 - 11 9 10 12 10 12 10 15 19 20 - 20 18 20 18 20 15 20 15 19 12 - 19 12 18 10 17 22 18 21 18 21 - 19 18 19 18 19 15 19 15 18 12 - 18 12 17 10 17 10 15 8 1 1 - 9 1 5 2 2 1 5 3 3 1 - 6 3 7 1 5 2 8 1 14 22 - 8 1 15 22 9 1 14 22 16 22 - 16 22 10 1 12 15 12 18 12 18 - 11 21 11 21 9 22 9 22 7 22 - 7 22 4 21 4 21 2 18 2 18 - 1 15 1 15 1 13 1 13 2 10 - 2 10 3 9 3 9 5 8 5 8 - 7 8 7 8 9 9 9 9 10 10 - 10 10 11 12 11 12 12 15 4 20 - 3 18 3 18 2 15 2 15 2 12 - 2 12 3 10 7 22 5 20 5 20 - 4 18 4 18 3 15 3 15 3 12 - 3 12 4 9 4 9 5 8 5 1 - 13 1 9 2 6 1 9 3 7 1 - 10 3 11 1 9 2 12 1 1 11 - 2 13 2 13 4 15 4 15 6 15 - 6 15 7 14 7 14 8 12 8 12 - 8 8 8 8 6 1 7 14 7 8 - 7 8 5 1 7 12 6 8 6 8 - 4 1 4 1 6 1 16 13 16 14 - 16 14 15 14 15 14 15 12 15 12 - 17 12 17 12 17 14 17 14 16 15 - 16 15 14 15 14 15 12 14 12 14 - 10 12 10 12 8 8 13 12 13 13 - 13 13 12 13 12 13 12 11 12 11 - 14 11 14 11 14 13 14 13 13 14 - 13 14 10 15 10 15 7 15 7 15 - 4 14 4 14 3 13 3 13 3 11 - 3 11 4 9 4 9 6 8 6 8 - 9 7 9 7 11 6 11 6 12 4 - 4 14 3 11 4 10 6 9 6 9 - 9 8 9 8 11 7 12 6 11 2 - 3 13 4 11 4 11 6 10 6 10 - 9 9 9 9 11 8 11 8 12 6 - 12 6 12 4 12 4 11 2 11 2 - 8 1 8 1 5 1 5 1 2 2 - 2 2 1 3 1 3 1 5 1 5 - 3 5 3 5 3 3 3 3 2 3 - 2 3 2 4 7 22 4 11 4 11 - 3 7 3 7 3 4 3 4 4 2 - 4 2 5 1 5 1 7 1 7 1 - 9 3 9 3 10 5 8 22 5 11 - 5 11 4 7 4 7 4 2 7 22 - 9 22 9 22 5 8 5 8 4 4 - 1 15 11 15 1 11 2 13 2 13 - 4 15 4 15 6 15 6 15 7 14 - 7 14 8 12 8 12 8 9 8 9 - 6 4 7 14 7 10 7 10 6 6 - 6 6 6 2 7 12 5 7 5 7 - 5 4 5 4 6 2 6 2 8 1 - 8 1 10 1 10 1 12 2 12 2 - 14 4 14 4 16 7 18 15 16 7 - 16 7 16 4 16 4 17 2 17 2 - 18 1 18 1 20 1 20 1 22 3 - 22 3 23 5 19 15 17 7 17 7 - 17 2 18 15 20 15 20 15 18 8 - 18 8 17 4 1 11 2 13 2 13 - 4 15 4 15 6 15 6 15 7 14 - 7 14 8 12 8 12 8 9 8 9 - 6 4 7 14 7 10 7 10 6 6 - 6 6 6 2 7 12 5 7 5 7 - 5 4 5 4 6 2 6 2 8 1 - 8 1 10 1 10 1 12 2 12 2 - 14 4 14 4 16 7 16 7 17 11 - 17 11 17 15 17 15 16 15 16 15 - 16 14 16 14 17 12 1 11 2 13 - 2 13 4 15 4 15 6 15 6 15 - 7 14 7 14 8 12 8 12 8 9 - 8 9 6 4 7 14 7 10 7 10 - 6 6 6 6 6 2 7 12 5 7 - 5 7 5 4 5 4 6 2 6 2 - 8 1 8 1 10 1 10 1 12 2 - 12 2 14 4 14 4 15 7 17 15 - 15 7 15 7 15 4 15 4 16 2 - 16 2 18 1 18 1 20 1 20 1 - 22 2 22 2 24 4 24 4 26 7 - 26 7 27 11 27 11 27 15 27 15 - 26 15 26 15 26 14 26 14 27 12 - 18 15 16 7 16 7 16 2 17 15 - 19 15 19 15 17 8 17 8 16 4 - 3 11 5 14 5 14 7 15 7 15 - 9 15 9 15 11 14 11 14 12 12 - 12 12 12 10 9 15 10 14 10 14 - 10 10 10 10 9 6 9 6 8 4 - 8 4 6 2 6 2 4 1 4 1 - 2 1 2 1 1 2 1 2 1 4 - 1 4 3 4 3 4 3 2 3 2 - 2 2 2 2 2 3 11 13 11 10 - 11 10 10 6 10 6 10 3 19 13 - 19 14 19 14 18 14 18 14 18 12 - 18 12 20 12 20 12 20 14 20 14 - 19 15 19 15 17 15 17 15 15 14 - 15 14 13 12 13 12 12 10 12 10 - 11 6 11 6 11 2 11 2 12 1 - 9 6 9 4 9 4 10 2 10 2 - 12 1 12 1 14 1 14 1 16 2 - 16 2 18 5 1 18 2 20 2 20 - 4 22 4 22 6 22 6 22 7 21 - 7 21 8 19 8 19 8 16 8 16 - 6 11 7 21 7 17 7 17 6 13 - 6 13 6 9 7 19 5 14 5 14 - 5 11 5 11 6 9 6 9 8 8 - 8 8 10 8 10 8 12 9 12 9 - 14 11 14 11 16 15 18 22 14 8 - 14 8 13 5 13 5 11 2 11 2 - 9 1 19 22 15 8 15 8 13 4 - 18 22 20 22 20 22 16 8 16 8 - 14 4 14 4 12 2 12 2 9 1 - 9 1 6 1 6 1 4 2 4 2 - 3 3 3 3 3 5 3 5 5 5 - 5 5 5 3 5 3 4 3 4 3 - 4 4 15 15 14 13 14 13 12 11 - 12 11 4 5 4 5 2 3 2 3 - 1 1 14 13 5 13 5 13 3 12 - 3 12 2 10 12 13 8 14 8 14 - 5 14 5 14 4 13 12 13 8 15 - 8 15 5 15 5 15 3 13 3 13 - 2 10 2 3 11 3 11 3 13 4 - 13 4 14 6 4 3 8 2 8 2 - 11 2 11 2 12 3 4 3 8 1 - 8 1 11 1 11 1 13 3 13 3 - 14 6 10 22 7 21 7 21 5 19 - 5 19 3 16 3 16 2 13 2 13 - 1 9 1 9 1 6 1 6 2 3 - 2 3 3 2 3 2 5 1 5 1 - 7 1 7 1 10 2 10 2 12 4 - 12 4 14 7 14 7 15 10 15 10 - 16 14 16 14 16 17 16 17 15 20 - 15 20 14 21 14 21 12 22 12 22 - 10 22 7 20 5 18 5 18 4 16 - 4 16 3 13 3 13 2 9 2 9 - 2 5 2 5 3 3 10 3 12 5 - 12 5 13 7 13 7 14 10 14 10 - 15 14 15 14 15 18 15 18 14 20 - 10 22 8 21 8 21 6 18 6 18 - 5 16 5 16 4 13 4 13 3 9 - 3 9 3 4 3 4 4 2 4 2 - 5 1 7 1 9 2 9 2 11 5 - 11 5 12 7 12 7 13 10 13 10 - 14 14 14 14 14 19 14 19 13 21 - 13 21 12 22 6 18 1 1 1 1 - 3 1 9 22 7 18 7 18 2 1 - 9 22 3 1 9 22 6 19 6 19 - 3 17 3 17 1 16 6 18 4 17 - 4 17 1 16 7 17 7 18 7 18 - 8 18 8 18 8 16 8 16 6 16 - 6 16 6 18 6 18 7 20 7 20 - 8 21 8 21 11 22 11 22 14 22 - 14 22 17 21 17 21 18 19 18 19 - 18 17 18 17 17 15 17 15 15 13 - 15 13 5 7 5 7 3 5 3 5 - 1 1 16 21 17 19 17 19 17 17 - 17 17 16 15 16 15 14 13 14 13 - 11 11 14 22 15 21 15 21 16 19 - 16 19 16 17 16 17 15 15 15 15 - 13 13 13 13 5 7 2 3 3 4 - 3 4 5 4 5 4 10 3 10 3 - 15 3 15 3 16 4 5 4 10 2 - 10 2 15 2 5 4 10 1 10 1 - 13 1 13 1 15 2 15 2 16 4 - 16 4 16 5 6 17 6 18 6 18 - 7 18 7 18 7 16 7 16 5 16 - 5 16 5 18 5 18 6 20 6 20 - 7 21 7 21 10 22 10 22 13 22 - 13 22 16 21 16 21 17 19 17 19 - 17 17 17 17 16 15 16 15 15 14 - 15 14 13 13 13 13 10 12 15 21 - 16 19 16 19 16 17 16 17 15 15 - 15 15 14 14 13 22 14 21 14 21 - 15 19 15 19 15 17 15 17 14 15 - 14 15 12 13 12 13 10 12 8 12 - 10 12 10 12 13 11 13 11 14 10 - 14 10 15 8 15 8 15 5 15 5 - 14 3 14 3 12 2 12 2 9 1 - 9 1 6 1 6 1 3 2 3 2 - 2 3 2 3 1 5 1 5 1 7 - 1 7 3 7 3 7 3 5 3 5 - 2 5 2 5 2 6 13 10 14 8 - 14 8 14 5 14 5 13 3 10 12 - 12 11 12 11 13 9 13 9 13 5 - 13 5 12 3 12 3 11 2 11 2 - 9 1 14 18 9 1 9 1 11 1 - 17 22 15 18 15 18 10 1 17 22 - 11 1 17 22 1 7 1 7 17 7 - 8 22 3 12 8 22 18 22 8 21 - 16 21 7 20 12 20 12 20 16 21 - 16 21 18 22 3 12 4 13 4 13 - 7 14 7 14 10 14 10 14 13 13 - 13 13 14 12 14 12 15 10 15 10 - 15 7 15 7 14 4 14 4 12 2 - 12 2 8 1 8 1 5 1 5 1 - 3 2 3 2 2 3 2 3 1 5 - 1 5 1 7 1 7 3 7 3 7 - 3 5 3 5 2 5 2 5 2 6 - 13 12 14 10 14 10 14 7 14 7 - 13 4 13 4 11 2 10 14 12 13 - 12 13 13 11 13 11 13 7 13 7 - 12 4 12 4 10 2 10 2 8 1 - 15 18 15 19 15 19 14 19 14 19 - 14 17 14 17 16 17 16 17 16 19 - 16 19 15 21 15 21 13 22 13 22 - 10 22 10 22 7 21 7 21 5 19 - 5 19 3 16 3 16 2 13 2 13 - 1 9 1 9 1 6 1 6 2 3 - 2 3 3 2 3 2 5 1 5 1 - 8 1 8 1 11 2 11 2 13 4 - 13 4 14 6 14 6 14 9 14 9 - 13 11 13 11 12 12 12 12 10 13 - 10 13 7 13 7 13 5 12 5 12 - 4 11 4 11 3 9 6 19 4 16 - 4 16 3 13 3 13 2 9 2 9 - 2 5 2 5 3 3 12 4 13 6 - 13 6 13 9 13 9 12 11 10 22 - 8 21 8 21 6 18 6 18 5 16 - 5 16 4 13 4 13 3 9 3 9 - 3 4 3 4 4 2 4 2 5 1 - 8 1 10 2 10 2 11 3 11 3 - 12 6 12 6 12 10 12 10 11 12 - 11 12 10 13 3 22 1 16 16 22 - 15 19 15 19 13 16 13 16 9 11 - 9 11 7 8 7 8 6 5 6 5 - 5 1 7 9 5 5 5 5 4 1 - 13 16 7 10 7 10 5 7 5 7 - 4 5 4 5 3 1 3 1 5 1 - 2 19 5 22 5 22 7 22 7 22 - 12 19 4 21 7 21 7 21 12 19 - 2 19 4 20 4 20 7 20 7 20 - 12 19 12 19 14 19 14 19 15 20 - 15 20 16 22 10 22 7 21 7 21 - 6 20 6 20 5 18 5 18 5 15 - 5 15 6 13 6 13 8 12 8 12 - 11 12 11 12 14 13 14 13 16 14 - 16 14 17 16 17 16 17 19 17 19 - 16 21 16 21 14 22 14 22 10 22 - 12 22 7 21 7 20 6 18 6 18 - 6 14 6 14 7 13 6 13 9 12 - 10 12 14 13 15 14 16 16 16 16 - 16 19 16 19 15 21 16 21 12 22 - 10 22 8 20 8 20 7 18 7 18 - 7 14 7 14 8 12 11 12 13 13 - 13 13 14 14 14 14 15 16 15 16 - 15 20 15 20 14 22 8 12 4 11 - 4 11 2 9 2 9 1 7 1 7 - 1 4 1 4 2 2 2 2 5 1 - 5 1 9 1 9 1 13 2 13 2 - 14 3 14 3 15 5 15 5 15 8 - 15 8 14 10 14 10 13 11 13 11 - 11 12 9 12 4 11 5 11 3 9 - 3 9 2 7 2 7 2 4 2 4 - 3 2 2 2 7 1 7 1 13 2 - 13 3 14 5 14 5 14 8 14 8 - 13 10 13 11 10 12 8 12 6 11 - 6 11 4 9 4 9 3 7 3 7 - 3 4 3 4 4 2 4 2 5 1 - 9 1 11 2 11 2 12 3 12 3 - 13 5 13 5 13 9 13 9 12 11 - 12 11 11 12 14 14 13 12 13 12 - 12 11 12 11 10 10 10 10 7 10 - 7 10 5 11 5 11 4 12 4 12 - 3 14 3 14 3 17 3 17 4 19 - 4 19 6 21 6 21 9 22 9 22 - 12 22 12 22 14 21 14 21 15 20 - 15 20 16 17 16 17 16 14 16 14 - 15 10 15 10 14 7 14 7 12 4 - 12 4 10 2 10 2 7 1 7 1 - 4 1 4 1 2 2 2 2 1 4 - 1 4 1 6 1 6 3 6 3 6 - 3 4 3 4 2 4 2 4 2 5 - 5 12 4 14 4 14 4 17 4 17 - 5 19 14 20 15 18 15 18 15 14 - 15 14 14 10 14 10 13 7 13 7 - 11 4 7 10 6 11 6 11 5 13 - 5 13 5 17 5 17 6 20 6 20 - 7 21 7 21 9 22 12 22 13 21 - 13 21 14 19 14 19 14 14 14 14 - 13 10 13 10 12 7 12 7 11 5 - 11 5 9 2 9 2 7 1 2 4 - 1 3 1 3 1 2 1 2 2 1 - 2 1 3 1 3 1 4 2 4 2 - 4 3 4 3 3 4 3 4 2 4 - 2 3 2 2 2 2 3 2 3 2 - 3 3 3 3 2 3 4 5 3 5 - 3 5 2 6 2 6 2 7 2 7 - 3 8 3 8 4 8 4 8 5 7 - 5 7 5 5 5 5 4 3 4 3 - 3 2 3 2 1 1 3 7 3 6 - 3 6 4 6 4 6 4 7 4 7 - 3 7 4 5 4 4 4 4 3 2 - 5 15 4 14 4 14 4 13 4 13 - 5 12 5 12 6 12 6 12 7 13 - 7 13 7 14 7 14 6 15 6 15 - 5 15 5 14 5 13 5 13 6 13 - 6 13 6 14 6 14 5 14 2 4 - 1 3 1 3 1 2 1 2 2 1 - 2 1 3 1 3 1 4 2 4 2 - 4 3 4 3 3 4 3 4 2 4 - 2 3 2 2 2 2 3 2 3 2 - 3 3 3 3 2 3 6 19 5 18 - 5 18 5 17 5 17 6 16 6 16 - 7 16 7 16 8 17 8 17 8 18 - 8 18 7 19 7 19 6 19 6 18 - 6 17 6 17 7 17 7 17 7 18 - 7 18 6 18 4 5 3 5 3 5 - 2 6 2 6 2 7 2 7 3 8 - 3 8 4 8 4 8 5 7 5 7 - 5 5 5 5 4 3 4 3 3 2 - 3 2 1 1 3 7 3 6 3 6 - 4 6 4 6 4 7 4 7 3 7 - 4 5 4 4 4 4 3 2 8 22 - 7 22 7 22 6 21 6 21 4 8 - 8 21 7 21 7 21 4 8 8 21 - 8 20 8 20 4 8 8 22 9 21 - 9 21 9 20 9 20 4 8 2 4 - 1 3 1 3 1 2 1 2 2 1 - 2 1 3 1 3 1 4 2 4 2 - 4 3 4 3 3 4 3 4 2 4 - 2 3 2 2 2 2 3 2 3 2 - 3 3 3 3 2 3 2 17 2 18 - 2 18 3 18 3 18 3 16 3 16 - 1 16 1 16 1 18 1 18 2 20 - 2 20 3 21 3 21 6 22 6 22 - 10 22 10 22 13 21 13 21 14 19 - 14 19 14 17 14 17 13 15 13 15 - 12 14 12 14 10 13 10 13 6 12 - 6 12 4 11 4 11 4 9 4 9 - 6 8 6 8 7 8 8 22 13 21 - 12 21 13 19 13 19 13 17 13 17 - 12 15 12 15 11 14 11 14 9 13 - 10 22 11 21 11 21 12 19 12 19 - 12 17 12 17 11 15 11 15 10 14 - 10 14 6 12 6 12 5 11 5 11 - 5 9 5 9 6 8 3 4 2 3 - 2 3 2 2 2 2 3 1 3 1 - 4 1 4 1 5 2 5 2 5 3 - 5 3 4 4 4 4 3 4 3 3 - 3 2 3 2 4 2 4 2 4 3 - 4 3 3 3 5 8 3 7 3 7 - 2 6 2 6 1 4 1 4 1 2 - 1 2 2 1 2 1 3 1 3 1 - 4 2 4 2 4 3 4 3 3 4 - 3 4 2 4 3 7 2 5 2 5 - 2 4 2 3 2 2 2 2 3 2 - 3 2 3 3 3 3 2 3 4 5 - 3 5 3 5 2 6 2 6 2 7 - 2 7 3 8 3 8 4 8 4 8 - 5 7 5 7 5 5 5 5 4 3 - 4 3 3 2 3 2 1 1 3 7 - 3 6 3 6 4 6 4 6 4 7 - 4 7 3 7 4 5 4 4 4 4 - 3 2 22 13 22 14 22 14 21 14 - 21 14 21 12 21 12 23 12 23 12 - 23 14 23 14 22 15 22 15 21 15 - 21 15 19 14 19 14 17 12 17 12 - 12 4 12 4 10 2 10 2 8 1 - 8 1 5 1 5 1 2 2 2 2 - 1 4 1 4 1 6 1 6 2 8 - 2 8 3 9 3 9 5 10 5 10 - 10 12 10 12 12 13 12 13 14 15 - 14 15 15 17 15 17 15 19 15 19 - 14 21 14 21 12 22 12 22 10 21 - 10 21 9 19 9 19 9 16 9 16 - 10 10 10 10 11 7 11 7 12 5 - 12 5 14 2 14 2 16 1 16 1 - 18 1 18 1 19 3 19 3 19 4 - 6 1 2 2 3 2 2 4 2 4 - 2 6 2 6 3 8 3 8 4 9 - 4 9 6 10 10 12 11 9 11 9 - 14 3 14 3 16 2 5 1 4 2 - 4 2 3 4 3 4 3 6 3 6 - 4 8 4 8 5 9 5 9 7 10 - 7 10 12 13 9 16 10 13 10 13 - 11 10 11 10 13 6 13 6 15 3 - 15 3 17 2 17 2 18 2 18 2 - 19 3 11 30 3 1 16 30 8 1 - 17 21 17 22 17 22 16 22 16 22 - 16 20 16 20 18 20 18 20 18 22 - 18 22 17 24 17 24 16 25 16 25 - 13 26 13 26 9 26 9 26 6 25 - 6 25 4 23 4 23 4 20 4 20 - 5 18 5 18 7 16 7 16 13 13 - 13 13 14 11 14 11 14 8 14 8 - 13 6 5 20 6 18 6 18 13 14 - 13 14 14 12 6 25 5 23 5 23 - 5 21 5 21 6 19 6 19 12 16 - 12 16 14 14 14 14 15 12 15 12 - 15 9 15 9 14 7 14 7 13 6 - 13 6 10 5 10 5 6 5 6 5 - 3 6 3 6 2 7 2 7 1 9 - 1 9 1 11 1 11 3 11 3 11 - 3 9 3 9 2 9 2 9 2 10 - 27 33 1 1 1 1 2 1 27 33 - 28 33 28 33 2 1 14 33 12 32 - 12 32 9 30 9 30 6 27 6 27 - 4 24 4 24 2 20 2 20 1 16 - 1 16 1 11 1 11 2 7 2 7 - 3 4 3 4 5 1 7 27 5 24 - 5 24 3 20 3 20 2 15 2 15 - 2 7 14 33 11 31 11 31 8 28 - 8 28 6 25 6 25 5 23 5 23 - 4 20 4 20 3 16 3 16 2 7 - 2 15 3 6 3 6 4 3 4 3 - 5 1 10 33 12 30 12 30 13 27 - 13 27 14 23 14 23 14 18 14 18 - 13 14 13 14 11 10 11 10 9 7 - 9 7 6 4 6 4 3 2 3 2 - 1 1 13 27 13 19 13 19 12 14 - 12 14 10 10 10 10 8 7 10 33 - 11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 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 21 22 19 20 19 20 17 17 17 17 - 14 12 14 12 12 9 12 9 9 5 - 9 5 6 2 6 2 4 1 4 1 - 2 1 2 1 1 2 1 2 1 4 - 1 4 2 5 2 5 3 4 3 4 - 2 3 21 22 20 18 20 18 18 8 - 18 8 17 1 21 22 18 1 17 1 - 17 3 17 3 16 6 16 6 15 8 - 15 8 13 10 13 10 11 11 11 11 - 9 11 9 11 8 10 8 10 8 8 - 8 8 9 5 9 5 12 2 12 2 - 15 1 15 1 19 1 19 1 21 2 - 15 21 14 20 14 20 13 18 13 18 - 11 13 11 13 9 7 9 7 8 5 - 8 5 6 2 6 2 4 1 14 20 - 13 17 13 17 11 9 11 9 10 6 - 10 6 9 4 9 4 7 2 7 2 - 4 1 4 1 2 1 2 1 1 2 - 1 2 1 4 1 4 2 5 2 5 - 3 4 3 4 2 3 9 16 8 14 - 8 14 7 13 7 13 5 13 5 13 - 4 14 4 14 4 16 4 16 5 18 - 5 18 7 20 7 20 9 21 9 21 - 12 22 12 22 18 22 18 22 20 21 - 20 21 21 19 21 19 21 17 21 17 - 20 15 20 15 18 14 18 14 14 13 - 14 13 12 13 18 22 19 21 19 21 - 20 19 20 19 20 17 20 17 19 15 - 19 15 18 14 14 13 17 12 17 12 - 18 11 18 11 19 9 19 9 19 6 - 19 6 18 3 18 3 17 2 17 2 - 15 1 15 1 13 1 13 1 12 2 - 12 2 12 4 12 4 13 7 14 13 - 16 12 16 12 17 11 17 11 18 9 - 18 9 18 6 18 6 17 3 17 3 - 15 1 2 20 1 18 1 18 1 16 - 1 16 2 14 2 14 5 13 5 13 - 8 13 8 13 12 14 12 14 14 15 - 14 15 16 17 16 17 17 19 17 19 - 17 21 17 21 16 22 16 22 14 22 - 14 22 11 21 11 21 8 18 8 18 - 6 15 6 15 4 11 4 11 3 7 - 3 7 3 4 3 4 4 2 4 2 - 7 1 7 1 9 1 9 1 12 2 - 12 2 14 4 14 4 15 6 15 6 - 15 8 15 8 14 10 14 10 12 10 - 12 10 10 9 10 9 9 7 14 22 - 12 21 12 21 9 18 9 18 7 15 - 7 15 5 11 5 11 4 7 4 7 - 4 4 4 4 5 2 5 2 7 1 - 15 21 14 20 14 20 13 18 13 18 - 11 13 11 13 9 7 9 7 8 5 - 8 5 6 2 6 2 4 1 14 20 - 13 17 13 17 11 9 11 9 10 6 - 10 6 9 4 9 4 7 2 7 2 - 4 1 4 1 2 1 2 1 1 2 - 1 2 1 4 1 4 2 5 2 5 - 4 5 4 5 6 4 6 4 8 2 - 8 2 10 1 10 1 13 1 13 1 - 15 2 15 2 17 4 17 4 19 8 - 19 8 20 13 20 13 20 16 20 16 - 19 19 19 19 17 21 17 21 15 22 - 15 22 10 22 10 22 7 21 7 21 - 5 19 5 19 4 17 4 17 4 15 - 4 15 5 14 5 14 7 14 7 14 - 8 15 8 15 9 17 13 19 12 18 - 12 18 12 16 12 16 13 15 13 15 - 15 15 15 15 16 17 16 17 16 19 - 16 19 15 21 15 21 13 22 13 22 - 10 22 10 22 8 21 8 21 7 20 - 7 20 6 18 6 18 6 16 6 16 - 7 14 7 14 9 13 10 22 8 20 - 8 20 7 18 7 18 7 15 7 15 - 9 13 9 13 7 13 7 13 4 12 - 4 12 2 10 2 10 1 8 1 8 - 1 5 1 5 2 3 2 3 3 2 - 3 2 5 1 5 1 8 1 8 1 - 11 2 11 2 13 4 13 4 14 6 - 14 6 14 8 14 8 13 10 13 10 - 11 10 11 10 9 9 9 9 8 7 - 7 13 5 12 5 12 3 10 3 10 - 2 8 2 8 2 4 2 4 3 2 - 16 20 15 18 15 18 13 13 13 13 - 11 7 11 7 10 5 10 5 8 2 - 8 2 6 1 10 16 9 14 9 14 - 7 13 7 13 5 13 5 13 4 15 - 4 15 4 17 4 17 5 19 5 19 - 7 21 7 21 10 22 10 22 20 22 - 20 22 17 21 17 21 16 20 16 20 - 15 17 15 17 13 9 13 9 12 6 - 12 6 11 4 11 4 9 2 9 2 - 6 1 6 1 4 1 4 1 2 2 - 2 2 1 3 1 3 1 4 1 4 - 2 5 2 5 3 4 3 4 2 3 - 12 22 16 21 16 21 17 21 8 9 - 9 10 9 10 11 11 11 11 15 11 - 15 11 17 12 17 12 19 15 19 15 - 17 8 2 19 1 17 1 17 1 15 - 1 15 2 13 2 13 4 12 4 12 - 7 12 7 12 10 13 10 13 12 14 - 12 14 15 17 15 17 16 20 16 20 - 16 21 16 21 15 22 15 22 14 22 - 14 22 12 21 12 21 10 19 10 19 - 9 17 9 17 8 14 8 14 8 11 - 8 11 9 9 9 9 11 8 11 8 - 13 8 13 8 15 9 15 9 17 11 - 17 11 18 13 15 22 13 21 13 21 - 11 19 11 19 10 17 10 17 9 14 - 9 14 9 10 9 10 11 8 18 13 - 17 9 17 9 15 5 15 5 13 3 - 13 3 11 2 11 2 7 1 7 1 - 4 1 4 1 2 2 2 2 1 4 - 1 4 1 5 1 5 2 6 2 6 - 3 5 3 5 2 4 17 9 15 6 - 15 6 13 4 13 4 10 2 10 2 - 7 1 7 16 6 17 6 17 6 19 - 6 19 7 21 7 21 10 22 10 22 - 13 22 13 22 10 11 10 11 8 5 - 8 5 7 3 7 3 6 2 6 2 - 4 1 4 1 2 1 2 1 1 2 - 1 2 1 4 1 4 2 5 2 5 - 3 4 3 4 2 3 13 22 10 13 - 10 13 9 10 9 10 7 5 7 5 - 6 3 6 3 4 1 5 8 6 9 - 6 9 8 10 8 10 17 13 17 13 - 19 14 19 14 22 16 22 16 24 18 - 24 18 25 20 25 20 25 21 25 21 - 24 22 24 22 23 22 23 22 21 21 - 21 21 19 18 19 18 18 16 18 16 - 16 10 16 10 15 6 15 6 15 3 - 15 3 17 1 17 1 18 1 18 1 - 20 2 20 2 22 4 23 22 21 20 - 21 20 19 16 19 16 17 10 17 10 - 16 6 16 6 16 3 16 3 17 1 - 15 20 13 17 13 17 11 12 11 12 - 9 7 9 7 8 5 8 5 6 2 - 6 2 4 1 17 16 15 14 15 14 - 12 13 12 13 9 13 9 13 7 14 - 7 14 6 16 6 16 6 18 6 18 - 7 20 7 20 9 21 9 21 13 22 - 13 22 17 22 17 22 15 20 15 20 - 14 18 14 18 12 12 12 12 10 6 - 10 6 9 4 9 4 7 2 7 2 - 4 1 4 1 2 1 2 1 1 2 - 1 2 1 4 1 4 2 5 2 5 - 3 4 3 4 2 3 16 26 14 24 - 14 24 12 21 12 21 10 16 10 16 - 7 7 7 7 5 3 16 19 14 17 - 14 17 11 16 11 16 8 16 8 16 - 6 17 6 17 5 19 5 19 5 21 - 5 21 6 23 6 23 8 25 8 25 - 12 26 12 26 16 26 16 26 14 23 - 14 23 13 21 13 21 10 12 10 12 - 8 8 8 8 7 6 7 6 5 3 - 5 3 4 2 4 2 2 1 2 1 - 1 2 1 2 1 4 1 4 2 6 - 2 6 4 8 4 8 6 9 6 9 - 9 10 9 10 13 11 7 16 6 17 - 6 17 6 19 6 19 8 21 8 21 - 11 22 11 22 13 22 13 22 10 11 - 10 11 8 5 8 5 7 3 7 3 - 6 2 6 2 4 1 4 1 2 1 - 2 1 1 2 1 2 1 4 1 4 - 2 5 2 5 3 4 3 4 2 3 - 13 22 10 13 10 13 9 10 9 10 - 7 5 7 5 6 3 6 3 4 1 - 21 21 18 17 18 17 16 15 16 15 - 14 14 14 14 11 13 24 21 23 20 - 23 20 24 19 24 19 25 20 25 20 - 25 21 25 21 24 22 24 22 23 22 - 23 22 21 21 21 21 18 16 18 16 - 17 15 17 15 15 14 15 14 11 13 - 11 13 14 12 14 12 15 10 15 10 - 16 3 16 3 17 1 11 13 13 12 - 13 12 14 10 14 10 15 3 15 3 - 17 1 17 1 18 1 18 1 20 2 - 20 2 22 4 6 19 5 17 5 17 - 5 15 5 15 6 13 6 13 8 12 - 8 12 11 12 11 12 14 13 14 13 - 16 14 16 14 19 17 19 17 20 20 - 20 20 20 21 20 21 19 22 19 22 - 18 22 18 22 16 21 16 21 15 20 - 15 20 13 17 13 17 9 7 9 7 - 8 5 8 5 6 2 6 2 4 1 - 15 20 13 16 13 16 11 9 11 9 - 10 6 10 6 9 4 9 4 7 2 - 7 2 4 1 4 1 2 1 2 1 - 1 2 1 2 1 4 1 4 2 5 - 2 5 4 5 4 5 6 4 6 4 - 9 2 9 2 11 1 11 1 14 1 - 14 1 16 2 16 2 18 4 17 22 - 13 13 13 13 10 7 10 7 8 4 - 8 4 6 2 6 2 4 1 4 1 - 2 1 2 1 1 2 1 2 1 4 - 1 4 2 5 2 5 3 4 3 4 - 2 3 17 22 15 15 15 15 14 11 - 14 11 13 6 13 6 13 2 13 2 - 15 1 17 22 16 18 16 18 15 13 - 15 13 14 6 14 6 14 2 14 2 - 15 1 26 22 22 13 22 13 17 4 - 17 4 15 1 26 22 24 15 24 15 - 23 11 23 11 22 6 22 6 22 2 - 22 2 24 1 24 1 25 1 25 1 - 27 2 27 2 29 4 26 22 25 18 - 25 18 24 13 24 13 23 6 23 6 - 23 2 23 2 24 1 14 22 13 18 - 13 18 11 12 11 12 9 7 9 7 - 8 5 8 5 6 2 6 2 4 1 - 4 1 2 1 2 1 1 2 1 2 - 1 4 1 4 2 5 2 5 3 4 - 3 4 2 3 14 22 14 17 14 17 - 15 6 15 6 16 1 14 22 15 17 - 15 17 16 6 16 6 16 1 28 21 - 27 20 27 20 28 19 28 19 29 20 - 29 20 29 21 29 21 28 22 28 22 - 26 22 26 22 24 21 24 21 22 18 - 22 18 21 16 21 16 19 11 19 11 - 17 5 17 5 16 1 9 22 7 21 - 7 21 5 19 5 19 3 16 3 16 - 2 14 2 14 1 10 1 10 1 6 - 1 6 2 3 2 3 3 2 3 2 - 5 1 5 1 7 1 7 1 10 2 - 10 2 12 4 12 4 14 7 14 7 - 15 9 15 9 16 13 16 13 16 17 - 16 17 15 20 15 20 14 21 14 21 - 13 21 13 21 11 20 11 20 9 18 - 9 18 7 14 7 14 6 9 6 9 - 6 6 7 21 5 18 5 18 3 14 - 3 14 2 10 2 10 2 6 2 6 - 3 3 3 3 5 1 15 21 14 20 - 14 20 13 18 13 18 11 13 11 13 - 9 7 9 7 8 5 8 5 6 2 - 6 2 4 1 14 20 13 17 13 17 - 11 9 11 9 10 6 10 6 9 4 - 9 4 7 2 7 2 4 1 4 1 - 2 1 2 1 1 2 1 2 1 4 - 1 4 2 5 2 5 3 4 3 4 - 2 3 9 16 8 14 8 14 7 13 - 7 13 5 13 5 13 4 14 4 14 - 4 16 4 16 5 18 5 18 7 20 - 7 20 9 21 9 21 12 22 12 22 - 16 22 16 22 19 21 19 21 20 20 - 20 20 21 18 21 18 21 15 21 15 - 20 13 20 13 19 12 19 12 16 11 - 16 11 14 11 14 11 12 12 16 22 - 18 21 18 21 19 20 19 20 20 18 - 20 18 20 15 20 15 19 13 19 13 - 18 12 18 12 16 11 14 18 14 16 - 14 16 13 14 13 14 12 13 12 13 - 10 12 10 12 8 12 8 12 7 14 - 7 14 7 16 7 16 8 19 8 19 - 10 21 10 21 13 22 13 22 16 22 - 16 22 18 21 18 21 19 19 19 19 - 19 15 19 15 18 12 18 12 16 9 - 16 9 12 5 12 5 9 3 9 3 - 7 2 7 2 4 1 4 1 2 1 - 2 1 1 2 1 2 1 4 1 4 - 2 5 2 5 4 5 4 5 6 4 - 6 4 9 2 9 2 12 1 12 1 - 15 1 15 1 17 2 17 2 19 4 - 16 22 17 21 17 21 18 19 18 19 - 18 15 18 15 17 12 17 12 15 9 - 15 9 12 6 12 6 8 3 8 3 - 4 1 15 21 14 20 14 20 13 18 - 13 18 11 13 11 13 9 7 9 7 - 8 5 8 5 6 2 6 2 4 1 - 14 20 13 17 13 17 11 9 11 9 - 10 6 10 6 9 4 9 4 7 2 - 7 2 4 1 4 1 2 1 2 1 - 1 2 1 2 1 4 1 4 2 5 - 2 5 3 4 3 4 2 3 9 16 - 8 14 8 14 7 13 7 13 5 13 - 5 13 4 14 4 14 4 16 4 16 - 5 18 5 18 7 20 7 20 9 21 - 9 21 12 22 12 22 17 22 17 22 - 20 21 20 21 21 19 21 19 21 17 - 21 17 20 15 20 15 19 14 19 14 - 16 13 16 13 12 13 17 22 19 21 - 19 21 20 19 20 19 20 17 20 17 - 19 15 19 15 18 14 18 14 16 13 - 12 13 15 12 15 12 16 10 16 10 - 17 3 17 3 18 1 12 13 14 12 - 14 12 15 10 15 10 16 3 16 3 - 18 1 18 1 19 1 19 1 21 2 - 21 2 23 4 7 19 6 17 6 17 - 6 15 6 15 7 13 7 13 9 12 - 9 12 12 12 12 12 15 13 15 13 - 17 14 17 14 20 17 20 17 21 20 - 21 20 21 21 21 21 20 22 20 22 - 19 22 19 22 17 21 17 21 16 20 - 16 20 15 18 15 18 14 15 14 15 - 12 8 12 8 11 5 11 5 9 2 - 9 2 7 1 15 18 14 14 14 14 - 13 7 13 7 12 4 12 4 10 2 - 10 2 7 1 7 1 4 1 4 1 - 2 2 2 2 1 4 1 4 1 5 - 1 5 2 6 2 6 3 5 3 5 - 2 4 16 20 15 18 15 18 13 13 - 13 13 11 7 11 7 10 5 10 5 - 8 2 8 2 6 1 10 16 9 14 - 9 14 7 13 7 13 5 13 5 13 - 4 15 4 15 4 17 4 17 5 19 - 5 19 7 21 7 21 10 22 10 22 - 19 22 19 22 17 21 17 21 16 20 - 16 20 15 17 15 17 13 9 13 9 - 12 6 12 6 11 4 11 4 9 2 - 9 2 6 1 6 1 4 1 4 1 - 2 2 2 2 1 3 1 3 1 4 - 1 4 2 5 2 5 3 4 3 4 - 2 3 12 22 16 21 16 21 17 21 - 1 18 3 21 3 21 5 22 5 22 - 6 22 6 22 8 20 8 20 8 17 - 8 17 7 14 7 14 4 6 4 6 - 4 3 4 3 5 1 6 22 7 20 - 7 20 7 17 7 17 4 9 4 9 - 3 6 3 6 3 3 3 3 5 1 - 5 1 7 1 7 1 9 2 9 2 - 12 5 12 5 14 8 14 8 15 10 - 19 22 15 10 15 10 14 6 14 6 - 14 3 14 3 16 1 16 1 17 1 - 17 1 19 2 19 2 21 4 20 22 - 16 10 16 10 15 6 15 6 15 3 - 15 3 16 1 1 18 3 21 3 21 - 5 22 5 22 6 22 6 22 8 20 - 8 20 8 17 8 17 7 13 7 13 - 5 6 5 6 5 3 5 3 6 1 - 6 22 7 20 7 20 7 17 7 17 - 5 10 5 10 4 6 4 6 4 3 - 4 3 6 1 6 1 7 1 7 1 - 10 2 10 2 13 5 13 5 15 8 - 15 8 17 12 17 12 18 15 18 15 - 19 19 19 19 19 21 19 21 18 22 - 18 22 17 22 17 22 16 21 16 21 - 15 19 15 19 15 16 15 16 16 14 - 16 14 18 12 18 12 20 11 20 11 - 22 11 3 16 2 16 2 16 1 17 - 1 17 1 19 1 19 2 21 2 21 - 4 22 4 22 8 22 8 22 7 20 - 7 20 6 16 6 16 5 7 5 7 - 4 1 6 16 6 7 6 7 5 1 - 16 22 14 20 14 20 12 16 12 16 - 9 7 9 7 7 3 7 3 5 1 - 16 22 15 20 15 20 14 16 14 16 - 13 7 13 7 12 1 14 16 14 7 - 14 7 13 1 26 22 24 21 24 21 - 22 19 22 19 20 16 20 16 17 7 - 17 7 15 3 15 3 13 1 10 17 - 9 16 9 16 7 16 7 16 6 17 - 6 17 6 19 6 19 7 21 7 21 - 9 22 9 22 11 22 11 22 13 21 - 13 21 14 19 14 19 14 16 14 16 - 13 12 13 12 11 7 11 7 9 4 - 9 4 7 2 7 2 4 1 4 1 - 2 1 2 1 1 2 1 2 1 4 - 1 4 2 5 2 5 3 4 3 4 - 2 3 11 22 12 21 12 21 13 19 - 13 19 13 16 13 16 12 12 12 12 - 10 7 10 7 8 4 8 4 6 2 - 6 2 4 1 23 21 22 20 22 20 - 23 19 23 19 24 20 24 20 24 21 - 24 21 23 22 23 22 21 22 21 22 - 19 21 19 21 17 19 17 19 15 16 - 15 16 13 12 13 12 12 7 12 7 - 12 4 12 4 13 2 13 2 14 1 - 14 1 15 1 15 1 17 2 17 2 - 19 4 2 18 4 21 4 21 6 22 - 6 22 7 22 7 22 9 21 9 21 - 9 19 9 19 7 13 7 13 7 10 - 7 10 8 8 7 22 8 21 8 21 - 8 19 8 19 6 13 6 13 6 10 - 6 10 8 8 8 8 10 8 10 8 - 13 9 13 9 15 11 15 11 17 14 - 17 14 18 16 20 22 18 16 18 16 - 15 8 15 8 13 4 21 22 19 16 - 19 16 17 11 17 11 15 7 15 7 - 13 4 13 4 11 2 11 2 8 1 - 8 1 4 1 4 1 2 2 2 2 - 1 4 1 4 1 5 1 5 2 6 - 2 6 3 5 3 5 2 4 20 20 - 19 18 19 18 17 13 17 13 16 10 - 16 10 15 8 15 8 13 5 13 5 - 11 3 11 3 9 2 9 2 6 1 - 13 16 12 14 12 14 10 13 10 13 - 8 13 8 13 7 15 7 15 7 17 - 7 17 8 19 8 19 10 21 10 21 - 13 22 13 22 23 22 23 22 21 21 - 21 21 20 20 20 20 19 17 19 17 - 18 13 18 13 16 7 16 7 14 4 - 14 4 11 2 11 2 6 1 6 1 - 2 1 2 1 1 2 1 2 1 4 - 1 4 2 5 2 5 4 5 4 5 - 6 4 6 4 9 2 9 2 11 1 - 11 1 14 1 14 1 17 2 17 2 - 19 4 16 22 20 21 20 21 21 21 - 10 7 9 9 9 9 7 10 7 10 - 5 10 5 10 3 9 3 9 2 8 - 2 8 1 6 1 6 1 4 1 4 - 2 2 2 2 4 1 4 1 6 1 - 6 1 8 2 8 2 9 4 5 10 - 3 8 3 8 2 6 2 6 2 3 - 2 3 4 1 11 10 9 4 9 4 - 9 2 9 2 11 1 11 1 13 2 - 13 2 14 3 14 3 16 6 12 10 - 10 4 10 4 10 2 10 2 11 1 - 1 6 3 9 3 9 5 13 8 22 - 2 4 2 4 2 2 2 2 4 1 - 4 1 5 1 5 1 7 2 7 2 - 9 4 9 4 10 7 10 7 10 10 - 10 10 11 6 11 6 12 5 12 5 - 13 5 13 5 15 6 9 22 3 4 - 3 4 3 2 3 2 4 1 8 9 - 7 8 7 8 8 8 8 8 8 9 - 8 9 7 10 7 10 5 10 5 10 - 3 9 3 9 2 8 2 8 1 6 - 1 6 1 4 1 4 2 2 2 2 - 4 1 4 1 7 1 7 1 10 3 - 10 3 12 6 5 10 3 8 3 8 - 2 6 2 6 2 3 2 3 4 1 - 10 7 9 9 9 9 7 10 7 10 - 5 10 5 10 3 9 3 9 2 8 - 2 8 1 6 1 6 1 4 1 4 - 2 2 2 2 4 1 4 1 6 1 - 6 1 8 2 8 2 9 4 5 10 - 3 8 3 8 2 6 2 6 2 3 - 2 3 4 1 15 22 9 4 9 4 - 9 2 9 2 11 1 11 1 13 2 - 13 2 14 3 14 3 16 6 16 22 - 10 4 10 4 10 2 10 2 11 1 - 3 3 5 4 5 4 6 5 6 5 - 7 7 7 7 7 9 7 9 6 10 - 6 10 5 10 5 10 3 9 3 9 - 2 8 2 8 1 6 1 6 1 4 - 1 4 2 2 2 2 4 1 4 1 - 7 1 7 1 10 3 10 3 12 6 - 5 10 3 8 3 8 2 6 2 6 - 2 3 2 3 4 1 8 22 11 25 - 11 25 13 28 13 28 14 31 14 31 - 14 33 14 33 13 34 13 34 11 33 - 11 33 10 31 10 31 1 4 1 4 - 1 2 1 2 2 1 2 1 4 2 - 4 2 5 5 5 5 6 14 6 14 - 7 13 7 13 9 13 9 13 11 14 - 11 14 12 15 12 15 14 18 10 31 - 9 26 9 26 8 22 8 22 5 13 - 5 13 3 8 3 8 1 4 10 19 - 9 21 9 21 7 22 7 22 5 22 - 5 22 3 21 3 21 2 20 2 20 - 1 18 1 18 1 16 1 16 2 14 - 2 14 4 13 4 13 6 13 6 13 - 8 14 8 14 9 16 5 22 3 20 - 3 20 2 18 2 18 2 15 2 15 - 4 13 11 22 5 4 12 22 9 13 - 9 13 7 8 7 8 5 4 5 4 - 4 2 4 2 2 1 2 1 1 2 - 1 2 1 4 1 4 2 7 2 7 - 4 9 4 9 7 11 7 11 11 13 - 11 13 14 15 14 15 16 18 1 6 - 3 9 3 9 5 13 8 22 1 1 - 9 22 2 1 4 7 6 9 6 9 - 8 10 8 10 9 10 9 10 11 9 - 11 9 11 7 11 7 10 4 10 4 - 10 2 10 2 11 1 9 10 10 9 - 10 9 10 7 10 7 9 4 9 4 - 9 2 9 2 11 1 11 1 13 2 - 13 2 14 3 14 3 16 6 5 16 - 4 15 4 15 5 14 5 14 6 15 - 6 15 5 16 3 10 1 4 1 4 - 1 2 1 2 3 1 3 1 5 2 - 5 2 6 3 6 3 8 6 4 10 - 2 4 2 4 2 2 2 2 3 1 - 13 28 12 27 12 27 13 26 13 26 - 14 27 14 27 13 28 11 22 5 4 - 12 22 9 13 9 13 7 8 7 8 - 5 4 5 4 4 2 4 2 2 1 - 2 1 1 2 1 2 1 4 1 4 - 2 7 2 7 4 9 4 9 7 11 - 7 11 11 13 11 13 14 15 14 15 - 16 18 1 6 3 9 3 9 5 13 - 8 22 1 1 9 22 2 1 10 10 - 10 9 10 9 11 9 11 9 10 10 - 10 10 9 10 9 10 7 8 7 8 - 4 7 4 7 7 6 7 6 8 2 - 8 2 9 1 4 7 6 6 6 6 - 7 2 7 2 9 1 9 1 10 1 - 10 1 13 3 13 3 15 6 1 6 - 3 9 3 9 5 13 8 22 2 4 - 2 4 2 2 2 2 4 1 4 1 - 6 2 6 2 7 3 7 3 9 6 - 9 22 3 4 3 4 3 2 3 2 - 4 1 1 6 3 9 3 9 5 10 - 5 10 7 9 7 9 7 7 7 7 - 5 1 5 10 6 9 6 9 6 7 - 6 7 4 1 7 7 9 9 9 9 - 11 10 11 10 12 10 12 10 14 9 - 14 9 14 7 14 7 12 1 12 10 - 13 9 13 9 13 7 13 7 11 1 - 14 7 16 9 16 9 18 10 18 10 - 19 10 19 10 21 9 21 9 21 7 - 21 7 20 4 20 4 20 2 20 2 - 21 1 19 10 20 9 20 9 20 7 - 20 7 19 4 19 4 19 2 19 2 - 21 1 21 1 23 2 23 2 24 3 - 24 3 26 6 1 6 3 9 3 9 - 5 10 5 10 7 9 7 9 7 7 - 7 7 5 1 5 10 6 9 6 9 - 6 7 6 7 4 1 7 7 9 9 - 9 9 11 10 11 10 12 10 12 10 - 14 9 14 9 14 7 14 7 13 4 - 13 4 13 2 13 2 14 1 12 10 - 13 9 13 9 13 7 13 7 12 4 - 12 4 12 2 12 2 14 1 14 1 - 16 2 16 2 17 3 17 3 19 6 - 7 10 5 10 5 10 3 9 3 9 - 2 8 2 8 1 6 1 6 1 4 - 1 4 2 2 2 2 4 1 4 1 - 6 1 6 1 8 2 8 2 9 3 - 9 3 10 5 10 5 10 7 10 7 - 9 9 9 9 7 10 7 10 6 9 - 6 9 6 7 6 7 7 5 7 5 - 9 4 9 4 11 4 11 4 13 5 - 13 5 14 6 5 10 3 8 3 8 - 2 6 2 6 2 3 2 3 4 1 - 5 18 7 21 7 21 9 25 10 28 - 1 1 11 28 2 1 8 19 10 21 - 10 21 12 22 12 22 13 22 13 22 - 15 21 15 21 15 19 15 19 14 16 - 14 16 14 14 14 14 15 13 13 22 - 14 21 14 21 14 19 14 19 13 16 - 13 16 13 14 13 14 15 13 15 13 - 17 14 17 14 18 15 18 15 20 18 - 10 19 9 21 9 21 7 22 7 22 - 5 22 5 22 3 21 3 21 2 20 - 2 20 1 18 1 18 1 16 1 16 - 2 14 2 14 4 13 4 13 6 13 - 6 13 8 14 5 22 3 20 3 20 - 2 18 2 18 2 15 2 15 4 13 - 11 22 5 4 5 4 5 2 5 2 - 6 1 6 1 8 2 8 2 9 5 - 9 5 9 13 9 13 11 13 11 13 - 14 15 14 15 16 18 12 22 9 13 - 9 13 7 8 7 8 5 4 1 6 - 3 9 3 9 5 10 5 10 7 9 - 7 9 7 7 7 7 5 1 5 10 - 6 9 6 9 6 7 6 7 4 1 - 7 7 9 9 9 9 11 10 11 10 - 12 10 12 10 11 7 11 10 11 7 - 11 7 12 5 12 5 13 5 13 5 - 15 6 1 6 3 9 3 9 4 11 - 4 11 4 9 4 9 7 7 7 7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 16 1 16 1 14 - 1 14 3 13 3 13 4 13 4 13 - 6 14 6 14 8 16 8 16 10 19 - 4 22 2 16 2 16 2 14 2 14 - 3 13 11 22 5 4 12 22 9 13 - 9 13 7 8 7 8 5 4 5 4 - 4 2 4 2 2 1 2 1 1 2 - 1 2 1 4 1 4 2 7 2 7 - 4 9 4 9 7 11 7 11 11 13 - 11 13 14 15 14 15 16 18 2 18 - 4 21 4 21 6 22 6 22 8 22 - 8 22 10 21 10 21 10 18 10 18 - 9 16 9 16 6 14 6 14 4 13 - 8 22 9 21 9 21 9 18 9 18 - 8 16 8 16 6 14 4 13 6 12 - 6 12 7 10 7 10 7 7 7 7 - 6 4 6 4 4 2 4 2 2 1 - 2 1 1 2 1 2 1 4 1 4 - 2 7 2 7 5 10 5 10 8 12 - 8 12 12 15 12 15 15 18 4 13 - 5 12 5 12 6 10 6 10 6 7 - 6 7 5 4 5 4 4 2 10 22 - 7 21 7 21 5 19 5 19 3 16 - 3 16 2 13 2 13 1 9 1 9 - 1 6 1 6 2 3 2 3 3 2 - 3 2 5 1 5 1 7 1 7 1 - 10 2 10 2 12 4 12 4 14 7 - 14 7 15 10 15 10 16 14 16 14 - 16 17 16 17 15 20 15 20 14 21 - 14 21 12 22 12 22 10 22 10 22 - 8 21 8 21 6 19 6 19 4 16 - 4 16 3 13 3 13 2 9 2 9 - 2 6 2 6 3 3 3 3 5 1 - 7 1 9 2 9 2 11 4 11 4 - 13 7 13 7 14 10 14 10 15 14 - 15 14 15 17 15 17 14 20 14 20 - 12 22 7 18 2 1 9 22 3 1 - 9 22 6 19 6 19 3 17 3 17 - 1 16 8 19 4 17 4 17 1 16 - 7 18 8 17 8 17 7 16 7 16 - 6 17 6 17 6 18 6 18 7 20 - 7 20 8 21 8 21 11 22 11 22 - 14 22 14 22 17 21 17 21 18 19 - 18 19 18 17 18 17 17 15 17 15 - 15 13 15 13 12 11 12 11 8 9 - 8 9 5 7 5 7 3 5 3 5 - 1 1 14 22 16 21 16 21 17 19 - 17 19 17 17 17 17 16 15 16 15 - 14 13 14 13 8 9 2 3 3 4 - 3 4 5 4 5 4 10 2 10 2 - 13 2 13 2 15 3 15 3 16 5 - 5 4 10 1 10 1 13 1 13 1 - 15 2 15 2 16 5 6 18 7 17 - 7 17 6 16 6 16 5 17 5 17 - 5 18 5 18 6 20 6 20 7 21 - 7 21 10 22 10 22 13 22 13 22 - 16 21 16 21 17 19 17 19 17 17 - 17 17 16 15 16 15 13 13 13 13 - 10 12 13 22 15 21 15 21 16 19 - 16 19 16 17 16 17 15 15 15 15 - 13 13 8 12 10 12 10 12 13 11 - 13 11 14 10 14 10 15 8 15 8 - 15 5 15 5 14 3 14 3 13 2 - 13 2 10 1 10 1 6 1 6 1 - 3 2 3 2 2 3 2 3 1 5 - 1 5 1 6 1 6 2 7 2 7 - 3 6 3 6 2 5 10 12 12 11 - 12 11 13 10 13 10 14 8 14 8 - 14 5 14 5 13 3 13 3 12 2 - 12 2 10 1 15 21 9 1 16 22 - 10 1 16 22 1 7 1 7 17 7 - 8 22 3 12 8 22 18 22 8 21 - 13 21 13 21 18 22 3 12 4 13 - 4 13 7 14 7 14 10 14 10 14 - 13 13 13 13 14 12 14 12 15 10 - 15 10 15 7 15 7 14 4 14 4 - 12 2 12 2 9 1 9 1 6 1 - 6 1 3 2 3 2 2 3 2 3 - 1 5 1 5 1 6 1 6 2 7 - 2 7 3 6 3 6 2 5 10 14 - 12 13 12 13 13 12 13 12 14 10 - 14 10 14 7 14 7 13 4 13 4 - 11 2 11 2 9 1 15 19 14 18 - 14 18 15 17 15 17 16 18 16 18 - 16 19 16 19 15 21 15 21 13 22 - 13 22 10 22 10 22 7 21 7 21 - 5 19 5 19 3 16 3 16 2 13 - 2 13 1 9 1 9 1 5 1 5 - 2 3 2 3 3 2 3 2 5 1 - 5 1 8 1 8 1 11 2 11 2 - 13 4 13 4 14 6 14 6 14 9 - 14 9 13 11 13 11 12 12 12 12 - 10 13 10 13 7 13 7 13 5 12 - 5 12 3 10 3 10 2 8 10 22 - 8 21 8 21 6 19 6 19 4 16 - 4 16 3 13 3 13 2 9 2 9 - 2 4 2 4 3 2 8 1 10 2 - 10 2 12 4 12 4 13 6 13 6 - 13 10 13 10 12 12 3 22 1 16 - 16 22 15 19 15 19 13 16 13 16 - 8 10 8 10 6 7 6 7 5 5 - 5 5 4 1 13 16 7 10 7 10 - 5 7 5 7 4 5 4 5 3 1 - 2 19 5 22 5 22 7 22 7 22 - 12 19 3 20 5 21 5 21 7 21 - 7 21 12 19 12 19 14 19 14 19 - 15 20 15 20 16 22 10 22 7 21 - 7 21 6 20 6 20 5 18 5 18 - 5 15 5 15 6 13 6 13 8 12 - 8 12 11 12 11 12 15 13 15 13 - 16 14 16 14 17 16 17 16 17 19 - 17 19 16 21 16 21 13 22 13 22 - 10 22 10 22 8 21 8 21 7 20 - 7 20 6 18 6 18 6 15 6 15 - 7 13 7 13 8 12 11 12 14 13 - 14 13 15 14 15 14 16 16 16 16 - 16 19 16 19 15 21 15 21 13 22 - 8 12 4 11 4 11 2 9 2 9 - 1 7 1 7 1 4 1 4 2 2 - 2 2 5 1 5 1 9 1 9 1 - 13 2 13 2 14 3 14 3 15 5 - 15 5 15 8 15 8 14 10 14 10 - 13 11 13 11 11 12 8 12 5 11 - 5 11 3 9 3 9 2 7 2 7 - 2 4 2 4 3 2 3 2 5 1 - 9 1 12 2 12 2 13 3 13 3 - 14 5 14 5 14 9 14 9 13 11 - 15 15 14 13 14 13 12 11 12 11 - 10 10 10 10 7 10 7 10 5 11 - 5 11 4 12 4 12 3 14 3 14 - 3 17 3 17 4 19 4 19 6 21 - 6 21 9 22 9 22 12 22 12 22 - 14 21 14 21 15 20 15 20 16 18 - 16 18 16 14 16 14 15 10 15 10 - 14 7 14 7 12 4 12 4 10 2 - 10 2 7 1 7 1 4 1 4 1 - 2 2 2 2 1 4 1 4 1 5 - 1 5 2 6 2 6 3 5 3 5 - 2 4 5 11 4 13 4 13 4 17 - 4 17 5 19 5 19 7 21 7 21 - 9 22 14 21 15 19 15 19 15 14 - 15 14 14 10 14 10 13 7 13 7 - 11 4 11 4 9 2 9 2 7 1 - 2 3 1 2 1 2 2 1 2 1 - 3 2 3 2 2 3 3 5 2 6 - 2 6 3 7 3 7 4 6 4 6 - 4 5 4 5 3 3 3 3 1 1 - 5 15 4 14 4 14 5 13 5 13 - 6 14 6 14 5 15 2 3 1 2 - 1 2 2 1 2 1 3 2 6 19 - 5 18 5 18 6 17 6 17 7 18 - 7 18 6 19 3 5 2 6 2 6 - 3 7 3 7 4 6 4 6 4 5 - 4 5 3 3 3 3 1 1 7 22 - 6 21 6 21 4 9 7 21 4 9 - 7 22 8 21 8 21 4 9 2 3 - 1 2 1 2 2 1 2 1 3 2 - 3 2 2 3 2 18 3 17 3 17 - 2 16 2 16 1 17 1 17 1 18 - 1 18 2 20 2 20 3 21 3 21 - 6 22 6 22 10 22 10 22 13 21 - 13 21 14 19 14 19 14 17 14 17 - 13 15 13 15 12 14 12 14 6 12 - 6 12 4 11 4 11 4 9 4 9 - 5 8 5 8 7 8 10 22 12 21 - 12 21 13 19 13 19 13 17 13 17 - 12 15 12 15 11 14 11 14 9 13 - 3 3 2 2 2 2 3 1 3 1 - 4 2 4 2 3 3 4 7 2 5 - 2 5 1 3 1 3 1 2 1 2 - 2 1 2 1 3 2 3 2 2 3 - 3 5 2 6 2 6 3 7 3 7 - 4 6 4 6 4 5 4 5 3 3 - 3 3 1 1 22 14 21 13 21 13 - 22 12 22 12 23 13 23 13 23 14 - 23 14 22 15 22 15 21 15 21 15 - 19 14 19 14 17 12 17 12 12 4 - 12 4 10 2 10 2 8 1 8 1 - 5 1 5 1 2 2 2 2 1 4 - 1 4 1 6 1 6 2 8 2 8 - 3 9 3 9 5 10 5 10 10 12 - 10 12 12 13 12 13 14 15 14 15 - 15 17 15 17 15 19 15 19 14 21 - 14 21 12 22 12 22 10 21 10 21 - 9 19 9 19 9 16 9 16 10 10 - 10 10 11 7 11 7 13 4 13 4 - 15 2 15 2 17 1 17 1 19 1 - 19 1 20 3 20 3 20 4 5 1 - 3 2 3 2 2 4 2 4 2 6 - 2 6 3 8 3 8 4 9 4 9 - 10 12 9 16 10 11 10 11 11 8 - 11 8 13 5 13 5 15 3 15 3 - 17 2 17 2 19 2 19 2 20 3 - 11 30 3 1 16 30 8 1 17 22 - 16 21 16 21 17 20 17 20 18 21 - 18 21 18 22 18 22 17 24 17 24 - 16 25 16 25 13 26 13 26 9 26 - 9 26 6 25 6 25 4 23 4 23 - 4 21 4 21 5 19 5 19 6 18 - 6 18 13 14 13 14 15 12 4 21 - 6 19 6 19 13 15 13 15 14 14 - 14 14 15 12 15 12 15 9 15 9 - 14 7 14 7 13 6 13 6 10 5 - 10 5 6 5 6 5 3 6 3 6 - 2 7 2 7 1 9 1 9 1 10 - 1 10 2 11 2 11 3 10 3 10 - 2 9 27 33 1 1 13 33 9 30 - 9 30 6 27 6 27 4 24 4 24 - 2 20 2 20 1 15 1 15 1 11 - 1 11 2 6 2 6 3 3 3 3 - 4 1 9 30 6 26 6 26 4 22 - 4 22 3 19 3 19 2 14 2 14 - 2 9 2 9 3 4 3 4 4 1 - 10 33 11 31 11 31 12 28 12 28 - 13 23 13 23 13 19 13 19 12 14 - 12 14 10 10 10 10 8 7 8 7 - 5 4 5 4 1 1 10 33 11 30 - 11 30 12 25 12 25 12 20 12 20 - 11 15 11 15 10 12 10 12 8 8 - 8 8 5 4 6 13 6 1 1 10 - 11 4 11 10 1 4 1 1 19 1 - 10 19 10 1 1 10 19 10 1 7 - 19 7 1 1 19 1 3 8 1 1 - 4 8 1 1 3 8 1 1 4 8 - 1 1 12 8 10 1 13 8 10 1 - 4 9 2 8 2 8 1 6 1 6 - 1 4 1 4 2 2 2 2 4 1 - 4 1 6 1 6 1 8 2 8 2 - 9 4 9 4 9 6 9 6 8 8 - 8 8 6 9 6 9 4 9 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0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 17 1 4 8 - 14 8 1 22 1 1 1 22 10 22 - 10 22 13 21 13 21 14 20 14 20 - 15 18 15 18 15 16 15 16 14 14 - 14 14 13 13 13 13 10 12 1 12 - 10 12 10 12 13 11 13 11 14 10 - 14 10 15 8 15 8 15 5 15 5 - 14 3 14 3 13 2 13 2 10 1 - 10 1 1 1 1 22 1 1 1 22 - 13 22 9 22 1 1 9 22 17 1 - 1 1 17 1 1 22 1 1 1 22 - 14 22 1 12 9 12 1 1 14 1 - 15 22 1 1 1 22 15 22 1 1 - 15 1 1 22 1 1 15 22 15 1 - 1 12 15 12 7 22 5 21 5 21 - 3 19 3 19 2 17 2 17 1 14 - 1 14 1 9 1 9 2 6 2 6 - 3 4 3 4 5 2 5 2 7 1 - 7 1 11 1 11 1 13 2 13 2 - 15 4 15 4 16 6 16 6 17 9 - 17 9 17 14 17 14 16 17 16 17 - 15 19 15 19 13 21 13 21 11 22 - 11 22 7 22 6 12 12 12 1 22 - 1 1 1 22 1 1 15 22 1 8 - 6 13 15 1 9 22 1 1 9 22 - 17 1 1 22 1 1 1 22 9 1 - 17 22 9 1 17 22 17 1 1 22 - 1 1 1 22 15 1 15 22 15 1 - 1 22 15 22 5 12 11 12 1 1 - 15 1 7 22 5 21 5 21 3 19 - 3 19 2 17 2 17 1 14 1 14 - 1 9 1 9 2 6 2 6 3 4 - 3 4 5 2 5 2 7 1 7 1 - 11 1 11 1 13 2 13 2 15 4 - 15 4 16 6 16 6 17 9 17 9 - 17 14 17 14 16 17 16 17 15 19 - 15 19 13 21 13 21 11 22 11 22 - 7 22 1 22 1 1 15 22 15 1 - 1 22 15 22 1 22 1 1 1 22 - 10 22 10 22 13 21 13 21 14 20 - 14 20 15 18 15 18 15 15 15 15 - 14 13 14 13 13 12 13 12 10 11 - 10 11 1 11 1 22 8 12 8 12 - 1 1 1 22 15 22 1 1 15 1 - 8 22 8 1 1 22 15 22 1 17 - 1 19 1 19 2 21 2 21 3 22 - 3 22 5 22 5 22 6 21 6 21 - 7 19 7 19 8 15 8 15 8 1 - 15 17 15 19 15 19 14 21 14 21 - 13 22 13 22 11 22 11 22 10 21 - 10 21 9 19 9 19 8 15 8 22 - 8 1 6 17 3 16 3 16 2 15 - 2 15 1 13 1 13 1 10 1 10 - 2 8 2 8 3 7 3 7 6 6 - 6 6 10 6 10 6 13 7 13 7 - 14 8 14 8 15 10 15 10 15 13 - 15 13 14 15 14 15 13 16 13 16 - 10 17 10 17 6 17 1 22 15 1 - 1 1 15 22 10 22 10 1 1 16 - 2 16 2 16 3 15 3 15 4 11 - 4 11 5 9 5 9 6 8 6 8 - 9 7 9 7 11 7 11 7 14 8 - 14 8 15 9 15 9 16 11 16 11 - 17 15 17 15 18 16 18 16 19 16 - 1 1 5 1 5 1 2 8 2 8 - 1 12 1 12 1 16 1 16 2 19 - 2 19 4 21 4 21 7 22 7 22 - 9 22 9 22 12 21 12 21 14 19 - 14 19 15 16 15 16 15 12 15 12 - 14 8 14 8 11 1 11 1 15 1 - 7 15 5 14 5 14 3 12 3 12 - 2 10 2 10 1 7 1 7 1 4 - 1 4 2 2 2 2 4 1 4 1 - 6 1 6 1 8 2 8 2 11 5 - 11 5 13 8 13 8 15 12 15 12 - 16 15 7 15 9 15 9 15 10 14 - 10 14 11 12 11 12 13 4 13 4 - 14 2 14 2 15 1 15 1 16 1 - 16 29 14 28 14 28 12 26 12 26 - 10 22 10 22 9 19 9 19 8 15 - 8 15 7 9 7 9 6 1 16 29 - 18 29 18 29 20 27 20 27 20 24 - 20 24 19 22 19 22 18 21 18 21 - 16 20 16 20 13 20 13 20 15 19 - 15 19 17 17 17 17 18 15 18 15 - 18 12 18 12 17 10 17 10 16 9 - 16 9 14 4 14 4 5 4 5 4 - 3 5 3 5 2 6 2 6 1 9 - 1 19 3 21 3 21 5 22 5 22 - 6 22 6 22 8 21 8 21 9 20 - 9 20 10 17 10 17 10 13 10 13 - 9 8 17 22 16 19 16 19 15 17 - 15 17 9 8 9 8 7 4 7 4 - 6 1 9 15 6 15 6 15 4 14 - 4 14 2 12 2 12 1 9 1 9 - 1 6 1 6 2 3 2 3 3 2 - 3 2 5 1 5 1 7 1 7 1 - 9 2 9 2 11 4 11 4 12 7 - 12 7 12 10 12 10 11 13 11 13 - 9 15 9 15 7 17 7 17 6 19 - 6 19 6 21 6 21 7 22 7 22 - 9 22 9 22 11 21 11 21 13 19 - 11 13 10 14 10 14 8 15 8 15 - 5 15 5 15 3 14 3 14 3 12 - 3 12 4 10 4 10 7 9 7 9 - 3 8 3 8 1 6 1 6 1 4 - 1 4 2 2 2 2 4 1 4 1 - 7 1 7 1 9 2 9 2 11 4 - 8 29 6 28 6 28 5 27 5 27 - 5 26 5 26 6 25 6 25 9 24 - 9 24 12 24 12 24 8 22 8 22 - 5 20 5 20 2 17 2 17 1 14 - 1 14 1 12 1 12 2 10 2 10 - 4 8 4 8 7 6 7 6 8 4 - 8 4 8 2 8 2 7 1 7 1 - 5 1 5 1 4 3 1 18 2 20 - 2 20 4 22 4 22 6 22 6 22 - 7 21 7 21 7 19 7 19 6 15 - 6 15 4 8 6 15 8 19 8 19 - 10 21 10 21 12 22 12 22 14 22 - 14 22 16 20 16 20 16 17 16 17 - 15 12 15 12 12 1 1 11 2 13 - 2 13 4 15 4 15 6 15 6 15 - 7 14 7 14 7 12 7 12 6 7 - 6 7 6 4 6 4 7 2 7 2 - 8 1 8 1 10 1 10 1 12 2 - 12 2 14 5 14 5 15 7 15 7 - 16 10 16 10 17 15 17 15 17 18 - 17 18 16 21 16 21 14 22 14 22 - 12 22 12 22 11 20 11 20 11 18 - 11 18 12 15 12 15 14 12 14 12 - 16 10 16 10 19 8 4 15 2 8 - 2 8 1 4 1 4 1 2 1 2 - 2 1 2 1 4 1 4 1 6 3 - 6 3 7 5 5 15 1 1 15 14 - 14 15 14 15 13 15 13 15 11 14 - 11 14 7 10 7 10 5 9 5 9 - 4 9 4 9 6 8 6 8 7 7 - 7 7 9 2 9 2 10 1 10 1 - 11 1 11 1 12 2 1 22 3 22 - 3 22 5 21 5 21 6 20 6 20 - 14 1 8 15 2 1 7 22 1 1 - 6 18 5 13 5 13 5 10 5 10 - 7 8 7 8 9 8 9 8 11 9 - 11 9 13 11 13 11 15 15 17 22 - 15 15 15 15 14 11 14 11 14 9 - 14 9 15 8 15 8 17 8 17 8 - 19 10 19 10 20 12 1 15 4 15 - 4 15 3 9 3 9 2 4 2 4 - 1 1 14 15 13 12 13 12 12 10 - 12 10 10 7 10 7 7 4 7 4 - 4 2 4 2 1 1 8 29 6 28 - 6 28 5 27 5 27 5 26 5 26 - 6 25 6 25 9 24 9 24 12 24 - 9 24 6 23 6 23 4 22 4 22 - 3 20 3 20 3 18 3 18 5 16 - 5 16 8 15 8 15 10 15 8 15 - 4 14 4 14 2 13 2 13 1 11 - 1 11 1 9 1 9 3 7 3 7 - 7 5 7 5 8 4 8 4 8 2 - 8 2 6 1 6 1 4 1 6 15 - 4 14 4 14 2 12 2 12 1 9 - 1 9 1 6 1 6 2 3 2 3 - 3 2 3 2 5 1 5 1 7 1 - 7 1 9 2 9 2 11 4 11 4 - 12 7 12 7 12 10 12 10 11 13 - 11 13 10 14 10 14 8 15 8 15 - 6 15 8 15 4 1 13 15 14 9 - 14 9 15 4 15 4 16 1 1 12 - 3 14 3 14 6 15 6 15 19 15 - 5 16 5 13 5 13 6 10 6 10 - 7 9 7 9 9 8 9 8 11 8 - 11 8 13 9 13 9 15 11 15 11 - 16 14 16 14 16 17 16 17 15 20 - 15 20 14 21 14 21 12 22 12 22 - 10 22 10 22 8 21 8 21 6 19 - 6 19 5 16 5 16 1 1 16 15 - 6 15 6 15 4 14 4 14 2 12 - 2 12 1 9 1 9 1 6 1 6 - 2 3 2 3 3 2 3 2 5 1 - 5 1 7 1 7 1 9 2 9 2 - 11 4 11 4 12 7 12 7 12 10 - 12 10 11 13 11 13 10 14 10 14 - 8 15 10 15 7 1 1 12 3 14 - 3 14 6 15 6 15 17 15 1 11 - 2 13 2 13 4 15 4 15 6 15 - 6 15 7 14 7 14 7 12 7 12 - 5 6 5 6 5 3 5 3 7 1 - 7 1 9 1 9 1 12 2 12 2 - 14 4 14 4 16 8 16 8 17 12 - 17 12 17 15 6 21 4 20 4 20 - 2 18 2 18 1 15 1 15 1 12 - 1 12 2 10 2 10 3 9 3 9 - 5 8 5 8 8 8 8 8 11 9 - 11 9 14 11 14 11 16 14 16 14 - 17 17 17 17 17 20 17 20 15 22 - 15 22 13 22 13 22 11 20 11 20 - 9 16 9 16 7 11 7 11 4 1 - 2 22 4 22 4 22 6 20 6 20 - 12 3 12 3 14 1 14 1 16 1 - 17 22 16 20 16 20 14 17 14 17 - 4 6 4 6 2 3 2 3 1 1 - 16 29 8 1 1 18 2 20 2 20 - 4 22 4 22 6 22 6 22 7 21 - 7 21 7 19 7 19 6 14 6 14 - 6 11 6 11 7 9 7 9 9 8 - 9 8 11 8 11 8 14 9 14 9 - 16 11 16 11 18 14 18 14 20 19 - 20 19 21 22 6 15 4 14 4 14 - 2 11 2 11 1 8 1 8 1 5 - 1 5 2 2 2 2 3 1 3 1 - 5 1 5 1 7 2 7 2 9 5 - 10 9 9 5 9 5 10 2 10 2 - 11 1 11 1 13 1 13 1 15 2 - 15 2 17 5 17 5 18 8 18 8 - 18 11 18 11 17 14 17 14 16 15 - 11 14 9 15 9 15 6 15 6 15 - 4 14 4 14 2 12 2 12 1 9 - 1 9 1 6 1 6 2 3 2 3 - 3 2 3 2 5 1 5 1 8 1 - 8 1 10 2 1 8 9 8 8 22 - 6 21 6 21 4 18 4 18 3 16 - 3 16 2 13 2 13 1 8 1 8 - 1 4 1 4 2 2 2 2 3 1 - 3 1 5 1 5 1 7 2 7 2 - 9 5 9 5 10 7 10 7 11 10 - 11 10 12 15 12 15 12 19 12 19 - 11 21 11 21 10 22 10 22 8 22 - 2 12 11 12 12 29 4 1 7 22 - 4 21 4 21 2 19 2 19 1 16 - 1 16 1 13 1 13 2 11 2 11 - 4 9 4 9 7 8 7 8 9 8 - 9 8 12 9 12 9 14 11 14 11 - 15 14 15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 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 diff --git a/ccp4c/data/fontpack.f b/ccp4c/data/fontpack.f deleted file mode 100644 index 45b3ab65..00000000 --- a/ccp4c/data/fontpack.f +++ /dev/null @@ -1,16 +0,0 @@ - INTEGER*2 IFHT(150,4),IFSTRT(150,4),IFWID(150,4),IFX0(150,4), - + IFY0(150,4),LENGF(150,4) - INTEGER*1 NFONTS(4,3000,4) - INTEGER IUNITF - DATA IUNITF/11/ -C -C - IFAIL = 0 - ITEROP = -IUNITF - CALL CCPDPN (-10,'font84.ascii','OLD','F',0,IFAIL) - CALL CCPDPN (ITEROP,'font84.dat','NEW','U',80,IFAIL) - READ(10,2000) IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT,NFONTS - 2000 FORMAT(10I5) - WRITE (IUNITF) IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT,NFONTS - CLOSE (UNIT=IUNITF) - END diff --git a/ccp4c/data/fontunpack.for b/ccp4c/data/fontunpack.for deleted file mode 100644 index 648f5454..00000000 --- a/ccp4c/data/fontunpack.for +++ /dev/null @@ -1,23 +0,0 @@ - INTEGER*2 IFHT,IFSTRT,IFWID,IFX0,IFY0,LENGF - BYTE NFONTS - INTEGER IUNITF - COMMON /PINOUT/LUNIN,LUNOUT - COMMON /PLT$FNT/IFSTRT(150,4),LENGF(150,4),IFX0(150,4), - + IFY0(150,4),IFWID(150,4),IFHT(150,4),NFONTS(4,3000,4) - DATA IUNITF/89/ -C -C - IFAIL = 0 - ITEROP = -IUNITF - OPEN(UNIT=10,FILE='font84.ascii',STATUS='NEW') - CALL CCPDPN (ITEROP,'font84.dat','OLD','U',80,IFAIL) - IF (IFAIL.NE.0) THEN - WRITE (6,FMT=6000) - 6000 FORMAT (' Unable to read fonts - FILE=PUBLIC_FONT84') - ELSE - READ (IUNITF) IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT,NFONTS - WRITE(10,2000) IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT,NFONTS -2000 FORMAT(10I10) - CLOSE (UNIT=IUNITF) - ENDIF - END diff --git a/ccp4c/data/syminfo.lib b/ccp4c/data/syminfo.lib deleted file mode 100644 index c8ea619a..00000000 --- a/ccp4c/data/syminfo.lib +++ /dev/null @@ -1,14552 +0,0 @@ -# This file contains a list of spacegroups, each in a -# number of settings. Each setting is delimited by -# begin_spacegroup / end_spacegroup records. For each -# spacegroup setting, the following are listed: -# number = standard spacegroup number -# basisop = change of basis operator -# symbol ccp4 = CCP4 spacegroup number e.g. 1003 -# (0 if not a CCP4 group) -# symbol Hall = Hall symbol -# symbol xHM = extended Hermann Mauguin symbol -# symbol old = CCP4 spacegroup name -# (blank if not a CCP4 group) -# symbol laue = Laue group symbol -# symbol patt = Patterson group symbol -# symbol pgrp = Point group symbol -# hklasu ccp4 = reciprocal space asymmetric unit -# (with respect to standard setting) -# mapasu ccp4 = CCP4 real space asymmetric unit -# (with respect to standard setting) -# (negative ranges if not a CCP4 group) -# mapasu zero = origin based real space asymmetric unit -# (with respect to current setting) -# mapasu nonz = non-origin based real space asymmetric unit -# (with respect to current setting) -# cheshire = Cheshire cell -# (with respect to standard setting) -# symop = list of primitive symmetry operators -# cenop = list of centering operators -# -begin_spacegroup -number 1 -basisop x,y,z -symbol ccp4 1 -symbol Hall ' P 1' -symbol xHM 'P 1' -symbol old 'P 1' -symbol laue '-P 1' '-1' -symbol patt '-P 1' '-1' -symbol pgrp ' P 1' '1' -hklasu ccp4 'l>0 or (l==0 and (h>0 or (h==0 and k>=0)))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=0; 0<=z<=0 -symop x,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 2 -basisop x,y,z -symbol ccp4 2 -symbol Hall '-P 1' -symbol xHM 'P -1' -symbol old 'P -1' -symbol laue '-P 1' '-1' -symbol patt '-P 1' '-1' -symbol pgrp '-P 1' '-1' -hklasu ccp4 'l>0 or (l==0 and (h>0 or (h==0 and k>=0)))' -mapasu ccp4 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 3 -basisop x,y,z -symbol ccp4 3 -symbol Hall ' P 2y' -symbol xHM 'P 1 2 1' -symbol old 'P 1 2 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp ' P 2y' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 3 -basisop z,x,y -symbol ccp4 1003 -symbol Hall ' P 2y (z,x,y)' -symbol xHM 'P 1 1 2' -symbol old 'P 1 1 2' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp ' P 2' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 3 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2y (y,z,x)' -symbol xHM 'P 2 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp ' P 2x' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 4 -basisop x,y,z -symbol ccp4 4 -symbol Hall ' P 2yb' -symbol xHM 'P 1 21 1' -symbol old 'P 1 21 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp ' P 2y' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<1; 0<=y<1/2; 0<=z<1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 4 -basisop z,x,y -symbol ccp4 1004 -symbol Hall ' P 2yb (z,x,y)' -symbol xHM 'P 1 1 21' -symbol old 'P 1 1 21' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp ' P 2' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/2 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 4 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2yb (y,z,x)' -symbol xHM 'P 21 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp ' P 2x' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 5 -basisop x,y,z -symbol ccp4 5 -symbol Hall ' C 2y' -symbol xHM 'C 1 2 1' -symbol old 'C 1 2 1' -symbol laue '-P 2y' '2/m' -symbol patt '-C 2y' '2/m' -symbol pgrp ' P 2y' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 5 -basisop z,y,-x -symbol ccp4 2005 -symbol Hall ' C 2y (z,y,-x)' -symbol xHM 'A 1 2 1' -symbol old 'A 1 2 1' 'A 2' -symbol laue '-P 2y' '2/m' -symbol patt '-A 2y' '2/m' -symbol pgrp ' P 2y' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 5 -basisop x,y,-x+z -symbol ccp4 4005 -symbol Hall ' C 2y (x,y,-x+z)' -symbol xHM 'I 1 2 1' -symbol old 'I 1 2 1' 'I 2' -symbol laue '-P 2y' '2/m' -symbol patt '-I 2y' '2/m' -symbol pgrp ' P 2y' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 5 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' C 2y (z,x,y)' -symbol xHM 'A 1 1 2' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-A 2' '2/m' -symbol pgrp ' P 2' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 5 -basisop -x,z,y -symbol ccp4 1005 -symbol Hall ' C 2y (-x,z,y)' -symbol xHM 'B 1 1 2' -symbol old 'B 1 1 2' 'B 2' -symbol laue '-P 2' '2/m' -symbol patt '-B 2' '2/m' -symbol pgrp ' P 2' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<1; 0<=y<=1/2; 0<=z<1/2 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 5 -basisop -x+z,x,y -symbol ccp4 0 -symbol Hall ' C 2y (-x+z,x,y)' -symbol xHM 'I 1 1 2' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-I 2' '2/m' -symbol pgrp ' P 2' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 5 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' C 2y (y,z,x)' -symbol xHM 'B 2 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-B 2x' '2/m' -symbol pgrp ' P 2x' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 5 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' C 2y (y,-x,z)' -symbol xHM 'C 2 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-C 2x' '2/m' -symbol pgrp ' P 2x' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 5 -basisop y,-x+z,x -symbol ccp4 0 -symbol Hall ' C 2y (y,-x+z,x)' -symbol xHM 'I 2 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-I 2x' '2/m' -symbol pgrp ' P 2x' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=0; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 6 -basisop x,y,z -symbol ccp4 6 -symbol Hall ' P -2y' -symbol xHM 'P 1 m 1' -symbol old 'P 1 m 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 6 -basisop z,x,y -symbol ccp4 1006 -symbol Hall ' P -2y (z,x,y)' -symbol xHM 'P 1 1 m' -symbol old 'P 1 1 m' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<=1/2 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 6 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P -2y (y,z,x)' -symbol xHM 'P m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop x,y,z -symbol ccp4 7 -symbol Hall ' P -2yc' -symbol xHM 'P 1 c 1' -symbol old 'P 1 c 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop x-z,y,z -symbol ccp4 0 -symbol Hall ' P -2yc (x-z,y,z)' -symbol xHM 'P 1 n 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' P -2yc (z,y,-x)' -symbol xHM 'P 1 a 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P -2yc (z,x,y)' -symbol xHM 'P 1 1 a' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop z,x-z,y -symbol ccp4 0 -symbol Hall ' P -2yc (z,x-z,y)' -symbol xHM 'P 1 1 n' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop -x,z,y -symbol ccp4 1007 -symbol Hall ' P -2yc (-x,z,y)' -symbol xHM 'P 1 1 b' -symbol old 'P 1 1 b' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P -2yc (y,z,x)' -symbol xHM 'P b 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop y,z,x-z -symbol ccp4 0 -symbol Hall ' P -2yc (y,z,x-z)' -symbol xHM 'P n 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 7 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' P -2yc (y,-x,z)' -symbol xHM 'P c 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 8 -basisop x,y,z -symbol ccp4 8 -symbol Hall ' C -2y' -symbol xHM 'C 1 m 1' -symbol old 'C 1 m 1' -symbol laue '-P 2y' '2/m' -symbol patt '-C 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 8 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' C -2y (z,y,-x)' -symbol xHM 'A 1 m 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-A 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 8 -basisop x,y,-x+z -symbol ccp4 0 -symbol Hall ' C -2y (x,y,-x+z)' -symbol xHM 'I 1 m 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-I 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 8 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' C -2y (z,x,y)' -symbol xHM 'A 1 1 m' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-A 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 8 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' C -2y (-x,z,y)' -symbol xHM 'B 1 1 m' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-B 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1; 0<=z<=1/2 -mapasu nonz 0<=x<1/2; 0<=y<1; 0<=z<=1/2 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,y,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 8 -basisop -x+z,x,y -symbol ccp4 0 -symbol Hall ' C -2y (-x+z,x,y)' -symbol xHM 'I 1 1 m' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-I 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 8 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' C -2y (y,z,x)' -symbol xHM 'B m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-B 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 8 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' C -2y (y,-x,z)' -symbol xHM 'C m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-C 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 8 -basisop y,-x+z,x -symbol ccp4 0 -symbol Hall ' C -2y (y,-x+z,x)' -symbol xHM 'I m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-I 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop x,y,z -symbol ccp4 9 -symbol Hall ' C -2yc' -symbol xHM 'C 1 c 1' -symbol old 'C 1 c 1' -symbol laue '-P 2y' '2/m' -symbol patt '-C 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 9 -basisop z,y,-x+z -symbol ccp4 0 -symbol Hall ' C -2yc (z,y,-x+z)' -symbol xHM 'A 1 n 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-A 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop x+z,y,-x -symbol ccp4 0 -symbol Hall ' C -2yc (x+z,y,-x)' -symbol xHM 'I 1 a 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-I 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' C -2yc (z,y,-x)' -symbol xHM 'A 1 a 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-A 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop x+1/4,y+1/4,z -symbol ccp4 0 -symbol Hall ' C -2yc (x+1/4,y+1/4,z)' -symbol xHM 'C 1 n 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-C 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 9 -basisop x,y,-x+z -symbol ccp4 0 -symbol Hall ' C -2yc (x,y,-x+z)' -symbol xHM 'I 1 c 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-I 2y' '2/m' -symbol pgrp ' P -2y' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' C -2yc (z,x,y)' -symbol xHM 'A 1 1 a' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-A 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop -x+z,z,y -symbol ccp4 0 -symbol Hall ' C -2yc (-x+z,z,y)' -symbol xHM 'B 1 1 n' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-B 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop -x,x+z,y -symbol ccp4 0 -symbol Hall ' C -2yc (-x,x+z,y)' -symbol xHM 'I 1 1 b' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-I 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop -x,z,y -symbol ccp4 1009 -symbol Hall ' C -2yc (-x,z,y)' -symbol xHM 'B 1 1 b' -symbol old 'B 1 1 b' -symbol laue '-P 2' '2/m' -symbol patt '-B 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop z,x-z,y -symbol ccp4 0 -symbol Hall ' C -2yc (z,x-z,y)' -symbol xHM 'A 1 1 n' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-A 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop -x+z,x,y -symbol ccp4 0 -symbol Hall ' C -2yc (-x+z,x,y)' -symbol xHM 'I 1 1 a' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-I 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' C -2yc (y,z,x)' -symbol xHM 'B b 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-B 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop y,-x+z,z -symbol ccp4 0 -symbol Hall ' C -2yc (y,-x+z,z)' -symbol xHM 'C n 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-C 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 9 -basisop y,-x,x+z -symbol ccp4 0 -symbol Hall ' C -2yc (y,-x,x+z)' -symbol xHM 'I c 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-I 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' C -2yc (y,-x,z)' -symbol xHM 'C c 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-C 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 9 -basisop y,z,x-z -symbol ccp4 0 -symbol Hall ' C -2yc (y,z,x-z)' -symbol xHM 'B n 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-B 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 9 -basisop y,-x+z,x -symbol ccp4 0 -symbol Hall ' C -2yc (y,-x+z,x)' -symbol xHM 'I b 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-I 2x' '2/m' -symbol pgrp ' P -2x' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=0; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 10 -basisop x,y,z -symbol ccp4 10 -symbol Hall '-P 2y' -symbol xHM 'P 1 2/m 1' -symbol old 'P 1 2/m 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y,-z -symop x,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 10 -basisop z,x,y -symbol ccp4 1010 -symbol Hall '-P 2y (z,x,y)' -symbol xHM 'P 1 1 2/m' -symbol old 'P 1 1 2/m' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop -x,-y,-z -symop x,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 10 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2y (y,z,x)' -symbol xHM 'P 2/m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,-y,-z -symop -x,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 11 -basisop x,y,z -symbol ccp4 11 -symbol Hall '-P 2yb' -symbol xHM 'P 1 21/m 1' -symbol old 'P 1 21/m 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z -symop -x,-y,-z -symop x,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 11 -basisop z,x,y -symbol ccp4 1011 -symbol Hall '-P 2yb (z,x,y)' -symbol xHM 'P 1 1 21/m' -symbol old 'P 1 1 21/m' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z+1/2 -symop -x,-y,-z -symop x,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 11 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2yb (y,z,x)' -symbol xHM 'P 21/m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z -symop -x,-y,-z -symop -x+1/2,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 12 -basisop x,y,z -symbol ccp4 12 -symbol Hall '-C 2y' -symbol xHM 'C 1 2/m 1' -symbol old 'C 1 2/m 1' -symbol laue '-P 2y' '2/m' -symbol patt '-C 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y,-z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 12 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-C 2y (z,y,-x)' -symbol xHM 'A 1 2/m 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-A 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y,-z -symop x,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 12 -basisop x,y,-x+z -symbol ccp4 0 -symbol Hall '-C 2y (x,y,-x+z)' -symbol xHM 'I 1 2/m 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-I 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y,-z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 12 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-C 2y (z,x,y)' -symbol xHM 'A 1 1 2/m' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-A 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop -x,-y,-z -symop x,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 12 -basisop -x,z,y -symbol ccp4 1012 -symbol Hall '-C 2y (-x,z,y)' -symbol xHM 'B 1 1 2/m' -symbol old 'B 1 1 2/m' -symbol laue '-P 2' '2/m' -symbol patt '-B 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop -x,-y,-z -symop x,y,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 12 -basisop -x+z,x,y -symbol ccp4 0 -symbol Hall '-C 2y (-x+z,x,y)' -symbol xHM 'I 1 1 2/m' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-I 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop -x,-y,-z -symop x,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 12 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-C 2y (y,z,x)' -symbol xHM 'B 2/m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-B 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,-y,-z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 12 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-C 2y (y,-x,z)' -symbol xHM 'C 2/m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-C 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,-y,-z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 12 -basisop y,-x+z,x -symbol ccp4 0 -symbol Hall '-C 2y (y,-x+z,x)' -symbol xHM 'I 2/m 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-I 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,-y,-z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 13 -basisop x,y,z -symbol ccp4 13 -symbol Hall '-P 2yc' -symbol xHM 'P 1 2/c 1' -symbol old 'P 1 2/c 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 13 -basisop x-z,y,z -symbol ccp4 0 -symbol Hall '-P 2yc (x-z,y,z)' -symbol xHM 'P 1 2/n 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z+1/2 -symop -x,-y,-z -symop x+1/2,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 13 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2yc (z,y,-x)' -symbol xHM 'P 1 2/a 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop -x,-y,-z -symop x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 13 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2yc (z,x,y)' -symbol xHM 'P 1 1 2/a' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop -x,-y,-z -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 13 -basisop z,x-z,y -symbol ccp4 0 -symbol Hall '-P 2yc (z,x-z,y)' -symbol xHM 'P 1 1 2/n' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop -x,-y,-z -symop x+1/2,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 13 -basisop -x,z,y -symbol ccp4 1013 -symbol Hall '-P 2yc (-x,z,y)' -symbol xHM 'P 1 1 2/b' -symbol old 'P 1 1 2/b' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop -x,-y,-z -symop x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 13 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2yc (y,z,x)' -symbol xHM 'P 2/b 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x,-y,-z -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 13 -basisop y,z,x-z -symbol ccp4 0 -symbol Hall '-P 2yc (y,z,x-z)' -symbol xHM 'P 2/n 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z+1/2 -symop -x,-y,-z -symop -x,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 13 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2yc (y,-x,z)' -symbol xHM 'P 2/c 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x,-y,-z -symop -x,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop x,y,z -symbol ccp4 14 -symbol Hall '-P 2ybc' -symbol xHM 'P 1 21/c 1' -symbol old 'P 1 21/c 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z+1/2 -symop -x,-y,-z -symop x,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop x-z,y,z -symbol ccp4 2014 -symbol Hall '-P 2ybc (x-z,y,z)' -symbol xHM 'P 1 21/n 1' -symbol old 'P 1 21/n 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y+1/2,-z+1/2 -symop -x,-y,-z -symop x+1/2,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop z,y,-x -symbol ccp4 3014 -symbol Hall '-P 2ybc (z,y,-x)' -symbol xHM 'P 1 21/a 1' -symbol old 'P 1 21/a 1' -symbol laue '-P 2y' '2/m' -symbol patt '-P 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y+1/2,-z -symop -x,-y,-z -symop x+1/2,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2ybc (z,x,y)' -symbol xHM 'P 1 1 21/a' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop -x,-y,-z -symop x+1/2,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop z,x-z,y -symbol ccp4 0 -symbol Hall '-P 2ybc (z,x-z,y)' -symbol xHM 'P 1 1 21/n' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z+1/2 -symop -x,-y,-z -symop x+1/2,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop -x,z,y -symbol ccp4 1014 -symbol Hall '-P 2ybc (-x,z,y)' -symbol xHM 'P 1 1 21/b' -symbol old 'P 1 1 21/b' -symbol laue '-P 2' '2/m' -symbol patt '-P 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z+1/2 -symop -x,-y,-z -symop x,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2ybc (y,z,x)' -symbol xHM 'P 21/b 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y+1/2,-z -symop -x,-y,-z -symop -x+1/2,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop y,z,x-z -symbol ccp4 0 -symbol Hall '-P 2ybc (y,z,x-z)' -symbol xHM 'P 21/n 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y+1/2,-z+1/2 -symop -x,-y,-z -symop -x+1/2,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 14 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2ybc (y,-x,z)' -symbol xHM 'P 21/c 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-P 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z+1/2 -symop -x,-y,-z -symop -x+1/2,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 15 -basisop x,y,z -symbol ccp4 15 -symbol Hall '-C 2yc' -symbol xHM 'C 1 2/c 1' -symbol old 'C 1 2/c 1' -symbol laue '-P 2y' '2/m' -symbol patt '-C 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 15 -basisop z,y,-x+z -symbol ccp4 0 -symbol Hall '-C 2yc (z,y,-x+z)' -symbol xHM 'A 1 2/n 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-A 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z+1/2 -symop -x,-y,-z -symop x+1/2,-y,z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop x+z,y,-x -symbol ccp4 0 -symbol Hall '-C 2yc (x+z,y,-x)' -symbol xHM 'I 1 2/a 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-I 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop -x,-y,-z -symop x+1/2,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-C 2yc (z,y,-x)' -symbol xHM 'A 1 2/a 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-A 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop -x,-y,-z -symop x+1/2,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop x+1/4,y-1/4,z -symbol ccp4 0 -symbol Hall '-C 2yc (x+1/4,y-1/4,z)' -symbol xHM 'C 1 2/n 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-C 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z+1/2 -symop -x+1/2,-y+1/2,-z -symop x,-y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 15 -basisop x,y,-x+z -symbol ccp4 0 -symbol Hall '-C 2yc (x,y,-x+z)' -symbol xHM 'I 1 2/c 1' -symbol old '' -symbol laue '-P 2y' '2/m' -symbol patt '-I 2y' '2/m' -symbol pgrp '-P 2y' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-C 2yc (z,x,y)' -symbol xHM 'A 1 1 2/a' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-A 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop -x,-y,-z -symop x+1/2,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop -x+z,z,y -symbol ccp4 0 -symbol Hall '-C 2yc (-x+z,z,y)' -symbol xHM 'B 1 1 2/n' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-B 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop -x,-y,-z -symop x+1/2,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop -x,x+z,y -symbol ccp4 0 -symbol Hall '-C 2yc (-x,x+z,y)' -symbol xHM 'I 1 1 2/b' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-I 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop -x,-y,-z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop -x,z,y -symbol ccp4 1015 -symbol Hall '-C 2yc (-x,z,y)' -symbol xHM 'B 1 1 2/b' -symbol old 'B 1 1 2/b' -symbol laue '-P 2' '2/m' -symbol patt '-B 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop -x,-y,-z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop z,x-z,y -symbol ccp4 0 -symbol Hall '-C 2yc (z,x-z,y)' -symbol xHM 'A 1 1 2/n' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-A 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop -x,-y,-z -symop x+1/2,y+1/2,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop -x+z,x,y -symbol ccp4 0 -symbol Hall '-C 2yc (-x+z,x,y)' -symbol xHM 'I 1 1 2/a' -symbol old '' -symbol laue '-P 2' '2/m' -symbol patt '-I 2' '2/m' -symbol pgrp '-P 2' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop -x,-y,-z -symop x+1/2,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-C 2yc (y,z,x)' -symbol xHM 'B 2/b 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-B 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x,-y,-z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop y,-x+z,z -symbol ccp4 0 -symbol Hall '-C 2yc (y,-x+z,z)' -symbol xHM 'C 2/n 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-C 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z+1/2 -symop -x,-y,-z -symop -x,y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 15 -basisop y,-x,x+z -symbol ccp4 0 -symbol Hall '-C 2yc (y,-x,x+z)' -symbol xHM 'I 2/c 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-I 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x,-y,-z -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-C 2yc (y,-x,z)' -symbol xHM 'C 2/c 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-C 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x,-y,-z -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 15 -basisop y,z,x-z -symbol ccp4 0 -symbol Hall '-C 2yc (y,z,x-z)' -symbol xHM 'B 2/n 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-B 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z+1/2 -symop -x,-y,-z -symop -x,y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 15 -basisop y,-x+z,x -symbol ccp4 0 -symbol Hall '-C 2yc (y,-x+z,x)' -symbol xHM 'I 2/b 1 1' -symbol old '' -symbol laue '-P 2x' '2/m' -symbol patt '-I 2x' '2/m' -symbol pgrp '-P 2x' '2/m' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 1/4<=x<=3/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x,-y,-z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 16 -basisop x,y,z -symbol ccp4 16 -symbol Hall ' P 2 2' -symbol xHM 'P 2 2 2' -symbol old 'P 2 2 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 17 -basisop x,y,z -symbol ccp4 17 -symbol Hall ' P 2c 2' -symbol xHM 'P 2 2 21' -symbol old 'P 2 2 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z+1/2 -symop x,-y,-z -symop -x,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 17 -basisop z,x,y -symbol ccp4 1017 -symbol Hall ' P 2c 2 (z,x,y)' -symbol xHM 'P 21 2 2' -symbol old 'P 21 2 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z -symop -x,y,-z -symop -x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 17 -basisop y,z,x -symbol ccp4 2017 -symbol Hall ' P 2c 2 (y,z,x)' -symbol xHM 'P 2 21 2' -symbol old 'P 2 21 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/2 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z -symop -x,-y,z -symop x,-y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 18 -basisop x,y,z -symbol ccp4 18 -symbol Hall ' P 2 2ab' -symbol xHM 'P 21 21 2' -symbol old 'P 21 21 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x+1/2,-y+1/2,-z -symop -x+1/2,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 18 -basisop z,x,y -symbol ccp4 3018 -symbol Hall ' P 2 2ab (z,x,y)' -symbol xHM 'P 2 21 21' -symbol old 'P 2 21 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/4 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,y+1/2,-z+1/2 -symop -x,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 18 -basisop y,z,x -symbol ccp4 2018 -symbol Hall ' P 2 2ab (y,z,x)' -symbol xHM 'P 21 2 21' -symbol old 'P 21 2 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x+1/2,-y,z+1/2 -symop x+1/2,-y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 19 -basisop x,y,z -symbol ccp4 19 -symbol Hall ' P 2ac 2ab' -symbol xHM 'P 21 21 21' -symbol old 'P 21 21 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/4 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop x+1/2,-y+1/2,-z -symop -x,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 20 -basisop x,y,z -symbol ccp4 20 -symbol Hall ' C 2c 2' -symbol xHM 'C 2 2 21' -symbol old 'C 2 2 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z+1/2 -symop x,-y,-z -symop -x,y,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 20 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' C 2c 2 (z,x,y)' -symbol xHM 'A 21 2 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z -symop -x,y,-z -symop -x+1/2,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 20 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' C 2c 2 (y,z,x)' -symbol xHM 'B 2 21 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z -symop -x,-y,z -symop x,-y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 21 -basisop x,y,z -symbol ccp4 21 -symbol Hall ' C 2 2' -symbol xHM 'C 2 2 2' -symbol old 'C 2 2 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 21 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' C 2 2 (z,x,y)' -symbol xHM 'A 2 2 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,y,-z -symop -x,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 21 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' C 2 2 (y,z,x)' -symbol xHM 'B 2 2 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y,z -symop x,-y,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 22 -basisop x,y,z -symbol ccp4 22 -symbol Hall ' F 2 2' -symbol xHM 'F 2 2 2' -symbol old 'F 2 2 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 23 -basisop x,y,z -symbol ccp4 23 -symbol Hall ' I 2 2' -symbol xHM 'I 2 2 2' -symbol old 'I 2 2 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 24 -basisop x,y,z -symbol ccp4 24 -symbol Hall ' I 2b 2c' -symbol xHM 'I 21 21 21' -symbol old 'I 21 21 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop x,-y,-z+1/2 -symop -x,y+1/2,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 25 -basisop x,y,z -symbol ccp4 25 -symbol Hall ' P 2 -2' -symbol xHM 'P m m 2' -symbol old 'P m m 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y,z -symop x,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 25 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2 -2 (z,x,y)' -symbol xHM 'P 2 m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y,z -symop x,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 25 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2 -2 (y,z,x)' -symbol xHM 'P m 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y,-z -symop -x,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 26 -basisop x,y,z -symbol ccp4 26 -symbol Hall ' P 2c -2' -symbol xHM 'P m c 21' -symbol old 'P m c 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z+1/2 -symop -x,y,z -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 26 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' P 2c -2 (y,-x,z)' -symbol xHM 'P c m 21' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z+1/2 -symop x,-y,z -symop -x,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 26 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2c -2 (z,x,y)' -symbol xHM 'P 21 m a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z -symop x,-y,z -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 26 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' P 2c -2 (z,y,-x)' -symbol xHM 'P 21 a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z -symop x,y,-z -symop x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 26 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2c -2 (y,z,x)' -symbol xHM 'P b 21 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z -symop x,y,-z -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 26 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' P 2c -2 (-x,z,y)' -symbol xHM 'P m 21 b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z -symop -x,y,z -symop x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 27 -basisop x,y,z -symbol ccp4 27 -symbol Hall ' P 2 -2c' -symbol xHM 'P c c 2' -symbol old 'P c c 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 27 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2 -2c (z,x,y)' -symbol xHM 'P 2 a a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x+1/2,-y,z -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 27 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2 -2c (y,z,x)' -symbol xHM 'P b 2 b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y+1/2,-z -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 28 -basisop x,y,z -symbol ccp4 28 -symbol Hall ' P 2 -2a' -symbol xHM 'P m a 2' -symbol old 'P m a 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x+1/2,y,z -symop x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 28 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' P 2 -2a (y,-x,z)' -symbol xHM 'P b m 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop x,-y+1/2,z -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 28 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2 -2a (z,x,y)' -symbol xHM 'P 2 m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y+1/2,z -symop x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 28 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' P 2 -2a (z,y,-x)' -symbol xHM 'P 2 c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,y,-z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 28 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2 -2a (y,z,x)' -symbol xHM 'P c 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<1; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y,-z+1/2 -symop -x,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 28 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' P 2 -2a (-x,z,y)' -symbol xHM 'P m 2 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop -x+1/2,y,z -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 29 -basisop x,y,z -symbol ccp4 29 -symbol Hall ' P 2c -2ac' -symbol xHM 'P c a 21' -symbol old 'P c a 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z+1/2 -symop -x+1/2,y,z+1/2 -symop x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 29 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' P 2c -2ac (y,-x,z)' -symbol xHM 'P b c 21' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z+1/2 -symop x,-y+1/2,z+1/2 -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 29 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2c -2ac (z,x,y)' -symbol xHM 'P 21 a b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z -symop x+1/2,-y+1/2,z -symop x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 29 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' P 2c -2ac (z,y,-x)' -symbol xHM 'P 21 c a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z -symop x+1/2,y,-z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 29 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2c -2ac (y,z,x)' -symbol xHM 'P c 21 b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z -symop x,y+1/2,-z+1/2 -symop -x,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 29 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' P 2c -2ac (-x,z,y)' -symbol xHM 'P b 21 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z -symop -x+1/2,y+1/2,z -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 30 -basisop x,y,z -symbol ccp4 30 -symbol Hall ' P 2 -2bc' -symbol xHM 'P n c 2' -symbol old 'P n c 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y+1/2,z+1/2 -symop x,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 30 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' P 2 -2bc (y,-x,z)' -symbol xHM 'P c n 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop x+1/2,-y,z+1/2 -symop -x+1/2,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 30 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2 -2bc (z,x,y)' -symbol xHM 'P 2 n a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x+1/2,-y,z+1/2 -symop x+1/2,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 30 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' P 2 -2bc (z,y,-x)' -symbol xHM 'P 2 a n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x+1/2,y+1/2,-z -symop x+1/2,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 30 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2 -2bc (y,z,x)' -symbol xHM 'P b 2 n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x+1/2,y+1/2,-z -symop -x+1/2,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 30 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' P 2 -2bc (-x,z,y)' -symbol xHM 'P n 2 b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop -x,y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 31 -basisop x,y,z -symbol ccp4 31 -symbol Hall ' P 2ac -2' -symbol xHM 'P m n 21' -symbol old 'P m n 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop -x,y,z -symop x+1/2,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 31 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' P 2ac -2 (y,-x,z)' -symbol xHM 'P n m 21' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y+1/2,z+1/2 -symop x,-y,z -symop -x,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 31 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2ac -2 (z,x,y)' -symbol xHM 'P 21 m n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y+1/2,-z -symop x,-y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 31 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' P 2ac -2 (z,y,-x)' -symbol xHM 'P 21 n m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z+1/2 -symop x,y,-z -symop x+1/2,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 31 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2ac -2 (y,z,x)' -symbol xHM 'P n 21 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z+1/2 -symop x,y,-z -symop -x,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 31 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' P 2ac -2 (-x,z,y)' -symbol xHM 'P m 21 n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x+1/2,y+1/2,-z -symop -x,y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 32 -basisop x,y,z -symbol ccp4 32 -symbol Hall ' P 2 -2ab' -symbol xHM 'P b a 2' -symbol old 'P b a 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x+1/2,y+1/2,z -symop x+1/2,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 32 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2 -2ab (z,x,y)' -symbol xHM 'P 2 c b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 32 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2 -2ab (y,z,x)' -symbol xHM 'P c 2 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x+1/2,y,-z+1/2 -symop -x+1/2,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 33 -basisop x,y,z -symbol ccp4 33 -symbol Hall ' P 2c -2n' -symbol xHM 'P n a 21' -symbol old 'P n a 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z+1/2 -symop -x+1/2,y+1/2,z+1/2 -symop x+1/2,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 33 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' P 2c -2n (y,-x,z)' -symbol xHM 'P b n 21' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -symop -x+1/2,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 33 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2c -2n (z,x,y)' -symbol xHM 'P 21 n b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z -symop x+1/2,-y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 33 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' P 2c -2n (z,y,-x)' -symbol xHM 'P 21 c n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z -symop x+1/2,y+1/2,-z+1/2 -symop x,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 33 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2c -2n (y,z,x)' -symbol xHM 'P c 21 n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z -symop x+1/2,y+1/2,-z+1/2 -symop -x+1/2,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 33 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' P 2c -2n (-x,z,y)' -symbol xHM 'P n 21 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z -symop -x+1/2,y+1/2,z+1/2 -symop x+1/2,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 34 -basisop x,y,z -symbol ccp4 34 -symbol Hall ' P 2 -2n' -symbol xHM 'P n n 2' -symbol old 'P n n 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x+1/2,y+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 34 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' P 2 -2n (z,x,y)' -symbol xHM 'P 2 n n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x+1/2,-y+1/2,z+1/2 -symop x+1/2,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 34 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' P 2 -2n (y,z,x)' -symbol xHM 'P n 2 n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x+1/2,y+1/2,-z+1/2 -symop -x+1/2,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 35 -basisop x,y,z -symbol ccp4 35 -symbol Hall ' C 2 -2' -symbol xHM 'C m m 2' -symbol old 'C m m 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y,z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 35 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' C 2 -2 (z,x,y)' -symbol xHM 'A 2 m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y,z -symop x,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 35 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' C 2 -2 (y,z,x)' -symbol xHM 'B m 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y,-z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 36 -basisop x,y,z -symbol ccp4 36 -symbol Hall ' C 2c -2' -symbol xHM 'C m c 21' -symbol old 'C m c 21' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z+1/2 -symop -x,y,z -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 36 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' C 2c -2 (y,-x,z)' -symbol xHM 'C c m 21' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z+1/2 -symop x,-y,z -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 36 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' C 2c -2 (z,x,y)' -symbol xHM 'A 21 m a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z -symop x,-y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 36 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' C 2c -2 (z,y,-x)' -symbol xHM 'A 21 a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x+1/2,-y,-z -symop x,y,-z -symop x+1/2,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 36 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' C 2c -2 (y,z,x)' -symbol xHM 'B b 21 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z -symop x,y,-z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 36 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' C 2c -2 (-x,z,y)' -symbol xHM 'B m 21 b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y+1/2,-z -symop -x,y,z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 37 -basisop x,y,z -symbol ccp4 37 -symbol Hall ' C 2 -2c' -symbol xHM 'C c c 2' -symbol old 'C c c 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 37 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' C 2 -2c (z,x,y)' -symbol xHM 'A 2 a a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x+1/2,-y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 37 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' C 2 -2c (y,z,x)' -symbol xHM 'B b 2 b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y+1/2,-z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 38 -basisop x,y,z -symbol ccp4 38 -symbol Hall ' A 2 -2' -symbol xHM 'A m m 2' -symbol old 'A m m 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y,z -symop x,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 38 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' A 2 -2 (y,-x,z)' -symbol xHM 'B m m 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop x,-y,z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 38 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' A 2 -2 (z,x,y)' -symbol xHM 'B 2 m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y,z -symop x,y,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 38 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' A 2 -2 (z,y,-x)' -symbol xHM 'C 2 m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,y,-z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 38 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' A 2 -2 (y,z,x)' -symbol xHM 'C m 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y,-z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 38 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' A 2 -2 (-x,z,y)' -symbol xHM 'A m 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop -x,y,z -symop x,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 39 -basisop x,y,z -symbol ccp4 39 -symbol Hall ' A 2 -2b' -symbol xHM 'A b m 2' -symbol old 'A b m 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y+1/2,z -symop x,-y+1/2,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 39 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' A 2 -2b (y,-x,z)' -symbol xHM 'B m a 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop x+1/2,-y,z -symop -x+1/2,y,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 39 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' A 2 -2b (z,x,y)' -symbol xHM 'B 2 c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<1/2; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y,z+1/2 -symop x,y,-z+1/2 -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 39 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' A 2 -2b (z,y,-x)' -symbol xHM 'C 2 m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,y+1/2,-z -symop x,-y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 39 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' A 2 -2b (y,z,x)' -symbol xHM 'C m 2 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x+1/2,y,-z -symop -x+1/2,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 39 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' A 2 -2b (-x,z,y)' -symbol xHM 'A c 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop -x,y,z+1/2 -symop x,y,-z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 40 -basisop x,y,z -symbol ccp4 40 -symbol Hall ' A 2 -2a' -symbol xHM 'A m a 2' -symbol old 'A m a 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x+1/2,y,z -symop x+1/2,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 40 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' A 2 -2a (y,-x,z)' -symbol xHM 'B b m 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop x,-y+1/2,z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 40 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' A 2 -2a (z,x,y)' -symbol xHM 'B 2 m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y+1/2,z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 40 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' A 2 -2a (z,y,-x)' -symbol xHM 'C 2 c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,y,-z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 40 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' A 2 -2a (y,z,x)' -symbol xHM 'C c 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y,-z+1/2 -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 40 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' A 2 -2a (-x,z,y)' -symbol xHM 'A m 2 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop -x+1/2,y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 41 -basisop x,y,z -symbol ccp4 41 -symbol Hall ' A 2 -2ab' -symbol xHM 'A b a 2' -symbol old 'A b a 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x+1/2,y+1/2,z -symop x+1/2,-y+1/2,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 41 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' A 2 -2ab (y,-x,z)' -symbol xHM 'B b a 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop x+1/2,-y+1/2,z -symop -x+1/2,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 41 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' A 2 -2ab (z,x,y)' -symbol xHM 'B 2 c b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 41 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' A 2 -2ab (z,y,-x)' -symbol xHM 'C 2 c b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,y+1/2,-z+1/2 -symop x,-y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 41 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' A 2 -2ab (y,z,x)' -symbol xHM 'C c 2 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x+1/2,y,-z+1/2 -symop -x+1/2,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 41 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' A 2 -2ab (-x,z,y)' -symbol xHM 'A c 2 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop -x+1/2,y,z+1/2 -symop x+1/2,y,-z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 42 -basisop x,y,z -symbol ccp4 42 -symbol Hall ' F 2 -2' -symbol xHM 'F m m 2' -symbol old 'F m m 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y,z -symop x,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 42 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' F 2 -2 (z,x,y)' -symbol xHM 'F 2 m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y,z -symop x,y,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 42 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' F 2 -2 (y,z,x)' -symbol xHM 'F m 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y,-z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 43 -basisop x,y,z -symbol ccp4 43 -symbol Hall ' F 2 -2d' -symbol xHM 'F d d 2' -symbol old 'F d d 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x+1/4,y+1/4,z+1/4 -symop x+3/4,-y+3/4,z+1/4 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 43 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' F 2 -2d (z,x,y)' -symbol xHM 'F 2 d d' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x+1/4,-y+1/4,z+1/4 -symop x+1/4,y+3/4,-z+3/4 -cenop x,y,z -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 43 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' F 2 -2d (y,z,x)' -symbol xHM 'F d 2 d' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x+1/4,y+1/4,-z+1/4 -symop -x+3/4,y+1/4,z+3/4 -cenop x,y,z -cenop x+1/2,y+1/2,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 44 -basisop x,y,z -symbol ccp4 44 -symbol Hall ' I 2 -2' -symbol xHM 'I m m 2' -symbol old 'I m m 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y,z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 44 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' I 2 -2 (z,x,y)' -symbol xHM 'I 2 m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y,z -symop x,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 44 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' I 2 -2 (y,z,x)' -symbol xHM 'I m 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y,-z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 45 -basisop x,y,z -symbol ccp4 45 -symbol Hall ' I 2 -2c' -symbol xHM 'I b a 2' -symbol old 'I b a 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 45 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' I 2 -2c (z,x,y)' -symbol xHM 'I 2 c b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x+1/2,-y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 45 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' I 2 -2c (y,z,x)' -symbol xHM 'I c 2 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y+1/2,-z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 46 -basisop x,y,z -symbol ccp4 46 -symbol Hall ' I 2 -2a' -symbol xHM 'I m a 2' -symbol old 'I m a 2' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop -x+1/2,y,z -symop x+1/2,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 46 -basisop y,-x,z -symbol ccp4 0 -symbol Hall ' I 2 -2a (y,-x,z)' -symbol xHM 'I b m 2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P 2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,-y,z -symop x,-y+1/2,z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 46 -basisop z,x,y -symbol ccp4 0 -symbol Hall ' I 2 -2a (z,x,y)' -symbol xHM 'I 2 m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,-y+1/2,z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 46 -basisop z,y,-x -symbol ccp4 0 -symbol Hall ' I 2 -2a (z,y,-x)' -symbol xHM 'I 2 c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P -2 2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop x,-y,-z -symop x,y,-z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 46 -basisop y,z,x -symbol ccp4 0 -symbol Hall ' I 2 -2a (y,z,x)' -symbol xHM 'I c 2 m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop x,y,-z+1/2 -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 46 -basisop -x,z,y -symbol ccp4 0 -symbol Hall ' I 2 -2a (-x,z,y)' -symbol xHM 'I m 2 a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P -2 -2' 'mm2' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -x,y,-z -symop -x+1/2,y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 47 -basisop x,y,z -symbol ccp4 47 -symbol Hall '-P 2 2' -symbol xHM 'P m m m' -symbol old 'P 2/m 2/m 2/m' 'P m m m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop -x,-y,-z -symop x,y,-z -symop -x,y,z -symop x,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 48 -basisop x-1/4,y-1/4,z-1/4 -symbol ccp4 48 -symbol Hall '-P 2ab 2bc (x-1/4,y-1/4,z-1/4)' -symbol xHM 'P n n n :1' -symbol old 'P 2/n 2/n 2/n' 'P n n n' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop -x+1/2,-y+1/2,-z+1/2 -symop x+1/2,y+1/2,-z+1/2 -symop -x+1/2,y+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 48 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 2ab 2bc' -symbol xHM 'P n n n :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y,-z+1/2 -symop -x,-y,-z -symop x+1/2,y+1/2,-z -symop -x,y+1/2,z+1/2 -symop x+1/2,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 49 -basisop x,y,z -symbol ccp4 49 -symbol Hall '-P 2 2c' -symbol xHM 'P c c m' -symbol old 'P 2/c 2/c 2/m' 'P c c m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z+1/2 -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x,y,-z -symop -x,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 49 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2 2c (z,x,y)' -symbol xHM 'P m a a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x+1/2,y,-z -symop -x+1/2,-y,z -symop -x,-y,-z -symop -x,y,z -symop x+1/2,-y,z -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 49 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2 2c (y,z,x)' -symbol xHM 'P b m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y+1/2,z -symop x,-y+1/2,-z -symop -x,-y,-z -symop x,-y,z -symop x,y+1/2,-z -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 50 -basisop x-1/4,y-1/4,z -symbol ccp4 50 -symbol Hall '-P 2ab 2b (x-1/4,y-1/4,z)' -symbol xHM 'P b a n :1' -symbol old 'P 2/b 2/a 2/n' 'P b a n' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop -x+1/2,-y+1/2,-z -symop x+1/2,y+1/2,-z -symop -x+1/2,y+1/2,z -symop x+1/2,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 50 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 2ab 2b' -symbol xHM 'P b a n :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x,-y+1/2,-z -symop -x+1/2,y,-z -symop -x,-y,-z -symop x+1/2,y+1/2,-z -symop -x,y+1/2,z -symop x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 50 -basisop z,x-1/4,y-1/4 -symbol ccp4 0 -symbol Hall '-P 2ab 2b (z,x-1/4,y-1/4)' -symbol xHM 'P n c b :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,y,-z -symop -x,-y,z -symop -x,-y+1/2,-z+1/2 -symop -x,y+1/2,z+1/2 -symop x,-y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 50 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2ab 2b (z,x,y)' -symbol xHM 'P n c b :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z+1/2 -symop -x,y,-z+1/2 -symop -x,-y+1/2,z -symop -x,-y,-z -symop -x,y+1/2,z+1/2 -symop x,-y,z+1/2 -symop x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 50 -basisop y-1/4,z,x-1/4 -symbol ccp4 0 -symbol Hall '-P 2ab 2b (y-1/4,z,x-1/4)' -symbol xHM 'P c n a :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y,z -symop x,-y,-z -symop -x+1/2,-y,-z+1/2 -symop x+1/2,-y,z+1/2 -symop x+1/2,y,-z+1/2 -symop -x+1/2,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 50 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2ab 2b (y,z,x)' -symbol xHM 'P c n a :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z+1/2 -symop -x+1/2,-y,z -symop x,-y,-z+1/2 -symop -x,-y,-z -symop x+1/2,-y,z+1/2 -symop x+1/2,y,-z -symop -x,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 51 -basisop x,y,z -symbol ccp4 51 -symbol Hall '-P 2a 2a' -symbol xHM 'P m m a' -symbol old 'P 21/m 2/m 2/a' 'P m m a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop x+1/2,-y,-z -symop -x,y,-z -symop -x,-y,-z -symop x+1/2,y,-z -symop -x+1/2,y,z -symop x,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 51 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2a 2a (y,-x,z)' -symbol xHM 'P m m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop -x,y+1/2,-z -symop x,-y,-z -symop -x,-y,-z -symop x,y+1/2,-z -symop x,-y+1/2,z -symop -x,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 51 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2a 2a (z,x,y)' -symbol xHM 'P b m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x,y+1/2,-z -symop -x,-y,z -symop -x,-y,-z -symop -x,y+1/2,z -symop x,-y+1/2,z -symop x,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 51 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2a 2a (z,y,-x)' -symbol xHM 'P c m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x,-y,z+1/2 -symop -x,y,-z -symop -x,-y,-z -symop -x,y,z+1/2 -symop x,y,-z+1/2 -symop x,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 51 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2a 2a (y,z,x)' -symbol xHM 'P m c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop -x,-y,z+1/2 -symop x,-y,-z -symop -x,-y,-z -symop x,-y,z+1/2 -symop x,y,-z+1/2 -symop -x,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 51 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-P 2a 2a (-x,z,y)' -symbol xHM 'P m a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop x+1/2,-y,-z -symop -x,-y,z -symop -x,-y,-z -symop x+1/2,-y,z -symop -x+1/2,y,z -symop x,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 52 -basisop x,y,z -symbol ccp4 52 -symbol Hall '-P 2a 2bc' -symbol xHM 'P n n a' -symbol old 'P 2/n 21/n 2/a' 'P n n a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y+1/2,-z+1/2 -symop -x,-y,-z -symop x+1/2,y,-z -symop -x,y+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 52 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2a 2bc (y,-x,z)' -symbol xHM 'P n n b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop -x+1/2,y,-z+1/2 -symop x+1/2,-y+1/2,-z+1/2 -symop -x,-y,-z -symop x,y+1/2,-z -symop x+1/2,-y,z+1/2 -symop -x+1/2,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 52 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2a 2bc (z,x,y)' -symbol xHM 'P b n n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x+1/2,y,-z+1/2 -symop -x+1/2,-y+1/2,z+1/2 -symop -x,-y,-z -symop -x,y+1/2,z -symop x+1/2,-y,z+1/2 -symop x+1/2,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 52 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2a 2bc (z,y,-x)' -symbol xHM 'P c n n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x+1/2,-y+1/2,z -symop -x+1/2,y+1/2,-z+1/2 -symop -x,-y,-z -symop -x,y,z+1/2 -symop x+1/2,y+1/2,-z -symop x+1/2,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 52 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2a 2bc (y,z,x)' -symbol xHM 'P n c n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop -x+1/2,-y+1/2,z -symop x+1/2,-y+1/2,-z+1/2 -symop -x,-y,-z -symop x,-y,z+1/2 -symop x+1/2,y+1/2,-z -symop -x+1/2,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 52 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-P 2a 2bc (-x,z,y)' -symbol xHM 'P n a n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,-y+1/2,z+1/2 -symop -x,-y,-z -symop x+1/2,-y,z -symop -x,y+1/2,z+1/2 -symop x+1/2,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 53 -basisop x,y,z -symbol ccp4 53 -symbol Hall '-P 2ac 2' -symbol xHM 'P m n a' -symbol old 'P 2/m 2/n 21/a' 'P m n a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop x,-y,-z -symop -x+1/2,y,-z+1/2 -symop -x,-y,-z -symop x+1/2,y,-z+1/2 -symop -x,y,z -symop x+1/2,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 53 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2ac 2 (y,-x,z)' -symbol xHM 'P n m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z+1/2 -symop -x,y,-z -symop x,-y+1/2,-z+1/2 -symop -x,-y,-z -symop x,y+1/2,-z+1/2 -symop x,-y,z -symop -x,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 53 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2ac 2 (z,x,y)' -symbol xHM 'P b m n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y+1/2,-z -symop -x,y,-z -symop -x+1/2,-y+1/2,z -symop -x,-y,-z -symop -x+1/2,y+1/2,z -symop x,-y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 53 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2ac 2 (z,y,-x)' -symbol xHM 'P c n m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 0<=y<1; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z+1/2 -symop -x,-y,z -symop -x+1/2,y,-z+1/2 -symop -x,-y,-z -symop -x+1/2,y,z+1/2 -symop x,y,-z -symop x+1/2,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 53 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2ac 2 (y,z,x)' -symbol xHM 'P n c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z+1/2 -symop -x,-y,z -symop x,-y+1/2,-z+1/2 -symop -x,-y,-z -symop x,-y+1/2,z+1/2 -symop x,y,-z -symop -x,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 53 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-P 2ac 2 (-x,z,y)' -symbol xHM 'P m a n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y+1/2,-z -symop x,-y,-z -symop -x+1/2,-y+1/2,z -symop -x,-y,-z -symop x+1/2,-y+1/2,z -symop -x,y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 54 -basisop x,y,z -symbol ccp4 54 -symbol Hall '-P 2a 2ac' -symbol xHM 'P c c a' -symbol old 'P 21/c 2/c 2/a' 'P c c a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop x+1/2,-y,-z+1/2 -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x+1/2,y,-z -symop -x+1/2,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 54 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2a 2ac (y,-x,z)' -symbol xHM 'P c c b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop -x,y+1/2,-z+1/2 -symop x,-y,-z+1/2 -symop -x,-y,-z -symop x,y+1/2,-z -symop x,-y+1/2,z+1/2 -symop -x,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 54 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2a 2ac (z,x,y)' -symbol xHM 'P b a a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x+1/2,y+1/2,-z -symop -x+1/2,-y,z -symop -x,-y,-z -symop -x,y+1/2,z -symop x+1/2,-y+1/2,z -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 54 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2a 2ac (z,y,-x)' -symbol xHM 'P c a a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x+1/2,-y,z+1/2 -symop -x+1/2,y,-z -symop -x,-y,-z -symop -x,y,z+1/2 -symop x+1/2,y,-z+1/2 -symop x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 54 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2a 2ac (y,z,x)' -symbol xHM 'P b c b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop -x,-y+1/2,z+1/2 -symop x,-y+1/2,-z -symop -x,-y,-z -symop x,-y,z+1/2 -symop x,y+1/2,-z+1/2 -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 54 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-P 2a 2ac (-x,z,y)' -symbol xHM 'P b a b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop x+1/2,-y+1/2,-z -symop -x,-y+1/2,z -symop -x,-y,-z -symop x+1/2,-y,z -symop -x+1/2,y+1/2,z -symop x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 55 -basisop x,y,z -symbol ccp4 55 -symbol Hall '-P 2 2ab' -symbol xHM 'P b a m' -symbol old 'P 21/b 21/a 2/m' 'P b a m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x+1/2,-y+1/2,-z -symop -x+1/2,y+1/2,-z -symop -x,-y,-z -symop x,y,-z -symop -x+1/2,y+1/2,z -symop x+1/2,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 55 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2 2ab (z,x,y)' -symbol xHM 'P m c b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,y+1/2,-z+1/2 -symop -x,-y+1/2,z+1/2 -symop -x,-y,-z -symop -x,y,z -symop x,-y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 55 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2 2ab (y,z,x)' -symbol xHM 'P c m a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x+1/2,-y,z+1/2 -symop x+1/2,-y,-z+1/2 -symop -x,-y,-z -symop x,-y,z -symop x+1/2,y,-z+1/2 -symop -x+1/2,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 56 -basisop x,y,z -symbol ccp4 56 -symbol Hall '-P 2ab 2ac' -symbol xHM 'P c c n' -symbol old 'P 21/c 21/c 2/n' 'P c c n' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x+1/2,-y,-z+1/2 -symop -x,y+1/2,-z+1/2 -symop -x,-y,-z -symop x+1/2,y+1/2,-z -symop -x+1/2,y,z+1/2 -symop x,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 56 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2ab 2ac (z,x,y)' -symbol xHM 'P n a a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y+1/2,-z -symop -x+1/2,-y,z+1/2 -symop -x,-y,-z -symop -x,y+1/2,z+1/2 -symop x+1/2,-y+1/2,z -symop x+1/2,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 56 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2ab 2ac (y,z,x)' -symbol xHM 'P b n b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z+1/2 -symop -x,-y+1/2,z+1/2 -symop x+1/2,-y+1/2,-z -symop -x,-y,-z -symop x+1/2,-y,z+1/2 -symop x,y+1/2,-z+1/2 -symop -x+1/2,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 57 -basisop x,y,z -symbol ccp4 57 -symbol Hall '-P 2c 2b' -symbol xHM 'P b c m' -symbol old 'P 2/b 21/c 21/m' 'P b c m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z+1/2 -symop x,-y+1/2,-z -symop -x,y+1/2,-z+1/2 -symop -x,-y,-z -symop x,y,-z+1/2 -symop -x,y+1/2,z -symop x,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 57 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2c 2b (y,-x,z)' -symbol xHM 'P c a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 0<=y<1; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z+1/2 -symop -x+1/2,y,-z -symop x+1/2,-y,-z+1/2 -symop -x,-y,-z -symop x,y,-z+1/2 -symop x+1/2,-y,z -symop -x+1/2,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 57 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2c 2b (z,x,y)' -symbol xHM 'P m c a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z -symop -x,y,-z+1/2 -symop -x+1/2,-y,z+1/2 -symop -x,-y,-z -symop -x+1/2,y,z -symop x,-y,z+1/2 -symop x+1/2,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 57 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2c 2b (z,y,-x)' -symbol xHM 'P m a b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z -symop -x,-y+1/2,z -symop -x+1/2,y+1/2,-z -symop -x,-y,-z -symop -x+1/2,y,z -symop x,y+1/2,-z -symop x+1/2,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 57 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2c 2b (y,z,x)' -symbol xHM 'P b m a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z -symop -x+1/2,-y,z -symop x+1/2,-y+1/2,-z -symop -x,-y,-z -symop x,-y+1/2,z -symop x+1/2,y,-z -symop -x+1/2,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 57 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-P 2c 2b (-x,z,y)' -symbol xHM 'P c m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z -symop x,-y,-z+1/2 -symop -x,-y+1/2,z+1/2 -symop -x,-y,-z -symop x,-y+1/2,z -symop -x,y,z+1/2 -symop x,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 58 -basisop x,y,z -symbol ccp4 58 -symbol Hall '-P 2 2n' -symbol xHM 'P n n m' -symbol old 'P 21/n 21/n 2/m' 'P n n m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x+1/2,-y+1/2,-z+1/2 -symop -x+1/2,y+1/2,-z+1/2 -symop -x,-y,-z -symop x,y,-z -symop -x+1/2,y+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 58 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2 2n (z,x,y)' -symbol xHM 'P m n n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x+1/2,y+1/2,-z+1/2 -symop -x+1/2,-y+1/2,z+1/2 -symop -x,-y,-z -symop -x,y,z -symop x+1/2,-y+1/2,z+1/2 -symop x+1/2,y+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 58 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2 2n (y,z,x)' -symbol xHM 'P n m n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x+1/2,-y+1/2,z+1/2 -symop x+1/2,-y+1/2,-z+1/2 -symop -x,-y,-z -symop x,-y,z -symop x+1/2,y+1/2,-z+1/2 -symop -x+1/2,y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 59 -basisop x-1/4,y-1/4,z -symbol ccp4 59 -symbol Hall '-P 2ab 2a (x-1/4,y-1/4,z)' -symbol xHM 'P m m n :1' -symbol old 'P 21/m 21/m 2/n' 'P m m n' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x+1/2,-y+1/2,-z -symop -x+1/2,y+1/2,-z -symop -x+1/2,-y+1/2,-z -symop x+1/2,y+1/2,-z -symop -x,y,z -symop x,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 59 -basisop x,y,z -symbol ccp4 1059 -symbol Hall '-P 2ab 2a' -symbol xHM 'P m m n :2' -symbol old 'P 21/m 21/m 2/n a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x+1/2,-y,-z -symop -x,y+1/2,-z -symop -x,-y,-z -symop x+1/2,y+1/2,-z -symop -x+1/2,y,z -symop x,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 59 -basisop z,x-1/4,y-1/4 -symbol ccp4 0 -symbol Hall '-P 2ab 2a (z,x-1/4,y-1/4)' -symbol xHM 'P n m m :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,y+1/2,-z+1/2 -symop -x,-y+1/2,z+1/2 -symop -x,-y+1/2,-z+1/2 -symop -x,y+1/2,z+1/2 -symop x,-y,z -symop x,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 59 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2ab 2a (z,x,y)' -symbol xHM 'P n m m :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z+1/2 -symop -x,y+1/2,-z -symop -x,-y,z+1/2 -symop -x,-y,-z -symop -x,y+1/2,z+1/2 -symop x,-y+1/2,z -symop x,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 59 -basisop y-1/4,z,x-1/4 -symbol ccp4 0 -symbol Hall '-P 2ab 2a (y-1/4,z,x-1/4)' -symbol xHM 'P m n m :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x+1/2,-y,z+1/2 -symop x+1/2,-y,-z+1/2 -symop -x+1/2,-y,-z+1/2 -symop x+1/2,-y,z+1/2 -symop x,y,-z -symop -x,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 59 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2ab 2a (y,z,x)' -symbol xHM 'P m n m :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z+1/2 -symop -x,-y,z+1/2 -symop x+1/2,-y,-z -symop -x,-y,-z -symop x+1/2,-y,z+1/2 -symop x,y,-z+1/2 -symop -x+1/2,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 60 -basisop x,y,z -symbol ccp4 60 -symbol Hall '-P 2n 2ab' -symbol xHM 'P b c n' -symbol old 'P 21/b 2/c 21/n' 'P b c n' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z+1/2 -symop x+1/2,-y+1/2,-z -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x+1/2,y+1/2,-z+1/2 -symop -x+1/2,y+1/2,z -symop x,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 60 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2n 2ab (y,-x,z)' -symbol xHM 'P c a n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z+1/2 -symop -x+1/2,y+1/2,-z -symop x,-y,-z+1/2 -symop -x,-y,-z -symop x+1/2,y+1/2,-z+1/2 -symop x+1/2,-y+1/2,z -symop -x,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 60 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2n 2ab (z,x,y)' -symbol xHM 'P n c a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y+1/2,-z+1/2 -symop -x,y+1/2,-z+1/2 -symop -x+1/2,-y,z -symop -x,-y,-z -symop -x+1/2,y+1/2,z+1/2 -symop x,-y+1/2,z+1/2 -symop x+1/2,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 60 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2n 2ab (z,y,-x)' -symbol xHM 'P n a b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y+1/2,-z+1/2 -symop -x,-y+1/2,z+1/2 -symop -x+1/2,y,-z -symop -x,-y,-z -symop -x+1/2,y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -symop x+1/2,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 60 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2n 2ab (y,z,x)' -symbol xHM 'P b n a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y+1/2,-z+1/2 -symop -x+1/2,-y,z+1/2 -symop x,-y+1/2,-z -symop -x,-y,-z -symop x+1/2,-y+1/2,z+1/2 -symop x+1/2,y,-z+1/2 -symop -x,y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 60 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-P 2n 2ab (-x,z,y)' -symbol xHM 'P c n b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y+1/2,-z+1/2 -symop x+1/2,-y,-z+1/2 -symop -x,-y+1/2,z -symop -x,-y,-z -symop x+1/2,-y+1/2,z+1/2 -symop -x+1/2,y,z+1/2 -symop x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 61 -basisop x,y,z -symbol ccp4 61 -symbol Hall '-P 2ac 2ab' -symbol xHM 'P b c a' -symbol old 'P 21/b 21/c 21/a' 'P b c a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop x+1/2,-y+1/2,-z -symop -x,y+1/2,-z+1/2 -symop -x,-y,-z -symop x+1/2,y,-z+1/2 -symop -x+1/2,y+1/2,z -symop x,-y+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 61 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2ac 2ab (z,y,-x)' -symbol xHM 'P c a b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z+1/2 -symop -x,-y+1/2,z+1/2 -symop -x+1/2,y+1/2,-z -symop -x,-y,-z -symop -x+1/2,y,z+1/2 -symop x,y+1/2,-z+1/2 -symop x+1/2,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 62 -basisop x,y,z -symbol ccp4 62 -symbol Hall '-P 2ac 2n' -symbol xHM 'P n m a' -symbol old 'P 21/n 21/m 21/a' 'P n m a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop x+1/2,-y+1/2,-z+1/2 -symop -x,y+1/2,-z -symop -x,-y,-z -symop x+1/2,y,-z+1/2 -symop -x+1/2,y+1/2,z+1/2 -symop x,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 62 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-P 2ac 2n (y,-x,z)' -symbol xHM 'P m n b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z+1/2 -symop -x+1/2,y+1/2,-z+1/2 -symop x+1/2,-y,-z -symop -x,-y,-z -symop x,y+1/2,-z+1/2 -symop x+1/2,-y+1/2,z+1/2 -symop -x+1/2,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 62 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-P 2ac 2n (z,x,y)' -symbol xHM 'P b n m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y+1/2,-z -symop -x+1/2,y+1/2,-z+1/2 -symop -x,-y,z+1/2 -symop -x,-y,-z -symop -x+1/2,y+1/2,z -symop x+1/2,-y+1/2,z+1/2 -symop x,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 62 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-P 2ac 2n (z,y,-x)' -symbol xHM 'P c m n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z+1/2 -symop -x+1/2,-y+1/2,z+1/2 -symop -x,y+1/2,-z -symop -x,-y,-z -symop -x+1/2,y,z+1/2 -symop x+1/2,y+1/2,-z+1/2 -symop x,-y+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 62 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-P 2ac 2n (y,z,x)' -symbol xHM 'P m c n' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z+1/2 -symop -x+1/2,-y+1/2,z+1/2 -symop x+1/2,-y,-z -symop -x,-y,-z -symop x,-y+1/2,z+1/2 -symop x+1/2,y+1/2,-z+1/2 -symop -x+1/2,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 62 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-P 2ac 2n (-x,z,y)' -symbol xHM 'P n a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y+1/2,-z -symop x+1/2,-y+1/2,-z+1/2 -symop -x,-y,z+1/2 -symop -x,-y,-z -symop x+1/2,-y+1/2,z -symop -x+1/2,y+1/2,z+1/2 -symop x,y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 63 -basisop x,y,z -symbol ccp4 63 -symbol Hall '-C 2c 2' -symbol xHM 'C m c m' -symbol old 'C 2/m 2/c 21/m' 'C m c m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z+1/2 -symop x,-y,-z -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x,y,-z+1/2 -symop -x,y,z -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 63 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-C 2c 2 (y,-x,z)' -symbol xHM 'C c m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z+1/2 -symop -x,y,-z -symop x,-y,-z+1/2 -symop -x,-y,-z -symop x,y,-z+1/2 -symop x,-y,z -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 63 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-C 2c 2 (z,x,y)' -symbol xHM 'A m m a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z -symop -x,y,-z -symop -x+1/2,-y,z -symop -x,-y,-z -symop -x+1/2,y,z -symop x,-y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 63 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-C 2c 2 (z,y,-x)' -symbol xHM 'A m a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z -symop -x,-y,z -symop -x+1/2,y,-z -symop -x,-y,-z -symop -x+1/2,y,z -symop x,y,-z -symop x+1/2,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 63 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-C 2c 2 (y,z,x)' -symbol xHM 'B b m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z -symop -x,-y,z -symop x,-y+1/2,-z -symop -x,-y,-z -symop x,-y+1/2,z -symop x,y,-z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 63 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-C 2c 2 (-x,z,y)' -symbol xHM 'B m m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z -symop x,-y,-z -symop -x,-y+1/2,z -symop -x,-y,-z -symop x,-y+1/2,z -symop -x,y,z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 64 -basisop x,y,z -symbol ccp4 64 -symbol Hall '-C 2ac 2' -symbol xHM 'C m c a' -symbol old 'C 2/m 2/c 21/a' 'C m c a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop x,-y,-z -symop -x+1/2,y,-z+1/2 -symop -x,-y,-z -symop x+1/2,y,-z+1/2 -symop -x,y,z -symop x+1/2,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 64 -basisop y,-x,z -symbol ccp4 0 -symbol Hall '-C 2ac 2 (y,-x,z)' -symbol xHM 'C c m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z+1/2 -symop -x,y,-z -symop x,-y+1/2,-z+1/2 -symop -x,-y,-z -symop x,y+1/2,-z+1/2 -symop x,-y,z -symop -x,y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 64 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-C 2ac 2 (z,x,y)' -symbol xHM 'A b m a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y+1/2,-z -symop -x,y,-z -symop -x+1/2,-y+1/2,z -symop -x,-y,-z -symop -x+1/2,y+1/2,z -symop x,-y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 64 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-C 2ac 2 (z,y,-x)' -symbol xHM 'A c a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x+1/2,-y,-z+1/2 -symop -x,-y,z -symop -x+1/2,y,-z+1/2 -symop -x,-y,-z -symop -x+1/2,y,z+1/2 -symop x,y,-z -symop x+1/2,-y,z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 64 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-C 2ac 2 (y,z,x)' -symbol xHM 'B b c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y+1/2,-z+1/2 -symop -x,-y,z -symop x,-y+1/2,-z+1/2 -symop -x,-y,-z -symop x,-y+1/2,z+1/2 -symop x,y,-z -symop -x,y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 64 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-C 2ac 2 (-x,z,y)' -symbol xHM 'B m a b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y+1/2,-z -symop x,-y,-z -symop -x+1/2,-y+1/2,z -symop -x,-y,-z -symop x+1/2,-y+1/2,z -symop -x,y,z -symop x+1/2,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 65 -basisop x,y,z -symbol ccp4 65 -symbol Hall '-C 2 2' -symbol xHM 'C m m m' -symbol old 'C 2/m 2/m 2/m' 'C m m m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop -x,-y,-z -symop x,y,-z -symop -x,y,z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 65 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-C 2 2 (z,x,y)' -symbol xHM 'A m m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x,y,-z -symop -x,-y,z -symop -x,-y,-z -symop -x,y,z -symop x,-y,z -symop x,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 65 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-C 2 2 (y,z,x)' -symbol xHM 'B m m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y,z -symop x,-y,-z -symop -x,-y,-z -symop x,-y,z -symop x,y,-z -symop -x,y,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 66 -basisop x,y,z -symbol ccp4 66 -symbol Hall '-C 2 2c' -symbol xHM 'C c c m' -symbol old 'C 2/c 2/c 2/m' 'C c c m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z+1/2 -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x,y,-z -symop -x,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 66 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-C 2 2c (z,x,y)' -symbol xHM 'A m a a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x+1/2,y,-z -symop -x+1/2,-y,z -symop -x,-y,-z -symop -x,y,z -symop x+1/2,-y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 66 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-C 2 2c (y,z,x)' -symbol xHM 'B b m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y+1/2,z -symop x,-y+1/2,-z -symop -x,-y,-z -symop x,-y,z -symop x,y+1/2,-z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 67 -basisop x,y,z -symbol ccp4 67 -symbol Hall '-C 2a 2' -symbol xHM 'C m m a' -symbol old 'C 2/m 2/m 2/a' 'C m m a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop x,-y,-z -symop -x+1/2,y,-z -symop -x,-y,-z -symop x+1/2,y,-z -symop -x,y,z -symop x+1/2,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 67 -basisop x+1/4,y+1/4,z -symbol ccp4 0 -symbol Hall '-C 2a 2 (x+1/4,y+1/4,z)' -symbol xHM 'C m m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop x,-y+1/2,-z -symop -x,y,-z -symop -x+1/2,-y+1/2,-z -symop x+1/2,y,-z -symop -x+1/2,y,z -symop x+1/2,-y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 67 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-C 2a 2 (z,x,y)' -symbol xHM 'A b m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x,y,-z -symop -x,-y+1/2,z -symop -x,-y,-z -symop -x,y+1/2,z -symop x,-y,z -symop x,y+1/2,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 67 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-C 2a 2 (z,y,-x)' -symbol xHM 'A c m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x,-y,z -symop -x,y,-z+1/2 -symop -x,-y,-z -symop -x,y,z+1/2 -symop x,y,-z -symop x,-y,z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 67 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-C 2a 2 (y,z,x)' -symbol xHM 'B m c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop -x,-y,z -symop x,-y,-z+1/2 -symop -x,-y,-z -symop x,-y,z+1/2 -symop x,y,-z -symop -x,y,z+1/2 -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 67 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-C 2a 2 (-x,z,y)' -symbol xHM 'B m a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop x,-y,-z -symop -x+1/2,-y,z -symop -x,-y,-z -symop x+1/2,-y,z -symop -x,y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 68 -basisop x-1/2,y-1/4,z+1/4 -symbol ccp4 68 -symbol Hall '-C 2a 2ac (x-1/2,y-1/4,z+1/4)' -symbol xHM 'C c c a :1' -symbol old 'C c c a' 'C 2/c 2/c 2/a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x+1/2,-y+1/2,-z -symop -x,y,-z -symop -x,-y+1/2,-z+1/2 -symop x+1/2,y,-z+1/2 -symop -x+1/2,y,z+1/2 -symop x,-y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 68 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-C 2a 2ac' -symbol xHM 'C c c a :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop x+1/2,-y,-z+1/2 -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x+1/2,y,-z -symop -x+1/2,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 68 -basisop x-1/2,y-1/4,z+1/4 -symbol ccp4 0 -symbol Hall '-C 2a 2ac (x-1/2,y-1/4,z+1/4)' -symbol xHM 'C c c b :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x+1/2,-y+1/2,-z -symop -x,y,-z -symop -x,-y+1/2,-z+1/2 -symop x+1/2,y,-z+1/2 -symop -x+1/2,y,z+1/2 -symop x,-y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 68 -basisop x-1/4,y-1/4,z -symbol ccp4 0 -symbol Hall '-C 2a 2ac (x-1/4,y-1/4,z)' -symbol xHM 'C c c b :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop x+1/2,-y+1/2,-z+1/2 -symop -x+1/2,y,-z+1/2 -symop -x+1/2,-y+1/2,-z -symop x+1/2,y,-z -symop -x,y,z+1/2 -symop x,-y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 68 -basisop z+1/4,x-1/2,y-1/4 -symbol ccp4 0 -symbol Hall '-C 2a 2ac (z+1/4,x-1/2,y-1/4)' -symbol xHM 'A b a a :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z+1/2 -symop -x,y+1/2,-z+1/2 -symop -x,-y,z -symop -x+1/2,-y,-z+1/2 -symop -x+1/2,y+1/2,z -symop x+1/2,-y+1/2,z -symop x+1/2,y,-z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 68 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-C 2a 2ac (z,x,y)' -symbol xHM 'A b a a :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x+1/2,y+1/2,-z -symop -x+1/2,-y,z -symop -x,-y,-z -symop -x,y+1/2,z -symop x+1/2,-y+1/2,z -symop x+1/2,y,-z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 68 -basisop z+1/4,x-1/2,y-1/4 -symbol ccp4 0 -symbol Hall '-C 2a 2ac (z+1/4,x-1/2,y-1/4)' -symbol xHM 'A c a a :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z+1/2 -symop -x,y+1/2,-z+1/2 -symop -x,-y,z -symop -x+1/2,-y,-z+1/2 -symop -x+1/2,y+1/2,z -symop x+1/2,-y+1/2,z -symop x+1/2,y,-z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 68 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-C 2a 2ac (z,y,-x)' -symbol xHM 'A c a a :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-A 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x+1/2,-y,z+1/2 -symop -x+1/2,y,-z -symop -x,-y,-z -symop -x,y,z+1/2 -symop x+1/2,y,-z+1/2 -symop x+1/2,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 68 -basisop y-1/4,z+1/4,x-1/2 -symbol ccp4 0 -symbol Hall '-C 2a 2ac (y-1/4,z+1/4,x-1/2)' -symbol xHM 'B b c b :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z+1/2 -symop -x+1/2,-y,z+1/2 -symop x,-y,-z -symop -x+1/2,-y+1/2,-z -symop x,-y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -symop -x+1/2,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 68 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-C 2a 2ac (y,z,x)' -symbol xHM 'B b c b :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop -x,-y+1/2,z+1/2 -symop x,-y+1/2,-z -symop -x,-y,-z -symop x,-y,z+1/2 -symop x,y+1/2,-z+1/2 -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 68 -basisop y-1/4,z+1/4,x-1/2 -symbol ccp4 0 -symbol Hall '-C 2a 2ac (y-1/4,z+1/4,x-1/2)' -symbol xHM 'B b a b :1' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z+1/2 -symop -x+1/2,-y,z+1/2 -symop x,-y,-z -symop -x+1/2,-y+1/2,-z -symop x,-y+1/2,z+1/2 -symop x,y+1/2,-z+1/2 -symop -x+1/2,y+1/2,z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 68 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-C 2a 2ac (-x,z,y)' -symbol xHM 'B b a b :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-B 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop x+1/2,-y+1/2,-z -symop -x,-y+1/2,z -symop -x,-y,-z -symop x+1/2,-y,z -symop -x+1/2,y+1/2,z -symop x,y+1/2,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 69 -basisop x,y,z -symbol ccp4 69 -symbol Hall '-F 2 2' -symbol xHM 'F m m m' -symbol old 'F 2/m 2/m 2/m' 'F m m m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop -x,-y,-z -symop x,y,-z -symop -x,y,z -symop x,-y,z -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 70 -basisop x+1/8,y+1/8,z+1/8 -symbol ccp4 70 -symbol Hall '-F 2uv 2vw (x+1/8,y+1/8,z+1/8)' -symbol xHM 'F d d d :1' -symbol old 'F 2/d 2/d 2/d' 'F d d d' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y,-z+1/2 -symop -x+1/4,-y+1/4,-z+1/4 -symop x+3/4,y+3/4,-z+1/4 -symop -x+1/4,y+3/4,z+3/4 -symop x+3/4,-y+1/4,z+3/4 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 70 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-F 2uv 2vw' -symbol xHM 'F d d d :2' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<=1/8; 1/8<=y<=3/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/4,-y+1/4,z -symop x,-y+1/4,-z+1/4 -symop -x+1/4,y,-z+1/4 -symop -x,-y,-z -symop x+3/4,y+3/4,-z -symop -x,y+3/4,z+3/4 -symop x+3/4,-y,z+3/4 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 71 -basisop x,y,z -symbol ccp4 71 -symbol Hall '-I 2 2' -symbol xHM 'I m m m' -symbol old 'I 2/m 2/m 2/m' 'I m m m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop -x,-y,-z -symop x,y,-z -symop -x,y,z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 72 -basisop x,y,z -symbol ccp4 72 -symbol Hall '-I 2 2c' -symbol xHM 'I b a m' -symbol old 'I 2/b 2/a 2/m' 'I b a m' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z+1/2 -symop -x,y,-z+1/2 -symop -x,-y,-z -symop x,y,-z -symop -x,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 72 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-I 2 2c (z,x,y)' -symbol xHM 'I m c b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z -symop -x+1/2,y,-z -symop -x+1/2,-y,z -symop -x,-y,-z -symop -x,y,z -symop x+1/2,-y,z -symop x+1/2,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 72 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-I 2 2c (y,z,x)' -symbol xHM 'I c m a' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z -symop -x,-y+1/2,z -symop x,-y+1/2,-z -symop -x,-y,-z -symop x,-y,z -symop x,y+1/2,-z -symop -x,y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 73 -basisop x,y,z -symbol ccp4 73 -symbol Hall '-I 2b 2c' -symbol xHM 'I b c a' -symbol old 'I 21/b 21/c 21/a' 'I b c a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop x,-y,-z+1/2 -symop -x,y+1/2,-z+1/2 -symop -x,-y,-z -symop x,y+1/2,-z -symop -x,y,z+1/2 -symop x,-y+1/2,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 73 -basisop x+1/4,y-1/4,z+1/4 -symbol ccp4 0 -symbol Hall '-I 2b 2c (x+1/4,y-1/4,z+1/4)' -symbol xHM 'I c a b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop x,-y+1/2,-z -symop -x+1/2,y+1/2,-z -symop -x+1/2,-y+1/2,-z+1/2 -symop x,y+1/2,-z+1/2 -symop -x+1/2,y,z+1/2 -symop x,-y,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 74 -basisop x,y,z -symbol ccp4 74 -symbol Hall '-I 2b 2' -symbol xHM 'I m m a' -symbol old 'I 21/m 21/m 21/a' 'I m m a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y+1/2,z -symop x,-y,-z -symop -x,y+1/2,-z -symop -x,-y,-z -symop x,y+1/2,-z -symop -x,y,z -symop x,-y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 74 -basisop x+1/4,y-1/4,z+1/4 -symbol ccp4 0 -symbol Hall '-I 2b 2 (x+1/4,y-1/4,z+1/4)' -symbol xHM 'I m m b' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y+1/2,-z+1/2 -symop -x+1/2,-y+1/2,-z+1/2 -symop x,y+1/2,-z+1/2 -symop -x+1/2,y,z -symop x,-y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 74 -basisop z,x,y -symbol ccp4 0 -symbol Hall '-I 2b 2 (z,x,y)' -symbol xHM 'I b m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y,-z+1/2 -symop -x,y,-z -symop -x,-y,z+1/2 -symop -x,-y,-z -symop -x,y,z+1/2 -symop x,-y,z -symop x,y,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 74 -basisop z,y,-x -symbol ccp4 0 -symbol Hall '-I 2b 2 (z,y,-x)' -symbol xHM 'I c m m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop x,-y+1/2,-z -symop -x,-y,z -symop -x,y+1/2,-z -symop -x,-y,-z -symop -x,y+1/2,z -symop x,y,-z -symop x,-y+1/2,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 74 -basisop y,z,x -symbol ccp4 0 -symbol Hall '-I 2b 2 (y,z,x)' -symbol xHM 'I m c m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,y,-z -symop -x,-y,z -symop x+1/2,-y,-z -symop -x,-y,-z -symop x+1/2,-y,z -symop x,y,-z -symop -x+1/2,y,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 74 -basisop -x,z,y -symbol ccp4 0 -symbol Hall '-I 2b 2 (-x,z,y)' -symbol xHM 'I m a m' -symbol old '' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp '-P 2 2' 'mmm' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,y,-z+1/2 -symop x,-y,-z -symop -x,-y,z+1/2 -symop -x,-y,-z -symop x,-y,z+1/2 -symop -x,y,z -symop x,y,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 75 -basisop x,y,z -symbol ccp4 75 -symbol Hall ' P 4' -symbol xHM 'P 4' -symbol old 'P 4' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp ' P 4' '4' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 76 -basisop x,y,z -symbol ccp4 76 -symbol Hall ' P 4w' -symbol xHM 'P 41' -symbol old 'P 41' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp ' P 4' '4' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/4 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z+1/4 -symop -x,-y,z+1/2 -symop y,-x,z+3/4 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 77 -basisop x,y,z -symbol ccp4 77 -symbol Hall ' P 4c' -symbol xHM 'P 42' -symbol old 'P 42' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp ' P 4' '4' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 78 -basisop x,y,z -symbol ccp4 78 -symbol Hall ' P 4cw' -symbol xHM 'P 43' -symbol old 'P 43' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp ' P 4' '4' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/4 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z+3/4 -symop -x,-y,z+1/2 -symop y,-x,z+1/4 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 79 -basisop x,y,z -symbol ccp4 79 -symbol Hall ' I 4' -symbol xHM 'I 4' -symbol old 'I 4' -symbol laue '-P 4' '4/m' -symbol patt '-I 4' '4/m' -symbol pgrp ' P 4' '4' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 80 -basisop x,y,z -symbol ccp4 80 -symbol Hall ' I 4bw' -symbol xHM 'I 41' -symbol old 'I 41' -symbol laue '-P 4' '4/m' -symbol patt '-I 4' '4/m' -symbol pgrp ' P 4' '4' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<1/4 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/4 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x+1/2,z+1/4 -symop -x+1/2,-y+1/2,z+1/2 -symop y+1/2,-x,z+3/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 81 -basisop x,y,z -symbol ccp4 81 -symbol Hall ' P -4' -symbol xHM 'P -4' -symbol old 'P -4' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp ' P -4' '-4' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 82 -basisop x,y,z -symbol ccp4 82 -symbol Hall ' I -4' -symbol xHM 'I -4' -symbol old 'I -4' -symbol laue '-P 4' '4/m' -symbol patt '-I 4' '4/m' -symbol pgrp ' P -4' '-4' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 83 -basisop x,y,z -symbol ccp4 83 -symbol Hall '-P 4' -symbol xHM 'P 4/m' -symbol old 'P 4/m' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 84 -basisop x,y,z -symbol ccp4 84 -symbol Hall '-P 4c' -symbol xHM 'P 42/m' -symbol old 'P 42/m' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -symop -x,-y,-z -symop y,-x,-z+1/2 -symop x,y,-z -symop -y,x,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 85 -basisop x-1/4,y+1/4,z -symbol ccp4 85 -symbol Hall '-P 4a (x-1/4,y+1/4,z)' -symbol xHM 'P 4/n :1' -symbol old 'P 4/n' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z -symop -x,-y,z -symop y+1/2,-x+1/2,z -symop -x+1/2,-y+1/2,-z -symop y,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 85 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4a' -symbol xHM 'P 4/n :2' -symbol old '' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z -symop -x,-y,-z -symop y+1/2,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 86 -basisop x+1/4,y+1/4,z+1/4 -symbol ccp4 86 -symbol Hall '-P 4bc (x+1/4,y+1/4,z+1/4)' -symbol xHM 'P 42/n :1' -symbol old 'P 42/n' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop -x+1/2,-y+1/2,-z+1/2 -symop y,-x,-z -symop x+1/2,y+1/2,-z+1/2 -symop -y,x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 86 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4bc' -symbol xHM 'P 42/n :2' -symbol old '' -symbol laue '-P 4' '4/m' -symbol patt '-P 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x+1/2,z+1/2 -symop -x+1/2,-y+1/2,z -symop y+1/2,-x,z+1/2 -symop -x,-y,-z -symop y,-x+1/2,-z+1/2 -symop x+1/2,y+1/2,-z -symop -y+1/2,x,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 87 -basisop x,y,z -symbol ccp4 87 -symbol Hall '-I 4' -symbol xHM 'I 4/m' -symbol old 'I 4/m' -symbol laue '-P 4' '4/m' -symbol patt '-I 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 88 -basisop x,y+1/4,z+1/8 -symbol ccp4 88 -symbol Hall '-I 4ad (x,y+1/4,z+1/8)' -symbol xHM 'I 41/a :1' -symbol old 'I 41/a' -symbol laue '-P 4' '4/m' -symbol patt '-I 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x+1/2,z+1/4 -symop -x+1/2,-y+1/2,z+1/2 -symop y+1/2,-x,z+3/4 -symop -x,-y+1/2,-z+1/4 -symop y,-x,-z -symop x+1/2,y,-z+3/4 -symop -y+1/2,x+1/2,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 88 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-I 4ad' -symbol xHM 'I 41/a :2' -symbol old '' -symbol laue '-P 4' '4/m' -symbol patt '-I 4' '4/m' -symbol pgrp '-P 4' '4/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+3/4,x+1/4,z+1/4 -symop -x+1/2,-y,z+1/2 -symop y+3/4,-x+3/4,z+3/4 -symop -x,-y,-z -symop y+1/4,-x+3/4,-z+3/4 -symop x+1/2,y,-z+1/2 -symop -y+1/4,x+1/4,-z+1/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 89 -basisop x,y,z -symbol ccp4 89 -symbol Hall ' P 4 2' -symbol xHM 'P 4 2 2' -symbol old 'P 4 2 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 90 -basisop x,y,z -symbol ccp4 90 -symbol Hall ' P 4ab 2ab' -symbol xHM 'P 4 21 2' -symbol old 'P 4 21 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z -symop -x,-y,z -symop y+1/2,-x+1/2,z -symop x+1/2,-y+1/2,-z -symop y,x,-z -symop -x+1/2,y+1/2,-z -symop -y,-x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 91 -basisop x,y,z -symbol ccp4 91 -symbol Hall ' P 4w 2c' -symbol xHM 'P 41 2 2' -symbol old 'P 41 2 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/8 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; -1/8<=z<=3/8 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z+1/4 -symop -x,-y,z+1/2 -symop y,-x,z+3/4 -symop x,-y,-z+1/2 -symop y,x,-z+3/4 -symop -x,y,-z -symop -y,-x,-z+1/4 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 92 -basisop x,y,z -symbol ccp4 92 -symbol Hall ' P 4abw 2nw' -symbol xHM 'P 41 21 2' -symbol old 'P 41 21 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+1/4 -symop -x,-y,z+1/2 -symop y+1/2,-x+1/2,z+3/4 -symop x+1/2,-y+1/2,-z+3/4 -symop y,x,-z -symop -x+1/2,y+1/2,-z+1/4 -symop -y,-x,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 93 -basisop x,y,z -symbol ccp4 93 -symbol Hall ' P 4c 2' -symbol xHM 'P 42 2 2' -symbol old 'P 42 2 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/4 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -symop x,-y,-z -symop y,x,-z+1/2 -symop -x,y,-z -symop -y,-x,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 94 -basisop x,y,z -symbol ccp4 94 -symbol Hall ' P 4n 2n' -symbol xHM 'P 42 21 2' -symbol old 'P 42 21 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,-z+1/2 -symop y,x,-z -symop -x+1/2,y+1/2,-z+1/2 -symop -y,-x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 95 -basisop x,y,z -symbol ccp4 95 -symbol Hall ' P 4cw 2c' -symbol xHM 'P 43 2 2' -symbol old 'P 43 2 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/8 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/8<=z<=5/8 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z+3/4 -symop -x,-y,z+1/2 -symop y,-x,z+1/4 -symop x,-y,-z+1/2 -symop y,x,-z+1/4 -symop -x,y,-z -symop -y,-x,-z+3/4 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 96 -basisop x,y,z -symbol ccp4 96 -symbol Hall ' P 4nw 2abw' -symbol xHM 'P 43 21 2' -symbol old 'P 43 21 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+3/4 -symop -x,-y,z+1/2 -symop y+1/2,-x+1/2,z+1/4 -symop x+1/2,-y+1/2,-z+1/4 -symop y,x,-z -symop -x+1/2,y+1/2,-z+3/4 -symop -y,-x,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 97 -basisop x,y,z -symbol ccp4 97 -symbol Hall ' I 4 2' -symbol xHM 'I 4 2 2' -symbol old 'I 4 2 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 98 -basisop x,y,z -symbol ccp4 98 -symbol Hall ' I 4bw 2bw' -symbol xHM 'I 41 2 2' -symbol old 'I 41 2 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; -1/4<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x+1/2,z+1/4 -symop -x+1/2,-y+1/2,z+1/2 -symop y+1/2,-x,z+3/4 -symop x,-y+1/2,-z+1/4 -symop y+1/2,x+1/2,-z+1/2 -symop -x+1/2,y,-z+3/4 -symop -y,-x,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 99 -basisop x,y,z -symbol ccp4 99 -symbol Hall ' P 4 -2' -symbol xHM 'P 4 m m' -symbol old 'P 4 m m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop -x,y,z -symop -y,-x,z -symop x,-y,z -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 100 -basisop x,y,z -symbol ccp4 100 -symbol Hall ' P 4 -2ab' -symbol xHM 'P 4 b m' -symbol old 'P 4 b m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop -x+1/2,y+1/2,z -symop -y+1/2,-x+1/2,z -symop x+1/2,-y+1/2,z -symop y+1/2,x+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 101 -basisop x,y,z -symbol ccp4 101 -symbol Hall ' P 4c -2c' -symbol xHM 'P 42 c m' -symbol old 'P 42 c m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -symop -x,y,z+1/2 -symop -y,-x,z -symop x,-y,z+1/2 -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 102 -basisop x,y,z -symbol ccp4 102 -symbol Hall ' P 4n -2n' -symbol xHM 'P 42 n m' -symbol old 'P 42 n m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<3/4; 1/4<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop -x+1/2,y+1/2,z+1/2 -symop -y,-x,z -symop x+1/2,-y+1/2,z+1/2 -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 103 -basisop x,y,z -symbol ccp4 103 -symbol Hall ' P 4 -2c' -symbol xHM 'P 4 c c' -symbol old 'P 4 c c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop -x,y,z+1/2 -symop -y,-x,z+1/2 -symop x,-y,z+1/2 -symop y,x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 104 -basisop x,y,z -symbol ccp4 104 -symbol Hall ' P 4 -2n' -symbol xHM 'P 4 n c' -symbol old 'P 4 n c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop -x+1/2,y+1/2,z+1/2 -symop -y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 105 -basisop x,y,z -symbol ccp4 105 -symbol Hall ' P 4c -2' -symbol xHM 'P 42 m c' -symbol old 'P 42 m c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -symop -x,y,z -symop -y,-x,z+1/2 -symop x,-y,z -symop y,x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 106 -basisop x,y,z -symbol ccp4 106 -symbol Hall ' P 4c -2ab' -symbol xHM 'P 42 b c' -symbol old 'P 42 b c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -symop -x+1/2,y+1/2,z -symop -y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,z -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 107 -basisop x,y,z -symbol ccp4 107 -symbol Hall ' I 4 -2' -symbol xHM 'I 4 m m' -symbol old 'I 4 m m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop -x,y,z -symop -y,-x,z -symop x,-y,z -symop y,x,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 108 -basisop x,y,z -symbol ccp4 108 -symbol Hall ' I 4 -2c' -symbol xHM 'I 4 c m' -symbol old 'I 4 c m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop -x,y,z+1/2 -symop -y,-x,z+1/2 -symop x,-y,z+1/2 -symop y,x,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 109 -basisop x,y,z -symbol ccp4 109 -symbol Hall ' I 4bw -2' -symbol xHM 'I 41 m d' -symbol old 'I 41 m d' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x+1/2,z+1/4 -symop -x+1/2,-y+1/2,z+1/2 -symop y+1/2,-x,z+3/4 -symop -x,y,z -symop -y,-x+1/2,z+1/4 -symop x+1/2,-y+1/2,z+1/2 -symop y+1/2,x,z+3/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 110 -basisop x,y,z -symbol ccp4 110 -symbol Hall ' I 4bw -2c' -symbol xHM 'I 41 c d' -symbol old 'I 41 c d' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P 4 -2' '4mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=0 -symop x,y,z -symop -y,x+1/2,z+1/4 -symop -x+1/2,-y+1/2,z+1/2 -symop y+1/2,-x,z+3/4 -symop -x,y,z+1/2 -symop -y,-x+1/2,z+3/4 -symop x+1/2,-y+1/2,z -symop y+1/2,x,z+1/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 111 -basisop x,y,z -symbol ccp4 111 -symbol Hall ' P -4 2' -symbol xHM 'P -4 2 m' -symbol old 'P -4 2 m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P -4 2' '-4m2' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x,-y,-z -symop -y,-x,z -symop -x,y,-z -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 112 -basisop x,y,z -symbol ccp4 112 -symbol Hall ' P -4 2c' -symbol xHM 'P -4 2 c' -symbol old 'P -4 2 c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P -4 2' '-4m2' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x,-y,-z+1/2 -symop -y,-x,z+1/2 -symop -x,y,-z+1/2 -symop y,x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 113 -basisop x,y,z -symbol ccp4 113 -symbol Hall ' P -4 2ab' -symbol xHM 'P -4 21 m' -symbol old 'P -4 21 m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P -4 2' '-4m2' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x+1/2,-y+1/2,-z -symop -y+1/2,-x+1/2,z -symop -x+1/2,y+1/2,-z -symop y+1/2,x+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 114 -basisop x,y,z -symbol ccp4 114 -symbol Hall ' P -4 2n' -symbol xHM 'P -4 21 c' -symbol old 'P -4 21 c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P -4 2' '-4m2' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x+1/2,-y+1/2,-z+1/2 -symop -y+1/2,-x+1/2,z+1/2 -symop -x+1/2,y+1/2,-z+1/2 -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 115 -basisop x,y,z -symbol ccp4 115 -symbol Hall ' P -4 -2' -symbol xHM 'P -4 m 2' -symbol old 'P -4 m 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P -4 -2' '-42m' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop -x,y,z -symop y,x,-z -symop x,-y,z -symop -y,-x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 116 -basisop x,y,z -symbol ccp4 116 -symbol Hall ' P -4 -2c' -symbol xHM 'P -4 c 2' -symbol old 'P -4 c 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P -4 -2' '-42m' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop -x,y,z+1/2 -symop y,x,-z+1/2 -symop x,-y,z+1/2 -symop -y,-x,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 117 -basisop x,y,z -symbol ccp4 117 -symbol Hall ' P -4 -2ab' -symbol xHM 'P -4 b 2' -symbol old 'P -4 b 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P -4 -2' '-42m' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop -x+1/2,y+1/2,z -symop y+1/2,x+1/2,-z -symop x+1/2,-y+1/2,z -symop -y+1/2,-x+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 118 -basisop x,y,z -symbol ccp4 118 -symbol Hall ' P -4 -2n' -symbol xHM 'P -4 n 2' -symbol old 'P -4 n 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P -4 -2' '-42m' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop -x+1/2,y+1/2,z+1/2 -symop y+1/2,x+1/2,-z+1/2 -symop x+1/2,-y+1/2,z+1/2 -symop -y+1/2,-x+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 119 -basisop x,y,z -symbol ccp4 119 -symbol Hall ' I -4 -2' -symbol xHM 'I -4 m 2' -symbol old 'I -4 m 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P -4 -2' '-42m' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop -x,y,z -symop y,x,-z -symop x,-y,z -symop -y,-x,-z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 120 -basisop x,y,z -symbol ccp4 120 -symbol Hall ' I -4 -2c' -symbol xHM 'I -4 c 2' -symbol old 'I -4 c 2' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P -4 -2' '-42m' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop -x,y,z+1/2 -symop y,x,-z+1/2 -symop x,-y,z+1/2 -symop -y,-x,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 121 -basisop x,y,z -symbol ccp4 121 -symbol Hall ' I -4 2' -symbol xHM 'I -4 2 m' -symbol old 'I -4 2 m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P -4 2' '-4m2' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<3/4; 1/4<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x,-y,-z -symop -y,-x,z -symop -x,y,-z -symop y,x,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 122 -basisop x,y,z -symbol ccp4 122 -symbol Hall ' I -4 2bw' -symbol xHM 'I -4 2 d' -symbol old 'I -4 2 d' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp ' P -4 2' '-4m2' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x,-y+1/2,-z+1/4 -symop -y+1/2,-x,z+3/4 -symop -x,y+1/2,-z+1/4 -symop y+1/2,x,z+3/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 123 -basisop x,y,z -symbol ccp4 123 -symbol Hall '-P 4 2' -symbol xHM 'P 4/m m m' -symbol old 'P 4/m 2/m 2/m' 'P4/m m m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x,y,z -symop -y,-x,z -symop x,-y,z -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 124 -basisop x,y,z -symbol ccp4 124 -symbol Hall '-P 4 2c' -symbol xHM 'P 4/m c c' -symbol old 'P 4/m 2/c 2/c' 'P4/m c c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z+1/2 -symop y,x,-z+1/2 -symop -x,y,-z+1/2 -symop -y,-x,-z+1/2 -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x,y,z+1/2 -symop -y,-x,z+1/2 -symop x,-y,z+1/2 -symop y,x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 125 -basisop x-1/4,y-1/4,z -symbol ccp4 125 -symbol Hall '-P 4a 2b (x-1/4,y-1/4,z)' -symbol xHM 'P 4/n b m :1' -symbol old 'P 4/n 2/b 2/m' 'P4/n b m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop -x+1/2,-y+1/2,-z -symop y+1/2,-x+1/2,-z -symop x+1/2,y+1/2,-z -symop -y+1/2,x+1/2,-z -symop -x+1/2,y+1/2,z -symop -y+1/2,-x+1/2,z -symop x+1/2,-y+1/2,z -symop y+1/2,x+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 125 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4a 2b' -symbol xHM 'P 4/n b m :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<1; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z -symop x,-y+1/2,-z -symop y,x,-z -symop -x+1/2,y,-z -symop -y+1/2,-x+1/2,-z -symop -x,-y,-z -symop y+1/2,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z -symop -x,y+1/2,z -symop -y,-x,z -symop x+1/2,-y,z -symop y+1/2,x+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 126 -basisop x-1/4,y-1/4,z-1/4 -symbol ccp4 126 -symbol Hall '-P 4a 2bc (x-1/4,y-1/4,z-1/4)' -symbol xHM 'P 4/n n c :1' -symbol old 'P 4/n 2/n 2/c' 'P4/n n c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop -x+1/2,-y+1/2,-z+1/2 -symop y+1/2,-x+1/2,-z+1/2 -symop x+1/2,y+1/2,-z+1/2 -symop -y+1/2,x+1/2,-z+1/2 -symop -x+1/2,y+1/2,z+1/2 -symop -y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 126 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4a 2bc' -symbol xHM 'P 4/n n c :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z -symop x,-y+1/2,-z+1/2 -symop y,x,-z+1/2 -symop -x+1/2,y,-z+1/2 -symop -y+1/2,-x+1/2,-z+1/2 -symop -x,-y,-z -symop y+1/2,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z -symop -x,y+1/2,z+1/2 -symop -y,-x,z+1/2 -symop x+1/2,-y,z+1/2 -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 127 -basisop x,y,z -symbol ccp4 127 -symbol Hall '-P 4 2ab' -symbol xHM 'P 4/m b m' -symbol old 'P 4/m 21/b 2/m' 'P4/m b m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x+1/2,-y+1/2,-z -symop y+1/2,x+1/2,-z -symop -x+1/2,y+1/2,-z -symop -y+1/2,-x+1/2,-z -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x+1/2,y+1/2,z -symop -y+1/2,-x+1/2,z -symop x+1/2,-y+1/2,z -symop y+1/2,x+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 128 -basisop x,y,z -symbol ccp4 128 -symbol Hall '-P 4 2n' -symbol xHM 'P 4/m n c' -symbol old 'P 4/m 21/n 2/c' 'P4/m n c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x+1/2,-y+1/2,-z+1/2 -symop y+1/2,x+1/2,-z+1/2 -symop -x+1/2,y+1/2,-z+1/2 -symop -y+1/2,-x+1/2,-z+1/2 -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x+1/2,y+1/2,z+1/2 -symop -y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 129 -basisop x-1/4,y+1/4,z -symbol ccp4 129 -symbol Hall '-P 4a 2a (x-1/4,y+1/4,z)' -symbol xHM 'P 4/n m m :1' -symbol old 'P 4/n 21/m 2/m' 'P4/n m m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z -symop -x,-y,z -symop y+1/2,-x+1/2,z -symop x+1/2,-y+1/2,-z -symop y,x,-z -symop -x+1/2,y+1/2,-z -symop -y,-x,-z -symop -x+1/2,-y+1/2,-z -symop y,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x,-z -symop -x,y,z -symop -y+1/2,-x+1/2,z -symop x,-y,z -symop y+1/2,x+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 129 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4a 2a' -symbol xHM 'P 4/n m m :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z -symop x+1/2,-y,-z -symop y+1/2,x+1/2,-z -symop -x,y+1/2,-z -symop -y,-x,-z -symop -x,-y,-z -symop y+1/2,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z -symop -x+1/2,y,z -symop -y+1/2,-x+1/2,z -symop x,-y+1/2,z -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 130 -basisop x-1/4,y+1/4,z -symbol ccp4 130 -symbol Hall '-P 4a 2ac (x-1/4,y+1/4,z)' -symbol xHM 'P 4/n c c :1' -symbol old 'P 4/n 2/c 2/c' 'P4/n c c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z -symop -x,-y,z -symop y+1/2,-x+1/2,z -symop x+1/2,-y+1/2,-z+1/2 -symop y,x,-z+1/2 -symop -x+1/2,y+1/2,-z+1/2 -symop -y,-x,-z+1/2 -symop -x+1/2,-y+1/2,-z -symop y,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x,-z -symop -x,y,z+1/2 -symop -y+1/2,-x+1/2,z+1/2 -symop x,-y,z+1/2 -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 130 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4a 2ac' -symbol xHM 'P 4/n c c :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z -symop x+1/2,-y,-z+1/2 -symop y+1/2,x+1/2,-z+1/2 -symop -x,y+1/2,-z+1/2 -symop -y,-x,-z+1/2 -symop -x,-y,-z -symop y+1/2,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z -symop -x+1/2,y,z+1/2 -symop -y+1/2,-x+1/2,z+1/2 -symop x,-y+1/2,z+1/2 -symop y,x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 131 -basisop x,y,z -symbol ccp4 131 -symbol Hall '-P 4c 2' -symbol xHM 'P 42/m m c' -symbol old 'P 42/m 2/m 2/c' 'P42/m m c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -symop x,-y,-z -symop y,x,-z+1/2 -symop -x,y,-z -symop -y,-x,-z+1/2 -symop -x,-y,-z -symop y,-x,-z+1/2 -symop x,y,-z -symop -y,x,-z+1/2 -symop -x,y,z -symop -y,-x,z+1/2 -symop x,-y,z -symop y,x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 132 -basisop x,y,z -symbol ccp4 132 -symbol Hall '-P 4c 2c' -symbol xHM 'P 42/m c m' -symbol old 'P 42/m 2/c 2/m' 'P42/m c m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -symop x,-y,-z+1/2 -symop y,x,-z -symop -x,y,-z+1/2 -symop -y,-x,-z -symop -x,-y,-z -symop y,-x,-z+1/2 -symop x,y,-z -symop -y,x,-z+1/2 -symop -x,y,z+1/2 -symop -y,-x,z -symop x,-y,z+1/2 -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 133 -basisop x-1/4,y+1/4,z+1/4 -symbol ccp4 133 -symbol Hall '-P 4ac 2b (x-1/4,y+1/4,z+1/4)' -symbol xHM 'P 42/n b c :1' -symbol old 'P 42/n 2/b 2/c' 'P42/n b c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x,-y,-z+1/2 -symop y+1/2,x+1/2,-z -symop -x,y,-z+1/2 -symop -y+1/2,-x+1/2,-z -symop -x+1/2,-y+1/2,-z+1/2 -symop y,-x,-z -symop x+1/2,y+1/2,-z+1/2 -symop -y,x,-z -symop -x+1/2,y+1/2,z -symop -y,-x,z+1/2 -symop x+1/2,-y+1/2,z -symop y,x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 133 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4ac 2b' -symbol xHM 'P 42/n b c :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z+1/2 -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z+1/2 -symop x,-y+1/2,-z -symop y,x,-z+1/2 -symop -x+1/2,y,-z -symop -y+1/2,-x+1/2,-z+1/2 -symop -x,-y,-z -symop y+1/2,-x,-z+1/2 -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z+1/2 -symop -x,y+1/2,z -symop -y,-x,z+1/2 -symop x+1/2,-y,z -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 134 -basisop x-1/4,y+1/4,z-1/4 -symbol ccp4 134 -symbol Hall '-P 4ac 2bc (x-1/4,y+1/4,z-1/4)' -symbol xHM 'P 42/n n m :1' -symbol old 'P 42/n 2/n 2/m' 'P42/n n m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x,-y,-z -symop y+1/2,x+1/2,-z+1/2 -symop -x,y,-z -symop -y+1/2,-x+1/2,-z+1/2 -symop -x+1/2,-y+1/2,-z+1/2 -symop y,-x,-z -symop x+1/2,y+1/2,-z+1/2 -symop -y,x,-z -symop -x+1/2,y+1/2,z+1/2 -symop -y,-x,z -symop x+1/2,-y+1/2,z+1/2 -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 134 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4ac 2bc' -symbol xHM 'P 42/n n m :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z+1/2 -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z+1/2 -symop x,-y+1/2,-z+1/2 -symop y,x,-z -symop -x+1/2,y,-z+1/2 -symop -y+1/2,-x+1/2,-z -symop -x,-y,-z -symop y+1/2,-x,-z+1/2 -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z+1/2 -symop -x,y+1/2,z+1/2 -symop -y,-x,z -symop x+1/2,-y,z+1/2 -symop y+1/2,x+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 135 -basisop x,y,z -symbol ccp4 135 -symbol Hall '-P 4c 2ab' -symbol xHM 'P 42/m b c' -symbol old 'P 42/m 21/b 2/c' 'P42/m b c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<1; 0<=y<=1/4; 0<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z+1/2 -symop -x,-y,z -symop y,-x,z+1/2 -symop x+1/2,-y+1/2,-z -symop y+1/2,x+1/2,-z+1/2 -symop -x+1/2,y+1/2,-z -symop -y+1/2,-x+1/2,-z+1/2 -symop -x,-y,-z -symop y,-x,-z+1/2 -symop x,y,-z -symop -y,x,-z+1/2 -symop -x+1/2,y+1/2,z -symop -y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,z -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 136 -basisop x,y,z -symbol ccp4 136 -symbol Hall '-P 4n 2n' -symbol xHM 'P 42/m n m' -symbol old 'P 42/m 21/n 2/m' 'P42/m n m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<3/4; 1/4<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,-z+1/2 -symop y,x,-z -symop -x+1/2,y+1/2,-z+1/2 -symop -y,-x,-z -symop -x,-y,-z -symop y+1/2,-x+1/2,-z+1/2 -symop x,y,-z -symop -y+1/2,x+1/2,-z+1/2 -symop -x+1/2,y+1/2,z+1/2 -symop -y,-x,z -symop x+1/2,-y+1/2,z+1/2 -symop y,x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 137 -basisop x-1/4,y+1/4,z+1/4 -symbol ccp4 137 -symbol Hall '-P 4ac 2a (x-1/4,y+1/4,z+1/4)' -symbol xHM 'P 42/n m c :1' -symbol old 'P 42/n 21/m 2/c' 'P42/n m c' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,-z+1/2 -symop y,x,-z -symop -x+1/2,y+1/2,-z+1/2 -symop -y,-x,-z -symop -x+1/2,-y+1/2,-z+1/2 -symop y,-x,-z -symop x+1/2,y+1/2,-z+1/2 -symop -y,x,-z -symop -x,y,z -symop -y+1/2,-x+1/2,z+1/2 -symop x,-y,z -symop y+1/2,x+1/2,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 137 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4ac 2a' -symbol xHM 'P 42/n m c :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 1/4<=y<=3/4; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z+1/2 -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z+1/2 -symop x+1/2,-y,-z -symop y+1/2,x+1/2,-z+1/2 -symop -x,y+1/2,-z -symop -y,-x,-z+1/2 -symop -x,-y,-z -symop y+1/2,-x,-z+1/2 -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z+1/2 -symop -x+1/2,y,z -symop -y+1/2,-x+1/2,z+1/2 -symop x,-y+1/2,z -symop y,x,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 138 -basisop x-1/4,y+1/4,z-1/4 -symbol ccp4 138 -symbol Hall '-P 4ac 2ac (x-1/4,y+1/4,z-1/4)' -symbol xHM 'P 42/n c m :1' -symbol old 'P 42/n 21/c 2/m' 'P42/n c m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<3/4; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,-z -symop y,x,-z+1/2 -symop -x+1/2,y+1/2,-z -symop -y,-x,-z+1/2 -symop -x+1/2,-y+1/2,-z+1/2 -symop y,-x,-z -symop x+1/2,y+1/2,-z+1/2 -symop -y,x,-z -symop -x,y,z+1/2 -symop -y+1/2,-x+1/2,z -symop x,-y,z+1/2 -symop y+1/2,x+1/2,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 138 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4ac 2ac' -symbol xHM 'P 42/n c m :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x,y,z -symop -y,-x,z -symop x,-y,z -symop y,x,z -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 140 -basisop x,y,z -symbol ccp4 140 -symbol Hall '-I 4 2c' -symbol xHM 'I 4/m c m' -symbol old 'I 4/m 2/c 2/m' 'I4/m c m' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<3/4; 0<=y<=1/4; 0<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z+1/2 -symop y,x,-z+1/2 -symop -x,y,-z+1/2 -symop -y,-x,-z+1/2 -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x,y,z+1/2 -symop -y,-x,z+1/2 -symop x,-y,z+1/2 -symop y,x,z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 141 -basisop x-1/2,y+1/4,z+1/8 -symbol ccp4 141 -symbol Hall '-I 4bd 2 (x-1/2,y+1/4,z+1/8)' -symbol xHM 'I 41/a m d :1' -symbol old 'I 41/a 2/m 2/d' 'I41/a m d' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x+1/2,z+1/4 -symop -x+1/2,-y+1/2,z+1/2 -symop y+1/2,-x,z+3/4 -symop x,-y+1/2,-z+1/4 -symop y+1/2,x+1/2,-z+1/2 -symop -x+1/2,y,-z+3/4 -symop -y,-x,-z -symop -x,-y+1/2,-z+1/4 -symop y,-x,-z -symop x+1/2,y,-z+3/4 -symop -y+1/2,x+1/2,-z+1/2 -symop -x,y,z -symop -y+1/2,-x,z+3/4 -symop x+1/2,-y+1/2,z+1/2 -symop y,x+1/2,z+1/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 141 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-I 4bd 2' -symbol xHM 'I 41/a m d :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; -1/8<=z<=3/8 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/4,x+3/4,z+1/4 -symop -x+1/2,-y,z+1/2 -symop y+1/4,-x+1/4,z+3/4 -symop x,-y,-z -symop y+1/4,x+3/4,-z+1/4 -symop -x+1/2,y,-z+1/2 -symop -y+1/4,-x+1/4,-z+3/4 -symop -x,-y,-z -symop y+3/4,-x+1/4,-z+3/4 -symop x+1/2,y,-z+1/2 -symop -y+3/4,x+3/4,-z+1/4 -symop -x,y,z -symop -y+3/4,-x+1/4,z+3/4 -symop x+1/2,-y,z+1/2 -symop y+3/4,x+3/4,z+1/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 142 -basisop x-1/2,y+1/4,z-3/8 -symbol ccp4 142 -symbol Hall '-I 4bd 2c (x-1/2,y+1/4,z-3/8)' -symbol xHM 'I 41/a c d :1' -symbol old 'I41/a c d' 'I 41/a 2/c 2/d' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/8 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x+1/2,z+1/4 -symop -x+1/2,-y+1/2,z+1/2 -symop y+1/2,-x,z+3/4 -symop x,-y+1/2,-z+3/4 -symop y+1/2,x+1/2,-z -symop -x+1/2,y,-z+1/4 -symop -y,-x,-z+1/2 -symop -x,-y+1/2,-z+1/4 -symop y,-x,-z -symop x+1/2,y,-z+3/4 -symop -y+1/2,x+1/2,-z+1/2 -symop -x,y,z+1/2 -symop -y+1/2,-x,z+1/4 -symop x+1/2,-y+1/2,z -symop y,x+1/2,z+3/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 142 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-I 4bd 2c' -symbol xHM 'I 41/a c d :2' -symbol old '' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-I 4 2' '4/mmm' -symbol pgrp '-P 4 2' '4/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/8 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 1/8<=z<=5/8 -cheshire 0<=x<=1; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/4,x+3/4,z+1/4 -symop -x+1/2,-y,z+1/2 -symop y+1/4,-x+1/4,z+3/4 -symop x,-y,-z+1/2 -symop y+1/4,x+3/4,-z+3/4 -symop -x+1/2,y,-z -symop -y+1/4,-x+1/4,-z+1/4 -symop -x,-y,-z -symop y+3/4,-x+1/4,-z+3/4 -symop x+1/2,y,-z+1/2 -symop -y+3/4,x+3/4,-z+1/4 -symop -x,y,z+1/2 -symop -y+3/4,-x+1/4,z+1/4 -symop x+1/2,-y,z -symop y+3/4,x+3/4,z+3/4 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 143 -basisop x,y,z -symbol ccp4 143 -symbol Hall ' P 3' -symbol xHM 'P 3' -symbol old 'P 3' -symbol laue '-P 3' '-3' -symbol patt '-P 3' '-3' -symbol pgrp ' P 3' '3' -hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 -mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 144 -basisop x,y,z -symbol ccp4 144 -symbol Hall ' P 31' -symbol xHM 'P 31' -symbol old 'P 31' -symbol laue '-P 3' '-3' -symbol patt '-P 3' '-3' -symbol pgrp ' P 3' '3' -hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/3 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/3 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1/3 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop -y,x-y,z+1/3 -symop -x+y,-x,z+2/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 145 -basisop x,y,z -symbol ccp4 145 -symbol Hall ' P 32' -symbol xHM 'P 32' -symbol old 'P 32' -symbol laue '-P 3' '-3' -symbol patt '-P 3' '-3' -symbol pgrp ' P 3' '3' -hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/3 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/3 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1/3 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop -y,x-y,z+2/3 -symop -x+y,-x,z+1/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 146 -basisop x,y,z -symbol ccp4 146 -symbol Hall ' R 3' -symbol xHM 'R 3 :H' -symbol old 'H 3' -symbol laue '-P 3' '-3' -symbol patt '-R 3' '-3' -symbol pgrp ' P 3' '3' -hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 -mapasu zero 0<=x<=1/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=1/3; 0<=y<=1/3; 0<=z<1 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -cenop x,y,z -cenop x+2/3,y+1/3,z+1/3 -cenop x+1/3,y+2/3,z+2/3 -end_spacegroup - -begin_spacegroup -number 146 -basisop -y+z,x+z,-x+y+z -symbol ccp4 1146 -symbol Hall ' R 3 (-y+z,x+z,-x+y+z)' -symbol xHM 'R 3 :R' -symbol old 'R 3' -symbol laue '-P 3*' '-3' -symbol patt '-P 3*' '-3' -symbol pgrp ' P 3*' '3' -hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop z,x,y -symop y,z,x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 147 -basisop x,y,z -symbol ccp4 147 -symbol Hall '-P 3' -symbol xHM 'P -3' -symbol old 'P -3' -symbol laue '-P 3' '-3' -symbol patt '-P 3' '-3' -symbol pgrp '-P 3' '-3' -hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -x,-y,-z -symop y,-x+y,-z -symop x-y,x,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 148 -basisop x,y,z -symbol ccp4 148 -symbol Hall '-R 3' -symbol xHM 'R -3 :H' -symbol old 'H -3' -symbol laue '-P 3' '-3' -symbol patt '-R 3' '-3' -symbol pgrp '-P 3' '-3' -hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/6 -mapasu zero 0<=x<=1/3; 0<=y<=1/3; 0<=z<=1/2 -mapasu nonz 0<=x<=1/3; -1/6<=y<=0; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -x,-y,-z -symop y,-x+y,-z -symop x-y,x,-z -cenop x,y,z -cenop x+2/3,y+1/3,z+1/3 -cenop x+1/3,y+2/3,z+2/3 -end_spacegroup - -begin_spacegroup -number 148 -basisop -y+z,x+z,-x+y+z -symbol ccp4 1148 -symbol Hall '-R 3 (-y+z,x+z,-x+y+z)' -symbol xHM 'R -3 :R' -symbol old 'R -3' -symbol laue '-P 3*' '-3' -symbol patt '-P 3*' '-3' -symbol pgrp '-P 3*' '-3' -hklasu ccp4 '(h>=0 and k>0) or (h=0 and k=0 and l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop z,x,y -symop y,z,x -symop -x,-y,-z -symop -z,-x,-y -symop -y,-z,-x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 149 -basisop x,y,z -symbol ccp4 149 -symbol Hall ' P 3 2' -symbol xHM 'P 3 1 2' -symbol old 'P 3 1 2' -symbol laue '-P 3 2' '-31m' -symbol patt '-P 3 2' '-31m' -symbol pgrp ' P 3 2' '312' -hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -y,-x,-z -symop x,x-y,-z -symop -x+y,y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 150 -basisop x,y,z -symbol ccp4 150 -symbol Hall ' P 3 2"' -symbol xHM 'P 3 2 1' -symbol old 'P 3 2 1' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-P 3 2"' '-3m1' -symbol pgrp ' P 3 2"' '321' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop y,x,-z -symop -x,-x+y,-z -symop x-y,-y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 151 -basisop x,y,z -symbol ccp4 151 -symbol Hall ' P 31 2 (x,y,z+1/3)' -symbol xHM 'P 31 1 2' -symbol old 'P 31 1 2' -symbol laue '-P 3 2' '-31m' -symbol patt '-P 3 2' '-31m' -symbol pgrp ' P 3 2' '312' -hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/6 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<=1/6 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z+1/3 -symop -x+y,-x,z+2/3 -symop -y,-x,-z+2/3 -symop x,x-y,-z -symop -x+y,y,-z+1/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 152 -basisop x,y,z -symbol ccp4 152 -symbol Hall ' P 31 2"' -symbol xHM 'P 31 2 1' -symbol old 'P 31 2 1' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-P 3 2"' '-3m1' -symbol pgrp ' P 3 2"' '321' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 -mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<=1/3 -mapasu nonz 0<=x<=1/2; 0<=y<1; 0<=z<=1/3 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z+1/3 -symop -x+y,-x,z+2/3 -symop y,x,-z -symop -x,-x+y,-z+1/3 -symop x-y,-y,-z+2/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 153 -basisop x,y,z -symbol ccp4 153 -symbol Hall ' P 32 2 (x,y,z+1/6)' -symbol xHM 'P 32 1 2' -symbol old 'P 32 1 2' -symbol laue '-P 3 2' '-31m' -symbol patt '-P 3 2' '-31m' -symbol pgrp ' P 3 2' '312' -hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<=1/6 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<=1/6 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z+2/3 -symop -x+y,-x,z+1/3 -symop -y,-x,-z+1/3 -symop x,x-y,-z -symop -x+y,y,-z+2/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 154 -basisop x,y,z -symbol ccp4 154 -symbol Hall ' P 32 2"' -symbol xHM 'P 32 2 1' -symbol old 'P 32 2 1' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-P 3 2"' '-3m1' -symbol pgrp ' P 3 2"' '321' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/3 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/3 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z+2/3 -symop -x+y,-x,z+1/3 -symop y,x,-z -symop -x,-x+y,-z+2/3 -symop x-y,-y,-z+1/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 155 -basisop x,y,z -symbol ccp4 155 -symbol Hall ' R 3 2"' -symbol xHM 'R 3 2 :H' -symbol old 'H 3 2' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-R 3 2"' '-3m' -symbol pgrp ' P 3 2"' '321' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/6 -mapasu zero 0<=x<=1/3; 0<=y<=1/3; 0<=z<=1/2 -mapasu nonz 0<=x<=1/3; 0<=y<=1/3; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop y,x,-z -symop -x,-x+y,-z -symop x-y,-y,-z -cenop x,y,z -cenop x+2/3,y+1/3,z+1/3 -cenop x+1/3,y+2/3,z+2/3 -end_spacegroup - -begin_spacegroup -number 155 -basisop -y+z,x+z,-x+y+z -symbol ccp4 1155 -symbol Hall ' R 3 2" (-y+z,x+z,-x+y+z)' -symbol xHM 'R 3 2 :R' -symbol old 'R 3 2' -symbol laue '-P 3* 2' '-3m' -symbol patt '-P 3* 2' '-3m' -symbol pgrp ' P 3* 2' '32' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop z,x,y -symop y,z,x -symop -y,-x,-z -symop -z,-y,-x -symop -x,-z,-y -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 156 -basisop x,y,z -symbol ccp4 156 -symbol Hall ' P 3 -2"' -symbol xHM 'P 3 m 1' -symbol old 'P 3 m 1' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-P 3 2"' '-3m1' -symbol pgrp ' P 3 -2"' '3m1' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 -mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<1 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -y,-x,z -symop x,x-y,z -symop -x+y,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 157 -basisop x,y,z -symbol ccp4 157 -symbol Hall ' P 3 -2' -symbol xHM 'P 3 1 m' -symbol old 'P 3 1 m' -symbol laue '-P 3 2' '-31m' -symbol patt '-P 3 2' '-31m' -symbol pgrp ' P 3 -2' '31m' -hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop y,x,z -symop -x,-x+y,z -symop x-y,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 158 -basisop x,y,z -symbol ccp4 158 -symbol Hall ' P 3 -2"c' -symbol xHM 'P 3 c 1' -symbol old 'P 3 c 1' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-P 3 2"' '-3m1' -symbol pgrp ' P 3 -2"' '3m1' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/2 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -y,-x,z+1/2 -symop x,x-y,z+1/2 -symop -x+y,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 159 -basisop x,y,z -symbol ccp4 159 -symbol Hall ' P 3 -2c' -symbol xHM 'P 3 1 c' -symbol old 'P 3 1 c' -symbol laue '-P 3 2' '-31m' -symbol patt '-P 3 2' '-31m' -symbol pgrp ' P 3 -2' '31m' -hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop y,x,z+1/2 -symop -x,-x+y,z+1/2 -symop x-y,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 160 -basisop x,y,z -symbol ccp4 160 -symbol Hall ' R 3 -2"' -symbol xHM 'R 3 m :H' -symbol old 'H 3 m' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-R 3 2"' '-3m' -symbol pgrp ' P 3 -2"' '3m1' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/3; 0<=y<1/3; 0<=z<1 -mapasu nonz 0<=x<=5/12; 0<=y<1/4; 0<=z<1 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -y,-x,z -symop x,x-y,z -symop -x+y,y,z -cenop x,y,z -cenop x+2/3,y+1/3,z+1/3 -cenop x+1/3,y+2/3,z+2/3 -end_spacegroup - -begin_spacegroup -number 160 -basisop -y+z,x+z,-x+y+z -symbol ccp4 1160 -symbol Hall ' R 3 -2" (-y+z,x+z,-x+y+z)' -symbol xHM 'R 3 m :R' -symbol old 'R 3 m' -symbol laue '-P 3* 2' '-3m' -symbol patt '-P 3* 2' '-3m' -symbol pgrp ' P 3* -2' '3m' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop z,x,y -symop y,z,x -symop y,x,z -symop z,y,x -symop x,z,y -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 161 -basisop x,y,z -symbol ccp4 161 -symbol Hall ' R 3 -2"c' -symbol xHM 'R 3 c :H' -symbol old 'H 3 c' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-R 3 2"' '-3m' -symbol pgrp ' P 3 -2"' '3m1' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/3; 0<=y<1/3; 0<=z<1/2 -mapasu nonz 0<=x<=1/3; 0<=y<1/3; 0<=z<1/2 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -y,-x,z+1/2 -symop x,x-y,z+1/2 -symop -x+y,y,z+1/2 -cenop x,y,z -cenop x+2/3,y+1/3,z+1/3 -cenop x+1/3,y+2/3,z+2/3 -end_spacegroup - -begin_spacegroup -number 161 -basisop -y+z,x+z,-x+y+z -symbol ccp4 1161 -symbol Hall ' R 3 -2"c (-y+z,x+z,-x+y+z)' -symbol xHM 'R 3 c :R' -symbol old 'R 3 c' -symbol laue '-P 3* 2' '-3m' -symbol patt '-P 3* 2' '-3m' -symbol pgrp ' P 3* -2' '3m' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<1/2; 0<=z<1 -mapasu nonz 0<=x<1/2; 0<=y<1/2; 0<=z<1 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=0 -symop x,y,z -symop z,x,y -symop y,z,x -symop y+1/2,x+1/2,z+1/2 -symop z+1/2,y+1/2,x+1/2 -symop x+1/2,z+1/2,y+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 162 -basisop x,y,z -symbol ccp4 162 -symbol Hall '-P 3 2' -symbol xHM 'P -3 1 m' -symbol old 'P -3 1 2/m' 'P -3 1 m' -symbol laue '-P 3 2' '-31m' -symbol patt '-P 3 2' '-31m' -symbol pgrp '-P 3 2' '-31m' -hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -y,-x,-z -symop x,x-y,-z -symop -x+y,y,-z -symop -x,-y,-z -symop y,-x+y,-z -symop x-y,x,-z -symop y,x,z -symop -x,-x+y,z -symop x-y,-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 163 -basisop x,y,z -symbol ccp4 163 -symbol Hall '-P 3 2c' -symbol xHM 'P -3 1 c' -symbol old 'P -3 1 2/c' 'P -3 1 c' -symbol laue '-P 3 2' '-31m' -symbol patt '-P 3 2' '-31m' -symbol pgrp '-P 3 2' '-31m' -hklasu ccp4 'h>=k and k>=0 and (k>0 or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop -y,-x,-z+1/2 -symop x,x-y,-z+1/2 -symop -x+y,y,-z+1/2 -symop -x,-y,-z -symop y,-x+y,-z -symop x-y,x,-z -symop y,x,z+1/2 -symop -x,-x+y,z+1/2 -symop x-y,-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 164 -basisop x,y,z -symbol ccp4 164 -symbol Hall '-P 3 2"' -symbol xHM 'P -3 m 1' -symbol old 'P -3 2/m 1' 'P -3 m 1' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-P 3 2"' '-3m1' -symbol pgrp '-P 3 2"' '-3m1' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop y,x,-z -symop -x,-x+y,-z -symop x-y,-y,-z -symop -x,-y,-z -symop y,-x+y,-z -symop x-y,x,-z -symop -y,-x,z -symop x,x-y,z -symop -x+y,y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 165 -basisop x,y,z -symbol ccp4 165 -symbol Hall '-P 3 2"c' -symbol xHM 'P -3 c 1' -symbol old 'P -3 2/c 1' 'P -3 c 1' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-P 3 2"' '-3m1' -symbol pgrp '-P 3 2"' '-3m1' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop y,x,-z+1/2 -symop -x,-x+y,-z+1/2 -symop x-y,-y,-z+1/2 -symop -x,-y,-z -symop y,-x+y,-z -symop x-y,x,-z -symop -y,-x,z+1/2 -symop x,x-y,z+1/2 -symop -x+y,y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 166 -basisop x,y,z -symbol ccp4 166 -symbol Hall '-R 3 2"' -symbol xHM 'R -3 m :H' -symbol old 'H -3 2/m' 'H -3 m' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-R 3 2"' '-3m' -symbol pgrp '-P 3 2"' '-3m1' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/6 -mapasu zero 0<=x<=1/3; 0<=y<=1/6; 0<=z<1 -mapasu nonz 0<=x<=1/3; 0<=y<=1/6; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop y,x,-z -symop -x,-x+y,-z -symop x-y,-y,-z -symop -x,-y,-z -symop y,-x+y,-z -symop x-y,x,-z -symop -y,-x,z -symop x,x-y,z -symop -x+y,y,z -cenop x,y,z -cenop x+2/3,y+1/3,z+1/3 -cenop x+1/3,y+2/3,z+2/3 -end_spacegroup - -begin_spacegroup -number 166 -basisop -y+z,x+z,-x+y+z -symbol ccp4 1166 -symbol Hall '-R 3 2" (-y+z,x+z,-x+y+z)' -symbol xHM 'R -3 m :R' -symbol old 'R -3 2/m' 'R -3 m' -symbol laue '-P 3* 2' '-3m' -symbol patt '-P 3* 2' '-3m' -symbol pgrp '-P 3* 2' '-3m' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop z,x,y -symop y,z,x -symop -y,-x,-z -symop -z,-y,-x -symop -x,-z,-y -symop -x,-y,-z -symop -z,-x,-y -symop -y,-z,-x -symop y,x,z -symop z,y,x -symop x,z,y -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 167 -basisop x,y,z -symbol ccp4 167 -symbol Hall '-R 3 2"c' -symbol xHM 'R -3 c :H' -symbol old 'H -3 2/c' 'H -3 c' -symbol laue '-P 3 2"' '-3m1' -symbol patt '-R 3 2"' '-3m' -symbol pgrp '-P 3 2"' '-3m1' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/6; 0<=z<=1/3 -mapasu nonz 0<=x<=1/3; -1/6<=y<=0; 1/12<=z<=7/12 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop -y,x-y,z -symop -x+y,-x,z -symop y,x,-z+1/2 -symop -x,-x+y,-z+1/2 -symop x-y,-y,-z+1/2 -symop -x,-y,-z -symop y,-x+y,-z -symop x-y,x,-z -symop -y,-x,z+1/2 -symop x,x-y,z+1/2 -symop -x+y,y,z+1/2 -cenop x,y,z -cenop x+2/3,y+1/3,z+1/3 -cenop x+1/3,y+2/3,z+2/3 -end_spacegroup - -begin_spacegroup -number 167 -basisop -y+z,x+z,-x+y+z -symbol ccp4 1167 -symbol Hall '-R 3 2"c (-y+z,x+z,-x+y+z)' -symbol xHM 'R -3 c :R' -symbol old 'R -3 2/c' 'R -3 c' -symbol laue '-P 3* 2' '-3m' -symbol patt '-P 3* 2' '-3m' -symbol pgrp '-P 3* 2' '-3m' -hklasu ccp4 'h>=k and k>=0 and (h>k or l>=0)' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; -1/4<=y<=1/4; 0<=z<3/4 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop z,x,y -symop y,z,x -symop -y+1/2,-x+1/2,-z+1/2 -symop -z+1/2,-y+1/2,-x+1/2 -symop -x+1/2,-z+1/2,-y+1/2 -symop -x,-y,-z -symop -z,-x,-y -symop -y,-z,-x -symop y+1/2,x+1/2,z+1/2 -symop z+1/2,y+1/2,x+1/2 -symop x+1/2,z+1/2,y+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 168 -basisop x,y,z -symbol ccp4 168 -symbol Hall ' P 6' -symbol xHM 'P 6' -symbol old 'P 6' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp ' P 6' '6' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=2/3; 0<=y<=1/2; 0<=z<1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z -symop -y,x-y,z -symop -x,-y,z -symop -x+y,-x,z -symop y,-x+y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 169 -basisop x,y,z -symbol ccp4 169 -symbol Hall ' P 61' -symbol xHM 'P 61' -symbol old 'P 61' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp ' P 6' '6' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/6 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/6 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1/6 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z+1/6 -symop -y,x-y,z+1/3 -symop -x,-y,z+1/2 -symop -x+y,-x,z+2/3 -symop y,-x+y,z+5/6 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 170 -basisop x,y,z -symbol ccp4 170 -symbol Hall ' P 65' -symbol xHM 'P 65' -symbol old 'P 65' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp ' P 6' '6' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/6 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/6 -mapasu nonz 0<=x<1; 0<=y<1; 0<=z<1/6 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z+5/6 -symop -y,x-y,z+2/3 -symop -x,-y,z+1/2 -symop -x+y,-x,z+1/3 -symop y,-x+y,z+1/6 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 171 -basisop x,y,z -symbol ccp4 171 -symbol Hall ' P 62' -symbol xHM 'P 62' -symbol old 'P 62' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp ' P 6' '6' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/3 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/3 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1/3 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z+1/3 -symop -y,x-y,z+2/3 -symop -x,-y,z -symop -x+y,-x,z+1/3 -symop y,-x+y,z+2/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 172 -basisop x,y,z -symbol ccp4 172 -symbol Hall ' P 64' -symbol xHM 'P 64' -symbol old 'P 64' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp ' P 6' '6' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<1/3 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<1/3 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<1/3 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z+2/3 -symop -y,x-y,z+1/3 -symop -x,-y,z -symop -x+y,-x,z+2/3 -symop y,-x+y,z+1/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 173 -basisop x,y,z -symbol ccp4 173 -symbol Hall ' P 6c' -symbol xHM 'P 63' -symbol old 'P 63' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp ' P 6' '6' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/2 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z+1/2 -symop -y,x-y,z -symop -x,-y,z+1/2 -symop -x+y,-x,z -symop y,-x+y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 174 -basisop x,y,z -symbol ccp4 174 -symbol Hall ' P -6' -symbol xHM 'P -6' -symbol old 'P -6' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp ' P -6' '-6' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop -x+y,-x,-z -symop -y,x-y,z -symop x,y,-z -symop -x+y,-x,z -symop -y,x-y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 175 -basisop x,y,z -symbol ccp4 175 -symbol Hall '-P 6' -symbol xHM 'P 6/m' -symbol old 'P 6/m' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp '-P 6' '6/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z -symop -y,x-y,z -symop -x,-y,z -symop -x+y,-x,z -symop y,-x+y,z -symop -x,-y,-z -symop -x+y,-x,-z -symop y,-x+y,-z -symop x,y,-z -symop x-y,x,-z -symop -y,x-y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 176 -basisop x,y,z -symbol ccp4 176 -symbol Hall '-P 6c' -symbol xHM 'P 63/m' -symbol old 'P 63/m' -symbol laue '-P 6' '6/m' -symbol patt '-P 6' '6/m' -symbol pgrp '-P 6' '6/m' -hklasu ccp4 'l>=0 and ((h>=0 and k>0) or (h=0 and k=0))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z+1/2 -symop -y,x-y,z -symop -x,-y,z+1/2 -symop -x+y,-x,z -symop y,-x+y,z+1/2 -symop -x,-y,-z -symop -x+y,-x,-z+1/2 -symop y,-x+y,-z -symop x,y,-z+1/2 -symop x-y,x,-z -symop -y,x-y,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 177 -basisop x,y,z -symbol ccp4 177 -symbol Hall ' P 6 2' -symbol xHM 'P 6 2 2' -symbol old 'P 6 2 2' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 2' '622' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=2/3; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z -symop -y,x-y,z -symop -x,-y,z -symop -x+y,-x,z -symop y,-x+y,z -symop -y,-x,-z -symop x-y,-y,-z -symop x,x-y,-z -symop y,x,-z -symop -x+y,y,-z -symop -x,-x+y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 178 -basisop x,y,z -symbol ccp4 178 -symbol Hall ' P 61 2 (x,y,z+5/12)' -symbol xHM 'P 61 2 2' -symbol old 'P 61 2 2' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 2' '622' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/12 -mapasu zero 0<=x<1; 0<=y<1; 0<=z<1/6 -mapasu nonz 0<=x<1; 0<=y<=1/2; -1/12<=z<=1/12 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z+1/6 -symop -y,x-y,z+1/3 -symop -x,-y,z+1/2 -symop -x+y,-x,z+2/3 -symop y,-x+y,z+5/6 -symop -y,-x,-z+5/6 -symop x-y,-y,-z -symop x,x-y,-z+1/6 -symop y,x,-z+1/3 -symop -x+y,y,-z+1/2 -symop -x,-x+y,-z+2/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 179 -basisop x,y,z -symbol ccp4 179 -symbol Hall ' P 65 2 (x,y,z+1/12)' -symbol xHM 'P 65 2 2' -symbol old 'P 65 2 2' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 2' '622' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/12 -mapasu zero 0<=x<=1/2; 0<=y<1; 0<=z<1/3 -mapasu nonz 0<=x<=1/2; 0<=y<1; 1/12<=z<=1/4 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z+5/6 -symop -y,x-y,z+2/3 -symop -x,-y,z+1/2 -symop -x+y,-x,z+1/3 -symop y,-x+y,z+1/6 -symop -y,-x,-z+1/6 -symop x-y,-y,-z -symop x,x-y,-z+5/6 -symop y,x,-z+2/3 -symop -x+y,y,-z+1/2 -symop -x,-x+y,-z+1/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 180 -basisop x,y,z -symbol ccp4 180 -symbol Hall ' P 62 2 (x,y,z+1/3)' -symbol xHM 'P 62 2 2' -symbol old 'P 62 2 2' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 2' '622' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/6 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/6 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z+1/3 -symop -y,x-y,z+2/3 -symop -x,-y,z -symop -x+y,-x,z+1/3 -symop y,-x+y,z+2/3 -symop -y,-x,-z+2/3 -symop x-y,-y,-z -symop x,x-y,-z+1/3 -symop y,x,-z+2/3 -symop -x+y,y,-z -symop -x,-x+y,-z+1/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 181 -basisop x,y,z -symbol ccp4 181 -symbol Hall ' P 64 2 (x,y,z+1/6)' -symbol xHM 'P 64 2 2' -symbol old 'P 64 2 2' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 2' '622' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/6 -mapasu zero 0<=x<1; 0<=y<=1/2; 0<=z<=1/6 -mapasu nonz 0<=x<1; 0<=y<=1/2; 0<=z<=1/6 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z+2/3 -symop -y,x-y,z+1/3 -symop -x,-y,z -symop -x+y,-x,z+2/3 -symop y,-x+y,z+1/3 -symop -y,-x,-z+1/3 -symop x-y,-y,-z -symop x,x-y,-z+2/3 -symop y,x,-z+1/3 -symop -x+y,y,-z -symop -x,-x+y,-z+2/3 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 182 -basisop x,y,z -symbol ccp4 182 -symbol Hall ' P 6c 2c' -symbol xHM 'P 63 2 2' -symbol old 'P 63 2 2' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 2' '622' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/4 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z+1/2 -symop -y,x-y,z -symop -x,-y,z+1/2 -symop -x+y,-x,z -symop y,-x+y,z+1/2 -symop -y,-x,-z+1/2 -symop x-y,-y,-z -symop x,x-y,-z+1/2 -symop y,x,-z -symop -x+y,y,-z+1/2 -symop -x,-x+y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 183 -basisop x,y,z -symbol ccp4 183 -symbol Hall ' P 6 -2' -symbol xHM 'P 6 m m' -symbol old 'P 6 m m' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 -2' '6mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z -symop -y,x-y,z -symop -x,-y,z -symop -x+y,-x,z -symop y,-x+y,z -symop y,x,z -symop -x+y,y,z -symop -x,-x+y,z -symop -y,-x,z -symop x-y,-y,z -symop x,x-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 184 -basisop x,y,z -symbol ccp4 184 -symbol Hall ' P 6 -2c' -symbol xHM 'P 6 c c' -symbol old 'P 6 c c' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 -2' '6mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z -symop -y,x-y,z -symop -x,-y,z -symop -x+y,-x,z -symop y,-x+y,z -symop y,x,z+1/2 -symop -x+y,y,z+1/2 -symop -x,-x+y,z+1/2 -symop -y,-x,z+1/2 -symop x-y,-y,z+1/2 -symop x,x-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 185 -basisop x,y,z -symbol ccp4 185 -symbol Hall ' P 6c -2' -symbol xHM 'P 63 c m' -symbol old 'P 63 c m' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 -2' '6mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z+1/2 -symop -y,x-y,z -symop -x,-y,z+1/2 -symop -x+y,-x,z -symop y,-x+y,z+1/2 -symop y,x,z -symop -x+y,y,z+1/2 -symop -x,-x+y,z -symop -y,-x,z+1/2 -symop x-y,-y,z -symop x,x-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 186 -basisop x,y,z -symbol ccp4 186 -symbol Hall ' P 6c -2c' -symbol xHM 'P 63 m c' -symbol old 'P 63 m c' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P 6 -2' '6mm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1 -mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=0 -symop x,y,z -symop x-y,x,z+1/2 -symop -y,x-y,z -symop -x,-y,z+1/2 -symop -x+y,-x,z -symop y,-x+y,z+1/2 -symop y,x,z+1/2 -symop -x+y,y,z -symop -x,-x+y,z+1/2 -symop -y,-x,z -symop x-y,-y,z+1/2 -symop x,x-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 187 -basisop x,y,z -symbol ccp4 187 -symbol Hall ' P -6 2' -symbol xHM 'P -6 m 2' -symbol old 'P -6 m 2' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P -6 2' '-62m' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop -x+y,-x,-z -symop -y,x-y,z -symop x,y,-z -symop -x+y,-x,z -symop -y,x-y,-z -symop -y,-x,-z -symop -x+y,y,z -symop x,x-y,-z -symop -y,-x,z -symop -x+y,y,-z -symop x,x-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 188 -basisop x,y,z -symbol ccp4 188 -symbol Hall ' P -6c 2' -symbol xHM 'P -6 c 2' -symbol old 'P -6 c 2' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P -6 2' '-62m' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 -mapasu nonz 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/4 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop -x+y,-x,-z+1/2 -symop -y,x-y,z -symop x,y,-z+1/2 -symop -x+y,-x,z -symop -y,x-y,-z+1/2 -symop -y,-x,-z -symop -x+y,y,z+1/2 -symop x,x-y,-z -symop -y,-x,z+1/2 -symop -x+y,y,-z -symop x,x-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 189 -basisop x,y,z -symbol ccp4 189 -symbol Hall ' P -6 -2' -symbol xHM 'P -6 2 m' -symbol old 'P -6 2 m' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P -6 -2' '-6m2' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop -x+y,-x,-z -symop -y,x-y,z -symop x,y,-z -symop -x+y,-x,z -symop -y,x-y,-z -symop y,x,z -symop x-y,-y,-z -symop -x,-x+y,z -symop y,x,-z -symop x-y,-y,z -symop -x,-x+y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 190 -basisop x,y,z -symbol ccp4 190 -symbol Hall ' P -6c -2c' -symbol xHM 'P -6 2 c' -symbol old 'P -6 2 c' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp ' P -6 -2' '-6m2' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 1/4<=z<=3/4 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop -x+y,-x,-z+1/2 -symop -y,x-y,z -symop x,y,-z+1/2 -symop -x+y,-x,z -symop -y,x-y,-z+1/2 -symop y,x,z+1/2 -symop x-y,-y,-z -symop -x,-x+y,z+1/2 -symop y,x,-z -symop x-y,-y,z+1/2 -symop -x,-x+y,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 191 -basisop x,y,z -symbol ccp4 191 -symbol Hall '-P 6 2' -symbol xHM 'P 6/m m m' -symbol old 'P 6/m 2/m 2/m' 'P 6/m m m' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp '-P 6 2' '6/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 0<=z<=1/2 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z -symop -y,x-y,z -symop -x,-y,z -symop -x+y,-x,z -symop y,-x+y,z -symop -y,-x,-z -symop x-y,-y,-z -symop x,x-y,-z -symop y,x,-z -symop -x+y,y,-z -symop -x,-x+y,-z -symop -x,-y,-z -symop -x+y,-x,-z -symop y,-x+y,-z -symop x,y,-z -symop x-y,x,-z -symop -y,x-y,-z -symop y,x,z -symop -x+y,y,z -symop -x,-x+y,z -symop -y,-x,z -symop x-y,-y,z -symop x,x-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 192 -basisop x,y,z -symbol ccp4 192 -symbol Hall '-P 6 2c' -symbol xHM 'P 6/m c c' -symbol old 'P 6/m 2/c 2/c' 'P 6/m c c' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp '-P 6 2' '6/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/3 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/4 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z -symop -y,x-y,z -symop -x,-y,z -symop -x+y,-x,z -symop y,-x+y,z -symop -y,-x,-z+1/2 -symop x-y,-y,-z+1/2 -symop x,x-y,-z+1/2 -symop y,x,-z+1/2 -symop -x+y,y,-z+1/2 -symop -x,-x+y,-z+1/2 -symop -x,-y,-z -symop -x+y,-x,-z -symop y,-x+y,-z -symop x,y,-z -symop x-y,x,-z -symop -y,x-y,-z -symop y,x,z+1/2 -symop -x+y,y,z+1/2 -symop -x,-x+y,z+1/2 -symop -y,-x,z+1/2 -symop x-y,-y,z+1/2 -symop x,x-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 193 -basisop x,y,z -symbol ccp4 193 -symbol Hall '-P 6c 2' -symbol xHM 'P 63/m c m' -symbol old 'P 63/m 2/c 2/m' 'P 63/m c m' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp '-P 6 2' '6/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=1/3; 0<=z<1/3 -mapasu nonz 0<=x<=2/3; 0<=y<=1/3; 0<=z<=1/4 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z+1/2 -symop -y,x-y,z -symop -x,-y,z+1/2 -symop -x+y,-x,z -symop y,-x+y,z+1/2 -symop -y,-x,-z -symop x-y,-y,-z+1/2 -symop x,x-y,-z -symop y,x,-z+1/2 -symop -x+y,y,-z -symop -x,-x+y,-z+1/2 -symop -x,-y,-z -symop -x+y,-x,-z+1/2 -symop y,-x+y,-z -symop x,y,-z+1/2 -symop x-y,x,-z -symop -y,x-y,-z+1/2 -symop y,x,z -symop -x+y,y,z+1/2 -symop -x,-x+y,z -symop -y,-x,z+1/2 -symop x-y,-y,z -symop x,x-y,z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 194 -basisop x,y,z -symbol ccp4 194 -symbol Hall '-P 6c 2c' -symbol xHM 'P 63/m m c' -symbol old 'P 63/m 2/m 2/c' 'P 63/m m c' -symbol laue '-P 6 2' '6/mmm' -symbol patt '-P 6 2' '6/mmm' -symbol pgrp '-P 6 2' '6/mmm' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=2/3; 0<=y<=2/3; 0<=z<1/3 -mapasu nonz 0<=x<=1/2; -1/3<=y<=0; 1/4<=z<=3/4 -cheshire 0<=x<=2/3; 0<=y<=2/3; 0<=z<=1/2 -symop x,y,z -symop x-y,x,z+1/2 -symop -y,x-y,z -symop -x,-y,z+1/2 -symop -x+y,-x,z -symop y,-x+y,z+1/2 -symop -y,-x,-z+1/2 -symop x-y,-y,-z -symop x,x-y,-z+1/2 -symop y,x,-z -symop -x+y,y,-z+1/2 -symop -x,-x+y,-z -symop -x,-y,-z -symop -x+y,-x,-z+1/2 -symop y,-x+y,-z -symop x,y,-z+1/2 -symop x-y,x,-z -symop -y,x-y,-z+1/2 -symop y,x,z+1/2 -symop -x+y,y,z -symop -x,-x+y,z+1/2 -symop -y,-x,z -symop x-y,-y,z+1/2 -symop x,x-y,z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 195 -basisop x,y,z -symbol ccp4 195 -symbol Hall ' P 2 2 3' -symbol xHM 'P 2 3' -symbol old 'P 2 3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-P 2 2 3' 'm-3' -symbol pgrp ' P 2 2 3' '23' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop z,x,y -symop -z,-x,y -symop z,-x,-y -symop -z,x,-y -symop y,z,x -symop y,-z,-x -symop -y,z,-x -symop -y,-z,x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 196 -basisop x,y,z -symbol ccp4 196 -symbol Hall ' F 2 2 3' -symbol xHM 'F 2 3' -symbol old 'F 2 3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-F 2 2 3' 'm-3' -symbol pgrp ' P 2 2 3' '23' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop z,x,y -symop -z,-x,y -symop z,-x,-y -symop -z,x,-y -symop y,z,x -symop y,-z,-x -symop -y,z,-x -symop -y,-z,x -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 197 -basisop x,y,z -symbol ccp4 197 -symbol Hall ' I 2 2 3' -symbol xHM 'I 2 3' -symbol old 'I 2 3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-I 2 2 3' 'm-3' -symbol pgrp ' P 2 2 3' '23' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/2 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop z,x,y -symop -z,-x,y -symop z,-x,-y -symop -z,x,-y -symop y,z,x -symop y,-z,-x -symop -y,z,-x -symop -y,-z,x -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 198 -basisop x,y,z -symbol ccp4 198 -symbol Hall ' P 2ac 2ab 3' -symbol xHM 'P 21 3' -symbol old 'P 21 3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-P 2 2 3' 'm-3' -symbol pgrp ' P 2 2 3' '23' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz -1/4<=x<1/4; 0<=y<1/2; 0<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop x+1/2,-y+1/2,-z -symop -x,y+1/2,-z+1/2 -symop z,x,y -symop -z+1/2,-x,y+1/2 -symop z+1/2,-x+1/2,-y -symop -z,x+1/2,-y+1/2 -symop y,z,x -symop y+1/2,-z+1/2,-x -symop -y,z+1/2,-x+1/2 -symop -y+1/2,-z,x+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 199 -basisop x,y,z -symbol ccp4 199 -symbol Hall ' I 2b 2c 3' -symbol xHM 'I 21 3' -symbol old 'I 21 3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-I 2 2 3' 'm-3' -symbol pgrp ' P 2 2 3' '23' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<1/2; 0=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop z,x,y -symop -z,-x,y -symop z,-x,-y -symop -z,x,-y -symop y,z,x -symop y,-z,-x -symop -y,z,-x -symop -y,-z,x -symop -x,-y,-z -symop x,y,-z -symop -x,y,z -symop x,-y,z -symop -z,-x,-y -symop z,x,-y -symop -z,x,y -symop z,-x,y -symop -y,-z,-x -symop -y,z,x -symop y,-z,x -symop y,z,-x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 201 -basisop x-1/4,y-1/4,z-1/4 -symbol ccp4 201 -symbol Hall '-P 2ab 2bc 3 (x-1/4,y-1/4,z-1/4)' -symbol xHM 'P n -3 :1' -symbol old 'P 2/n -3' 'P n -3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-P 2 2 3' 'm-3' -symbol pgrp '-P 2 2 3' 'm-3' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop z,x,y -symop -z,-x,y -symop z,-x,-y -symop -z,x,-y -symop y,z,x -symop y,-z,-x -symop -y,z,-x -symop -y,-z,x -symop -x+1/2,-y+1/2,-z+1/2 -symop x+1/2,y+1/2,-z+1/2 -symop -x+1/2,y+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -symop -z+1/2,-x+1/2,-y+1/2 -symop z+1/2,x+1/2,-y+1/2 -symop -z+1/2,x+1/2,y+1/2 -symop z+1/2,-x+1/2,y+1/2 -symop -y+1/2,-z+1/2,-x+1/2 -symop -y+1/2,z+1/2,x+1/2 -symop y+1/2,-z+1/2,x+1/2 -symop y+1/2,z+1/2,-x+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 201 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 2ab 2bc 3' -symbol xHM 'P n -3 :2' -symbol old '' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-P 2 2 3' 'm-3' -symbol pgrp '-P 2 2 3' 'm-3' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y,-z+1/2 -symop z,x,y -symop -z+1/2,-x+1/2,y -symop z,-x+1/2,-y+1/2 -symop -z+1/2,x,-y+1/2 -symop y,z,x -symop y,-z+1/2,-x+1/2 -symop -y+1/2,z,-x+1/2 -symop -y+1/2,-z+1/2,x -symop -x,-y,-z -symop x+1/2,y+1/2,-z -symop -x,y+1/2,z+1/2 -symop x+1/2,-y,z+1/2 -symop -z,-x,-y -symop z+1/2,x+1/2,-y -symop -z,x+1/2,y+1/2 -symop z+1/2,-x,y+1/2 -symop -y,-z,-x -symop -y,z+1/2,x+1/2 -symop y+1/2,-z,x+1/2 -symop y+1/2,z+1/2,-x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 202 -basisop x,y,z -symbol ccp4 202 -symbol Hall '-F 2 2 3' -symbol xHM 'F m -3' -symbol old 'F 2/m -3' 'F m -3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-F 2 2 3' 'm-3' -symbol pgrp '-P 2 2 3' 'm-3' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop z,x,y -symop -z,-x,y -symop z,-x,-y -symop -z,x,-y -symop y,z,x -symop y,-z,-x -symop -y,z,-x -symop -y,-z,x -symop -x,-y,-z -symop x,y,-z -symop -x,y,z -symop x,-y,z -symop -z,-x,-y -symop z,x,-y -symop -z,x,y -symop z,-x,y -symop -y,-z,-x -symop -y,z,x -symop y,-z,x -symop y,z,-x -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 203 -basisop x+1/8,y+1/8,z+1/8 -symbol ccp4 203 -symbol Hall '-F 2uv 2vw 3 (x+1/8,y+1/8,z+1/8)' -symbol xHM 'F d -3 :1' -symbol old 'F 2/d -3' 'F d -3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-F 2 2 3' 'm-3' -symbol pgrp '-P 2 2 3' 'm-3' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y,-z+1/2 -symop z,x,y -symop -z+1/2,-x+1/2,y -symop z,-x+1/2,-y+1/2 -symop -z+1/2,x,-y+1/2 -symop y,z,x -symop y,-z+1/2,-x+1/2 -symop -y+1/2,z,-x+1/2 -symop -y+1/2,-z+1/2,x -symop -x+1/4,-y+1/4,-z+1/4 -symop x+3/4,y+3/4,-z+1/4 -symop -x+1/4,y+3/4,z+3/4 -symop x+3/4,-y+1/4,z+3/4 -symop -z+1/4,-x+1/4,-y+1/4 -symop z+3/4,x+3/4,-y+1/4 -symop -z+1/4,x+3/4,y+3/4 -symop z+3/4,-x+1/4,y+3/4 -symop -y+1/4,-z+1/4,-x+1/4 -symop -y+1/4,z+3/4,x+3/4 -symop y+3/4,-z+1/4,x+3/4 -symop y+3/4,z+3/4,-x+1/4 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 203 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-F 2uv 2vw 3' -symbol xHM 'F d -3 :2' -symbol old '' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-F 2 2 3' 'm-3' -symbol pgrp '-P 2 2 3' 'm-3' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -x+1/4,-y+1/4,z -symop x,-y+1/4,-z+1/4 -symop -x+1/4,y,-z+1/4 -symop z,x,y -symop -z+1/4,-x+1/4,y -symop z,-x+1/4,-y+1/4 -symop -z+1/4,x,-y+1/4 -symop y,z,x -symop y,-z+1/4,-x+1/4 -symop -y+1/4,z,-x+1/4 -symop -y+1/4,-z+1/4,x -symop -x,-y,-z -symop x+3/4,y+3/4,-z -symop -x,y+3/4,z+3/4 -symop x+3/4,-y,z+3/4 -symop -z,-x,-y -symop z+3/4,x+3/4,-y -symop -z,x+3/4,y+3/4 -symop z+3/4,-x,y+3/4 -symop -y,-z,-x -symop -y,z+3/4,x+3/4 -symop y+3/4,-z,x+3/4 -symop y+3/4,z+3/4,-x -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 204 -basisop x,y,z -symbol ccp4 204 -symbol Hall '-I 2 2 3' -symbol xHM 'I m -3' -symbol old 'I 2/m -3' 'I m -3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-I 2 2 3' 'm-3' -symbol pgrp '-P 2 2 3' 'm-3' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x,-y,z -symop x,-y,-z -symop -x,y,-z -symop z,x,y -symop -z,-x,y -symop z,-x,-y -symop -z,x,-y -symop y,z,x -symop y,-z,-x -symop -y,z,-x -symop -y,-z,x -symop -x,-y,-z -symop x,y,-z -symop -x,y,z -symop x,-y,z -symop -z,-x,-y -symop z,x,-y -symop -z,x,y -symop z,-x,y -symop -y,-z,-x -symop -y,z,x -symop y,-z,x -symop y,z,-x -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 205 -basisop x,y,z -symbol ccp4 205 -symbol Hall '-P 2ac 2ab 3' -symbol xHM 'P a -3' -symbol old 'P 21/a -3' 'P a -3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-P 2 2 3' 'm-3' -symbol pgrp '-P 2 2 3' 'm-3' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<1/2; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/4; -1/4<=z<1/4 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop x+1/2,-y+1/2,-z -symop -x,y+1/2,-z+1/2 -symop z,x,y -symop -z+1/2,-x,y+1/2 -symop z+1/2,-x+1/2,-y -symop -z,x+1/2,-y+1/2 -symop y,z,x -symop y+1/2,-z+1/2,-x -symop -y,z+1/2,-x+1/2 -symop -y+1/2,-z,x+1/2 -symop -x,-y,-z -symop x+1/2,y,-z+1/2 -symop -x+1/2,y+1/2,z -symop x,-y+1/2,z+1/2 -symop -z,-x,-y -symop z+1/2,x,-y+1/2 -symop -z+1/2,x+1/2,y -symop z,-x+1/2,y+1/2 -symop -y,-z,-x -symop -y+1/2,z+1/2,x -symop y,-z+1/2,x+1/2 -symop y+1/2,z,-x+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 206 -basisop x,y,z -symbol ccp4 206 -symbol Hall '-I 2b 2c 3' -symbol xHM 'I a -3' -symbol old 'I 21/a -3' 'I a -3' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-I 2 2 3' 'm-3' -symbol pgrp '-P 2 2 3' 'm-3' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -x,-y+1/2,z -symop x,-y,-z+1/2 -symop -x,y+1/2,-z+1/2 -symop z,x,y -symop -z,-x+1/2,y -symop z,-x,-y+1/2 -symop -z,x+1/2,-y+1/2 -symop y,z,x -symop y,-z,-x+1/2 -symop -y,z+1/2,-x+1/2 -symop -y+1/2,-z,x+1/2 -symop -x,-y,-z -symop x,y+1/2,-z -symop -x,y,z+1/2 -symop x,-y+1/2,z+1/2 -symop -z,-x,-y -symop z,x+1/2,-y -symop -z,x,y+1/2 -symop z,-x+1/2,y+1/2 -symop -y,-z,-x -symop -y,z,x+1/2 -symop y,-z+1/2,x+1/2 -symop y+1/2,z,-x+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 207 -basisop x,y,z -symbol ccp4 207 -symbol Hall ' P 4 2 3' -symbol xHM 'P 4 3 2' -symbol old 'P 4 3 2' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp ' P 4 2 3' '432' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<1; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop z,x,y -symop -x,z,y -symop -z,-x,y -symop x,-z,y -symop z,-x,-y -symop x,z,-y -symop -z,x,-y -symop -x,-z,-y -symop y,z,x -symop y,-z,-x -symop z,y,-x -symop -y,z,-x -symop -z,-y,-x -symop -y,-z,x -symop z,-y,x -symop -z,y,x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 208 -basisop x,y,z -symbol ccp4 208 -symbol Hall ' P 4n 2 3' -symbol xHM 'P 42 3 2' -symbol old 'P 42 3 2' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp ' P 4 2 3' '432' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/4 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x,-y,-z -symop y+1/2,x+1/2,-z+1/2 -symop -x,y,-z -symop -y+1/2,-x+1/2,-z+1/2 -symop z,x,y -symop -x+1/2,z+1/2,y+1/2 -symop -z,-x,y -symop x+1/2,-z+1/2,y+1/2 -symop z,-x,-y -symop x+1/2,z+1/2,-y+1/2 -symop -z,x,-y -symop -x+1/2,-z+1/2,-y+1/2 -symop y,z,x -symop y,-z,-x -symop z+1/2,y+1/2,-x+1/2 -symop -y,z,-x -symop -z+1/2,-y+1/2,-x+1/2 -symop -y,-z,x -symop z+1/2,-y+1/2,x+1/2 -symop -z+1/2,y+1/2,x+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 209 -basisop x,y,z -symbol ccp4 209 -symbol Hall ' F 4 2 3' -symbol xHM 'F 4 3 2' -symbol old 'F 4 3 2' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp ' P 4 2 3' '432' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop z,x,y -symop -x,z,y -symop -z,-x,y -symop x,-z,y -symop z,-x,-y -symop x,z,-y -symop -z,x,-y -symop -x,-z,-y -symop y,z,x -symop y,-z,-x -symop z,y,-x -symop -y,z,-x -symop -z,-y,-x -symop -y,-z,x -symop z,-y,x -symop -z,y,x -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 210 -basisop x,y,z -symbol ccp4 210 -symbol Hall ' F 4d 2 3' -symbol xHM 'F 41 3 2' -symbol old 'F 41 3 2' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp ' P 4 2 3' '432' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/4,x+1/4,z+1/4 -symop -x,-y+1/2,z+1/2 -symop y+3/4,-x+1/4,z+3/4 -symop x,-y,-z -symop y+1/4,x+1/4,-z+1/4 -symop -x,y+1/2,-z+1/2 -symop -y+3/4,-x+1/4,-z+3/4 -symop z,x,y -symop -x+1/4,z+1/4,y+1/4 -symop -z,-x+1/2,y+1/2 -symop x+3/4,-z+1/4,y+3/4 -symop z,-x,-y -symop x+1/4,z+1/4,-y+1/4 -symop -z,x+1/2,-y+1/2 -symop -x+3/4,-z+1/4,-y+3/4 -symop y,z,x -symop y+1/2,-z,-x+1/2 -symop z+1/4,y+3/4,-x+3/4 -symop -y+1/2,z+1/2,-x -symop -z+1/4,-y+1/4,-x+1/4 -symop -y,-z,x -symop z+1/4,-y+3/4,x+3/4 -symop -z+3/4,y+3/4,x+1/4 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 211 -basisop x,y,z -symbol ccp4 211 -symbol Hall ' I 4 2 3' -symbol xHM 'I 4 3 2' -symbol old 'I 4 3 2' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-I 4 2 3' 'm-3m' -symbol pgrp ' P 4 2 3' '432' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop z,x,y -symop -x,z,y -symop -z,-x,y -symop x,-z,y -symop z,-x,-y -symop x,z,-y -symop -z,x,-y -symop -x,-z,-y -symop y,z,x -symop y,-z,-x -symop z,y,-x -symop -y,z,-x -symop -z,-y,-x -symop -y,-z,x -symop z,-y,x -symop -z,y,x -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 212 -basisop x,y,z -symbol ccp4 212 -symbol Hall ' P 4acd 2ab 3' -symbol xHM 'P 43 3 2' -symbol old 'P 43 3 2' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp ' P 4 2 3' '432' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<1; 0<=y<=1/8; 0<=z<1 -mapasu nonz 1/8<=x<=3/8; 1/8<=y<=3/8; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y+3/4,x+1/4,z+3/4 -symop -x+1/2,-y,z+1/2 -symop y+3/4,-x+3/4,z+1/4 -symop x+1/2,-y+1/2,-z -symop y+1/4,x+3/4,-z+3/4 -symop -x,y+1/2,-z+1/2 -symop -y+1/4,-x+1/4,-z+1/4 -symop z,x,y -symop -x+3/4,z+1/4,y+3/4 -symop -z+1/2,-x,y+1/2 -symop x+3/4,-z+3/4,y+1/4 -symop z+1/2,-x+1/2,-y -symop x+1/4,z+3/4,-y+3/4 -symop -z,x+1/2,-y+1/2 -symop -x+1/4,-z+1/4,-y+1/4 -symop y,z,x -symop y+1/2,-z+1/2,-x -symop z+1/4,y+3/4,-x+3/4 -symop -y,z+1/2,-x+1/2 -symop -z+1/4,-y+1/4,-x+1/4 -symop -y+1/2,-z,x+1/2 -symop z+3/4,-y+3/4,x+1/4 -symop -z+3/4,y+1/4,x+3/4 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 213 -basisop x,y,z -symbol ccp4 213 -symbol Hall ' P 4bd 2ab 3' -symbol xHM 'P 41 3 2' -symbol old 'P 41 3 2' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp ' P 4 2 3' '432' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<1; 0<=y<=1/8; 0<=z<1 -mapasu nonz 1/8<=x<=3/8; 1/8<=y<=3/8; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y+1/4,x+3/4,z+1/4 -symop -x+1/2,-y,z+1/2 -symop y+1/4,-x+1/4,z+3/4 -symop x+1/2,-y+1/2,-z -symop y+3/4,x+1/4,-z+1/4 -symop -x,y+1/2,-z+1/2 -symop -y+3/4,-x+3/4,-z+3/4 -symop z,x,y -symop -x+1/4,z+3/4,y+1/4 -symop -z+1/2,-x,y+1/2 -symop x+1/4,-z+1/4,y+3/4 -symop z+1/2,-x+1/2,-y -symop x+3/4,z+1/4,-y+1/4 -symop -z,x+1/2,-y+1/2 -symop -x+3/4,-z+3/4,-y+3/4 -symop y,z,x -symop y+1/2,-z+1/2,-x -symop z+3/4,y+1/4,-x+1/4 -symop -y,z+1/2,-x+1/2 -symop -z+3/4,-y+3/4,-x+3/4 -symop -y+1/2,-z,x+1/2 -symop z+1/4,-y+1/4,x+3/4 -symop -z+1/4,y+3/4,x+1/4 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 214 -basisop x,y,z -symbol ccp4 214 -symbol Hall ' I 4bd 2c 3' -symbol xHM 'I 41 3 2' -symbol old 'I 41 3 2' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-I 4 2 3' 'm-3m' -symbol pgrp ' P 4 2 3' '432' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/8 -mapasu zero 0<=x<1; 0<=y<=1/8; 0<=z<1/2 -mapasu nonz -1/8<=x<=1/8; 0<=y<=1/8; 0=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x,-y,-z -symop -y,-x,z -symop -x,y,-z -symop y,x,z -symop z,x,y -symop x,-z,-y -symop -z,-x,y -symop -x,z,-y -symop z,-x,-y -symop -x,-z,y -symop -z,x,-y -symop x,z,y -symop y,z,x -symop y,-z,-x -symop -z,-y,x -symop -y,z,-x -symop z,y,x -symop -y,-z,x -symop -z,y,-x -symop z,-y,-x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 216 -basisop x,y,z -symbol ccp4 216 -symbol Hall ' F -4 2 3' -symbol xHM 'F -4 3 m' -symbol old 'F -4 3 m' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp ' P -4 2 3' '-43m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x,-y,-z -symop -y,-x,z -symop -x,y,-z -symop y,x,z -symop z,x,y -symop x,-z,-y -symop -z,-x,y -symop -x,z,-y -symop z,-x,-y -symop -x,-z,y -symop -z,x,-y -symop x,z,y -symop y,z,x -symop y,-z,-x -symop -z,-y,x -symop -y,z,-x -symop z,y,x -symop -y,-z,x -symop -z,y,-x -symop z,-y,-x -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 217 -basisop x,y,z -symbol ccp4 217 -symbol Hall ' I -4 2 3' -symbol xHM 'I -4 3 m' -symbol old 'I -4 3 m' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-I 4 2 3' 'm-3m' -symbol pgrp ' P -4 2 3' '-43m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop y,-x,-z -symop -x,-y,z -symop -y,x,-z -symop x,-y,-z -symop -y,-x,z -symop -x,y,-z -symop y,x,z -symop z,x,y -symop x,-z,-y -symop -z,-x,y -symop -x,z,-y -symop z,-x,-y -symop -x,-z,y -symop -z,x,-y -symop x,z,y -symop y,z,x -symop y,-z,-x -symop -z,-y,x -symop -y,z,-x -symop z,y,x -symop -y,-z,x -symop -z,y,-x -symop z,-y,-x -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 218 -basisop x,y,z -symbol ccp4 218 -symbol Hall ' P -4n 2 3' -symbol xHM 'P -4 3 n' -symbol old 'P -4 3 n' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp ' P -4 2 3' '-43m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop y+1/2,-x+1/2,-z+1/2 -symop -x,-y,z -symop -y+1/2,x+1/2,-z+1/2 -symop x,-y,-z -symop -y+1/2,-x+1/2,z+1/2 -symop -x,y,-z -symop y+1/2,x+1/2,z+1/2 -symop z,x,y -symop x+1/2,-z+1/2,-y+1/2 -symop -z,-x,y -symop -x+1/2,z+1/2,-y+1/2 -symop z,-x,-y -symop -x+1/2,-z+1/2,y+1/2 -symop -z,x,-y -symop x+1/2,z+1/2,y+1/2 -symop y,z,x -symop y,-z,-x -symop -z+1/2,-y+1/2,x+1/2 -symop -y,z,-x -symop z+1/2,y+1/2,x+1/2 -symop -y,-z,x -symop -z+1/2,y+1/2,-x+1/2 -symop z+1/2,-y+1/2,-x+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 219 -basisop x,y,z -symbol ccp4 219 -symbol Hall ' F -4a 2 3' -symbol xHM 'F -4 3 c' -symbol old 'F -4 3 c' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp ' P -4 2 3' '-43m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop y+1/2,-x,-z -symop -x+1/2,-y+1/2,z -symop -y,x+1/2,-z -symop x,-y,-z -symop -y+1/2,-x,z -symop -x+1/2,y+1/2,-z -symop y,x+1/2,z -symop z,x,y -symop x+1/2,-z,-y -symop -z+1/2,-x+1/2,y -symop -x,z+1/2,-y -symop z,-x,-y -symop -x+1/2,-z,y -symop -z+1/2,x+1/2,-y -symop x,z+1/2,y -symop y,z,x -symop y,-z+1/2,-x+1/2 -symop -z,-y,x+1/2 -symop -y+1/2,z,-x+1/2 -symop z+1/2,y,x -symop -y,-z,x -symop -z,y,-x+1/2 -symop z+1/2,-y+1/2,-x+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 220 -basisop x,y,z -symbol ccp4 220 -symbol Hall ' I -4bd 2c 3' -symbol xHM 'I -4 3 d' -symbol old 'I -4 3 d' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-I 4 2 3' 'm-3m' -symbol pgrp ' P -4 2 3' '-43m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz -1/8<=x<=1/8; 0<=y<=1/8; 0=l and l>=h and h>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu nonz 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop z,x,y -symop -x,z,y -symop -z,-x,y -symop x,-z,y -symop z,-x,-y -symop x,z,-y -symop -z,x,-y -symop -x,-z,-y -symop y,z,x -symop y,-z,-x -symop z,y,-x -symop -y,z,-x -symop -z,-y,-x -symop -y,-z,x -symop z,-y,x -symop -z,y,x -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x,y,z -symop -y,-x,z -symop x,-y,z -symop y,x,z -symop -z,-x,-y -symop x,-z,-y -symop z,x,-y -symop -x,z,-y -symop -z,x,y -symop -x,-z,y -symop z,-x,y -symop x,z,y -symop -y,-z,-x -symop -y,z,x -symop -z,-y,x -symop y,-z,x -symop z,y,x -symop y,z,-x -symop -z,y,-x -symop z,-y,-x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 222 -basisop x-1/4,y-1/4,z-1/4 -symbol ccp4 222 -symbol Hall '-P 4a 2bc 3 (x-1/4,y-1/4,z-1/4)' -symbol xHM 'P n -3 n :1' -symbol old 'P 4/n -3 2/n' 'P n -3 n' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop z,x,y -symop -x,z,y -symop -z,-x,y -symop x,-z,y -symop z,-x,-y -symop x,z,-y -symop -z,x,-y -symop -x,-z,-y -symop y,z,x -symop y,-z,-x -symop z,y,-x -symop -y,z,-x -symop -z,-y,-x -symop -y,-z,x -symop z,-y,x -symop -z,y,x -symop -x+1/2,-y+1/2,-z+1/2 -symop y+1/2,-x+1/2,-z+1/2 -symop x+1/2,y+1/2,-z+1/2 -symop -y+1/2,x+1/2,-z+1/2 -symop -x+1/2,y+1/2,z+1/2 -symop -y+1/2,-x+1/2,z+1/2 -symop x+1/2,-y+1/2,z+1/2 -symop y+1/2,x+1/2,z+1/2 -symop -z+1/2,-x+1/2,-y+1/2 -symop x+1/2,-z+1/2,-y+1/2 -symop z+1/2,x+1/2,-y+1/2 -symop -x+1/2,z+1/2,-y+1/2 -symop -z+1/2,x+1/2,y+1/2 -symop -x+1/2,-z+1/2,y+1/2 -symop z+1/2,-x+1/2,y+1/2 -symop x+1/2,z+1/2,y+1/2 -symop -y+1/2,-z+1/2,-x+1/2 -symop -y+1/2,z+1/2,x+1/2 -symop -z+1/2,-y+1/2,x+1/2 -symop y+1/2,-z+1/2,x+1/2 -symop z+1/2,y+1/2,x+1/2 -symop y+1/2,z+1/2,-x+1/2 -symop -z+1/2,y+1/2,-x+1/2 -symop z+1/2,-y+1/2,-x+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 222 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4a 2bc 3' -symbol xHM 'P n -3 n :2' -symbol old '' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 1/4<=z<=3/4 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y+1/2,x,z -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z -symop x,-y+1/2,-z+1/2 -symop y,x,-z+1/2 -symop -x+1/2,y,-z+1/2 -symop -y+1/2,-x+1/2,-z+1/2 -symop z,x,y -symop -x+1/2,z,y -symop -z+1/2,-x+1/2,y -symop x,-z+1/2,y -symop z,-x+1/2,-y+1/2 -symop x,z,-y+1/2 -symop -z+1/2,x,-y+1/2 -symop -x+1/2,-z+1/2,-y+1/2 -symop y,z,x -symop y,-z+1/2,-x+1/2 -symop z,y,-x+1/2 -symop -y+1/2,z,-x+1/2 -symop -z+1/2,-y+1/2,-x+1/2 -symop -y+1/2,-z+1/2,x -symop z,-y+1/2,x -symop -z+1/2,y,x -symop -x,-y,-z -symop y+1/2,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z -symop -x,y+1/2,z+1/2 -symop -y,-x,z+1/2 -symop x+1/2,-y,z+1/2 -symop y+1/2,x+1/2,z+1/2 -symop -z,-x,-y -symop x+1/2,-z,-y -symop z+1/2,x+1/2,-y -symop -x,z+1/2,-y -symop -z,x+1/2,y+1/2 -symop -x,-z,y+1/2 -symop z+1/2,-x,y+1/2 -symop x+1/2,z+1/2,y+1/2 -symop -y,-z,-x -symop -y,z+1/2,x+1/2 -symop -z,-y,x+1/2 -symop y+1/2,-z,x+1/2 -symop z+1/2,y+1/2,x+1/2 -symop y+1/2,z+1/2,-x -symop -z,y+1/2,-x -symop z+1/2,-y,-x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 223 -basisop x,y,z -symbol ccp4 223 -symbol Hall '-P 4n 2 3' -symbol xHM 'P m -3 n' -symbol old 'P 42/m -3 2/n' 'P m -3 n' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x,-y,-z -symop y+1/2,x+1/2,-z+1/2 -symop -x,y,-z -symop -y+1/2,-x+1/2,-z+1/2 -symop z,x,y -symop -x+1/2,z+1/2,y+1/2 -symop -z,-x,y -symop x+1/2,-z+1/2,y+1/2 -symop z,-x,-y -symop x+1/2,z+1/2,-y+1/2 -symop -z,x,-y -symop -x+1/2,-z+1/2,-y+1/2 -symop y,z,x -symop y,-z,-x -symop z+1/2,y+1/2,-x+1/2 -symop -y,z,-x -symop -z+1/2,-y+1/2,-x+1/2 -symop -y,-z,x -symop z+1/2,-y+1/2,x+1/2 -symop -z+1/2,y+1/2,x+1/2 -symop -x,-y,-z -symop y+1/2,-x+1/2,-z+1/2 -symop x,y,-z -symop -y+1/2,x+1/2,-z+1/2 -symop -x,y,z -symop -y+1/2,-x+1/2,z+1/2 -symop x,-y,z -symop y+1/2,x+1/2,z+1/2 -symop -z,-x,-y -symop x+1/2,-z+1/2,-y+1/2 -symop z,x,-y -symop -x+1/2,z+1/2,-y+1/2 -symop -z,x,y -symop -x+1/2,-z+1/2,y+1/2 -symop z,-x,y -symop x+1/2,z+1/2,y+1/2 -symop -y,-z,-x -symop -y,z,x -symop -z+1/2,-y+1/2,x+1/2 -symop y,-z,x -symop z+1/2,y+1/2,x+1/2 -symop y,z,-x -symop -z+1/2,y+1/2,-x+1/2 -symop z+1/2,-y+1/2,-x+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 224 -basisop x+1/4,y+1/4,z+1/4 -symbol ccp4 224 -symbol Hall '-P 4bc 2bc 3 (x+1/4,y+1/4,z+1/4)' -symbol xHM 'P n -3 m :1' -symbol old 'P 42/n -3 2/m' 'P n -3 m' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y+1/2,x+1/2,z+1/2 -symop -x,-y,z -symop y+1/2,-x+1/2,z+1/2 -symop x,-y,-z -symop y+1/2,x+1/2,-z+1/2 -symop -x,y,-z -symop -y+1/2,-x+1/2,-z+1/2 -symop z,x,y -symop -x+1/2,z+1/2,y+1/2 -symop -z,-x,y -symop x+1/2,-z+1/2,y+1/2 -symop z,-x,-y -symop x+1/2,z+1/2,-y+1/2 -symop -z,x,-y -symop -x+1/2,-z+1/2,-y+1/2 -symop y,z,x -symop y,-z,-x -symop z+1/2,y+1/2,-x+1/2 -symop -y,z,-x -symop -z+1/2,-y+1/2,-x+1/2 -symop -y,-z,x -symop z+1/2,-y+1/2,x+1/2 -symop -z+1/2,y+1/2,x+1/2 -symop -x+1/2,-y+1/2,-z+1/2 -symop y,-x,-z -symop x+1/2,y+1/2,-z+1/2 -symop -y,x,-z -symop -x+1/2,y+1/2,z+1/2 -symop -y,-x,z -symop x+1/2,-y+1/2,z+1/2 -symop y,x,z -symop -z+1/2,-x+1/2,-y+1/2 -symop x,-z,-y -symop z+1/2,x+1/2,-y+1/2 -symop -x,z,-y -symop -z+1/2,x+1/2,y+1/2 -symop -x,-z,y -symop z+1/2,-x+1/2,y+1/2 -symop x,z,y -symop -y+1/2,-z+1/2,-x+1/2 -symop -y+1/2,z+1/2,x+1/2 -symop -z,-y,x -symop y+1/2,-z+1/2,x+1/2 -symop z,y,x -symop y+1/2,z+1/2,-x+1/2 -symop -z,y,-x -symop z,-y,-x -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 224 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-P 4bc 2bc 3' -symbol xHM 'P n -3 m :2' -symbol old '' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-P 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y,x+1/2,z+1/2 -symop -x+1/2,-y+1/2,z -symop y+1/2,-x,z+1/2 -symop x,-y+1/2,-z+1/2 -symop y+1/2,x+1/2,-z -symop -x+1/2,y,-z+1/2 -symop -y,-x,-z -symop z,x,y -symop -x,z+1/2,y+1/2 -symop -z+1/2,-x+1/2,y -symop x+1/2,-z,y+1/2 -symop z,-x+1/2,-y+1/2 -symop x+1/2,z+1/2,-y -symop -z+1/2,x,-y+1/2 -symop -x,-z,-y -symop y,z,x -symop y,-z+1/2,-x+1/2 -symop z+1/2,y+1/2,-x -symop -y+1/2,z,-x+1/2 -symop -z,-y,-x -symop -y+1/2,-z+1/2,x -symop z+1/2,-y,x+1/2 -symop -z,y+1/2,x+1/2 -symop -x,-y,-z -symop y,-x+1/2,-z+1/2 -symop x+1/2,y+1/2,-z -symop -y+1/2,x,-z+1/2 -symop -x,y+1/2,z+1/2 -symop -y+1/2,-x+1/2,z -symop x+1/2,-y,z+1/2 -symop y,x,z -symop -z,-x,-y -symop x,-z+1/2,-y+1/2 -symop z+1/2,x+1/2,-y -symop -x+1/2,z,-y+1/2 -symop -z,x+1/2,y+1/2 -symop -x+1/2,-z+1/2,y -symop z+1/2,-x,y+1/2 -symop x,z,y -symop -y,-z,-x -symop -y,z+1/2,x+1/2 -symop -z+1/2,-y+1/2,x -symop y+1/2,-z,x+1/2 -symop z,y,x -symop y+1/2,z+1/2,-x -symop -z+1/2,y,-x+1/2 -symop z,-y+1/2,-x+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 225 -basisop x,y,z -symbol ccp4 225 -symbol Hall '-F 4 2 3' -symbol xHM 'F m -3 m' -symbol old 'F 4/m -3 2/m' 'F m -3 m' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/4; 0<=z<=1/4 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop z,x,y -symop -x,z,y -symop -z,-x,y -symop x,-z,y -symop z,-x,-y -symop x,z,-y -symop -z,x,-y -symop -x,-z,-y -symop y,z,x -symop y,-z,-x -symop z,y,-x -symop -y,z,-x -symop -z,-y,-x -symop -y,-z,x -symop z,-y,x -symop -z,y,x -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x,y,z -symop -y,-x,z -symop x,-y,z -symop y,x,z -symop -z,-x,-y -symop x,-z,-y -symop z,x,-y -symop -x,z,-y -symop -z,x,y -symop -x,-z,y -symop z,-x,y -symop x,z,y -symop -y,-z,-x -symop -y,z,x -symop -z,-y,x -symop y,-z,x -symop z,y,x -symop y,z,-x -symop -z,y,-x -symop z,-y,-x -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 226 -basisop x,y,z -symbol ccp4 226 -symbol Hall '-F 4a 2 3' -symbol xHM 'F m -3 c' -symbol old 'F 4/m -3 2/c' 'F m -3 c' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/4 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/4 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x,z -symop -x+1/2,-y+1/2,z -symop y,-x+1/2,z -symop x,-y,-z -symop y+1/2,x,-z -symop -x+1/2,y+1/2,-z -symop -y,-x+1/2,-z -symop z,x,y -symop -x+1/2,z,y -symop -z+1/2,-x+1/2,y -symop x,-z+1/2,y -symop z,-x,-y -symop x+1/2,z,-y -symop -z+1/2,x+1/2,-y -symop -x,-z+1/2,-y -symop y,z,x -symop y,-z+1/2,-x+1/2 -symop z,y,-x+1/2 -symop -y+1/2,z,-x+1/2 -symop -z+1/2,-y,-x -symop -y,-z,x -symop z,-y,x+1/2 -symop -z+1/2,y+1/2,x+1/2 -symop -x,-y,-z -symop y+1/2,-x,-z -symop x+1/2,y+1/2,-z -symop -y,x+1/2,-z -symop -x,y,z -symop -y+1/2,-x,z -symop x+1/2,-y+1/2,z -symop y,x+1/2,z -symop -z,-x,-y -symop x+1/2,-z,-y -symop z+1/2,x+1/2,-y -symop -x,z+1/2,-y -symop -z,x,y -symop -x+1/2,-z,y -symop z+1/2,-x+1/2,y -symop x,z+1/2,y -symop -y,-z,-x -symop -y,z+1/2,x+1/2 -symop -z,-y,x+1/2 -symop y+1/2,-z,x+1/2 -symop z+1/2,y,x -symop y,z,-x -symop -z,y,-x+1/2 -symop z+1/2,-y+1/2,-x+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 227 -basisop x+1/8,y+1/8,z+1/8 -symbol ccp4 227 -symbol Hall '-F 4vw 2vw 3 (x+1/8,y+1/8,z+1/8)' -symbol xHM 'F d -3 m :1' -symbol old 'F 41/d -3 2/m' 'F d -3 m' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/4,x+1/4,z+1/4 -symop -x,-y+1/2,z+1/2 -symop y+3/4,-x+1/4,z+3/4 -symop x,-y+1/2,-z+1/2 -symop y+3/4,x+1/4,-z+3/4 -symop -x,y,-z -symop -y+1/4,-x+1/4,-z+1/4 -symop z,x,y -symop -x+1/4,z+1/4,y+1/4 -symop -z,-x+1/2,y+1/2 -symop x+3/4,-z+1/4,y+3/4 -symop z,-x+1/2,-y+1/2 -symop x+3/4,z+1/4,-y+3/4 -symop -z,x,-y -symop -x+1/4,-z+1/4,-y+1/4 -symop y,z,x -symop y+1/2,-z,-x+1/2 -symop z+1/4,y+3/4,-x+3/4 -symop -y+1/2,z+1/2,-x -symop -z+1/4,-y+3/4,-x+3/4 -symop -y+1/2,-z+1/2,x -symop z+1/4,-y+1/4,x+1/4 -symop -z+3/4,y+1/4,x+3/4 -symop -x+1/4,-y+1/4,-z+1/4 -symop y,-x,-z -symop x+1/4,y+3/4,-z+3/4 -symop -y+1/2,x,-z+1/2 -symop -x+1/4,y+3/4,z+3/4 -symop -y+1/2,-x,z+1/2 -symop x+1/4,-y+1/4,z+1/4 -symop y,x,z -symop -z+1/4,-x+1/4,-y+1/4 -symop x,-z,-y -symop z+1/4,x+3/4,-y+3/4 -symop -x+1/2,z,-y+1/2 -symop -z+1/4,x+3/4,y+3/4 -symop -x+1/2,-z,y+1/2 -symop z+1/4,-x+1/4,y+1/4 -symop x,z,y -symop -y+1/4,-z+1/4,-x+1/4 -symop -y+3/4,z+1/4,x+3/4 -symop -z,-y+1/2,x+1/2 -symop y+3/4,-z+3/4,x+1/4 -symop z,y+1/2,x+1/2 -symop y+3/4,z+3/4,-x+1/4 -symop -z,y,-x -symop z+1/2,-y,-x+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 227 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-F 4vw 2vw 3' -symbol xHM 'F d -3 m :2' -symbol old '' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y,x+1/4,z+1/4 -symop -x+3/4,-y+1/4,z+1/2 -symop y+3/4,-x,z+3/4 -symop x,-y+1/4,-z+1/4 -symop y+3/4,x+1/4,-z+1/2 -symop -x+3/4,y,-z+3/4 -symop -y,-x,-z -symop z,x,y -symop -x,z+1/4,y+1/4 -symop -z+3/4,-x+1/4,y+1/2 -symop x+3/4,-z,y+3/4 -symop z,-x+1/4,-y+1/4 -symop x+3/4,z+1/4,-y+1/2 -symop -z+3/4,x,-y+3/4 -symop -x,-z,-y -symop y,z,x -symop y+1/2,-z+3/4,-x+1/4 -symop z+1/4,y+3/4,-x+1/2 -symop -y+1/4,z+1/2,-x+3/4 -symop -z,-y+1/2,-x+1/2 -symop -y+1/4,-z+1/4,x -symop z+1/4,-y,x+1/4 -symop -z+1/2,y+1/4,x+3/4 -symop -x,-y,-z -symop y,-x+3/4,-z+3/4 -symop x+1/4,y+3/4,-z+1/2 -symop -y+1/4,x,-z+1/4 -symop -x,y+3/4,z+3/4 -symop -y+1/4,-x+3/4,z+1/2 -symop x+1/4,-y,z+1/4 -symop y,x,z -symop -z,-x,-y -symop x,-z+3/4,-y+3/4 -symop z+1/4,x+3/4,-y+1/2 -symop -x+1/4,z,-y+1/4 -symop -z,x+3/4,y+3/4 -symop -x+1/4,-z+3/4,y+1/2 -symop z+1/4,-x,y+1/4 -symop x,z,y -symop -y,-z,-x -symop -y+1/2,z+1/4,x+3/4 -symop -z+3/4,-y+1/4,x+1/2 -symop y+3/4,-z+1/2,x+1/4 -symop z,y+1/2,x+1/2 -symop y+3/4,z+3/4,-x -symop -z+3/4,y,-x+3/4 -symop z+1/2,-y+3/4,-x+1/4 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 228 -basisop x-1/8,y-1/8,z-1/8 -symbol ccp4 228 -symbol Hall '-F 4ud 2vw 3 (x-1/8,y-1/8,z-1/8)' -symbol xHM 'F d -3 c :1' -symbol old 'F d -3 c' 'F 41/d -3 2/c' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1/2 -mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/4,x+1/4,z+1/4 -symop -x,-y+1/2,z+1/2 -symop y+3/4,-x+1/4,z+3/4 -symop x,-y,-z -symop y+1/4,x+1/4,-z+1/4 -symop -x,y+1/2,-z+1/2 -symop -y+3/4,-x+1/4,-z+3/4 -symop z,x,y -symop -x+1/4,z+1/4,y+1/4 -symop -z,-x+1/2,y+1/2 -symop x+3/4,-z+1/4,y+3/4 -symop z,-x,-y -symop x+1/4,z+1/4,-y+1/4 -symop -z,x+1/2,-y+1/2 -symop -x+3/4,-z+1/4,-y+3/4 -symop y,z,x -symop y+1/2,-z,-x+1/2 -symop z+1/4,y+3/4,-x+3/4 -symop -y+1/2,z+1/2,-x -symop -z+1/4,-y+1/4,-x+1/4 -symop -y,-z,x -symop z+1/4,-y+3/4,x+3/4 -symop -z+3/4,y+3/4,x+1/4 -symop -x+3/4,-y+3/4,-z+3/4 -symop y+1/2,-x+1/2,-z+1/2 -symop x+3/4,y+1/4,-z+1/4 -symop -y,x+1/2,-z -symop -x+3/4,y+3/4,z+3/4 -symop -y+1/2,-x+1/2,z+1/2 -symop x+3/4,-y+1/4,z+1/4 -symop y,x+1/2,z -symop -z+3/4,-x+3/4,-y+3/4 -symop x+1/2,-z+1/2,-y+1/2 -symop z+3/4,x+1/4,-y+1/4 -symop -x,z+1/2,-y -symop -z+3/4,x+3/4,y+3/4 -symop -x+1/2,-z+1/2,y+1/2 -symop z+3/4,-x+1/4,y+1/4 -symop x,z+1/2,y -symop -y+3/4,-z+3/4,-x+3/4 -symop -y+1/4,z+3/4,x+1/4 -symop -z+1/2,-y,x -symop y+1/4,-z+1/4,x+3/4 -symop z+1/2,y+1/2,x+1/2 -symop y+3/4,z+3/4,-x+3/4 -symop -z+1/2,y,-x -symop z,-y,-x+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 228 -basisop x,y,z -symbol ccp4 0 -symbol Hall '-F 4ud 2vw 3' -symbol xHM 'F d -3 c :2' -symbol old '' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-F 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1/2 -mapasu nonz 0<=x<=1/8; 0<=y<=1/8; 0<=z<1/2 -cheshire 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -symop x,y,z -symop -y+1/2,x+1/4,z+1/4 -symop -x+1/4,-y+3/4,z+1/2 -symop y+3/4,-x+1/2,z+3/4 -symop x,-y+1/4,-z+1/4 -symop y+1/4,x+1/4,-z+1/2 -symop -x+1/4,y+1/2,-z+3/4 -symop -y,-x+1/2,-z -symop z,x,y -symop -x+1/2,z+1/4,y+1/4 -symop -z+1/4,-x+3/4,y+1/2 -symop x+3/4,-z+1/2,y+3/4 -symop z,-x+1/4,-y+1/4 -symop x+1/4,z+1/4,-y+1/2 -symop -z+1/4,x+1/2,-y+3/4 -symop -x,-z+1/2,-y -symop y,z,x -symop y+1/2,-z+1/4,-x+3/4 -symop z+1/4,y+3/4,-x -symop -y+3/4,z+1/2,-x+1/4 -symop -z+1/2,-y+1/2,-x+1/2 -symop -y+1/4,-z+1/4,x -symop z+1/4,-y,x+3/4 -symop -z,y+3/4,x+1/4 -symop -x,-y,-z -symop y+1/2,-x+3/4,-z+3/4 -symop x+3/4,y+1/4,-z+1/2 -symop -y+1/4,x+1/2,-z+1/4 -symop -x,y+3/4,z+3/4 -symop -y+3/4,-x+3/4,z+1/2 -symop x+3/4,-y+1/2,z+1/4 -symop y,x+1/2,z -symop -z,-x,-y -symop x+1/2,-z+3/4,-y+3/4 -symop z+3/4,x+1/4,-y+1/2 -symop -x+1/4,z+1/2,-y+1/4 -symop -z,x+3/4,y+3/4 -symop -x+3/4,-z+3/4,y+1/2 -symop z+3/4,-x+1/2,y+1/4 -symop x,z+1/2,y -symop -y,-z,-x -symop -y+1/2,z+3/4,x+1/4 -symop -z+3/4,-y+1/4,x -symop y+1/4,-z+1/2,x+3/4 -symop z+1/2,y+1/2,x+1/2 -symop y+3/4,z+3/4,-x -symop -z+3/4,y,-x+1/4 -symop z,-y+1/4,-x+3/4 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 229 -basisop x,y,z -symbol ccp4 229 -symbol Hall '-I 4 2 3' -symbol xHM 'I m -3 m' -symbol old 'I 4/m -3 2/m' 'I m -3 m' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-I 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/4 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<=1/4; 0<=y<=1/4; 0<=z<=1/2 -cheshire 0<=x<=1; 0<=y<=1; 0<=z<=1 -symop x,y,z -symop -y,x,z -symop -x,-y,z -symop y,-x,z -symop x,-y,-z -symop y,x,-z -symop -x,y,-z -symop -y,-x,-z -symop z,x,y -symop -x,z,y -symop -z,-x,y -symop x,-z,y -symop z,-x,-y -symop x,z,-y -symop -z,x,-y -symop -x,-z,-y -symop y,z,x -symop y,-z,-x -symop z,y,-x -symop -y,z,-x -symop -z,-y,-x -symop -y,-z,x -symop z,-y,x -symop -z,y,x -symop -x,-y,-z -symop y,-x,-z -symop x,y,-z -symop -y,x,-z -symop -x,y,z -symop -y,-x,z -symop x,-y,z -symop y,x,z -symop -z,-x,-y -symop x,-z,-y -symop z,x,-y -symop -x,z,-y -symop -z,x,y -symop -x,-z,y -symop z,-x,y -symop x,z,y -symop -y,-z,-x -symop -y,z,x -symop -z,-y,x -symop y,-z,x -symop z,y,x -symop y,z,-x -symop -z,y,-x -symop z,-y,-x -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 230 -basisop x,y,z -symbol ccp4 230 -symbol Hall '-I 4bd 2c 3' -symbol xHM 'I a -3 d' -symbol old 'I 41/a -3 2/d' 'I a -3 d' -symbol laue '-P 4 2 3' 'm-3m' -symbol patt '-I 4 2 3' 'm-3m' -symbol pgrp '-P 4 2 3' 'm-3m' -hklasu ccp4 'k>=l and l>=h and h>=0' -mapasu ccp4 0<=x<-1; 0<=y<-1; 0<=z<-1 -mapasu zero 0<=x<=1/8; 0<=y<=1/8; 0<=z<1 -mapasu nonz 0<=x<=1/8; -1/8<=y<=0; 1/8=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<1; 0<=y<1/2; 0<=z<1 -mapasu zero 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -x+1/2,y,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 5 -basisop x+1/4,y+1/4,z -symbol ccp4 3005 -symbol Hall ' C 2y (x+1/4,y+1/4,z)' -symbol xHM 'C 1 21 1' -symbol old 'C 1 21 1' -symbol laue '-P 2y' '2/m' -symbol patt '-C 2y' '2/m' -symbol pgrp ' P 2y' '2' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<=1/4; 0<=y<1; 0<=z<1 -mapasu zero 0<=x<1; 0<=y<1/2; 0<=z<=1/2 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -x+1/2,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 8 -basisop -x,z,y -symbol ccp4 1008 -symbol Hall ' B -2' -symbol xHM 'B 1 1 m' -symbol old 'B 1 1 m' -symbol laue '-P 2' '2/m' -symbol patt '-B 2' '2/m' -symbol pgrp ' P -2' 'm' -hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' -mapasu ccp4 0<=x<1; 0<=y<1/4; 0<=z<1 -mapasu zero 0<=x<1/2; 0<=y<=1; 0<=z<1/2 -mapasu nonz 0<=x<1/2; 0<=y<=1; 0<=z<1/2 -cheshire -symop x,y,z -symop x,y,-z -cenop x,y,z -cenop x+1/2,y,z+1/2 -end_spacegroup - -begin_spacegroup -number 18 -basisop x+1/4,y+1/4,z -symbol ccp4 1018 -symbol Hall ' P 2 2ab (x+1/4,y+1/4,z)' -symbol xHM '' -symbol old 'P 21 21 2 (a)' -symbol laue '-P 2 2' 'mmm' -symbol patt '-P 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x+1/2,-y,-z -symop -x,y+1/2,-z -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 20 -basisop x+1/4,y,z -symbol ccp4 1020 -symbol Hall ' C 2c 2 (x+1/4,y,z)' -symbol xHM '' -symbol old 'C 2 2 21a)' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu zero 0<=x<=1/4; 0<=y<=1/2; 0<=z<1 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -x+1/2,-y,z+1/2 -symop x,-y,-z -symop -x+1/2,y,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 21 -basisop x+1/4,y+1/4,z -symbol ccp4 1021 -symbol Hall ' C 2 2 (x+1/4,y+1/4,z)' -symbol xHM '' -symbol old 'C 2 2 2a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-C 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<=1/2 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x,-y+1/2,-z -symop -x+1/2,y,-z -cenop x,y,z -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 22 -basisop x,y,z+1/4 -symbol ccp4 1022 -symbol Hall ' F 2 2 (x,y,z+1/4)' -symbol xHM '' -symbol old 'F 2 2 2a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-F 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -x,-y,z -symop x,-y,-z+1/2 -symop -x,y,-z+1/2 -cenop x,y,z -cenop x,y+1/2,z+1/2 -cenop x+1/2,y,z+1/2 -cenop x+1/2,y+1/2,z -end_spacegroup - -begin_spacegroup -number 23 -basisop x-1/4,y+1/4,z-1/4 -symbol ccp4 1023 -symbol Hall ' I 2 2 (x-1/4,y+1/4,z-1/4)' -symbol xHM '' -symbol old 'I 2 2 2a' -symbol laue '-P 2 2' 'mmm' -symbol patt '-I 2 2' 'mmm' -symbol pgrp ' P 2 2' '222' -hklasu ccp4 'h>=0 and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<1; 0<=z<=1/4 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y,-z+1/2 -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - -begin_spacegroup -number 94 -basisop x-1/4,y-1/4,z-1/4 -symbol ccp4 1094 -symbol Hall ' P 4n 2n (x-1/4,y-1/4,z-1/4)' -symbol xHM '' -symbol old 'P 42 21 2a' -symbol laue '-P 4 2' '4/mmm' -symbol patt '-P 4 2' '4/mmm' -symbol pgrp ' P 4 2' '422' -hklasu ccp4 'h>=k and k>=0 and l>=0' -mapasu ccp4 0<=x<=1/2; 0<=y<=1/2; 0<=z<=1/2 -mapasu zero 0<=x<1; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -y,x+1/2,z+1/2 -symop -x+1/2,-y+1/2,z -symop y+1/2,-x,z+1/2 -symop x+1/2,-y,-z -symop y,x,-z+1/2 -symop -x,y+1/2,-z -symop -y+1/2,-x+1/2,-z+1/2 -cenop x,y,z -end_spacegroup - -begin_spacegroup -number 197 -basisop x+1/4,y+1/4,z+1/4 -symbol ccp4 1197 -symbol Hall ' I 2 2 3 (x+1/4,y+1/4,z+1/4)' -symbol xHM '' -symbol old 'I 2 3a' -symbol laue '-P 2 2 3' 'm-3' -symbol patt '-I 2 2 3' 'm-3' -symbol pgrp ' P 2 2 3' '23' -hklasu ccp4 'h>=0 and ((l>=h and k>h) or (l=h and k=h))' -mapasu ccp4 0<=x<1; 0<=y<1; 0<=z<=1/2 -mapasu zero 0<=x<=1/4; 0<=y<=1/4; 0<=z<1 -mapasu nonz 0<=x<-1; 0<=y<-1; 0<=z<-1 -cheshire -symop x,y,z -symop -x+1/2,-y+1/2,z -symop x,-y+1/2,-z+1/2 -symop -x+1/2,y,-z+1/2 -symop z,x,y -symop -z+1/2,-x+1/2,y -symop z,-x+1/2,-y+1/2 -symop -z+1/2,x,-y+1/2 -symop y,z,x -symop y,-z+1/2,-x+1/2 -symop -y+1/2,z,-x+1/2 -symop -y+1/2,-z+1/2,x -cenop x,y,z -cenop x+1/2,y+1/2,z+1/2 -end_spacegroup - diff --git a/ccp4c/data/symop.lib b/ccp4c/data/symop.lib deleted file mode 100644 index f770634e..00000000 --- a/ccp4c/data/symop.lib +++ /dev/null @@ -1,4920 +0,0 @@ -1 1 1 P1 PG1 TRICLINIC 'P 1' - X,Y,Z -2 2 2 P-1 PG1bar TRICLINIC 'P -1' - X,Y,Z - -X,-Y,-Z -3 2 2 P2 PG2 MONOCLINIC 'P 1 2 1' - X,Y,Z - -X,Y,-Z -4 2 2 P21 PG2 MONOCLINIC 'P 1 21 1' - X,Y,Z - -X,Y+1/2,-Z -5 4 2 C2 PG2 MONOCLINIC 'C 1 2 1' - X,Y,Z - -X,Y,-Z - 1/2+X,1/2+Y,Z - 1/2-X,1/2+Y,-Z -6 2 2 Pm PGm MONOCLINIC 'P 1 m 1' - X,Y,Z - X,-Y,Z -7 2 2 Pc PGm MONOCLINIC 'P 1 c 1' - X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 2' !(unique axis a) - X,Y,Z - -X,Y,-Z - 1/2+X,-Y,-Z - 1/2-X,-Y,Z -2017 4 4 P2212 PG222 ORTHORHOMBIC 'P 2 21 2' !(unique axis b) - X,Y,Z - X,1/2-Y,-Z - -X,1/2+Y,-Z - -X,-Y,Z -1018 4 4 P21212a PG222 ORTHORHOMBIC 'P 21 21 2 (a)' ! origin on 21 21, shift (1/4,1/4,0) - X,Y,Z - 1/2-X,1/2-Y,Z - X+1/2,-Y,-Z - -X,Y+1/2,-Z -2018 4 4 P21221 PG222 ORTHORHOMBIC 'P 21 2 21' !(unique axis b) - X,Y,Z - -X,Y,-Z - 1/2+X,-Y,1/2-Z - 1/2-X,-Y,1/2+Z -3018 4 4 P22121 PG222 ORTHORHOMBIC 'P 2 21 21' !(unique axis a) - X,Y,Z - X,-Y,-Z - -X,1/2+Y,1/2-Z - -X,1/2-Y,1/2+Z -1020 8 4 C2221a PG222 ORTHORHOMBIC 'C 2 2 21a)' ! P212121 with C centring, shift(1/4,0,0) - X,Y,Z - 1/2-X,-Y,1/2+Z - 1/2+X,1/2-Y,-Z - -X,1/2+Y,1/2-Z - 1/2+X,1/2+Y,Z - -X,1/2-Y,1/2+Z - X,-Y,-Z - 1/2-X,Y,1/2-Z -1021 8 4 C222a PG222 ORTHORHOMBIC 'C 2 2 2a' ! C21212a origin on 21 21 - X,Y,Z - 1/2-X,1/2-Y,Z - X+1/2,-Y,-Z - -X,Y+1/2,-Z - 1/2+ X,1/2+Y,Z - -X,-Y,Z - X,1/2-Y,-Z - 1/2-X,Y,-Z -1022 16 4 F222a PG222 ORTHORHOMBIC 'F 2 2 2a' ! same as 1018 with face centring shift (1/4,0,0) - X,Y,Z - 1/2-X,1/2-Y,Z - X+1/2,-Y,-Z - -X,Y+1/2,-Z - X,Y+1/2,Z+1/2 - 1/2-X,-Y,Z+1/2 - X+1/2,-Y+1/2,-Z+1/2 - -X,Y,-Z+1/2 - X+1/2,Y,Z+1/2 - -X,1/2-Y,Z+1/2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Z,X,1/2-Y diff --git a/docs/SOFTWARE.md b/docs/SOFTWARE.md index 8e642cfe..3f783c2d 100644 --- a/docs/SOFTWARE.md +++ b/docs/SOFTWARE.md @@ -47,8 +47,7 @@ Directly included in the repository: * Cpp-http library for HTTP - see [github.com/yhirose/cpp-httplib](https://github.com/yhirose/cpp-httplib) * Base64 decoder/encoder - see [gist.github.com/tomykaira](https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594) * GEMMI library by Global Phasing - see [github.com/project-gemmi/gemmi](https://github.com/project-gemmi/gemmi) -* CCP4c library 8.0.0 by CCP4 - see [ccp4.ac.uk](https://www.ccp4.ac.uk/) - + For license check LICENSE file in respective directory diff --git a/image_analysis/scale_merge/CMakeLists.txt b/image_analysis/scale_merge/CMakeLists.txt index 1850ba53..62aefd28 100644 --- a/image_analysis/scale_merge/CMakeLists.txt +++ b/image_analysis/scale_merge/CMakeLists.txt @@ -1,2 +1,2 @@ -ADD_LIBRARY(JFJochScaleMerge ScaleAndMerge.cpp ScaleAndMerge.h FrenchWilson.cpp FrenchWilson.h MtzWriter.h MtzWriter.cpp) -TARGET_LINK_LIBRARIES(JFJochScaleMerge Ceres::ceres Eigen3::Eigen JFJochCommon ccp4c) \ No newline at end of file +ADD_LIBRARY(JFJochScaleMerge ScaleAndMerge.cpp ScaleAndMerge.h FrenchWilson.cpp FrenchWilson.h) +TARGET_LINK_LIBRARIES(JFJochScaleMerge Ceres::ceres Eigen3::Eigen JFJochCommon) \ No newline at end of file diff --git a/image_analysis/scale_merge/MtzWriter.cpp b/image_analysis/scale_merge/MtzWriter.cpp deleted file mode 100644 index c1c7ad9f..00000000 --- a/image_analysis/scale_merge/MtzWriter.cpp +++ /dev/null @@ -1,234 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Paul Scherrer Institute -// SPDX-License-Identifier: GPL-3.0-only - -#include "MtzWriter.h" - -#include -#include -#include -#include - -// CCP4 C library — lives inside the CMtz namespace when included from C++ -#include "../../ccp4c/ccp4/cmtzlib.h" -#include "../../ccp4c/ccp4/csymlib.h" -#include "../../ccp4c/ccp4/mtzdata.h" - -MtzWriteOptions::MtzWriteOptions(const DiffractionExperiment& experiment, - const std::optional& cell_override) { - // Unit cell: prefer explicit override, then experiment setting, else default - if (cell_override.has_value()) { - cell = cell_override.value(); - } else if (experiment.GetUnitCell().has_value()) { - cell = experiment.GetUnitCell().value(); - } - - // Space group - auto sg = experiment.GetGemmiSpaceGroup(); - if (sg) { - spacegroup_number = sg->ccp4; - spacegroup_name = sg->xhm(); - } - - // Wavelength - wavelength = experiment.GetWavelength_A(); - - // Sample name → crystal name - auto sample = experiment.GetSampleName(); - if (!sample.empty()) - crystal_name = sample; - - // File prefix → project name - auto prefix = experiment.GetFilePrefix(); - if (!prefix.empty()) - project_name = prefix; -} - -namespace { - -/// Helper: create a fresh in-memory MTZ structure, set up symmetry, -/// crystal, dataset, and the requested columns. -/// Returns {mtz, columns} or throws on failure. -struct MtzSetup { - CMtz::MTZ* mtz = nullptr; - std::vector cols; -}; - -MtzSetup CreateMtzSkeleton(const MtzWriteOptions& opts, - const char labels[][31], - const char types[][3], - int ncol) { - using namespace CMtz; - - // Allocate empty MTZ (0 crystals initially) - int nset_zero = 0; - MTZ* mtz = MtzMalloc(0, &nset_zero); - if (!mtz) - throw std::runtime_error("MtzMalloc failed"); - - mtz->refs_in_memory = 1; // we build everything in memory, then write - - // Title - ccp4_lwtitl(mtz, opts.title.c_str(), 0); - - // Symmetry: use CCP4 spacegroup lookup - CCP4SPG* spg = ccp4spg_load_by_ccp4_num(opts.spacegroup_number); - if (!spg) { - // Fallback to P1 - spg = ccp4spg_load_by_ccp4_num(1); - } - - if (spg) { - const int nsym = spg->nsymop; - const int nsymp = spg->nsymop_prim; - float rsymx[192][4][4]; - std::memset(rsymx, 0, sizeof(rsymx)); - - for (int i = 0; i < nsym && i < 192; ++i) { - for (int r = 0; r < 3; ++r) { - for (int c = 0; c < 3; ++c) - rsymx[i][r][c] = static_cast(spg->symop[i].rot[r][c]); - rsymx[i][r][3] = static_cast(spg->symop[i].trn[r]); - } - rsymx[i][3][3] = 1.0f; - } - - char ltypex[2] = {spg->symbol_old[0], '\0'}; - char spgrnx[MAXSPGNAMELENGTH + 1]; - std::strncpy(spgrnx, spg->symbol_xHM, MAXSPGNAMELENGTH); - spgrnx[MAXSPGNAMELENGTH] = '\0'; - char pgnamx[MAXPGNAMELENGTH + 1]; - std::strncpy(pgnamx, spg->pgname, MAXPGNAMELENGTH); - pgnamx[MAXPGNAMELENGTH] = '\0'; - - ccp4_lwsymm(mtz, nsym, nsymp, rsymx, - ltypex, spg->spg_ccp4_num, spgrnx, pgnamx); - - ccp4spg_free(&spg); - } - - // Crystal + dataset - float cell[6] = { - static_cast(opts.cell.a), - static_cast(opts.cell.b), - static_cast(opts.cell.c), - static_cast(opts.cell.alpha), - static_cast(opts.cell.beta), - static_cast(opts.cell.gamma) - }; - - MTZXTAL* xtal = MtzAddXtal(mtz, - opts.crystal_name.c_str(), - opts.project_name.c_str(), - cell); - if (!xtal) { - MtzFree(mtz); - throw std::runtime_error("MtzAddXtal failed"); - } - - MTZSET* set = MtzAddDataset(mtz, xtal, - opts.dataset_name.c_str(), - opts.wavelength); - if (!set) { - MtzFree(mtz); - throw std::runtime_error("MtzAddDataset failed"); - } - - // Add columns - MtzSetup result; - result.mtz = mtz; - result.cols.resize(ncol, nullptr); - - for (int i = 0; i < ncol; ++i) { - result.cols[i] = MtzAddColumn(mtz, set, labels[i], types[i]); - if (!result.cols[i]) { - MtzFree(mtz); - throw std::runtime_error(std::string("MtzAddColumn failed for ") + labels[i]); - } - } - - return result; -} - -} // namespace - -bool WriteMtzIntensities(const std::string& filename, - const std::vector& merged, - const MtzWriteOptions& opts) { - using namespace CMtz; - - if (merged.empty()) - return false; - - constexpr int NCOL = 5; - const char labels[NCOL][31] = {"H", "K", "L", "IMEAN", "SIGIMEAN"}; - const char types[NCOL][3] = {"H", "H", "H", "J", "Q"}; - - MtzSetup setup; - try { - setup = CreateMtzSkeleton(opts, labels, types, NCOL); - } catch (...) { - return false; - } - - // Write reflections (1-indexed) - const int nref = static_cast(merged.size()); - for (int i = 0; i < nref; ++i) { - float adata[NCOL]; - adata[0] = static_cast(merged[i].h); - adata[1] = static_cast(merged[i].k); - adata[2] = static_cast(merged[i].l); - adata[3] = static_cast(merged[i].I); - adata[4] = std::isfinite(static_cast(merged[i].sigma)) - ? static_cast(merged[i].sigma) - : 0.0f; - - ccp4_lwrefl(setup.mtz, adata, setup.cols.data(), NCOL, i + 1); - } - - // Write to disk - setup.mtz->nref = nref; - int ok = MtzPut(setup.mtz, filename.c_str()); - MtzFree(setup.mtz); - return ok != 0; -} - -bool WriteMtzAmplitudes(const std::string& filename, - const std::vector& fw, - const MtzWriteOptions& opts) { - using namespace CMtz; - - if (fw.empty()) - return false; - - constexpr int NCOL = 7; - const char labels[NCOL][31] = {"H", "K", "L", "FP", "SIGFP", "IMEAN", "SIGIMEAN"}; - const char types[NCOL][3] = {"H", "H", "H", "F", "Q", "J", "Q"}; - - MtzSetup setup; - try { - setup = CreateMtzSkeleton(opts, labels, types, NCOL); - } catch (...) { - return false; - } - - const int nref = static_cast(fw.size()); - for (int i = 0; i < nref; ++i) { - float adata[NCOL]; - adata[0] = static_cast(fw[i].h); - adata[1] = static_cast(fw[i].k); - adata[2] = static_cast(fw[i].l); - adata[3] = static_cast(fw[i].F); - adata[4] = static_cast(fw[i].sigmaF); - adata[5] = static_cast(fw[i].I); - adata[6] = std::isfinite(static_cast(fw[i].sigmaI)) - ? static_cast(fw[i].sigmaI) - : 0.0f; - - ccp4_lwrefl(setup.mtz, adata, setup.cols.data(), NCOL, i + 1); - } - - setup.mtz->nref = nref; - int ok = MtzPut(setup.mtz, filename.c_str()); - MtzFree(setup.mtz); - return ok != 0; -} \ No newline at end of file diff --git a/image_analysis/scale_merge/MtzWriter.h b/image_analysis/scale_merge/MtzWriter.h deleted file mode 100644 index fa6fe3b8..00000000 --- a/image_analysis/scale_merge/MtzWriter.h +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Paul Scherrer Institute -// SPDX-License-Identifier: GPL-3.0-only - -#pragma once - -#include -#include - -#include "ScaleAndMerge.h" -#include "FrenchWilson.h" -#include "../../common/UnitCell.h" -#include "../../common/DiffractionExperiment.h" - -/// Options controlling what goes into the MTZ file -struct MtzWriteOptions { - /// Unit cell parameters (required for a valid MTZ) - UnitCell cell = {50.0, 50.0, 50.0, 90.0, 90.0, 90.0}; - - /// Space group number (1 = P1 if unknown) - int spacegroup_number = 1; - - /// Space group name (e.g. "P 21 21 21") - std::string spacegroup_name = "P 1"; - - /// Dataset metadata - std::string project_name = "JFJoch"; - std::string crystal_name = "crystal"; - std::string dataset_name = "dataset"; - - /// Wavelength in Angstroms - float wavelength = 1.0f; - - /// Title line - std::string title = "JFJoch scaled data"; - - /// Construct default options - MtzWriteOptions() = default; - - /// Construct from a DiffractionExperiment, optionally overriding the - /// unit cell (e.g. with the lattice found by the rotation indexer). - explicit MtzWriteOptions(const DiffractionExperiment& experiment, - const std::optional& cell_override = std::nullopt); -}; - -/// Write merged intensities (ScaleMergeResult) to an MTZ file. -/// Columns: H K L IMEAN SIGIMEAN -/// Returns true on success. -bool WriteMtzIntensities(const std::string& filename, - const std::vector& merged, - const MtzWriteOptions& opts); - -/// Write French-Wilson amplitudes to an MTZ file. -/// Columns: H K L FP SIGFP IMEAN SIGIMEAN -/// Returns true on success. -bool WriteMtzAmplitudes(const std::string& filename, - const std::vector& fw, - const MtzWriteOptions& opts); \ No newline at end of file diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 8325acc7..1f5fdf78 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -25,7 +25,6 @@ #include "../receiver/JFJochReceiverPlots.h" #include "../compression/JFJochCompressor.h" #include "../image_analysis/scale_merge/FrenchWilson.h" -#include "../image_analysis/scale_merge/MtzWriter.h" void print_usage(Logger &logger) { logger.Info("Usage ./jfjoch_analysis {} "); @@ -427,9 +426,10 @@ int main(int argc, char **argv) { } } + // --- French-Wilson: convert I → F --- { FrenchWilsonOptions fw_opts; - fw_opts.acentric = true; + fw_opts.acentric = true; // typical for MX fw_opts.num_shells = 20; auto fw = FrenchWilson(scale_result->merged, fw_opts); @@ -448,30 +448,6 @@ int main(int argc, char **argv) { fw_file.close(); logger.Info("French-Wilson: wrote {} amplitudes to {}", fw.size(), fw_path); } - - // --- Write MTZ files --- - MtzWriteOptions mtz_opts(experiment, - rotation_indexer_ret.has_value() - ? std::optional(rotation_indexer_ret->lattice.GetUnitCell()) - : std::nullopt); - - // Intensities MTZ - { - const std::string mtz_i_path = output_prefix + "_scaled.mtz"; - if (WriteMtzIntensities(mtz_i_path, scale_result->merged, mtz_opts)) - logger.Info("Wrote {} reflections to {}", scale_result->merged.size(), mtz_i_path); - else - logger.Error("Failed to write {}", mtz_i_path); - } - - // Amplitudes MTZ (French-Wilson) - { - const std::string mtz_f_path = output_prefix + "_amplitudes.mtz"; - if (WriteMtzAmplitudes(mtz_f_path, fw, mtz_opts)) - logger.Info("Wrote {} reflections to {}", fw.size(), mtz_f_path); - else - logger.Error("Failed to write {}", mtz_f_path); - } } } else { logger.Warning("Scaling skipped — too few reflections accumulated (need >= 20)"); -- 2.52.0 From c40a0332e725dcca3d53e78c7fcd6b12b38d0b79 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Mon, 9 Feb 2026 10:27:47 +0100 Subject: [PATCH 32/81] jfjoch_process: minor fixes to input parameters --- tools/jfjoch_process.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 1f5fdf78..50225f76 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -38,7 +38,8 @@ void print_usage(Logger &logger) { logger.Info(" -F Use FFT indexing algorithm (default: Auto)"); logger.Info(" -x No least-square beam center refinement"); logger.Info(" -d High resolution limit for spot finding (default: 1.5)"); - logger.Info(" -S Run scaling (refine mosaicity) and write scaled.hkl + image.dat"); + logger.Info(" -S Space group number"); + logger.Info(" -M Scale and merge (refine mosaicity) and write scaled.hkl + image.dat"); } int main(int argc, char **argv) { @@ -59,6 +60,7 @@ int main(int argc, char **argv) { bool use_fft = false; bool refine_beam_center = true; bool run_scaling = false; + std::optional space_group_number; float d_high = 1.5; @@ -68,7 +70,7 @@ int main(int argc, char **argv) { } int opt; - while ((opt = getopt(argc, argv, "o:N:s:e:vR::Fxd:")) != -1) { + while ((opt = getopt(argc, argv, "o:N:s:e:vR::Fxd:S:M")) != -1) { switch (opt) { case 'o': output_prefix = optarg; @@ -99,6 +101,9 @@ int main(int argc, char **argv) { d_high = atof(optarg); break; case 'S': + space_group_number = atoi(optarg); + break; + case 'M': run_scaling = true; break; default: @@ -116,6 +121,17 @@ int main(int argc, char **argv) { input_file = argv[optind]; logger.Verbose(verbose); + // Validate space group number early + const gemmi::SpaceGroup* space_group = nullptr; + if (space_group_number.has_value()) { + space_group = gemmi::find_spacegroup_by_number(space_group_number.value()); + if (!space_group) { + logger.Error("Unknown space group number {}", space_group_number.value()); + exit(EXIT_FAILURE); + } + logger.Info("Using space group {} (number {})", space_group->hm, space_group_number.value()); + } + // 1. Read Input File JFJochHDF5Reader reader; try { @@ -381,6 +397,11 @@ int main(int argc, char **argv) { scale_opts.max_num_iterations = 500; scale_opts.max_solver_time_s = 240.0; // generous cutoff for now + if (space_group) + scale_opts.space_group = *space_group; + else + scale_opts.space_group = experiment.GetGemmiSpaceGroup(); + auto scale_start = std::chrono::steady_clock::now(); auto scale_result = indexer.ScaleRotationData(scale_opts); auto scale_end = std::chrono::steady_clock::now(); -- 2.52.0 From 684c3df204bb434a67154ed67ac026a5baf79aa2 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Mon, 9 Feb 2026 12:29:48 +0100 Subject: [PATCH 33/81] ScaleAndMerge: Fix partiality model --- .../bragg_prediction/BraggPredictionRot.cpp | 9 +- .../bragg_prediction/BraggPredictionRotGPU.cu | 2 +- image_analysis/scale_merge/ScaleAndMerge.cpp | 152 +++++++----------- image_analysis/scale_merge/ScaleAndMerge.h | 10 +- tools/jfjoch_process.cpp | 1 - 5 files changed, 68 insertions(+), 106 deletions(-) diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 11547f6f..898943ee 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -47,8 +47,7 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys int i = 0; const float mos_angle_rad = settings.mosaicity_deg * static_cast(M_PI) / 180.f; - const float wedge_angle_rad = settings.wedge_deg * static_cast(M_PI) / 180.f; - const float max_angle_rad = wedge_angle_rad / 2 + mos_angle_rad; + const float half_wedge_angle_rad = settings.wedge_deg * static_cast(M_PI) / 180.f / 2.0f ; for (int h = -settings.max_hkl; h <= settings.max_hkl; h++) { // Precompute A* h contribution @@ -109,10 +108,10 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys continue; const float lorentz_reciprocal = std::fabs(m2 * (S % S0))/(S*S0); - const float c1 = std::sqrt(2.0f) * mos_angle_rad / zeta_abs; + const float c1 = zeta_abs / (std::sqrt(2.0f) * mos_angle_rad); - const float partiality = (std::erf((phi + wedge_angle_rad / 2.0f) * c1) - - std::erf((phi - wedge_angle_rad / 2.0f) * c1)) / 2.0f; + const float partiality = (std::erf((phi + half_wedge_angle_rad) * c1) + - std::erf((phi - half_wedge_angle_rad) * c1)) / 2.0f; // Inlined RecipToDector with rot1 and rot2 (rot3 = 0) // Apply rotation matrix transpose float S_rot_x = rot[0] * S.x + rot[1] * S.y + rot[2] * S.z; diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index fb557633..705a2ac5 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -125,7 +125,7 @@ namespace { // Partiality calculation (Kabsch formulation) // c1 = sqrt(2) * sigma / zeta, where sigma = mosaicity - float c1 = sqrtf(2.0f) * C.mos_angle_rad / zeta_abs; + float c1 = zeta_abs / (sqrtf(2.0f) * C.mos_angle_rad); float half_wedge = C.wedge_angle_rad / 2.0f; float partiality = (erff((phi + half_wedge) * c1) - erff((phi - half_wedge) * c1)) / 2.0f; diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 5473d719..71d9689c 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -114,39 +114,30 @@ inline HKLKey CanonicalizeHKLKey(const Reflection& r, const ScaleMergeOptions& o } struct IntensityResidual { - IntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, double s2, bool refine_b, - bool partiality_model) + IntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, bool refine_partiality) : Iobs_(static_cast(r.I)), inv_sigma_(SafeInv(sigma_obs, 1.0)), delta_phi_rad_(static_cast(r.delta_phi) * M_PI / 180.0), lp_(SafeInv(static_cast(r.rlp), 1.0)), half_wedge_rad_(wedge_deg * M_PI / 180.0 / 2.0), - c1_(std::sqrt(2.0) * SafeInv(static_cast(r.zeta), 1.0)), - s2_(s2), - refine_b_(refine_b), - partiality_model_(partiality_model) {} + c1_(r.zeta / std::sqrt(2.0)), + partiality_(r.partiality), + refine_partiality_(refine_partiality) {} template - bool operator()(const T* const log_k, - const T* const b, + bool operator()(const T* const k, const T* const mosaicity_rad, - const T* const log_Itrue, + const T* const Itrue, T* residual) const { - const T k = ceres::exp(log_k[0]); - const T Itrue = ceres::exp(log_Itrue[0]); - - T partiality = T(1.0); - if (partiality_model_) { - const T arg_plus = T(delta_phi_rad_ + half_wedge_rad_) * (T(c1_) * mosaicity_rad[0]); - const T arg_minus = T(delta_phi_rad_ - half_wedge_rad_) * (T(c1_) * mosaicity_rad[0]); + T partiality; + if (refine_partiality_ && mosaicity_rad[0] != 0.0) { + const T arg_plus = T(delta_phi_rad_ + half_wedge_rad_) * T(c1_) / mosaicity_rad[0]; + const T arg_minus = T(delta_phi_rad_ - half_wedge_rad_) * T(c1_) / mosaicity_rad[0]; partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); - } - T wilson = T(1.0); - if (refine_b_) { - wilson = ceres::exp(-b[0] * T(s2_)); - } + } else + partiality = T(partiality_); - const T Ipred = k * wilson * partiality * T(lp_) * Itrue; + const T Ipred = k[0] * partiality * T(lp_) * Itrue[0]; residual[0] = (Ipred - T(Iobs_)) * T(inv_sigma_); return true; } @@ -157,9 +148,8 @@ struct IntensityResidual { double lp_; double half_wedge_rad_; double c1_; - double s2_; - bool refine_b_; - bool partiality_model_; + double partiality_; + bool refine_partiality_; }; struct ScaleRegularizationResidual { @@ -167,9 +157,8 @@ struct ScaleRegularizationResidual { : inv_sigma_(SafeInv(sigma_k, 1.0)) {} template - bool operator()(const T* const log_k, T* residual) const { - const T k = ceres::exp(log_k[0]); - residual[0] = (k - T(1.0)) * T(inv_sigma_); + bool operator()(const T* const k, T* residual) const { + residual[0] = (k[0] - T(1.0)) * T(inv_sigma_); return true; } @@ -187,7 +176,6 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob int img_id = 0; int img_slot = -1; int hkl_slot = -1; - double s2 = 0.0; double sigma = 0.0; }; @@ -213,7 +201,6 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob continue; const double sigma = SafeSigma(static_cast(r.sigma), opt.min_sigma); - const double s2 = 1.0 / (d * d); const int img_id = RoundImageId(r.image_number, opt.image_number_rounding); @@ -247,7 +234,6 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob o.img_id = img_id; o.img_slot = img_slot; o.hkl_slot = hkl_slot; - o.s2 = s2; o.sigma = sigma; obs.push_back(o); } @@ -256,16 +242,14 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob const int nhkl = static_cast(hklToSlot.size()); out.image_scale_k.assign(nimg, 1.0); - out.image_b_factor.assign(nimg, 0.0); out.image_ids.assign(nimg, 0); for (const auto& kv : imgIdToSlot) { out.image_ids[kv.second] = kv.first; } - std::vector log_k(nimg, 0.0); - std::vector b(nimg, 0.0); - std::vector log_Itrue(nhkl, 0.0); + std::vector k(nimg, 1.0); + std::vector Itrue(nhkl, 0.0); auto deg2rad = [](double deg) { return deg * M_PI / 180.0; }; @@ -281,31 +265,30 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob for (int h = 0; h < nhkl; ++h) { auto& v = per_hkl_I[h]; if (v.empty()) { - log_Itrue[h] = std::log(std::max(opt.min_sigma, 1e-6)); + Itrue[h] = std::max(opt.min_sigma, 1e-6); continue; } std::nth_element(v.begin(), v.begin() + static_cast(v.size() / 2), v.end()); double med = v[v.size() / 2]; if (!std::isfinite(med) || med <= opt.min_sigma) med = opt.min_sigma; - log_Itrue[h] = std::log(med); + Itrue[h] = med; } } ceres::Problem problem; - const bool partiality_model = opt.wedge_deg > 0.0; + const bool refine_partiality = opt.wedge_deg > 0.0; for (const auto& o : obs) { - auto* cost = new ceres::AutoDiffCostFunction( - new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, o.s2, opt.refine_b_factor, partiality_model)); + auto* cost = new ceres::AutoDiffCostFunction( + new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, refine_partiality)); problem.AddResidualBlock(cost, nullptr, // no loss function - &log_k[o.img_slot], - &b[o.img_slot], + &k[o.img_slot], &mosaicity_rad[o.img_slot], - &log_Itrue[o.hkl_slot]); + &Itrue[o.hkl_slot]); } // Optional Kabsch-like regularization for k @@ -313,28 +296,14 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob for (int i = 0; i < nimg; ++i) { auto* rcost = new ceres::AutoDiffCostFunction( new ScaleRegularizationResidual(opt.scale_regularization_sigma)); - problem.AddResidualBlock(rcost, nullptr, &log_k[i]); + problem.AddResidualBlock(rcost, nullptr, &k[i]); } } // Fix gauge freedom if (opt.fix_first_image_scale && nimg > 0) { - log_k[0] = 0.0; - problem.SetParameterBlockConstant(&log_k[0]); - } - - if (!opt.refine_b_factor) { - for (int i = 0; i < nimg; ++i) { - b[i] = 0.0; - problem.SetParameterBlockConstant(&b[i]); - } - } else { - for (int i = 0; i < nimg; ++i) { - if (opt.b_min) - problem.SetParameterLowerBound(&b[i], 0, *opt.b_min); - if (opt.b_max) - problem.SetParameterUpperBound(&b[i], 0, *opt.b_max); - } + k[0] = 1.0; + problem.SetParameterBlockConstant(&k[0]); } // Mosaicity refinement + bounds @@ -342,14 +311,22 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob for (int i = 0; i < nimg; ++i) problem.SetParameterBlockConstant(&mosaicity_rad[i]); } else { - const std::optional min_rad = opt.mosaicity_min_deg - ? std::optional(deg2rad(*opt.mosaicity_min_deg)) : std::nullopt; - const std::optional max_rad = opt.mosaicity_max_deg - ? std::optional(deg2rad(*opt.mosaicity_max_deg)) : std::nullopt; + const double min_rad = deg2rad(opt.mosaicity_min_deg); + const double max_rad = deg2rad(opt.mosaicity_max_deg); for (int i = 0; i < nimg; ++i) { - if (min_rad) problem.SetParameterLowerBound(&mosaicity_rad[i], 0, *min_rad); - if (max_rad) problem.SetParameterUpperBound(&mosaicity_rad[i], 0, *max_rad); + problem.SetParameterLowerBound(&mosaicity_rad[i], 0, min_rad); + problem.SetParameterUpperBound(&mosaicity_rad[i], 0, max_rad); + } + } + + // Force k[i] > 0 for all images (scale factors must be positive) + { + constexpr double k_floor = 1e-8; + for (int i = 0; i < nimg; ++i) { + if (!(opt.fix_first_image_scale && i == 0)) { + problem.SetParameterLowerBound(&k[i], 0, k_floor); + } } } @@ -364,10 +341,8 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob ceres::Solve(options, &problem, &summary); // --- Export per-image results --- - for (int i = 0; i < nimg; ++i) { - out.image_scale_k[i] = std::exp(log_k[i]); - out.image_b_factor[i] = opt.refine_b_factor ? b[i] : 0.0; - } + for (int i = 0; i < nimg; ++i) + out.image_scale_k[i] = k[i]; out.mosaicity_deg.resize(nimg); for (int i = 0; i < nimg; ++i) @@ -375,13 +350,11 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob // --- Compute goodness-of-fit (reduced chi-squared) --- const int n_obs = static_cast(obs.size()); - // Count free parameters: nhkl log_Itrue + per-image (log_k + b + mosaicity) minus fixed ones + // Count free parameters: nhkl Itrue + per-image (k + mosaicity) minus fixed ones int n_params = nhkl; for (int i = 0; i < nimg; ++i) { if (!(opt.fix_first_image_scale && i == 0)) - n_params += 1; // log_k - if (opt.refine_b_factor) - n_params += 1; // b + n_params += 1; // k if (opt.refine_mosaicity) n_params += 1; // mosaicity } @@ -393,22 +366,20 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob const int i = o.img_slot; const int h = o.hkl_slot; - const double ki = std::exp(log_k[i]); - const double atten = opt.refine_b_factor ? std::exp(-b[i] * o.s2) : 1.0; - const double Itrue = std::exp(log_Itrue[h]); + const double ki = k[i]; - const double zeta = static_cast(o.r->zeta); const double mosa_i = mosaicity_rad[i]; - const double c1 = std::sqrt(2.0) * (mosa_i / zeta); + const double c2 = o.r->zeta / (std::sqrt(2.0) * mosa_i); const double delta_phi_rad = static_cast(o.r->delta_phi) * M_PI / 180.0; - const double partiality = partiality_model - ? (std::erf((delta_phi_rad + half_wedge_rad) * c1) - std::erf((delta_phi_rad - half_wedge_rad) * c1)) / 2.0 - : 1.0; + const double partiality = refine_partiality + ? (std::erf((delta_phi_rad + half_wedge_rad) * c2) + - std::erf((delta_phi_rad - half_wedge_rad) * c2)) / 2.0 + : o.r->partiality; - const double lp = SafeInv(static_cast(o.r->rlp), 1.0); + const double lp = SafeInv(o.r->rlp, 1.0); - const double Ipred = ki * atten * partiality * lp * Itrue; + const double Ipred = ki * partiality * lp * Itrue[h]; const double resid = (Ipred - static_cast(o.r->I)) / o.sigma; sum_r2 += resid * resid; } @@ -427,7 +398,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob out.merged[h].h = slotToHKL[h].h; out.merged[h].k = slotToHKL[h].k; out.merged[h].l = slotToHKL[h].l; - out.merged[h].I = std::exp(log_Itrue[h]); + out.merged[h].I = Itrue[h]; out.merged[h].sigma = std::numeric_limits::quiet_NaN(); out.merged[h].d = 0.0; } @@ -457,17 +428,16 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob std::vector> covariance_blocks; covariance_blocks.reserve(nhkl); for (int h = 0; h < nhkl; ++h) { - covariance_blocks.emplace_back(&log_Itrue[h], &log_Itrue[h]); + covariance_blocks.emplace_back(&Itrue[h], &Itrue[h]); } if (covariance.Compute(covariance_blocks, &problem)) { for (int h = 0; h < nhkl; ++h) { - double var_log_I = 0.0; - covariance.GetCovarianceBlock(&log_Itrue[h], &log_Itrue[h], &var_log_I); + double var_I = 0.0; + covariance.GetCovarianceBlock(&Itrue[h], &Itrue[h], &var_I); - // σ(I) = I * sqrt( var(log I) * GoF² ) - const double Itrue = std::exp(log_Itrue[h]); - out.merged[h].sigma = Itrue * std::sqrt(var_log_I * gof2); + // σ(I) = I * sqrt( var(I) * GoF² ) + out.merged[h].sigma = std::sqrt(var_I * gof2); } } diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index 1959e1fd..1e0271fd 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -11,8 +11,6 @@ #include "gemmi/symmetry.hpp" struct ScaleMergeOptions { - bool refine_b_factor = true; - int max_num_iterations = 100; double max_solver_time_s = 1.0; @@ -21,9 +19,6 @@ struct ScaleMergeOptions { bool fix_first_image_scale = true; - std::optional b_min = 0.0; - std::optional b_max = 200.0; - // Symmetry canonicalization of HKL prior to merging/scaling. // If not set, the routine uses raw HKL as-is. std::optional space_group; @@ -41,8 +36,8 @@ struct ScaleMergeOptions { bool refine_mosaicity = true; double mosaicity_init_deg = 0.17; // ~0.003 rad - std::optional mosaicity_min_deg = 1e-3; - std::optional mosaicity_max_deg = 2.0; + double mosaicity_min_deg = 1e-3; + double mosaicity_max_deg = 2.0; // --- Optional: regularize per-image scale k towards 1 (Kabsch-like) --- bool regularize_scale_to_one = false; @@ -61,7 +56,6 @@ struct MergedReflection { struct ScaleMergeResult { std::vector merged; std::vector image_scale_k; - std::vector image_b_factor; std::vector image_ids; // One mosaicity value per image (degrees). diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 50225f76..40a15f3d 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -392,7 +392,6 @@ int main(int argc, char **argv) { logger.Info("Running scaling (mosaicity refinement) ..."); ScaleMergeOptions scale_opts; - scale_opts.refine_b_factor = false; // B-factor refinement doesn't make sense for rotation scale_opts.refine_mosaicity = true; scale_opts.max_num_iterations = 500; scale_opts.max_solver_time_s = 240.0; // generous cutoff for now -- 2.52.0 From e0fd62df2bffd5806fb2e19263315aea10fa4462 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Mon, 9 Feb 2026 18:00:23 +0100 Subject: [PATCH 34/81] ScaleAndMerge: Fix symbol names k --> g, remove setting first image scale factor to 1 (it is too weak), remove radians --- image_analysis/scale_merge/ScaleAndMerge.cpp | 122 ++++--------------- image_analysis/scale_merge/ScaleAndMerge.h | 6 +- tools/jfjoch_process.cpp | 2 +- 3 files changed, 28 insertions(+), 102 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 71d9689c..0bdcbcdf 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -117,36 +117,36 @@ struct IntensityResidual { IntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, bool refine_partiality) : Iobs_(static_cast(r.I)), inv_sigma_(SafeInv(sigma_obs, 1.0)), - delta_phi_rad_(static_cast(r.delta_phi) * M_PI / 180.0), + delta_phi_(r.delta_phi), lp_(SafeInv(static_cast(r.rlp), 1.0)), - half_wedge_rad_(wedge_deg * M_PI / 180.0 / 2.0), + half_wedge_(wedge_deg / 2.0), c1_(r.zeta / std::sqrt(2.0)), partiality_(r.partiality), refine_partiality_(refine_partiality) {} template - bool operator()(const T* const k, - const T* const mosaicity_rad, + bool operator()(const T* const G, + const T* const mosaicity, const T* const Itrue, T* residual) const { T partiality; - if (refine_partiality_ && mosaicity_rad[0] != 0.0) { - const T arg_plus = T(delta_phi_rad_ + half_wedge_rad_) * T(c1_) / mosaicity_rad[0]; - const T arg_minus = T(delta_phi_rad_ - half_wedge_rad_) * T(c1_) / mosaicity_rad[0]; + if (refine_partiality_ && mosaicity[0] != 0.0) { + const T arg_plus = T(delta_phi_ + half_wedge_) * T(c1_) / mosaicity[0]; + const T arg_minus = T(delta_phi_ - half_wedge_) * T(c1_) / mosaicity[0]; partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); } else partiality = T(partiality_); - const T Ipred = k[0] * partiality * T(lp_) * Itrue[0]; + const T Ipred = G[0] * partiality * T(lp_) * Itrue[0]; residual[0] = (Ipred - T(Iobs_)) * T(inv_sigma_); return true; } double Iobs_; double inv_sigma_; - double delta_phi_rad_; + double delta_phi_; double lp_; - double half_wedge_rad_; + double half_wedge_; double c1_; double partiality_; bool refine_partiality_; @@ -241,20 +241,18 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob const int nimg = static_cast(imgIdToSlot.size()); const int nhkl = static_cast(hklToSlot.size()); - out.image_scale_k.assign(nimg, 1.0); + out.image_scale_g.assign(nimg, 1.0); out.image_ids.assign(nimg, 0); for (const auto& kv : imgIdToSlot) { out.image_ids[kv.second] = kv.first; } - std::vector k(nimg, 1.0); + std::vector g(nimg, 1.0); std::vector Itrue(nhkl, 0.0); - auto deg2rad = [](double deg) { return deg * M_PI / 180.0; }; - // Mosaicity: always per-image - std::vector mosaicity_rad(nimg, deg2rad(opt.mosaicity_init_deg)); + std::vector mosaicity(nimg, opt.mosaicity_init_deg); // Initialize Itrue from per-HKL median of observed intensities { @@ -286,8 +284,8 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob problem.AddResidualBlock(cost, nullptr, // no loss function - &k[o.img_slot], - &mosaicity_rad[o.img_slot], + &g[o.img_slot], + &mosaicity[o.img_slot], &Itrue[o.hkl_slot]); } @@ -296,44 +294,25 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob for (int i = 0; i < nimg; ++i) { auto* rcost = new ceres::AutoDiffCostFunction( new ScaleRegularizationResidual(opt.scale_regularization_sigma)); - problem.AddResidualBlock(rcost, nullptr, &k[i]); + problem.AddResidualBlock(rcost, nullptr, &g[i]); } } - // Fix gauge freedom - if (opt.fix_first_image_scale && nimg > 0) { - k[0] = 1.0; - problem.SetParameterBlockConstant(&k[0]); - } - // Mosaicity refinement + bounds if (!opt.refine_mosaicity) { for (int i = 0; i < nimg; ++i) - problem.SetParameterBlockConstant(&mosaicity_rad[i]); + problem.SetParameterBlockConstant(&mosaicity[i]); } else { - const double min_rad = deg2rad(opt.mosaicity_min_deg); - const double max_rad = deg2rad(opt.mosaicity_max_deg); - for (int i = 0; i < nimg; ++i) { - problem.SetParameterLowerBound(&mosaicity_rad[i], 0, min_rad); - problem.SetParameterUpperBound(&mosaicity_rad[i], 0, max_rad); - } - } - - // Force k[i] > 0 for all images (scale factors must be positive) - { - constexpr double k_floor = 1e-8; - for (int i = 0; i < nimg; ++i) { - if (!(opt.fix_first_image_scale && i == 0)) { - problem.SetParameterLowerBound(&k[i], 0, k_floor); - } + problem.SetParameterLowerBound(&mosaicity[i], 0, opt.mosaicity_min_deg); + problem.SetParameterUpperBound(&mosaicity[i], 0, opt.mosaicity_max_deg); } } ceres::Solver::Options options; + options.linear_solver_type = ceres::SPARSE_NORMAL_CHOLESKY; - options.minimizer_progress_to_stdout = false; - options.logging_type = ceres::LoggingType::SILENT; + options.minimizer_progress_to_stdout = true; options.max_num_iterations = opt.max_num_iterations; options.max_solver_time_in_seconds = opt.max_solver_time_s; @@ -342,52 +321,22 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob // --- Export per-image results --- for (int i = 0; i < nimg; ++i) - out.image_scale_k[i] = k[i]; + out.image_scale_g[i] = g[i]; out.mosaicity_deg.resize(nimg); for (int i = 0; i < nimg; ++i) - out.mosaicity_deg[i] = mosaicity_rad[i] * 180.0 / M_PI; + out.mosaicity_deg[i] = mosaicity[i]; // --- Compute goodness-of-fit (reduced chi-squared) --- const int n_obs = static_cast(obs.size()); // Count free parameters: nhkl Itrue + per-image (k + mosaicity) minus fixed ones int n_params = nhkl; for (int i = 0; i < nimg; ++i) { - if (!(opt.fix_first_image_scale && i == 0)) - n_params += 1; // k + n_params += 1; // k if (opt.refine_mosaicity) n_params += 1; // mosaicity } - const double half_wedge_rad = opt.wedge_deg * M_PI / 180.0 / 2.0; - - double sum_r2 = 0.0; - for (const auto& o : obs) { - const int i = o.img_slot; - const int h = o.hkl_slot; - - const double ki = k[i]; - - const double mosa_i = mosaicity_rad[i]; - const double c2 = o.r->zeta / (std::sqrt(2.0) * mosa_i); - - const double delta_phi_rad = static_cast(o.r->delta_phi) * M_PI / 180.0; - const double partiality = refine_partiality - ? (std::erf((delta_phi_rad + half_wedge_rad) * c2) - - std::erf((delta_phi_rad - half_wedge_rad) * c2)) / 2.0 - : o.r->partiality; - - const double lp = SafeInv(o.r->rlp, 1.0); - - const double Ipred = ki * partiality * lp * Itrue[h]; - const double resid = (Ipred - static_cast(o.r->I)) / o.sigma; - sum_r2 += resid * resid; - } - - const double gof2 = (n_obs > n_params) ? sum_r2 / static_cast(n_obs - n_params) : 1.0; - out.gof2 = gof2; - - // --- Covariance: σ(I_true) from (J^T W J)^{-1} scaled by GoF² --- std::vector slotToHKL(nhkl); for (const auto& kv : hklToSlot) { slotToHKL[kv.second] = kv.first; @@ -399,7 +348,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob out.merged[h].k = slotToHKL[h].k; out.merged[h].l = slotToHKL[h].l; out.merged[h].I = Itrue[h]; - out.merged[h].sigma = std::numeric_limits::quiet_NaN(); + out.merged[h].sigma = 0.0; out.merged[h].d = 0.0; } @@ -420,26 +369,5 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } - ceres::Covariance::Options cov_options; - cov_options.algorithm_type = ceres::SPARSE_QR; - - ceres::Covariance covariance(cov_options); - - std::vector> covariance_blocks; - covariance_blocks.reserve(nhkl); - for (int h = 0; h < nhkl; ++h) { - covariance_blocks.emplace_back(&Itrue[h], &Itrue[h]); - } - - if (covariance.Compute(covariance_blocks, &problem)) { - for (int h = 0; h < nhkl; ++h) { - double var_I = 0.0; - covariance.GetCovarianceBlock(&Itrue[h], &Itrue[h], &var_I); - - // σ(I) = I * sqrt( var(I) * GoF² ) - out.merged[h].sigma = std::sqrt(var_I * gof2); - } - } - return out; } diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index 1e0271fd..65f5f310 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -17,8 +17,6 @@ struct ScaleMergeOptions { double image_number_rounding = 1.0; double min_sigma = 1e-3; - bool fix_first_image_scale = true; - // Symmetry canonicalization of HKL prior to merging/scaling. // If not set, the routine uses raw HKL as-is. std::optional space_group; @@ -40,7 +38,7 @@ struct ScaleMergeOptions { double mosaicity_max_deg = 2.0; // --- Optional: regularize per-image scale k towards 1 (Kabsch-like) --- - bool regularize_scale_to_one = false; + bool regularize_scale_to_one = true; double scale_regularization_sigma = 0.05; }; @@ -55,7 +53,7 @@ struct MergedReflection { struct ScaleMergeResult { std::vector merged; - std::vector image_scale_k; + std::vector image_scale_g; std::vector image_ids; // One mosaicity value per image (degrees). diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 40a15f3d..c3c359a0 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -439,7 +439,7 @@ int main(int argc, char **argv) { for (size_t i = 0; i < scale_result->image_ids.size(); ++i) { img_file << scale_result->image_ids[i] << " " << scale_result->mosaicity_deg[i] << " " - << scale_result->image_scale_k[i] << "\n"; + << scale_result->image_scale_g[i] << "\n"; } img_file.close(); logger.Info("Wrote {} image records to {}", scale_result->image_ids.size(), img_path); -- 2.52.0 From 14402f817592f0de106c30524e612a09af9287a1 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Mon, 9 Feb 2026 18:00:44 +0100 Subject: [PATCH 35/81] BraggPredictionRotGPU: Save delta_phi in degrees, not radians --- common/Reflection.h | 2 +- frame_serialize/CBORStream2Deserializer.cpp | 2 +- frame_serialize/CBORStream2Serializer.cpp | 2 +- image_analysis/bragg_prediction/BraggPrediction.cpp | 2 +- image_analysis/bragg_prediction/BraggPredictionRot.cpp | 2 +- image_analysis/bragg_prediction/BraggPredictionRotGPU.cu | 2 +- image_analysis/scale_merge/ScaleAndMerge.cpp | 2 +- reader/JFJochHDF5Reader.cpp | 2 +- tools/jfjoch_extract_hkl.cpp | 2 +- writer/HDF5DataFilePluginReflection.cpp | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/Reflection.h b/common/Reflection.h index 87865869..8a1c41fd 100644 --- a/common/Reflection.h +++ b/common/Reflection.h @@ -13,7 +13,7 @@ struct Reflection { int64_t k; int64_t l; float image_number; // Can be in-between for 3D integration - float delta_phi; // phi angle from XDS - difference from middle of current frame (NOT an absolute angle) + float delta_phi_deg; // phi angle from XDS - difference from middle of current frame (NOT an absolute angle) float predicted_x; float predicted_y; float d; diff --git a/frame_serialize/CBORStream2Deserializer.cpp b/frame_serialize/CBORStream2Deserializer.cpp index e2b102dc..b265e51d 100644 --- a/frame_serialize/CBORStream2Deserializer.cpp +++ b/frame_serialize/CBORStream2Deserializer.cpp @@ -450,7 +450,7 @@ namespace { else if (key == "l") r.l = GetCBORInt(map_value); else if (key == "phi") - r.delta_phi = GetCBORFloat(map_value); + r.delta_phi_deg = GetCBORFloat(map_value); else if (key == "x") r.predicted_x = GetCBORFloat(map_value); else if (key == "y") diff --git a/frame_serialize/CBORStream2Serializer.cpp b/frame_serialize/CBORStream2Serializer.cpp index 7b76c42d..fd2d8212 100644 --- a/frame_serialize/CBORStream2Serializer.cpp +++ b/frame_serialize/CBORStream2Serializer.cpp @@ -235,7 +235,7 @@ inline void CBOR_ENC(CborEncoder &encoder, const Reflection& r) { CBOR_ENC(mapEncoder, "h", r.h); CBOR_ENC(mapEncoder, "k", r.k); CBOR_ENC(mapEncoder, "l", r.l); - CBOR_ENC(mapEncoder, "phi", r.delta_phi); + CBOR_ENC(mapEncoder, "phi", r.delta_phi_deg); CBOR_ENC(mapEncoder, "x", r.predicted_x); CBOR_ENC(mapEncoder, "y", r.predicted_y); CBOR_ENC(mapEncoder, "d", r.d); diff --git a/image_analysis/bragg_prediction/BraggPrediction.cpp b/image_analysis/bragg_prediction/BraggPrediction.cpp index 81adf248..a46a5d74 100644 --- a/image_analysis/bragg_prediction/BraggPrediction.cpp +++ b/image_analysis/bragg_prediction/BraggPrediction.cpp @@ -96,7 +96,7 @@ int BraggPrediction::Calc(const DiffractionExperiment &experiment, const Crystal .h = h, .k = k, .l = l, - .delta_phi = NAN, + .delta_phi_deg = NAN, .predicted_x = x, .predicted_y = y, .d = d, diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 898943ee..7a4c04e1 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -134,7 +134,7 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys .h = h, .k = k, .l = l, - .delta_phi = phi * 180.0f / static_cast(M_PI), + .delta_phi_deg = phi * 180.0f / static_cast(M_PI), .predicted_x = x, .predicted_y = y, .d = d, diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index 705a2ac5..752297df 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -150,7 +150,7 @@ namespace { out[count].h = h; out[count].k = k; out[count].l = l; - out[count].delta_phi = phi; + out[count].delta_phi_deg = phi * 180.0 / M_PI; out[count].predicted_x = x; out[count].predicted_y = y; out[count].d = 1.0f / sqrtf(p0_sq); diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 0bdcbcdf..e5f224af 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -117,7 +117,7 @@ struct IntensityResidual { IntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, bool refine_partiality) : Iobs_(static_cast(r.I)), inv_sigma_(SafeInv(sigma_obs, 1.0)), - delta_phi_(r.delta_phi), + delta_phi_(r.delta_phi_deg), lp_(SafeInv(static_cast(r.rlp), 1.0)), half_wedge_(wedge_deg / 2.0), c1_(r.zeta / std::sqrt(2.0)), diff --git a/reader/JFJochHDF5Reader.cpp b/reader/JFJochHDF5Reader.cpp index 497a0513..2761dc06 100644 --- a/reader/JFJochHDF5Reader.cpp +++ b/reader/JFJochHDF5Reader.cpp @@ -709,7 +709,7 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr &dataset .h = h.at(i), .k = k.at(i), .l = l.at(i), - .delta_phi = delta_phi_val, + .delta_phi_deg = delta_phi_val, .predicted_x = predicted_x.at(i), .predicted_y = predicted_y.at(i), .d = d.at(i), diff --git a/tools/jfjoch_extract_hkl.cpp b/tools/jfjoch_extract_hkl.cpp index 951be721..0fe7d22b 100644 --- a/tools/jfjoch_extract_hkl.cpp +++ b/tools/jfjoch_extract_hkl.cpp @@ -157,7 +157,7 @@ int main(int argc, char **argv) { if (dist < max_dist_ewald_sphere) f << r.l << " " << r.k << " " << r.h << " " << r.I << " " << r.sigma << " " << dist << " " - << r.predicted_x << " " << r.predicted_y << " " << r.delta_phi + << r.predicted_x << " " << r.predicted_y << " " << r.delta_phi_deg << std::endl; } } diff --git a/writer/HDF5DataFilePluginReflection.cpp b/writer/HDF5DataFilePluginReflection.cpp index 778e7bad..03c70a78 100644 --- a/writer/HDF5DataFilePluginReflection.cpp +++ b/writer/HDF5DataFilePluginReflection.cpp @@ -32,7 +32,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_ bkg.emplace_back(refl.bkg); lp.emplace_back(1.0/refl.rlp); partiality.emplace_back(refl.partiality); - phi.emplace_back(refl.delta_phi); + phi.emplace_back(refl.delta_phi_deg); zeta.emplace_back(refl.zeta); } -- 2.52.0 From 247ed0e1eb88bcd3407902c97cea81a41b14c8a9 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Mon, 9 Feb 2026 20:35:55 +0100 Subject: [PATCH 36/81] BraggPredictionGPU: Fix --- image_analysis/bragg_prediction/BraggPredictionGPU.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_analysis/bragg_prediction/BraggPredictionGPU.cu b/image_analysis/bragg_prediction/BraggPredictionGPU.cu index 0f4b2789..96fef397 100644 --- a/image_analysis/bragg_prediction/BraggPredictionGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionGPU.cu @@ -77,7 +77,7 @@ namespace { out.h = h; out.k = k; out.l = l; - out.delta_phi = NAN; + out.delta_phi_deg = NAN; out.predicted_x = x; out.predicted_y = y; out.d = 1.0f / sqrtf(recip_sq); -- 2.52.0 From 44802ddac4227e24780bc401ba945a5f8ad05d3c Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 10 Feb 2026 08:04:14 +0100 Subject: [PATCH 37/81] Ceres: Build with C++ threads --- image_analysis/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_analysis/CMakeLists.txt b/image_analysis/CMakeLists.txt index 2eaac793..819a2b11 100644 --- a/image_analysis/CMakeLists.txt +++ b/image_analysis/CMakeLists.txt @@ -7,7 +7,7 @@ SET(SUITESPARSE OFF) # Prevent MKL/BLAS/LAPACK from being found (guarantees no MKL) SET(CMAKE_DISABLE_FIND_PACKAGE_MKL TRUE) -SET(CERES_THREADING_MODEL "OFF") +SET(CERES_THREADING_MODEL "CXX_THREADS") FetchContent_Declare( ceres -- 2.52.0 From 45e4a642f95ef96a563f0b85716d8f6fdc9f168a Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 10 Feb 2026 08:12:47 +0100 Subject: [PATCH 38/81] ScaleAndMerge: Print full report (for now) and use max number of threads --- image_analysis/geom_refinement/RingOptimizer.cpp | 2 ++ image_analysis/geom_refinement/XtalOptimizer.cpp | 1 + image_analysis/scale_merge/ScaleAndMerge.cpp | 11 ++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/image_analysis/geom_refinement/RingOptimizer.cpp b/image_analysis/geom_refinement/RingOptimizer.cpp index 1ebcc85f..af214bf4 100644 --- a/image_analysis/geom_refinement/RingOptimizer.cpp +++ b/image_analysis/geom_refinement/RingOptimizer.cpp @@ -86,6 +86,8 @@ DiffractionGeometry RingOptimizer::Run(const std::vector &in options.linear_solver_type = ceres::DENSE_QR; options.minimizer_progress_to_stdout = false; options.logging_type = ceres::LoggingType::SILENT; + options.num_threads = 1; + ceres::Solver::Summary summary; // Run optimization diff --git a/image_analysis/geom_refinement/XtalOptimizer.cpp b/image_analysis/geom_refinement/XtalOptimizer.cpp index bf5564ee..4f033993 100644 --- a/image_analysis/geom_refinement/XtalOptimizer.cpp +++ b/image_analysis/geom_refinement/XtalOptimizer.cpp @@ -555,6 +555,7 @@ bool XtalOptimizerInternal(XtalOptimizerData &data, options.minimizer_progress_to_stdout = false; options.max_solver_time_in_seconds = data.max_time; options.logging_type = ceres::LoggingType::SILENT; + options.num_threads = 1; // Fix threads to 1, as this runs in multi-threaded context ceres::Solver::Summary summary; // Run optimization diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index e5f224af..5f20d674 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -4,8 +4,9 @@ #include "ScaleAndMerge.h" #include -#include +#include +#include #include #include #include @@ -309,12 +310,18 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } + // use all available threads + unsigned int hw = std::thread::hardware_concurrency(); + if (hw == 0) + hw = 1; // fallback + ceres::Solver::Options options; options.linear_solver_type = ceres::SPARSE_NORMAL_CHOLESKY; options.minimizer_progress_to_stdout = true; options.max_num_iterations = opt.max_num_iterations; options.max_solver_time_in_seconds = opt.max_solver_time_s; + options.num_threads = static_cast(hw); ceres::Solver::Summary summary; ceres::Solve(options, &problem, &summary); @@ -369,5 +376,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } + std::cout << summary.FullReport() << std::endl; + return out; } -- 2.52.0 From 86afb7697e7ba3be84afaf7f7486d1dec5730b72 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 11 Feb 2026 16:20:14 +0100 Subject: [PATCH 39/81] ScaleAndMerge: Add log-scaling residual --- image_analysis/scale_merge/ScaleAndMerge.cpp | 96 +++++++++++++++++--- image_analysis/scale_merge/ScaleAndMerge.h | 1 + 2 files changed, 83 insertions(+), 14 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 5f20d674..42a5a525 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -114,6 +114,58 @@ inline HKLKey CanonicalizeHKLKey(const Reflection& r, const ScaleMergeOptions& o return key; } +/// CrystFEL-like log-scaling residual +/// +/// residual = w * [ ln(I_obs) - ln(G) - ln(partiality) - ln(lp) - ln(I_true) ] +/// +/// Only observations with I_obs > 0 should be fed in (the caller skips the rest). +/// G and I_true are constrained to be positive via Ceres lower bounds. +struct LogIntensityResidual { + LogIntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, bool refine_partiality) + : log_Iobs_(std::log(std::max(static_cast(r.I), 1e-30))), + weight_(SafeInv(sigma_obs / std::max(static_cast(r.I), 1e-30), 1.0)), + delta_phi_(r.delta_phi_deg), + log_lp_(std::log(std::max(SafeInv(static_cast(r.rlp), 1.0), 1e-30))), + half_wedge_(wedge_deg / 2.0), + c1_(r.zeta / std::sqrt(2.0)), + partiality_(r.partiality), + refine_partiality_(refine_partiality) {} + + template + bool operator()(const T* const G, + const T* const mosaicity, + const T* const Itrue, + T* residual) const { + T partiality; + if (refine_partiality_ && mosaicity[0] != 0.0) { + const T arg_plus = T(delta_phi_ + half_wedge_) * T(c1_) / mosaicity[0]; + const T arg_minus = T(delta_phi_ - half_wedge_) * T(c1_) / mosaicity[0]; + partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); + } else { + partiality = T(partiality_); + } + + // Clamp partiality away from zero so log is safe + const T min_p = T(1e-30); + if (partiality < min_p) + partiality = min_p; + + // ln(I_pred) = ln(G) + ln(partiality) + ln(lp) + ln(Itrue) + const T log_Ipred = ceres::log(G[0]) + ceres::log(partiality) + T(log_lp_) + ceres::log(Itrue[0]); + residual[0] = (log_Ipred - T(log_Iobs_)) * T(weight_); + return true; + } + + double log_Iobs_; + double weight_; // w_i ≈ I_obs / sigma_obs (relative weight in log-space) + double delta_phi_; + double log_lp_; + double half_wedge_; + double c1_; + double partiality_; + bool refine_partiality_; +}; + struct IntensityResidual { IntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, bool refine_partiality) : Iobs_(static_cast(r.I)), @@ -280,24 +332,40 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob const bool refine_partiality = opt.wedge_deg > 0.0; for (const auto& o : obs) { - auto* cost = new ceres::AutoDiffCostFunction( - new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, refine_partiality)); + if (opt.log_scaling_residual) { + // Log residual requires positive I_obs + if (o.r->I <= 0.0f) + continue; - problem.AddResidualBlock(cost, - nullptr, // no loss function - &g[o.img_slot], - &mosaicity[o.img_slot], - &Itrue[o.hkl_slot]); + auto* cost = new ceres::AutoDiffCostFunction( + new LogIntensityResidual(*o.r, o.sigma, opt.wedge_deg, refine_partiality)); + + problem.AddResidualBlock(cost, + nullptr, + &g[o.img_slot], + &mosaicity[o.img_slot], + &Itrue[o.hkl_slot]); + } else { + auto* cost = new ceres::AutoDiffCostFunction( + new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, refine_partiality)); + + problem.AddResidualBlock(cost, + nullptr, + &g[o.img_slot], + &mosaicity[o.img_slot], + &Itrue[o.hkl_slot]); + } + } + + // For log residual, G and Itrue must stay positive + if (opt.log_scaling_residual) { + for (int i = 0; i < nimg; ++i) + problem.SetParameterLowerBound(&g[i], 0, 1e-12); + for (int h = 0; h < nhkl; ++h) + problem.SetParameterLowerBound(&Itrue[h], 0, 1e-12); } // Optional Kabsch-like regularization for k - if (opt.regularize_scale_to_one) { - for (int i = 0; i < nimg; ++i) { - auto* rcost = new ceres::AutoDiffCostFunction( - new ScaleRegularizationResidual(opt.scale_regularization_sigma)); - problem.AddResidualBlock(rcost, nullptr, &g[i]); - } - } // Mosaicity refinement + bounds if (!opt.refine_mosaicity) { diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index 65f5f310..a3f2875d 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -40,6 +40,7 @@ struct ScaleMergeOptions { // --- Optional: regularize per-image scale k towards 1 (Kabsch-like) --- bool regularize_scale_to_one = true; double scale_regularization_sigma = 0.05; + bool log_scaling_residual = false; }; struct MergedReflection { -- 2.52.0 From 217e86c23ba8159515c9717dbc611fc587aeaa36 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 11 Feb 2026 16:22:45 +0100 Subject: [PATCH 40/81] ScaleAndMerge: Add option to turn off per image mosaicity --- image_analysis/scale_merge/ScaleAndMerge.cpp | 18 +++++------------- image_analysis/scale_merge/ScaleAndMerge.h | 1 + 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 42a5a525..cbf16641 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -332,6 +332,8 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob const bool refine_partiality = opt.wedge_deg > 0.0; for (const auto& o : obs) { + size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0; + if (opt.log_scaling_residual) { // Log residual requires positive I_obs if (o.r->I <= 0.0f) @@ -343,7 +345,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob problem.AddResidualBlock(cost, nullptr, &g[o.img_slot], - &mosaicity[o.img_slot], + &mosaicity[mos_slot], &Itrue[o.hkl_slot]); } else { auto* cost = new ceres::AutoDiffCostFunction( @@ -352,7 +354,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob problem.AddResidualBlock(cost, nullptr, &g[o.img_slot], - &mosaicity[o.img_slot], + &mosaicity[mos_slot], &Itrue[o.hkl_slot]); } } @@ -400,17 +402,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob out.mosaicity_deg.resize(nimg); for (int i = 0; i < nimg; ++i) - out.mosaicity_deg[i] = mosaicity[i]; - - // --- Compute goodness-of-fit (reduced chi-squared) --- - const int n_obs = static_cast(obs.size()); - // Count free parameters: nhkl Itrue + per-image (k + mosaicity) minus fixed ones - int n_params = nhkl; - for (int i = 0; i < nimg; ++i) { - n_params += 1; // k - if (opt.refine_mosaicity) - n_params += 1; // mosaicity - } + out.mosaicity_deg[i] = opt.per_image_mosaicity ? mosaicity[i] : mosaicity[0]; std::vector slotToHKL(nhkl); for (const auto& kv : hklToSlot) { diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index a3f2875d..fcc93a6e 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -32,6 +32,7 @@ struct ScaleMergeOptions { // --- Mosaicity (user input in degrees; internally converted to radians) --- bool refine_mosaicity = true; + bool per_image_mosaicity = true; double mosaicity_init_deg = 0.17; // ~0.003 rad double mosaicity_min_deg = 1e-3; -- 2.52.0 From de8e8d3a64ff18b0622ef04bb7e1b863bb38f187 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 11 Feb 2026 16:26:36 +0100 Subject: [PATCH 41/81] jfjoch_process: More options --- tools/jfjoch_process.cpp | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index c3c359a0..664c86ee 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -40,6 +40,8 @@ void print_usage(Logger &logger) { logger.Info(" -d High resolution limit for spot finding (default: 1.5)"); logger.Info(" -S Space group number"); logger.Info(" -M Scale and merge (refine mosaicity) and write scaled.hkl + image.dat"); + logger.Info(" -L Use log-scaling residual"); + logger.Info(" -m Mosaicity refinement none|fixed|image (default: image)"); } int main(int argc, char **argv) { @@ -62,6 +64,10 @@ int main(int argc, char **argv) { bool run_scaling = false; std::optional space_group_number; + bool log_residual = false; + enum class MosaicityRefinementMode { None, Fixed, Image }; + MosaicityRefinementMode mosaicity_refinement_mode = MosaicityRefinementMode::Image; + float d_high = 1.5; if (argc == 1) { @@ -106,6 +112,22 @@ int main(int argc, char **argv) { case 'M': run_scaling = true; break; + case 'L': + log_residual = true; + break; + case 'm': + if (strcmp(optarg, "none") == 0) + mosaicity_refinement_mode = MosaicityRefinementMode::None; + else if (strcmp(optarg, "fixed") == 0) + mosaicity_refinement_mode = MosaicityRefinementMode::Fixed; + else if (strcmp(optarg, "image") == 0) + mosaicity_refinement_mode = MosaicityRefinementMode::Image; + else { + logger.Error("Invalid mosaicity refinement mode: {}", optarg); + print_usage(logger); + exit(EXIT_FAILURE); + } + break; default: print_usage(logger); exit(EXIT_FAILURE); @@ -395,7 +417,20 @@ int main(int argc, char **argv) { scale_opts.refine_mosaicity = true; scale_opts.max_num_iterations = 500; scale_opts.max_solver_time_s = 240.0; // generous cutoff for now - + scale_opts.log_scaling_residual = log_residual; + switch (mosaicity_refinement_mode) { + case MosaicityRefinementMode::None: + scale_opts.refine_mosaicity = false; + break; + case MosaicityRefinementMode::Fixed: + scale_opts.refine_mosaicity = true; + scale_opts.per_image_mosaicity = false; + break; + case MosaicityRefinementMode::Image: + scale_opts.refine_mosaicity = true; + scale_opts.per_image_mosaicity = true; + break; + } if (space_group) scale_opts.space_group = *space_group; else -- 2.52.0 From 161df2f5a17468cc4cd571d8f6bee208c9ee5bbb Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 11 Feb 2026 19:31:07 +0100 Subject: [PATCH 42/81] jfjoch_process: Fixes --- tools/jfjoch_process.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 664c86ee..41fb0de6 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -41,7 +41,7 @@ void print_usage(Logger &logger) { logger.Info(" -S Space group number"); logger.Info(" -M Scale and merge (refine mosaicity) and write scaled.hkl + image.dat"); logger.Info(" -L Use log-scaling residual"); - logger.Info(" -m Mosaicity refinement none|fixed|image (default: image)"); + logger.Info(" -m Mosaicity refinement none|fixed|image (default: image)"); } int main(int argc, char **argv) { @@ -76,7 +76,7 @@ int main(int argc, char **argv) { } int opt; - while ((opt = getopt(argc, argv, "o:N:s:e:vR::Fxd:S:M")) != -1) { + while ((opt = getopt(argc, argv, "o:N:s:e:vR::Fxd:S:MLm:")) != -1) { switch (opt) { case 'o': output_prefix = optarg; -- 2.52.0 From 34b24133c7be9f54aeeb83ea9b36558152b87271 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 11 Feb 2026 19:59:32 +0100 Subject: [PATCH 43/81] jfjoch_process: More fixes --- image_analysis/scale_merge/ScaleAndMerge.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index cbf16641..60c9597f 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -331,6 +331,8 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob const bool refine_partiality = opt.wedge_deg > 0.0; + std::vector is_valid_hkl_slot(nhkl, false); + for (const auto& o : obs) { size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0; @@ -347,6 +349,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob &g[o.img_slot], &mosaicity[mos_slot], &Itrue[o.hkl_slot]); + is_valid_hkl_slot[o.hkl_slot] = true; } else { auto* cost = new ceres::AutoDiffCostFunction( new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, refine_partiality)); @@ -356,6 +359,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob &g[o.img_slot], &mosaicity[mos_slot], &Itrue[o.hkl_slot]); + is_valid_hkl_slot[o.hkl_slot] = true; } } @@ -363,12 +367,12 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob if (opt.log_scaling_residual) { for (int i = 0; i < nimg; ++i) problem.SetParameterLowerBound(&g[i], 0, 1e-12); - for (int h = 0; h < nhkl; ++h) - problem.SetParameterLowerBound(&Itrue[h], 0, 1e-12); + for (int h = 0; h < nhkl; ++h) { + if (is_valid_hkl_slot[h]) + problem.SetParameterLowerBound(&Itrue[h], 0, 1e-12); + } } - // Optional Kabsch-like regularization for k - // Mosaicity refinement + bounds if (!opt.refine_mosaicity) { for (int i = 0; i < nimg; ++i) -- 2.52.0 From fd8e263934cfaa9792f387ee1f674b009bd2499f Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 11 Feb 2026 20:41:52 +0100 Subject: [PATCH 44/81] jfjoch_process: More fixes --- image_analysis/scale_merge/ScaleAndMerge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 60c9597f..9f5c7bd0 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -375,10 +375,10 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob // Mosaicity refinement + bounds if (!opt.refine_mosaicity) { - for (int i = 0; i < nimg; ++i) + for (int i = 0; i < (opt.per_image_mosaicity ? nimg : 1); ++i) problem.SetParameterBlockConstant(&mosaicity[i]); } else { - for (int i = 0; i < nimg; ++i) { + for (int i = 0; i < (opt.per_image_mosaicity ? nimg : 1); ++i) { problem.SetParameterLowerBound(&mosaicity[i], 0, opt.mosaicity_min_deg); problem.SetParameterUpperBound(&mosaicity[i], 0, opt.mosaicity_max_deg); } -- 2.52.0 From 1dedd3de33dcc00160bb6460da4b97e30041458b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 12 Feb 2026 17:56:32 +0100 Subject: [PATCH 45/81] ScaleAndMerge: Add AI generated sigmas --- image_analysis/scale_merge/ScaleAndMerge.cpp | 74 ++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 9f5c7bd0..1d6a83e3 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -442,5 +442,79 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob std::cout << summary.FullReport() << std::endl; + // --- Compute sigma(I_true) from scatter of corrected observations --- + { + // Accumulate per-HKL weighted residuals + // I_corrected_i = I_obs_i / (G_i * partiality_i * lp_i) + // sigma(I_true) = 1 / sqrt(sum_i w_i) where w_i = 1/sigma_corrected_i^2 + // OR from sample variance of I_corrected around I_true + + struct HKLAccum { + double sum_w = 0.0; // sum of weights + double sum_w_delta2 = 0.0; // sum of w * (I_corr - I_true)^2 + int count = 0; + }; + std::vector accum(nhkl); + + const double half_wedge = opt.wedge_deg / 2.0; + + for (const auto& o : obs) { + const Reflection& r = *o.r; + const double lp = SafeInv(static_cast(r.rlp), 1.0); + const double G_i = g[o.img_slot]; + + // Compute partiality with refined mosaicity + double partiality; + size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0; + if (refine_partiality && mosaicity[mos_slot] > 0.0) { + double c1 = r.zeta / std::sqrt(2.0); + double arg_plus = (r.delta_phi_deg + half_wedge) * c1 / mosaicity[mos_slot]; + double arg_minus = (r.delta_phi_deg - half_wedge) * c1 / mosaicity[mos_slot]; + partiality = (std::erf(arg_plus) - std::erf(arg_minus)) / 2.0; + } else { + partiality = r.partiality; + } + if (partiality < 1e-6) partiality = 1e-6; + + const double correction = G_i * partiality * lp; + if (correction <= 0.0) continue; + + const double I_corr = static_cast(r.I) / correction; + const double sigma_corr = o.sigma / correction; + const double w = 1.0 / (sigma_corr * sigma_corr); + + const double delta = I_corr - Itrue[o.hkl_slot]; + accum[o.hkl_slot].sum_w += w; + accum[o.hkl_slot].sum_w_delta2 += w * delta * delta; + accum[o.hkl_slot].count++; + } + + // GoF^2 (global reduced chi-squared) for rescaling + double global_sum_w_delta2 = 0.0; + double global_sum_w = 0.0; + int global_n = 0; + for (int h = 0; h < nhkl; ++h) { + global_sum_w_delta2 += accum[h].sum_w_delta2; + global_sum_w += accum[h].sum_w; + global_n += accum[h].count; + } + out.gof2 = (global_n > nhkl) + ? global_sum_w_delta2 / static_cast(global_n - nhkl) + : 1.0; + + for (int h = 0; h < nhkl; ++h) { + if (accum[h].count >= 2 && accum[h].sum_w > 0.0) { + // Internal consistency: sigma^2 = (1/sum_w) * chi^2_h + // where chi^2_h = sum_w_delta2 / (n-1) + double chi2_h = accum[h].sum_w_delta2 / static_cast(accum[h].count - 1); + out.merged[h].sigma = std::sqrt(chi2_h / accum[h].sum_w); + } else if (accum[h].sum_w > 0.0) { + // Single observation: use propagated sigma + out.merged[h].sigma = std::sqrt(1.0 / accum[h].sum_w); + } + // else: sigma stays 0.0 (no usable data) + } + } + return out; } -- 2.52.0 From 38199c480fe0c5b48c1b4a4a65ef0578c8e9b4fc Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 12 Feb 2026 18:09:35 +0100 Subject: [PATCH 46/81] jfjoch_process: Save reflections as mmCIF (experimental) --- image_analysis/CMakeLists.txt | 4 +- image_analysis/WriteMmcif.cpp | 163 ++++++++++++++++++++++++++++++++++ image_analysis/WriteMmcif.h | 48 ++++++++++ tools/jfjoch_process.cpp | 50 ++++++++--- 4 files changed, 252 insertions(+), 13 deletions(-) create mode 100644 image_analysis/WriteMmcif.cpp create mode 100644 image_analysis/WriteMmcif.h diff --git a/image_analysis/CMakeLists.txt b/image_analysis/CMakeLists.txt index 819a2b11..2cf690d1 100644 --- a/image_analysis/CMakeLists.txt +++ b/image_analysis/CMakeLists.txt @@ -32,7 +32,9 @@ ADD_LIBRARY(JFJochImageAnalysis STATIC RotationParameters.cpp RotationParameters.h RotationSpotAccumulator.cpp - RotationSpotAccumulator.h) + RotationSpotAccumulator.h + WriteMmcif.cpp + WriteMmcif.h) FIND_PACKAGE(Eigen3 3.4 REQUIRED NO_MODULE) # provides Eigen3::Eigen diff --git a/image_analysis/WriteMmcif.cpp b/image_analysis/WriteMmcif.cpp new file mode 100644 index 00000000..28b4d994 --- /dev/null +++ b/image_analysis/WriteMmcif.cpp @@ -0,0 +1,163 @@ +// SPDX-FileCopyrightText: 2025 Paul Scherrer Institute +// SPDX-License-Identifier: GPL-3.0-only + +#include "WriteMmcif.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace { + +/// Current date in ISO-8601 (YYYY-MM-DD) for the _audit block. +std::string CurrentDateISO() { + auto now = std::chrono::system_clock::now(); + auto t = std::chrono::system_clock::to_time_t(now); + std::tm tm{}; +#ifdef _WIN32 + gmtime_s(&tm, &t); +#else + gmtime_r(&t, &tm); +#endif + char buf[32]; + std::strftime(buf, sizeof(buf), "%Y-%m-%d", &tm); + return buf; +} + +/// Format a double with given decimal places; returns "?" for non-finite. +std::string Fmt(double val, int decimals = 4) { + if (!std::isfinite(val)) + return "?"; + std::ostringstream ss; + ss << std::fixed << std::setprecision(decimals) << val; + return ss.str(); +} + +/// Quote a CIF string value; returns "?" for empty. +std::string CifStr(const std::string& s) { + if (s.empty()) + return "?"; + // If it contains spaces or special chars, single-quote it + if (s.find(' ') != std::string::npos || + s.find('\'') != std::string::npos || + s.find('#') != std::string::npos) + return "'" + s + "'"; + return s; +} + +} // namespace + +void WriteMmcifReflections(std::ostream& out, + const std::vector& reflections, + const MmcifMetadata& meta) { + + out << std::fixed; + + // ---------- data block ---------- + out << "data_" << meta.data_block_name << "\n"; + out << "#\n"; + + // ---------- _audit ---------- + out << "_audit.revision_id 1\n"; + out << "_audit.creation_date " << CurrentDateISO() << "\n"; + out << "_audit.update_record 'Initial release'\n"; + out << "#\n"; + + // ---------- _software ---------- + out << "_software.name 'Jungfraujoch'\n"; + if (meta.software_version.has_value()) + out << "_software.version " << CifStr(meta.software_version.value()) << "\n"; + out << "_software.classification reduction\n"; + out << "#\n"; + + // ---------- _cell ---------- + out << "_cell.length_a " << Fmt(meta.unit_cell.a, 3) << "\n"; + out << "_cell.length_b " << Fmt(meta.unit_cell.b, 3) << "\n"; + out << "_cell.length_c " << Fmt(meta.unit_cell.c, 3) << "\n"; + out << "_cell.angle_alpha " << Fmt(meta.unit_cell.alpha, 2) << "\n"; + out << "_cell.angle_beta " << Fmt(meta.unit_cell.beta, 2) << "\n"; + out << "_cell.angle_gamma " << Fmt(meta.unit_cell.gamma, 2) << "\n"; + + // ---------- _symmetry ---------- + out << "_symmetry.space_group_name_H-M " << CifStr(meta.space_group_name) << "\n"; + out << "_symmetry.Int_Tables_number " << meta.space_group_number << "\n"; + out << "#\n"; + + // ---------- _diffrn_source / _diffrn_detector ---------- + if (meta.source.has_value()) { + out << "_diffrn_source.pdbx_synchrotron_site" + << CifStr(meta.source.value()) << "\n"; + } + + if (meta.beamline.has_value()) { + out << "_diffrn_source.pdbx_synchrotron_beamline" + << CifStr(meta.beamline.value()) << "\n"; + } + + if (meta.wavelength_A.has_value()) { + out << "_diffrn_radiation_wavelength.wavelength " + << Fmt(meta.wavelength_A.value(), 5) << "\n"; + } + + if (!meta.detector_name.empty()) { + out << "_diffrn_detector.detector " << CifStr(meta.detector_name) << "\n"; + } + + if (meta.detector_distance_mm.has_value()) { + out << "_diffrn_detector.distance " + << Fmt(meta.detector_distance_mm.value(), 2) << "\n"; + } + + if (meta.sample_temperature_K.has_value()) { + out << "_diffrn.ambient_temp " + << Fmt(meta.sample_temperature_K.value(), 1) << "\n"; + } + + if (meta.sample_name.has_value() && !meta.sample_name->empty()) { + out << "_entity.id 1\n"; + out << "_entity.type polymer\n"; + out << "_entity.pdbx_description " << CifStr(meta.sample_name.value()) << "\n"; + } + + // ---------- _refln loop ---------- + out << "loop_\n"; + out << "_refln.index_h\n"; + out << "_refln.index_k\n"; + out << "_refln.index_l\n"; + out << "_refln.F_meas_au\n"; + out << "_refln.F_meas_sigma_au\n"; + out << "_refln.intensity_meas\n"; + out << "_refln.intensity_sigma\n"; + out << "_refln.status\n"; + + for (const auto& r : reflections) { + out << std::setw(5) << r.h << " " + << std::setw(5) << r.k << " " + << std::setw(5) << r.l << " " + << std::setw(12) << Fmt(r.F, 4) << " " + << std::setw(12) << Fmt(r.sigmaF, 4) << " " + << std::setw(14) << Fmt(r.I, 4) << " " + << std::setw(14) << Fmt(r.sigmaI, 4) << " " + << "o" // 'o' = observed + << "\n"; + } + + out << "#\n"; + out << "# End of reflections\n"; +} + +void WriteMmcifReflections(const std::string& path, + const std::vector& reflections, + const MmcifMetadata& meta) { + std::ofstream file(path); + if (!file) + throw std::runtime_error("WriteMmcifReflections: cannot open " + path); + WriteMmcifReflections(file, reflections, meta); + file.close(); + if (!file) + throw std::runtime_error("WriteMmcifReflections: I/O error writing " + path); +} \ No newline at end of file diff --git a/image_analysis/WriteMmcif.h b/image_analysis/WriteMmcif.h new file mode 100644 index 00000000..10e05b22 --- /dev/null +++ b/image_analysis/WriteMmcif.h @@ -0,0 +1,48 @@ +// SPDX-FileCopyrightText: 2025 Paul Scherrer Institute +// SPDX-License-Identifier: GPL-3.0-only + +#pragma once + +#include +#include +#include +#include + +#include "scale_merge/FrenchWilson.h" +#include "../common/UnitCell.h" +#include "../symmetry/gemmi/symmetry.hpp" + +/// Metadata needed to write a meaningful mmCIF reflection file. +struct MmcifMetadata { + // Required + UnitCell unit_cell{}; + std::string space_group_name; // e.g. "P 21 21 21" + int space_group_number = 1; + + // Optional but recommended + std::string data_block_name = "jfjoch"; // CIF data_ + std::string detector_name; // e.g. "JUNGFRAU 4M" + std::optional wavelength_A; // incident wavelength + std::optional detector_distance_mm; + std::optional sample_temperature_K; + std::optional sample_name; + std::optional software_version; // jfjoch version string + + std::optional source; + std::optional beamline; +}; + +/// Write a PDBx/mmCIF reflection file (containing _refln loop with F/sigmaF/I/sigmaI) +/// to the given output stream. +/// +/// The file follows the conventions expected by CCP4/CCTBX/Phenix for +/// structure-factor mmCIF files. +void WriteMmcifReflections(std::ostream& out, + const std::vector& reflections, + const MmcifMetadata& meta); + +/// Convenience overload that writes to a file path. +/// Throws std::runtime_error on I/O failure. +void WriteMmcifReflections(const std::string& path, + const std::vector& reflections, + const MmcifMetadata& meta); \ No newline at end of file diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 41fb0de6..9510388d 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -25,6 +25,7 @@ #include "../receiver/JFJochReceiverPlots.h" #include "../compression/JFJochCompressor.h" #include "../image_analysis/scale_merge/FrenchWilson.h" +#include "../image_analysis/WriteMmcif.h" // (actually include at top of file) void print_usage(Logger &logger) { logger.Info("Usage ./jfjoch_analysis {} "); @@ -489,19 +490,44 @@ int main(int argc, char **argv) { auto fw = FrenchWilson(scale_result->merged, fw_opts); - const std::string fw_path = output_prefix + "_amplitudes.hkl"; - std::ofstream fw_file(fw_path); - if (!fw_file) { - logger.Error("Cannot open {} for writing", fw_path); - } else { - fw_file << "# h k l F sigmaF I_fw sigmaI\n"; - for (const auto& r : fw) { - fw_file << r.h << " " << r.k << " " << r.l << " " - << r.F << " " << r.sigmaF << " " - << r.I << " " << r.sigmaI << "\n"; + { + + MmcifMetadata cif_meta; + + // Unit cell — from rotation indexing result or experiment setting + if (rotation_indexer_ret.has_value()) { + cif_meta.unit_cell = rotation_indexer_ret->lattice.GetUnitCell(); + } else if (experiment.GetUnitCell().has_value()) { + cif_meta.unit_cell = experiment.GetUnitCell().value(); + } + + // Space group + if (auto sg = experiment.GetGemmiSpaceGroup(); sg.has_value()) { + cif_meta.space_group_name = sg->hm; + cif_meta.space_group_number = sg->number; + } else if (space_group) { + cif_meta.space_group_name = space_group->hm; + cif_meta.space_group_number = space_group->number; + } + + // Detector & experiment info + cif_meta.detector_name = experiment.GetDetectorDescription(); + cif_meta.wavelength_A = experiment.GetWavelength_A(); + cif_meta.detector_distance_mm = experiment.GetDetectorDistance_mm(); + cif_meta.sample_temperature_K = experiment.GetSampleTemperature_K(); + cif_meta.sample_name = experiment.GetSampleName(); + cif_meta.data_block_name = output_prefix; + + cif_meta.beamline = experiment.GetInstrumentName(); + cif_meta.source = experiment.GetSourceName(); + + const std::string cif_path = output_prefix + "_amplitudes.cif"; + try { + WriteMmcifReflections(cif_path, fw, cif_meta); + logger.Info("Wrote mmCIF reflections to {}", cif_path); + } catch (const std::exception& e) { + logger.Error("Failed to write mmCIF: {}", e.what()); } - fw_file.close(); - logger.Info("French-Wilson: wrote {} amplitudes to {}", fw.size(), fw_path); } } } else { -- 2.52.0 From 0ae85a63f9ca23d6c3d48018a05d4c628039f749 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 12 Feb 2026 20:12:56 +0100 Subject: [PATCH 47/81] ScaleAndMerge: sigma calculation included --- image_analysis/scale_merge/ScaleAndMerge.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 1d6a83e3..9fea5650 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -474,19 +474,19 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } else { partiality = r.partiality; } - if (partiality < 1e-6) partiality = 1e-6; - const double correction = G_i * partiality * lp; - if (correction <= 0.0) continue; + if (partiality > 0.01) { + const double correction = G_i * partiality * lp; + if (correction <= 0.0) continue; - const double I_corr = static_cast(r.I) / correction; - const double sigma_corr = o.sigma / correction; - const double w = 1.0 / (sigma_corr * sigma_corr); + const double I_corr = static_cast(r.I) / correction; + const double w = correction * correction / (o.sigma * o.sigma); - const double delta = I_corr - Itrue[o.hkl_slot]; - accum[o.hkl_slot].sum_w += w; - accum[o.hkl_slot].sum_w_delta2 += w * delta * delta; - accum[o.hkl_slot].count++; + const double delta = I_corr - Itrue[o.hkl_slot]; + accum[o.hkl_slot].sum_w += w; + accum[o.hkl_slot].sum_w_delta2 += w * delta * delta; + accum[o.hkl_slot].count++; + } } // GoF^2 (global reduced chi-squared) for rescaling -- 2.52.0 From 936b63a7a9bb47768432ca71b0d5ba539572f731 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 12 Feb 2026 21:08:47 +0100 Subject: [PATCH 48/81] ScaleAndMerge: Intensities come from merging --- image_analysis/scale_merge/ScaleAndMerge.cpp | 31 +++++++++++++------- image_analysis/scale_merge/ScaleAndMerge.h | 2 ++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 9fea5650..21e46343 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -451,7 +451,8 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob struct HKLAccum { double sum_w = 0.0; // sum of weights - double sum_w_delta2 = 0.0; // sum of w * (I_corr - I_true)^2 + double mean = 0.0; // running weighted mean (Welford) + double M2 = 0.0; // running weighted sum of squared deviations int count = 0; }; std::vector accum(nhkl); @@ -475,38 +476,46 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob partiality = r.partiality; } - if (partiality > 0.01) { + if (partiality > opt.min_partiality_for_merge) { const double correction = G_i * partiality * lp; if (correction <= 0.0) continue; const double I_corr = static_cast(r.I) / correction; const double w = correction * correction / (o.sigma * o.sigma); - const double delta = I_corr - Itrue[o.hkl_slot]; - accum[o.hkl_slot].sum_w += w; - accum[o.hkl_slot].sum_w_delta2 += w * delta * delta; - accum[o.hkl_slot].count++; + // Welford's online weighted algorithm + auto& a = accum[o.hkl_slot]; + a.count++; + const double new_sum_w = a.sum_w + w; + const double delta = I_corr - a.mean; + const double R = delta * w / new_sum_w; + a.mean += R; + a.M2 += a.sum_w * delta * R; // = w * delta * (I_corr - new_mean) + a.sum_w = new_sum_w; } } // GoF^2 (global reduced chi-squared) for rescaling - double global_sum_w_delta2 = 0.0; + double global_M2 = 0.0; double global_sum_w = 0.0; int global_n = 0; for (int h = 0; h < nhkl; ++h) { - global_sum_w_delta2 += accum[h].sum_w_delta2; + global_M2 += accum[h].M2; global_sum_w += accum[h].sum_w; global_n += accum[h].count; } out.gof2 = (global_n > nhkl) - ? global_sum_w_delta2 / static_cast(global_n - nhkl) + ? global_M2 / static_cast(global_n - nhkl) : 1.0; for (int h = 0; h < nhkl; ++h) { + if (accum[h].sum_w > 0.0) { + out.merged[h].I = accum[h].mean; + } if (accum[h].count >= 2 && accum[h].sum_w > 0.0) { // Internal consistency: sigma^2 = (1/sum_w) * chi^2_h - // where chi^2_h = sum_w_delta2 / (n-1) - double chi2_h = accum[h].sum_w_delta2 / static_cast(accum[h].count - 1); + // where chi^2_h = M2 / (n-1) + double chi2_h = accum[h].M2 / static_cast(accum[h].count - 1); out.merged[h].sigma = std::sqrt(chi2_h / accum[h].sum_w); } else if (accum[h].sum_w > 0.0) { // Single observation: use propagated sigma diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index fcc93a6e..54a26760 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -42,6 +42,8 @@ struct ScaleMergeOptions { bool regularize_scale_to_one = true; double scale_regularization_sigma = 0.05; bool log_scaling_residual = false; + + double min_partiality_for_merge = 0.2; }; struct MergedReflection { -- 2.52.0 From 8325d879820c4f59bbafb3a78ef7850e47f06245 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 13 Feb 2026 20:33:29 +0100 Subject: [PATCH 49/81] WriteMmcif: Fix synchrotron site parameters --- image_analysis/WriteMmcif.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image_analysis/WriteMmcif.cpp b/image_analysis/WriteMmcif.cpp index 28b4d994..841e534b 100644 --- a/image_analysis/WriteMmcif.cpp +++ b/image_analysis/WriteMmcif.cpp @@ -89,12 +89,12 @@ void WriteMmcifReflections(std::ostream& out, // ---------- _diffrn_source / _diffrn_detector ---------- if (meta.source.has_value()) { - out << "_diffrn_source.pdbx_synchrotron_site" + out << "_diffrn_source.pdbx_synchrotron_site " << CifStr(meta.source.value()) << "\n"; } if (meta.beamline.has_value()) { - out << "_diffrn_source.pdbx_synchrotron_beamline" + out << "_diffrn_source.pdbx_synchrotron_beamline " << CifStr(meta.beamline.value()) << "\n"; } -- 2.52.0 From f0e17fde6007dcf0c1322aa9ffc3127f83057112 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 15 Feb 2026 10:37:09 +0100 Subject: [PATCH 50/81] RotationParameters: More flexibility on moving average size --- image_analysis/RotationParameters.cpp | 4 ++-- image_analysis/RotationParameters.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/image_analysis/RotationParameters.cpp b/image_analysis/RotationParameters.cpp index 5b259155..8fa5dbf3 100644 --- a/image_analysis/RotationParameters.cpp +++ b/image_analysis/RotationParameters.cpp @@ -3,8 +3,8 @@ #include "RotationParameters.h" -RotationParameters::RotationParameters() - : profile_radius(100), beam_x(100), beam_y(100), mosaicity(100) {} +RotationParameters::RotationParameters(uint64_t moving_average_elems) + : profile_radius(moving_average_elems), beam_x(moving_average_elems), beam_y(moving_average_elems), mosaicity(moving_average_elems) {} float RotationParameters::ProfileRadius(float input) { profile_radius.Add(input); diff --git a/image_analysis/RotationParameters.h b/image_analysis/RotationParameters.h index 2c91e39b..1eab2ead 100644 --- a/image_analysis/RotationParameters.h +++ b/image_analysis/RotationParameters.h @@ -9,7 +9,7 @@ class RotationParameters { MovingAverage profile_radius, beam_x, beam_y, mosaicity; public: - RotationParameters(); + RotationParameters(uint64_t moving_average_elems = 20); float ProfileRadius(float input); float Mosaicity(float input); float BeamX(float input); -- 2.52.0 From 832bbe4d89d8054e5690cff771b109076632416d Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 15 Feb 2026 19:22:03 +0100 Subject: [PATCH 51/81] ScaleAndMerge: Minor fixes --- image_analysis/scale_merge/ScaleAndMerge.cpp | 72 ++++++++++++++++---- image_analysis/scale_merge/ScaleAndMerge.h | 4 ++ 2 files changed, 63 insertions(+), 13 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 21e46343..6860435e 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -165,11 +165,11 @@ struct LogIntensityResidual { double partiality_; bool refine_partiality_; }; - + struct IntensityResidual { - IntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, bool refine_partiality) + IntensityResidual(const Reflection &r, double sigma_obs, double wedge_deg, bool refine_partiality) : Iobs_(static_cast(r.I)), - inv_sigma_(SafeInv(sigma_obs, 1.0)), + weight_(SafeInv(sigma_obs, 1.0)), delta_phi_(r.delta_phi_deg), lp_(SafeInv(static_cast(r.rlp), 1.0)), half_wedge_(wedge_deg / 2.0), @@ -178,25 +178,25 @@ struct IntensityResidual { refine_partiality_(refine_partiality) {} template - bool operator()(const T* const G, - const T* const mosaicity, - const T* const Itrue, - T* residual) const { + bool operator()(const T *const G, + const T *const mosaicity, + const T *const Itrue, + T *residual) const { T partiality; if (refine_partiality_ && mosaicity[0] != 0.0) { - const T arg_plus = T(delta_phi_ + half_wedge_) * T(c1_) / mosaicity[0]; + const T arg_plus = T(delta_phi_ + half_wedge_) * T(c1_) / mosaicity[0]; const T arg_minus = T(delta_phi_ - half_wedge_) * T(c1_) / mosaicity[0]; partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); } else partiality = T(partiality_); const T Ipred = G[0] * partiality * T(lp_) * Itrue[0]; - residual[0] = (Ipred - T(Iobs_)) * T(inv_sigma_); + residual[0] = (Ipred - T(Iobs_)) * T(weight_); return true; } double Iobs_; - double inv_sigma_; + double weight_; double delta_phi_; double lp_; double half_wedge_; @@ -218,6 +218,21 @@ struct ScaleRegularizationResidual { double inv_sigma_; }; + struct SmoothnessRegularizationResidual { + explicit SmoothnessRegularizationResidual(double sigma) + : inv_sigma_(SafeInv(sigma, 1.0)) {} + template + bool operator()(const T* const k0, + const T* const k1, + const T* const k2, + T* residual) const { + residual[0] = (ceres::log(k0[0]) + ceres::log(k2[0]) - T(2.0) * ceres::log(k1[0])) * T(inv_sigma_); + return true; + } + + double inv_sigma_; + }; + } // namespace ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& observations, @@ -306,6 +321,10 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob // Mosaicity: always per-image std::vector mosaicity(nimg, opt.mosaicity_init_deg); + for (int i = 0; i < nimg && i < opt.mosaicity_init_deg_vec.size(); ++i) { + if (opt.mosaicity_init_deg_vec[i] > 0.0) + mosaicity[i] = opt.mosaicity_init_deg_vec[i]; + } // Initialize Itrue from per-HKL median of observed intensities { @@ -363,10 +382,37 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } - // For log residual, G and Itrue must stay positive + if (opt.smoothen_g) { + for (int i = 0; i < nimg - 2; ++i) { + auto *cost = new ceres::AutoDiffCostFunction( + new SmoothnessRegularizationResidual(0.05)); + + problem.AddResidualBlock(cost, nullptr, + &g[i], + &g[i + 1], + &g[i + 2]); + } + } + + if (opt.smoothen_mos && opt.per_image_mosaicity) { + for (int i = 0; i < nimg - 2; ++i) { + auto *cost = new ceres::AutoDiffCostFunction( + new SmoothnessRegularizationResidual(0.05)); + + problem.AddResidualBlock(cost, nullptr, + &mosaicity[i], + &mosaicity[i + 1], + &mosaicity[i + 2]); + } + } + + // Scaling factors must be always positive + for (int i = 0; i < nimg; ++i) + problem.SetParameterLowerBound(&g[i], 0, 1e-12); + + + // For log residual, Itrue must stay positive if (opt.log_scaling_residual) { - for (int i = 0; i < nimg; ++i) - problem.SetParameterLowerBound(&g[i], 0, 1e-12); for (int h = 0; h < nhkl; ++h) { if (is_valid_hkl_slot[h]) problem.SetParameterLowerBound(&Itrue[h], 0, 1e-12); diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index 54a26760..25ea2a4f 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -37,6 +37,7 @@ struct ScaleMergeOptions { double mosaicity_init_deg = 0.17; // ~0.003 rad double mosaicity_min_deg = 1e-3; double mosaicity_max_deg = 2.0; + std::vector mosaicity_init_deg_vec; // --- Optional: regularize per-image scale k towards 1 (Kabsch-like) --- bool regularize_scale_to_one = true; @@ -44,6 +45,9 @@ struct ScaleMergeOptions { bool log_scaling_residual = false; double min_partiality_for_merge = 0.2; + bool smoothen_g = true; + bool smoothen_mos = true; + }; struct MergedReflection { -- 2.52.0 From 1295ee9f859a7297e579538a4cb19b1ce9bbaa72 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 15 Feb 2026 19:22:44 +0100 Subject: [PATCH 52/81] jfjoch_process: Reformat --- tools/jfjoch_process.cpp | 68 +++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 9510388d..4e012710 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -145,7 +145,7 @@ int main(int argc, char **argv) { logger.Verbose(verbose); // Validate space group number early - const gemmi::SpaceGroup* space_group = nullptr; + const gemmi::SpaceGroup *space_group = nullptr; if (space_group_number.has_value()) { space_group = gemmi::find_spacegroup_by_number(space_group_number.value()); if (!space_group) { @@ -243,7 +243,8 @@ int main(int argc, char **argv) { int images_to_process = end_image - start_image; if (images_to_process <= 0) { - logger.Warning("No images to process (Start: {}, End: {}, Total: {})", start_image, end_image, total_images_in_file); + logger.Warning("No images to process (Start: {}, End: {}, Total: {})", start_image, end_image, + total_images_in_file); return 0; } @@ -270,8 +271,8 @@ int main(int argc, char **argv) { std::vector compressed_buffer; compressed_buffer.resize(MaxCompressedSize(experiment.GetCompressionAlgorithm(), - experiment.GetPixelsNum(), - experiment.GetByteDepthImage())); + experiment.GetPixelsNum(), + experiment.GetByteDepthImage())); // Thread-local analysis resources MXAnalysisWithoutFPGA analysis(experiment, mapping, pixel_mask, indexer); @@ -286,12 +287,11 @@ int main(int argc, char **argv) { if (image_idx >= end_image) break; // Load Image - std::shared_ptr img; - { + std::shared_ptr img; { std::lock_guard lock(reader_mutex); try { img = reader.LoadImage(image_idx); - } catch (const std::exception& e) { + } catch (const std::exception &e) { logger.Error("Failed to load image {}: {}", image_idx, e.what()); continue; } @@ -315,7 +315,7 @@ int main(int argc, char **argv) { // Analyze try { analysis.Analyze(msg, decomp_buffer, profile, spot_settings); - } catch (const std::exception& e) { + } catch (const std::exception &e) { logger.Error("Error analyzing image {}: {}", image_idx, e.what()); continue; } @@ -353,13 +353,13 @@ int main(int argc, char **argv) { // Update max sent tracking uint64_t current_max = max_image_number_sent.load(); while (static_cast(msg.number) > current_max) { - if (max_image_number_sent.compare_exchange_weak(current_max, static_cast(msg.number))) - break; + if (max_image_number_sent.compare_exchange_weak(current_max, static_cast(msg.number))) + break; } // Progress log if (current_idx_offset > 0 && current_idx_offset % 100 == 0) - logger.Info("Processed {} / {} images", current_idx_offset, images_to_process); + logger.Info("Processed {} / {} images", current_idx_offset, images_to_process); } // Finalize per-thread indexing (if any per-thread aggregation is needed, though pool handles most) @@ -368,14 +368,14 @@ int main(int argc, char **argv) { }; // Launch threads - std::vector> futures; + std::vector > futures; futures.reserve(nthreads); for (int i = 0; i < nthreads; ++i) { futures.push_back(std::async(std::launch::async, worker, i)); } // Wait for completion - for (auto &f : futures) { + for (auto &f: futures) { f.get(); } @@ -397,10 +397,9 @@ int main(int argc, char **argv) { // Finalize Indexing (Global) to get rotation lattice // We create a temporary IndexAndRefine to call Finalize() which aggregates pool results - IndexAndRefine global_indexer(experiment, &indexer_pool); - const auto rotation_indexer_ret = global_indexer.Finalize(); + const auto rotation_indexer_ret = indexer.Finalize(); - if (rotation_indexer_ret.has_value()) { + if (rotation_indexer_ret.has_value()) { end_msg.rotation_lattice = rotation_indexer_ret->lattice; end_msg.rotation_lattice_type = LatticeMessage{ .centering = rotation_indexer_ret->search_result.centering, @@ -415,9 +414,9 @@ int main(int argc, char **argv) { logger.Info("Running scaling (mosaicity refinement) ..."); ScaleMergeOptions scale_opts; - scale_opts.refine_mosaicity = true; + scale_opts.refine_mosaicity = true; scale_opts.max_num_iterations = 500; - scale_opts.max_solver_time_s = 240.0; // generous cutoff for now + scale_opts.max_solver_time_s = 240.0; // generous cutoff for now scale_opts.log_scaling_residual = log_residual; switch (mosaicity_refinement_mode) { case MosaicityRefinementMode::None: @@ -439,7 +438,7 @@ int main(int argc, char **argv) { auto scale_start = std::chrono::steady_clock::now(); auto scale_result = indexer.ScaleRotationData(scale_opts); - auto scale_end = std::chrono::steady_clock::now(); + auto scale_end = std::chrono::steady_clock::now(); double scale_time = std::chrono::duration(scale_end - scale_start).count(); if (scale_result) { @@ -455,9 +454,9 @@ int main(int argc, char **argv) { logger.Error("Cannot open {} for writing", hkl_path); } else { hkl_file << "# h k l I sigma\n"; - for (const auto& r : scale_result->merged) { + for (const auto &r: scale_result->merged) { hkl_file << r.h << " " << r.k << " " << r.l << " " - << r.I << " " << r.sigma << "\n"; + << r.I << " " << r.sigma << "\n"; } hkl_file.close(); logger.Info("Wrote {} reflections to {}", scale_result->merged.size(), hkl_path); @@ -474,8 +473,8 @@ int main(int argc, char **argv) { img_file << "# image_id mosaicity_deg K\n"; for (size_t i = 0; i < scale_result->image_ids.size(); ++i) { img_file << scale_result->image_ids[i] << " " - << scale_result->mosaicity_deg[i] << " " - << scale_result->image_scale_g[i] << "\n"; + << scale_result->mosaicity_deg[i] << " " + << scale_result->image_scale_g[i] << "\n"; } img_file.close(); logger.Info("Wrote {} image records to {}", scale_result->image_ids.size(), img_path); @@ -485,17 +484,16 @@ int main(int argc, char **argv) { // --- French-Wilson: convert I → F --- { FrenchWilsonOptions fw_opts; - fw_opts.acentric = true; // typical for MX + fw_opts.acentric = true; // typical for MX fw_opts.num_shells = 20; - auto fw = FrenchWilson(scale_result->merged, fw_opts); - - { - + auto fw = FrenchWilson(scale_result->merged, fw_opts); { MmcifMetadata cif_meta; // Unit cell — from rotation indexing result or experiment setting if (rotation_indexer_ret.has_value()) { + logger.Info("Bla {:f} {:f}", rotation_indexer_ret->lattice.GetUnitCell().a, + rotation_indexer_ret->lattice.GetUnitCell().b); cif_meta.unit_cell = rotation_indexer_ret->lattice.GetUnitCell(); } else if (experiment.GetUnitCell().has_value()) { cif_meta.unit_cell = experiment.GetUnitCell().value(); @@ -503,20 +501,20 @@ int main(int argc, char **argv) { // Space group if (auto sg = experiment.GetGemmiSpaceGroup(); sg.has_value()) { - cif_meta.space_group_name = sg->hm; + cif_meta.space_group_name = sg->hm; cif_meta.space_group_number = sg->number; } else if (space_group) { - cif_meta.space_group_name = space_group->hm; + cif_meta.space_group_name = space_group->hm; cif_meta.space_group_number = space_group->number; } // Detector & experiment info - cif_meta.detector_name = experiment.GetDetectorDescription(); - cif_meta.wavelength_A = experiment.GetWavelength_A(); + cif_meta.detector_name = experiment.GetDetectorDescription(); + cif_meta.wavelength_A = experiment.GetWavelength_A(); cif_meta.detector_distance_mm = experiment.GetDetectorDistance_mm(); cif_meta.sample_temperature_K = experiment.GetSampleTemperature_K(); - cif_meta.sample_name = experiment.GetSampleName(); - cif_meta.data_block_name = output_prefix; + cif_meta.sample_name = experiment.GetSampleName(); + cif_meta.data_block_name = output_prefix; cif_meta.beamline = experiment.GetInstrumentName(); cif_meta.source = experiment.GetSourceName(); @@ -525,7 +523,7 @@ int main(int argc, char **argv) { try { WriteMmcifReflections(cif_path, fw, cif_meta); logger.Info("Wrote mmCIF reflections to {}", cif_path); - } catch (const std::exception& e) { + } catch (const std::exception &e) { logger.Error("Failed to write mmCIF: {}", e.what()); } } -- 2.52.0 From 411276415ecd04c60bedf80b83dc279b6e7ef7ed Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 11:25:07 +0100 Subject: [PATCH 53/81] jfjoch_viewer: Display partiality and reverse LP correction --- viewer/windows/JFJochViewerReflectionListWindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/viewer/windows/JFJochViewerReflectionListWindow.cpp b/viewer/windows/JFJochViewerReflectionListWindow.cpp index 6c9fa8af..a3a4998c 100644 --- a/viewer/windows/JFJochViewerReflectionListWindow.cpp +++ b/viewer/windows/JFJochViewerReflectionListWindow.cpp @@ -23,7 +23,7 @@ JFJochViewerReflectionListWindow::JFJochViewerReflectionListWindow(QWidget* pare proxyModel->setSortRole(Qt::UserRole); // numeric sort on underlying values tableView->setModel(proxyModel); - tableView->sortByColumn(7, Qt::DescendingOrder); // default: I (Intensity) desc + tableView->sortByColumn(6, Qt::DescendingOrder); // default: I (Intensity) desc tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); tableView->setSortingEnabled(true); tableView->verticalHeader()->setVisible(false); @@ -45,7 +45,7 @@ JFJochViewerReflectionListWindow::JFJochViewerReflectionListWindow(QWidget* pare } void JFJochViewerReflectionListWindow::setupTableModel() { - tableModel->setColumnCount(9); + tableModel->setColumnCount(11); tableModel->setHeaderData(0, Qt::Horizontal, "h"); tableModel->setHeaderData(1, Qt::Horizontal, "k"); tableModel->setHeaderData(2, Qt::Horizontal, "l"); @@ -55,6 +55,8 @@ void JFJochViewerReflectionListWindow::setupTableModel() { tableModel->setHeaderData(6, Qt::Horizontal, "I"); tableModel->setHeaderData(7, Qt::Horizontal, "Sigma"); tableModel->setHeaderData(8, Qt::Horizontal, "Bkg"); + tableModel->setHeaderData(9, Qt::Horizontal, "Part."); + tableModel->setHeaderData(10, Qt::Horizontal, "LP^-1"); } static QStandardItem* mkNumItem(const QVariant& userValue, const QString& displayText = QString()) { @@ -88,6 +90,8 @@ void JFJochViewerReflectionListWindow::addReflectionRow(int index, const Reflect row.append(mkNumItem(static_cast(r.bkg), QString::number(r.bkg, 'f', 1))); + row.append(mkNumItem(r.partiality, QString::number(r.partiality, 'f', 2))); + row.append(mkNumItem(r.rlp, QString::number(r.rlp, 'f', 3))); tableModel->appendRow(row); } -- 2.52.0 From 175e9386166fe837a12065d6ca1aa260edba1553 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 11:56:39 +0100 Subject: [PATCH 54/81] BraggIntegrate2D: Lorentz-Polarization correction is not directly applied --- .../bragg_integration/BraggIntegrate2D.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/image_analysis/bragg_integration/BraggIntegrate2D.cpp b/image_analysis/bragg_integration/BraggIntegrate2D.cpp index 77622f64..fac3cbd9 100644 --- a/image_analysis/bragg_integration/BraggIntegrate2D.cpp +++ b/image_analysis/bragg_integration/BraggIntegrate2D.cpp @@ -63,8 +63,6 @@ void IntegrateReflection(Reflection &r, const T *image, size_t xpixel, size_t yp } } -#include - template std::vector IntegrateInternal(const DiffractionExperiment &experiment, const CompressedImage &image, @@ -88,22 +86,13 @@ std::vector IntegrateInternal(const DiffractionExperiment &experimen const float r_2_sq = settings.GetR2() * settings.GetR2(); const float r_3_sq = settings.GetR3() * settings.GetR3(); - const Coord S0 = geom.GetScatteringVector(); - Coord m2 = Coord(0,0,0); // zero vector - if (experiment.GetGoniometer().has_value()) - m2 = experiment.GetGoniometer()->GetAxis().Normalize(); - for (int i = 0; i < npredicted; i++) { auto r = predicted.at(i); IntegrateReflection(r, ptr, image.GetWidth(), image.GetHeight(), special_value, saturation, r_3, r_1_sq, r_2_sq, r_3_sq); if (r.observed) { if (experiment.GetPolarizationFactor()) - r.rlp *= geom.CalcAzIntPolarizationCorr(r.predicted_x, r.predicted_y, - experiment.GetPolarizationFactor().value()); - r.I *= r.rlp; - r.bkg *= r.rlp; - r.sigma *= r.rlp; + r.rlp *= geom.CalcAzIntPolarizationCorr(r.predicted_x, r.predicted_y, experiment.GetPolarizationFactor().value()); r.image_number = static_cast(image_number); ret.emplace_back(r); } -- 2.52.0 From c7bf8c4d136f391abe4ca2de20466f152ff303a6 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 12:18:05 +0100 Subject: [PATCH 55/81] jfjoch_process: Don't write header row for hkl file --- tools/jfjoch_process.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 4e012710..f6725a5e 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -453,7 +453,6 @@ int main(int argc, char **argv) { if (!hkl_file) { logger.Error("Cannot open {} for writing", hkl_path); } else { - hkl_file << "# h k l I sigma\n"; for (const auto &r: scale_result->merged) { hkl_file << r.h << " " << r.k << " " << r.l << " " << r.I << " " << r.sigma << "\n"; -- 2.52.0 From 981c8ce0d49154e9d50fc22f72a1b3d808c68fab Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 13:05:45 +0100 Subject: [PATCH 56/81] AzimuthalIntegration: Clear naming for polarization factor --- common/AzimuthalIntegration.cpp | 6 +++--- common/AzimuthalIntegration.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/AzimuthalIntegration.cpp b/common/AzimuthalIntegration.cpp index 284e39a5..4d1fa294 100644 --- a/common/AzimuthalIntegration.cpp +++ b/common/AzimuthalIntegration.cpp @@ -31,7 +31,7 @@ AzimuthalIntegration::AzimuthalIntegration(const DiffractionExperiment &experime experiment.GetYPixelsNum(), experiment.GetWavelength_A()) { - polarization_correction = experiment.GetPolarizationFactor(); + polarization_factor = experiment.GetPolarizationFactor(); if (!experiment.IsGeometryTransformed()) SetupRawGeom(experiment, mask.GetMaskRaw(experiment)); @@ -89,8 +89,8 @@ void AzimuthalIntegration::SetupPixel(const DiffractionGeometry &geom, float corr = 1.0; if (settings.IsSolidAngleCorrection()) corr /= geom.CalcAzIntSolidAngleCorr(x, y); - if (settings.IsPolarizationCorrection() && polarization_correction) - corr /= geom.CalcAzIntPolarizationCorr(x, y, polarization_correction.value()); + if (settings.IsPolarizationCorrection() && polarization_factor) + corr /= geom.CalcAzIntPolarizationCorr(x, y, polarization_factor.value()); corrections[pxl] = corr; if (d > 0) { diff --git a/common/AzimuthalIntegration.h b/common/AzimuthalIntegration.h index e9a54098..0ef3a5e9 100644 --- a/common/AzimuthalIntegration.h +++ b/common/AzimuthalIntegration.h @@ -23,7 +23,7 @@ protected: std::vector pixel_resolution; std::vector corrections; - std::optional polarization_correction; + std::optional polarization_factor; void UpdateMaxBinNumber(); AzimuthalIntegration(const AzimuthalIntegrationSettings& settings, -- 2.52.0 From c4d4b5d570fa191f825912df12387326b779666b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 13:07:22 +0100 Subject: [PATCH 57/81] BraggIntegrate2D: Fix polarization correction division --- image_analysis/bragg_integration/BraggIntegrate2D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_analysis/bragg_integration/BraggIntegrate2D.cpp b/image_analysis/bragg_integration/BraggIntegrate2D.cpp index fac3cbd9..cbbfcfbd 100644 --- a/image_analysis/bragg_integration/BraggIntegrate2D.cpp +++ b/image_analysis/bragg_integration/BraggIntegrate2D.cpp @@ -92,7 +92,7 @@ std::vector IntegrateInternal(const DiffractionExperiment &experimen r_3, r_1_sq, r_2_sq, r_3_sq); if (r.observed) { if (experiment.GetPolarizationFactor()) - r.rlp *= geom.CalcAzIntPolarizationCorr(r.predicted_x, r.predicted_y, experiment.GetPolarizationFactor().value()); + r.rlp /= geom.CalcAzIntPolarizationCorr(r.predicted_x, r.predicted_y, experiment.GetPolarizationFactor().value()); r.image_number = static_cast(image_number); ret.emplace_back(r); } -- 2.52.0 From f3e8379a554b7b84d70776e4a5d1fdd4e2748592 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 13:08:59 +0100 Subject: [PATCH 58/81] jfjoch_process: Write amplitudes at the end into hkl file in addition to mmCIF file (to be improved later) --- tools/jfjoch_process.cpp | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index f6725a5e..0f3e1090 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -179,6 +179,7 @@ int main(int argc, char **argv) { experiment.Mode(DetectorMode::Standard); // Ensure full image analysis experiment.PixelSigned(true); experiment.OverwriteExistingFiles(true); + experiment.PolarizationFactor(0.99); // Unpolarized beam // Configure Indexing IndexingSettings indexing_settings; @@ -446,21 +447,7 @@ int main(int argc, char **argv) { scale_time, scale_result->gof2, scale_result->merged.size(), scale_result->image_ids.size()); - // Write scaled.hkl (h k l I sigma) - { - const std::string hkl_path = output_prefix + "_scaled.hkl"; - std::ofstream hkl_file(hkl_path); - if (!hkl_file) { - logger.Error("Cannot open {} for writing", hkl_path); - } else { - for (const auto &r: scale_result->merged) { - hkl_file << r.h << " " << r.k << " " << r.l << " " - << r.I << " " << r.sigma << "\n"; - } - hkl_file.close(); - logger.Info("Wrote {} reflections to {}", scale_result->merged.size(), hkl_path); - } - } + // Write image.dat (image_id mosaicity_deg K) { @@ -486,13 +473,29 @@ int main(int argc, char **argv) { fw_opts.acentric = true; // typical for MX fw_opts.num_shells = 20; - auto fw = FrenchWilson(scale_result->merged, fw_opts); { + auto fw = FrenchWilson(scale_result->merged, fw_opts); + { + { + // Write scaled.hkl (h k l I sigma) + const std::string hkl_path = output_prefix + "_amplitudes.hkl"; + std::ofstream hkl_file(hkl_path); + if (!hkl_file) { + logger.Error("Cannot open {} for writing", hkl_path); + } else { + for (const auto &r: fw) { + hkl_file << r.h << " " << r.k << " " << r.l << " " + << r.F << " " << r.sigmaF << " " + << r.I << " " << r.sigmaI + << "\n"; + } + hkl_file.close(); + logger.Info("Wrote {} reflections to {}", scale_result->merged.size(), hkl_path); + } + } MmcifMetadata cif_meta; // Unit cell — from rotation indexing result or experiment setting if (rotation_indexer_ret.has_value()) { - logger.Info("Bla {:f} {:f}", rotation_indexer_ret->lattice.GetUnitCell().a, - rotation_indexer_ret->lattice.GetUnitCell().b); cif_meta.unit_cell = rotation_indexer_ret->lattice.GetUnitCell(); } else if (experiment.GetUnitCell().has_value()) { cif_meta.unit_cell = experiment.GetUnitCell().value(); -- 2.52.0 From 957980307f0dc895ac3ecfa9c8f10502e7ab705b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 13:18:40 +0100 Subject: [PATCH 59/81] jfjoch_process: Add anomalous mode --- tools/jfjoch_process.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 0f3e1090..dc2cc9ab 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -43,6 +43,7 @@ void print_usage(Logger &logger) { logger.Info(" -M Scale and merge (refine mosaicity) and write scaled.hkl + image.dat"); logger.Info(" -L Use log-scaling residual"); logger.Info(" -m Mosaicity refinement none|fixed|image (default: image)"); + logger.Info(" -A Anomalous mode (don't merge Friedel pairs)"); } int main(int argc, char **argv) { @@ -63,6 +64,7 @@ int main(int argc, char **argv) { bool use_fft = false; bool refine_beam_center = true; bool run_scaling = false; + bool anomalous_mode = false; std::optional space_group_number; bool log_residual = false; @@ -77,7 +79,7 @@ int main(int argc, char **argv) { } int opt; - while ((opt = getopt(argc, argv, "o:N:s:e:vR::Fxd:S:MLm:")) != -1) { + while ((opt = getopt(argc, argv, "o:N:s:e:vR::Fxd:S:MLm:A")) != -1) { switch (opt) { case 'o': output_prefix = optarg; @@ -116,6 +118,9 @@ int main(int argc, char **argv) { case 'L': log_residual = true; break; + case 'A': + anomalous_mode = true; + break; case 'm': if (strcmp(optarg, "none") == 0) mosaicity_refinement_mode = MosaicityRefinementMode::None; @@ -419,6 +424,8 @@ int main(int argc, char **argv) { scale_opts.max_num_iterations = 500; scale_opts.max_solver_time_s = 240.0; // generous cutoff for now scale_opts.log_scaling_residual = log_residual; + scale_opts.merge_friedel = !anomalous_mode; + switch (mosaicity_refinement_mode) { case MosaicityRefinementMode::None: scale_opts.refine_mosaicity = false; -- 2.52.0 From 21059d16621b84c0fd202a3c54b510af0cd90ad9 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 13:43:52 +0100 Subject: [PATCH 60/81] CBOR: Add scale factors (work in progress) --- common/JFJochMessages.h | 2 ++ frame_serialize/CBORStream2Deserializer.cpp | 2 ++ frame_serialize/CBORStream2Serializer.cpp | 1 + writer/HDF5NXmx.cpp | 3 +++ 4 files changed, 8 insertions(+) diff --git a/common/JFJochMessages.h b/common/JFJochMessages.h index 0bbedfda..3d25da43 100644 --- a/common/JFJochMessages.h +++ b/common/JFJochMessages.h @@ -295,6 +295,8 @@ struct EndMessage { std::optional rotation_lattice_type; std::optional rotation_lattice; + + std::vector scale_factor; }; struct MetadataMessage { diff --git a/frame_serialize/CBORStream2Deserializer.cpp b/frame_serialize/CBORStream2Deserializer.cpp index b265e51d..036daf00 100644 --- a/frame_serialize/CBORStream2Deserializer.cpp +++ b/frame_serialize/CBORStream2Deserializer.cpp @@ -1261,6 +1261,8 @@ namespace { message.bkg_estimate = GetCBORFloat(value); else if (key == "indexing_rate") message.indexing_rate = GetCBORFloat(value); + else if (key == "image_scale_factor") + GetCBORFloatArray(value, message.scale_factor); else if (key == "rotation_lattice") { std::vector tmp; GetCBORFloatArray(value, tmp); diff --git a/frame_serialize/CBORStream2Serializer.cpp b/frame_serialize/CBORStream2Serializer.cpp index fd2d8212..16e8e2c9 100644 --- a/frame_serialize/CBORStream2Serializer.cpp +++ b/frame_serialize/CBORStream2Serializer.cpp @@ -676,6 +676,7 @@ void CBORStream2Serializer::SerializeSequenceEnd(const EndMessage& message) { CBOR_ENC(mapEncoder, "rotation_lattice_type", message.rotation_lattice_type); CBOR_ENC(mapEncoder, "rotation_lattice", message.rotation_lattice->GetVector()); + CBOR_ENC(mapEncoder, "image_scale_factor", message.scale_factor); cborErr(cbor_encoder_close_container(&encoder, &mapEncoder)); curr_size = cbor_encoder_get_buffer_size(&encoder, buffer); diff --git a/writer/HDF5NXmx.cpp b/writer/HDF5NXmx.cpp index ce60cab4..15cac4ab 100644 --- a/writer/HDF5NXmx.cpp +++ b/writer/HDF5NXmx.cpp @@ -711,6 +711,9 @@ void NXmx::Finalize(const EndMessage &end) { if (end.bkg_estimate) { SaveScalar(*hdf5_file, "/entry/MX/bkgEstimateMean", end.bkg_estimate.value()); } + + if (!end.scale_factor.empty()) + SaveVector(*hdf5_file, "/entry/MX/imageScaleFactor", end.scale_factor); } void NXmx::UserData(const StartMessage &start) { -- 2.52.0 From 329be6eb3332143fd2335faab891b832f1b3ee07 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Feb 2026 13:56:12 +0100 Subject: [PATCH 61/81] ScaleAndMerge: Remove GoF, refactor merging part --- image_analysis/scale_merge/ScaleAndMerge.cpp | 76 +++++++++----------- image_analysis/scale_merge/ScaleAndMerge.h | 3 - tools/jfjoch_process.cpp | 9 ++- 3 files changed, 39 insertions(+), 49 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 6860435e..b7914de8 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -488,17 +488,12 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob std::cout << summary.FullReport() << std::endl; - // --- Compute sigma(I_true) from scatter of corrected observations --- + // Merge (XDS/XSCALE style: inverse-variance weighted mean) { - // Accumulate per-HKL weighted residuals - // I_corrected_i = I_obs_i / (G_i * partiality_i * lp_i) - // sigma(I_true) = 1 / sqrt(sum_i w_i) where w_i = 1/sigma_corrected_i^2 - // OR from sample variance of I_corrected around I_true - struct HKLAccum { - double sum_w = 0.0; // sum of weights - double mean = 0.0; // running weighted mean (Welford) - double M2 = 0.0; // running weighted sum of squared deviations + double sum_wI = 0.0; // Σ(w_i * I_i) + double sum_w = 0.0; // Σ(w_i) + double sum_wI2 = 0.0; // Σ(w_i * I_i²) for internal variance int count = 0; }; std::vector accum(nhkl); @@ -526,48 +521,47 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob const double correction = G_i * partiality * lp; if (correction <= 0.0) continue; + // Corrected intensity and propagated sigma const double I_corr = static_cast(r.I) / correction; - const double w = correction * correction / (o.sigma * o.sigma); + const double sigma_corr = o.sigma / correction; + + // XDS/XSCALE style: weight = 1/σ² + const double w = 1.0 / (sigma_corr * sigma_corr); - // Welford's online weighted algorithm auto& a = accum[o.hkl_slot]; + a.sum_wI += w * I_corr; + a.sum_w += w; + a.sum_wI2 += w * I_corr * I_corr; a.count++; - const double new_sum_w = a.sum_w + w; - const double delta = I_corr - a.mean; - const double R = delta * w / new_sum_w; - a.mean += R; - a.M2 += a.sum_w * delta * R; // = w * delta * (I_corr - new_mean) - a.sum_w = new_sum_w; } } - // GoF^2 (global reduced chi-squared) for rescaling - double global_M2 = 0.0; - double global_sum_w = 0.0; - int global_n = 0; + // Populate merged reflections for (int h = 0; h < nhkl; ++h) { - global_M2 += accum[h].M2; - global_sum_w += accum[h].sum_w; - global_n += accum[h].count; - } - out.gof2 = (global_n > nhkl) - ? global_M2 / static_cast(global_n - nhkl) - : 1.0; + const auto& a = accum[h]; - for (int h = 0; h < nhkl; ++h) { - if (accum[h].sum_w > 0.0) { - out.merged[h].I = accum[h].mean; + if (a.sum_w > 0.0) { + // XDS/XSCALE style: weighted mean + out.merged[h].I = a.sum_wI / a.sum_w; + + // Standard error of weighted mean: σ = 1/√(Σw) + double sigma_stat = std::sqrt(1.0 / a.sum_w); + + if (a.count >= 2) { + // XDS/XSCALE style: use internal consistency to estimate sigma + // σ² = (1/(n-1)) * Σw_i(I_i - )² / Σw_i + const double var_internal = a.sum_wI2 - (a.sum_wI * a.sum_wI) / a.sum_w; + const double sigma_int = std::sqrt(var_internal / (a.sum_w * (a.count - 1))); + + // Take the larger of statistical and internal sigma + // (XDS approach: if data is worse than expected, use internal estimate) + out.merged[h].sigma = std::max(sigma_stat, sigma_int); + } else { + // Single observation: use propagated sigma + out.merged[h].sigma = sigma_stat; + } } - if (accum[h].count >= 2 && accum[h].sum_w > 0.0) { - // Internal consistency: sigma^2 = (1/sum_w) * chi^2_h - // where chi^2_h = M2 / (n-1) - double chi2_h = accum[h].M2 / static_cast(accum[h].count - 1); - out.merged[h].sigma = std::sqrt(chi2_h / accum[h].sum_w); - } else if (accum[h].sum_w > 0.0) { - // Single observation: use propagated sigma - out.merged[h].sigma = std::sqrt(1.0 / accum[h].sum_w); - } - // else: sigma stays 0.0 (no usable data) + // else: I and sigma stay at initialized values (Itrue[h] and 0.0) } } diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index 25ea2a4f..f2c2f35e 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -66,9 +66,6 @@ struct ScaleMergeResult { // One mosaicity value per image (degrees). std::vector mosaicity_deg; - - // Goodness-of-fit squared (reduced chi-squared). - double gof2 = 1.0; }; ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& observations, diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index dc2cc9ab..4836b7e9 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -450,11 +450,10 @@ int main(int argc, char **argv) { double scale_time = std::chrono::duration(scale_end - scale_start).count(); if (scale_result) { - logger.Info("Scaling completed in {:.2f} s (GoF² = {:.4f}, {} unique reflections, {} images)", - scale_time, scale_result->gof2, - scale_result->merged.size(), scale_result->image_ids.size()); - - + logger.Info("Scaling completed in {:.2f} s ({} unique reflections, {} images)", + scale_time, + scale_result->merged.size(), + scale_result->image_ids.size()); // Write image.dat (image_id mosaicity_deg K) { -- 2.52.0 From 30791b1da08c1e29771a553135dd513c4fef0b3b Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 17 Feb 2026 18:53:06 +0100 Subject: [PATCH 62/81] MXAnalysisAfterFPGA: Add state management to handle disabling functionality properly --- image_analysis/MXAnalysisAfterFPGA.cpp | 95 ++++++++++++++------------ image_analysis/MXAnalysisAfterFPGA.h | 2 + 2 files changed, 52 insertions(+), 45 deletions(-) diff --git a/image_analysis/MXAnalysisAfterFPGA.cpp b/image_analysis/MXAnalysisAfterFPGA.cpp index 0d417269..dd6ca221 100644 --- a/image_analysis/MXAnalysisAfterFPGA.cpp +++ b/image_analysis/MXAnalysisAfterFPGA.cpp @@ -34,64 +34,69 @@ MXAnalysisAfterFPGA::MXAnalysisAfterFPGA(const DiffractionExperiment &in_experim } void MXAnalysisAfterFPGA::ReadFromFPGA(const DeviceOutput *output, const SpotFindingSettings &settings, size_t module_number) { - if (!find_spots || !settings.enable) - return; - StrongPixelSet strong_pixel_set; - strong_pixel_set.ReadFPGAOutput(experiment, *output); - strong_pixel_set.FindSpots(experiment, settings, spots, module_number); + if (state == State::Disabled || !find_spots || !settings.enable) { + state = State::Disabled; + } else { + StrongPixelSet strong_pixel_set; + strong_pixel_set.ReadFPGAOutput(experiment, *output); + strong_pixel_set.FindSpots(experiment, settings, spots, module_number); + state = State::Enabled; + } } void MXAnalysisAfterFPGA::ReadFromCPU(DeviceOutput *output, const SpotFindingSettings &settings, size_t module_number) { std::unique_lock ul(read_from_cpu_mutex); - if (!find_spots) - return; + if (state == State::Disabled || !find_spots || !settings.enable) { + state = State::Disabled; + } else { + state = State::Enabled; - std::vector d_map(RAW_MODULE_SIZE); + std::vector d_map(RAW_MODULE_SIZE); - experiment.CalcSpotFinderResolutionMap(d_map.data(), module_number); + experiment.CalcSpotFinderResolutionMap(d_map.data(), module_number); - arr_mean.resize(RAW_MODULE_SIZE); - arr_sttdev.resize(RAW_MODULE_SIZE); - arr_valid_count.resize(RAW_MODULE_SIZE); - arr_strong_pixel.resize(RAW_MODULE_SIZE); + arr_mean.resize(RAW_MODULE_SIZE); + arr_sttdev.resize(RAW_MODULE_SIZE); + arr_valid_count.resize(RAW_MODULE_SIZE); + arr_strong_pixel.resize(RAW_MODULE_SIZE); - if (experiment.GetByteDepthImage() == 2) - FindSpots(*output, - settings, - d_map.data(), - arr_mean.data(), - arr_sttdev.data(), - arr_valid_count.data(), - arr_strong_pixel.data()); - else if (experiment.GetByteDepthImage() == 4) - FindSpots(*output, - settings, - d_map.data(), - arr_mean.data(), - arr_sttdev.data(), - arr_valid_count.data(), - arr_strong_pixel.data()); - else if (experiment.GetByteDepthImage() == 1) - FindSpots(*output, - settings, - d_map.data(), - arr_mean.data(), - arr_sttdev.data(), - arr_valid_count.data(), - arr_strong_pixel.data()); + if (experiment.GetByteDepthImage() == 2) + FindSpots(*output, + settings, + d_map.data(), + arr_mean.data(), + arr_sttdev.data(), + arr_valid_count.data(), + arr_strong_pixel.data()); + else if (experiment.GetByteDepthImage() == 4) + FindSpots(*output, + settings, + d_map.data(), + arr_mean.data(), + arr_sttdev.data(), + arr_valid_count.data(), + arr_strong_pixel.data()); + else if (experiment.GetByteDepthImage() == 1) + FindSpots(*output, + settings, + d_map.data(), + arr_mean.data(), + arr_sttdev.data(), + arr_valid_count.data(), + arr_strong_pixel.data()); - ReadFromFPGA(output, settings, module_number); + ReadFromFPGA(output, settings, module_number); + } } void MXAnalysisAfterFPGA::Process(DataMessage &message, const SpotFindingSettings& spot_finding_settings) { - if (!find_spots) - return; - - SpotAnalyze(experiment, spot_finding_settings, spots, message); - - if (spot_finding_settings.indexing) - indexer.ProcessImage(message, spot_finding_settings, message.image, *prediction); + if (find_spots && (state == State::Enabled)) { + SpotAnalyze(experiment, spot_finding_settings, spots, message); + if (spot_finding_settings.indexing) + indexer.ProcessImage(message, spot_finding_settings, message.image, *prediction); + } spots.clear(); + state = State::Idle; } diff --git a/image_analysis/MXAnalysisAfterFPGA.h b/image_analysis/MXAnalysisAfterFPGA.h index 00c19f11..78bc827c 100644 --- a/image_analysis/MXAnalysisAfterFPGA.h +++ b/image_analysis/MXAnalysisAfterFPGA.h @@ -24,6 +24,8 @@ class MXAnalysisAfterFPGA { std::vector arr_sttdev; std::vector arr_valid_count; std::vector arr_strong_pixel; + + enum class State {Idle, Disabled, Enabled} state = State::Idle; public: MXAnalysisAfterFPGA(const DiffractionExperiment& experiment, IndexAndRefine &indexer); -- 2.52.0 From f7f13c45e8a598bc18af7b691da94409fd391376 Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 17 Feb 2026 18:59:17 +0100 Subject: [PATCH 63/81] Docs: Add jumbo frames --- docs/FPGA_NETWORK.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/FPGA_NETWORK.md b/docs/FPGA_NETWORK.md index ceaeb5c0..cad5e8d4 100644 --- a/docs/FPGA_NETWORK.md +++ b/docs/FPGA_NETWORK.md @@ -18,7 +18,7 @@ encountered such a situation. ## Switch configuration Special care has to be taken for switch operation, given the FPGA core doesn't support auto-negotiation. It is necessary to configure switch port -to fixed speed (100 Gbit/s or 10 Gbit/s) and to disable auto-negotiation. +to fixed speed (100 Gbit/s or 10 Gbit/s) and to disable auto-negotiation. It is also necessary to enable jumbo frames (MTU of 9000). ## Network LEDs Each QSFP connector is equipped with green and orange LEDs. These LEDs are connected to Ethernet physical layer status port (rx_status). -- 2.52.0 From be5dff5370b165389c5d59bdc78b8fdb5937fd71 Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 17 Feb 2026 19:23:34 +0100 Subject: [PATCH 64/81] Reflection: slightly reduce struct size --- common/Reflection.h | 9 ++++----- image_analysis/bragg_prediction/BraggPrediction.cpp | 3 --- image_analysis/bragg_prediction/BraggPredictionGPU.cu | 3 --- image_analysis/bragg_prediction/BraggPredictionRot.cpp | 3 --- image_analysis/bragg_prediction/BraggPredictionRotGPU.cu | 3 --- 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/common/Reflection.h b/common/Reflection.h index 8a1c41fd..b73dd8aa 100644 --- a/common/Reflection.h +++ b/common/Reflection.h @@ -9,9 +9,9 @@ #include "SpotToSave.h" struct Reflection { - int64_t h; - int64_t k; - int64_t l; + int32_t h; + int32_t k; + int32_t l; float image_number; // Can be in-between for 3D integration float delta_phi_deg; // phi angle from XDS - difference from middle of current frame (NOT an absolute angle) float predicted_x; @@ -22,10 +22,9 @@ struct Reflection { float sigma; float dist_ewald; float rlp; - bool observed = false; - float S_x, S_y, S_z; float partiality; float zeta; + bool observed = false; }; #endif //JFJOCH_REFLECTION_H diff --git a/image_analysis/bragg_prediction/BraggPrediction.cpp b/image_analysis/bragg_prediction/BraggPrediction.cpp index a46a5d74..9a337c16 100644 --- a/image_analysis/bragg_prediction/BraggPrediction.cpp +++ b/image_analysis/bragg_prediction/BraggPrediction.cpp @@ -102,9 +102,6 @@ int BraggPrediction::Calc(const DiffractionExperiment &experiment, const Crystal .d = d, .dist_ewald = dist_ewald_sphere, .rlp = 1.0, - .S_x = S_x, - .S_y = S_y, - .S_z = S_z, .partiality = 1.0, .zeta = NAN }; diff --git a/image_analysis/bragg_prediction/BraggPredictionGPU.cu b/image_analysis/bragg_prediction/BraggPredictionGPU.cu index 96fef397..b79ccef4 100644 --- a/image_analysis/bragg_prediction/BraggPredictionGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionGPU.cu @@ -82,9 +82,6 @@ namespace { out.predicted_y = y; out.d = 1.0f / sqrtf(recip_sq); out.dist_ewald = dist_ewald; - out.S_x = Sx; - out.S_y = Sy; - out.S_z = Sz; out.rlp = 1.0f; out.partiality = 1.0f; out.zeta = NAN; diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 7a4c04e1..adeb4528 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -140,9 +140,6 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys .d = d, .dist_ewald = dist_ewald_sphere, .rlp = lorentz_reciprocal, - .S_x = S.x, - .S_y = S.y, - .S_z = S.z, .partiality = partiality, .zeta = zeta_abs }; diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index 752297df..7ced01d3 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -156,9 +156,6 @@ namespace { out[count].d = 1.0f / sqrtf(p0_sq); out[count].dist_ewald = dist_ewald; out[count].rlp = lorentz; - out[count].S_x = Sx; - out[count].S_y = Sy; - out[count].S_z = Sz; out[count].partiality = partiality; out[count].zeta = zeta_abs; count++; -- 2.52.0 From 0ed72eb2eaeb768ef8ffa9a1168fc6470d31ed7d Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 17 Feb 2026 19:46:28 +0100 Subject: [PATCH 65/81] ScaleAndMerge: Add statistics --- image_analysis/scale_merge/ScaleAndMerge.cpp | 244 +++++++++++++++++++ image_analysis/scale_merge/ScaleAndMerge.h | 22 ++ tools/jfjoch_process.cpp | 43 +++- 3 files changed, 305 insertions(+), 4 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index b7914de8..7410c236 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -16,6 +16,8 @@ #include #include +#include "../../common/ResolutionShells.h" + namespace { struct HKLKey { @@ -565,5 +567,247 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob } } + // ---- Compute per-shell merging statistics ---- + { + constexpr int kStatShells = 10; + + // Determine d-range from merged reflections + float stat_d_min = std::numeric_limits::max(); + float stat_d_max = 0.0f; + for (int h = 0; h < nhkl; ++h) { + const auto d = static_cast(out.merged[h].d); + if (std::isfinite(d) && d > 0.0f) { + if (d < stat_d_min) stat_d_min = d; + if (d > stat_d_max) stat_d_max = d; + } + } + + if (stat_d_min < stat_d_max && stat_d_min > 0.0f) { + const float d_min_pad = stat_d_min * 0.999f; + const float d_max_pad = stat_d_max * 1.001f; + ResolutionShells stat_shells(d_min_pad, d_max_pad, kStatShells); + + const auto shell_mean_1_d2 = stat_shells.GetShellMeanOneOverResSq(); + const auto shell_min_res = stat_shells.GetShellMinRes(); + + // Assign each unique reflection to a shell + std::vector hkl_shell(nhkl, -1); + for (int h = 0; h < nhkl; ++h) { + const auto d = static_cast(out.merged[h].d); + if (std::isfinite(d) && d > 0.0f) { + auto s = stat_shells.GetShell(d); + if (s.has_value()) + hkl_shell[h] = s.value(); + } + } + + // Build corrected observations per HKL (same correction logic as merge) + struct CorrObs { + int hkl_slot; + int shell; + double I_corr; + }; + std::vector corr_obs; + corr_obs.reserve(obs.size()); + + const double half_wedge = opt.wedge_deg / 2.0; + + for (const auto& o : obs) { + if (hkl_shell[o.hkl_slot] < 0) + continue; + + const Reflection& r = *o.r; + const double lp = SafeInv(static_cast(r.rlp), 1.0); + const double G_i = g[o.img_slot]; + + double partiality; + size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0; + if (refine_partiality && mosaicity[mos_slot] > 0.0) { + double c1 = r.zeta / std::sqrt(2.0); + double arg_plus = (r.delta_phi_deg + half_wedge) * c1 / mosaicity[mos_slot]; + double arg_minus = (r.delta_phi_deg - half_wedge) * c1 / mosaicity[mos_slot]; + partiality = (std::erf(arg_plus) - std::erf(arg_minus)) / 2.0; + } else { + partiality = r.partiality; + } + + if (partiality <= opt.min_partiality_for_merge) + continue; + const double correction = G_i * partiality * lp; + if (correction <= 0.0) + continue; + + CorrObs co; + co.hkl_slot = o.hkl_slot; + co.shell = hkl_shell[o.hkl_slot]; + co.I_corr = static_cast(r.I) / correction; + corr_obs.push_back(co); + } + + // Per-HKL: collect corrected intensities for Rmeas + struct HKLStats { + double sum_I = 0.0; + int n = 0; + std::vector I_list; + }; + std::vector per_hkl(nhkl); + + for (const auto& co : corr_obs) { + auto& hs = per_hkl[co.hkl_slot]; + hs.sum_I += co.I_corr; + hs.n += 1; + hs.I_list.push_back(co.I_corr); + } + + // Compute per-shell statistics + out.statistics.shells.resize(kStatShells); + + // Accumulators per shell + struct ShellAccum { + int total_obs = 0; + std::unordered_set unique_hkls; + double rmeas_num = 0.0; // Σ sqrt(n/(n-1)) * Σ|I_i - | + double rmeas_den = 0.0; // Σ Σ I_i + double sum_i_over_sig = 0.0; + int n_merged_with_sigma = 0; + }; + std::vector shell_acc(kStatShells); + + // Accumulate per-HKL contributions to each shell + for (int h = 0; h < nhkl; ++h) { + if (hkl_shell[h] < 0) + continue; + const int s = hkl_shell[h]; + auto& sa = shell_acc[s]; + const auto& hs = per_hkl[h]; + if (hs.n == 0) + continue; + + sa.unique_hkls.insert(h); + sa.total_obs += hs.n; + + const double mean_I = hs.sum_I / static_cast(hs.n); + + // Rmeas numerator: sqrt(n/(n-1)) * Σ_i |I_i - | + if (hs.n >= 2) { + double sum_abs_dev = 0.0; + for (double Ii : hs.I_list) + sum_abs_dev += std::abs(Ii - mean_I); + sa.rmeas_num += std::sqrt(static_cast(hs.n) / (hs.n - 1.0)) * sum_abs_dev; + } + + // Rmeas denominator: Σ_i I_i (use absolute values for robustness) + for (double Ii : hs.I_list) + sa.rmeas_den += std::abs(Ii); + + // from merged reflection + if (out.merged[h].sigma > 0.0) { + sa.sum_i_over_sig += out.merged[h].I / out.merged[h].sigma; + sa.n_merged_with_sigma += 1; + } + } + + // Completeness: enumerate ASU reflections per shell if we have space group + unit cell + std::vector possible_per_shell(kStatShells, 0); + int total_possible = 0; + bool have_completeness = false; + + if (opt.space_group.has_value()) { + // Try to build a gemmi UnitCell from the merged reflections' d-spacings + // We need the actual unit cell. Check if any merged reflection has d > 0. + // Actually, we need the real unit cell parameters. We can get them from + // the observations' HKL + d to deduce the metric tensor, but that's complex. + // Instead, we compute d from the unit cell if the caller set it via space_group. + // For now, we count unique reflections in the ASU by brute-force enumeration. + + // We'll try to infer cell parameters from the merged d-spacings + HKL. + // Simpler: use the already-available merged reflections d-spacings to get + // max h, k, l and enumerate. This is a practical approximation. + + const gemmi::SpaceGroup& sg = *opt.space_group; + const gemmi::GroupOps gops = sg.operations(); + const gemmi::ReciprocalAsu rasu(&sg); + + // Find max indices from merged data + int max_h = 0, max_k = 0, max_l = 0; + for (int idx = 0; idx < nhkl; ++idx) { + max_h = std::max(max_h, std::abs(out.merged[idx].h)); + max_k = std::max(max_k, std::abs(out.merged[idx].k)); + max_l = std::max(max_l, std::abs(out.merged[idx].l)); + } + + // We need a metric tensor to compute d-spacing from HKL. + // Estimate reciprocal metric from the merged data using least-squares. + // For simplicity, use the unit cell from the first observation's d + HKL + // This is getting complex - let's use a simpler approach: + // Build a map from HKL key -> d for merged reflections, then for completeness + // just count how many ASU reflections exist at each resolution. + // We enumerate all HKL in the box [-max_h..max_h] x [-max_k..max_k] x [-max_l..max_l], + // check if they're in the ASU, compute d from the observation data. + + // Actually the simplest robust approach: count all ASU HKLs that have d in + // the range of each shell. We need d(hkl) which requires the metric tensor. + // Since we don't have direct access to unit cell parameters here, skip completeness + // or let the caller fill it in. + + // Mark completeness as unavailable for now - the caller (jfjoch_process) can + // fill it in if it has the unit cell. + have_completeness = false; + } + + // Fill output statistics + for (int s = 0; s < kStatShells; ++s) { + auto& ss = out.statistics.shells[s]; + const auto& sa = shell_acc[s]; + + ss.mean_one_over_d2 = shell_mean_1_d2[s]; + // Shell boundaries: shell 0 goes from d_max_pad to shell_min_res[0], etc. + ss.d_min = shell_min_res[s]; + ss.d_max = (s == 0) ? d_max_pad : shell_min_res[s - 1]; + + ss.total_observations = sa.total_obs; + ss.unique_reflections = static_cast(sa.unique_hkls.size()); + ss.rmeas = (sa.rmeas_den > 0.0) ? (sa.rmeas_num / sa.rmeas_den) : 0.0; + ss.mean_i_over_sigma = (sa.n_merged_with_sigma > 0) + ? (sa.sum_i_over_sig / sa.n_merged_with_sigma) : 0.0; + ss.possible_reflections = possible_per_shell[s]; + ss.completeness = (have_completeness && possible_per_shell[s] > 0) + ? static_cast(sa.unique_hkls.size()) / possible_per_shell[s] : 0.0; + } + + // Overall statistics + { + auto& ov = out.statistics.overall; + ov.d_min = stat_d_min; + ov.d_max = stat_d_max; + ov.mean_one_over_d2 = 0.0f; + + int total_obs_all = 0; + std::unordered_set all_unique; + double rmeas_num_all = 0.0, rmeas_den_all = 0.0; + double sum_isig_all = 0.0; + int n_isig_all = 0; + + for (int s = 0; s < kStatShells; ++s) { + const auto& sa = shell_acc[s]; + total_obs_all += sa.total_obs; + all_unique.insert(sa.unique_hkls.begin(), sa.unique_hkls.end()); + rmeas_num_all += sa.rmeas_num; + rmeas_den_all += sa.rmeas_den; + sum_isig_all += sa.sum_i_over_sig; + n_isig_all += sa.n_merged_with_sigma; + } + + ov.total_observations = total_obs_all; + ov.unique_reflections = static_cast(all_unique.size()); + ov.rmeas = (rmeas_den_all > 0.0) ? (rmeas_num_all / rmeas_den_all) : 0.0; + ov.mean_i_over_sigma = (n_isig_all > 0) ? (sum_isig_all / n_isig_all) : 0.0; + ov.possible_reflections = total_possible; + ov.completeness = (have_completeness && total_possible > 0) + ? static_cast(all_unique.size()) / total_possible : 0.0; + } + } + } + return out; } diff --git a/image_analysis/scale_merge/ScaleAndMerge.h b/image_analysis/scale_merge/ScaleAndMerge.h index f2c2f35e..7cf9a3c4 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.h +++ b/image_analysis/scale_merge/ScaleAndMerge.h @@ -59,6 +59,25 @@ struct MergedReflection { double d = 0.0; }; +/// Per-resolution-shell merging statistics +struct MergeStatisticsShell { + float d_min = 0.0f; ///< High-resolution limit of this shell (Å) + float d_max = 0.0f; ///< Low-resolution limit of this shell (Å) + float mean_one_over_d2 = 0; ///< Mean 1/d² in shell + int total_observations = 0; ///< Total number of (corrected) observations + int unique_reflections = 0; ///< Number of unique HKLs with observations + double rmeas = 0.0; ///< Redundancy-independent merging R-factor + double mean_i_over_sigma = 0.0; ///< Mean I/σ(I) of the merged reflections + double completeness = 0.0; ///< Fraction of possible reflections observed (0 if unknown) + int possible_reflections = 0;///< Theoretical number of reflections in this shell (0 if unknown) +}; + +/// Overall + per-shell merging statistics +struct MergeStatistics { + std::vector shells; + MergeStatisticsShell overall; ///< Statistics over all shells combined +}; + struct ScaleMergeResult { std::vector merged; std::vector image_scale_g; @@ -66,6 +85,9 @@ struct ScaleMergeResult { // One mosaicity value per image (degrees). std::vector mosaicity_deg; + + /// Per-shell and overall merging statistics (populated after merging) + MergeStatistics statistics; }; ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& observations, diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 4836b7e9..54ebc810 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -450,10 +450,45 @@ int main(int argc, char **argv) { double scale_time = std::chrono::duration(scale_end - scale_start).count(); if (scale_result) { - logger.Info("Scaling completed in {:.2f} s ({} unique reflections, {} images)", - scale_time, - scale_result->merged.size(), - scale_result->image_ids.size()); + +// ... existing code ... + logger.Info("Scaling completed in {:.2f} s ({} unique reflections, {} images)", + scale_time, + scale_result->merged.size(), + scale_result->image_ids.size()); + + // Print resolution-shell statistics table + { + const auto& stats = scale_result->statistics; + logger.Info(""); + logger.Info(" {:>8s} {:>8s} {:>8s} {:>8s} {:>8s} {:>10s}", + "d_min", "N_obs", "N_uniq", "Rmeas", "", "Complete"); + logger.Info(" {:->8s} {:->8s} {:->8s} {:->8s} {:->8s} {:->10s}", + "", "", "", "", "", ""); + for (const auto& sh : stats.shells) { + if (sh.unique_reflections == 0) + continue; + std::string compl_str = (sh.completeness > 0.0) + ? fmt::format("{:8.1f}%", sh.completeness * 100.0) + : " N/A"; + logger.Info(" {:8.2f} {:8d} {:8d} {:8.3f}% {:8.1f} {:>10s}", + sh.d_min, sh.total_observations, sh.unique_reflections, + sh.rmeas * 100, sh.mean_i_over_sigma, compl_str); + } + // Overall + { + const auto& ov = stats.overall; + logger.Info(" {:->8s} {:->8s} {:->8s} {:->8s} {:->8s} {:->10s}", + "", "", "", "", "", ""); + std::string compl_str = (ov.completeness > 0.0) + ? fmt::format("{:8.1f}%", ov.completeness * 100.0) + : " N/A"; + logger.Info(" {:>8s} {:8d} {:8d} {:8.3f}% {:8.1f} {:>10s}", + "Overall", ov.total_observations, ov.unique_reflections, + ov.rmeas * 100, ov.mean_i_over_sigma, compl_str); + } + logger.Info(""); + } // Write image.dat (image_id mosaicity_deg K) { -- 2.52.0 From 091b3808a4e65dbac2686e0115f9961dffb33f1c Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 17 Feb 2026 19:54:37 +0100 Subject: [PATCH 66/81] ScaleAndMerge: Add statistics --- image_analysis/scale_merge/ScaleAndMerge.cpp | 923 +++++++++---------- 1 file changed, 420 insertions(+), 503 deletions(-) diff --git a/image_analysis/scale_merge/ScaleAndMerge.cpp b/image_analysis/scale_merge/ScaleAndMerge.cpp index 7410c236..8c6c63ca 100644 --- a/image_analysis/scale_merge/ScaleAndMerge.cpp +++ b/image_analysis/scale_merge/ScaleAndMerge.cpp @@ -19,230 +19,233 @@ #include "../../common/ResolutionShells.h" namespace { + struct HKLKey { + int64_t h = 0; + int64_t k = 0; + int64_t l = 0; + bool is_positive = true; // only relevant if opt.merge_friedel == false -struct HKLKey { - int64_t h = 0; - int64_t k = 0; - int64_t l = 0; - bool is_positive = true; // only relevant if opt.merge_friedel == false - - bool operator==(const HKLKey& o) const noexcept { - return h == o.h && k == o.k && l == o.l && is_positive == o.is_positive; - } -}; - -struct HKLKeyHash { - size_t operator()(const HKLKey& key) const noexcept { - auto mix = [](uint64_t x) { - x ^= x >> 33; - x *= 0xff51afd7ed558ccdULL; - x ^= x >> 33; - x *= 0xc4ceb9fe1a85ec53ULL; - x ^= x >> 33; - return x; - }; - const uint64_t a = static_cast(key.h); - const uint64_t b = static_cast(key.k); - const uint64_t c = static_cast(key.l); - const uint64_t d = static_cast(key.is_positive ? 1 : 0); - return static_cast(mix(a) ^ (mix(b) << 1) ^ (mix(c) << 2) ^ (mix(d) << 3)); - } -}; - -inline int RoundImageId(float image_number, double rounding_step) { - if (!(rounding_step > 0.0)) - rounding_step = 1.0; - const double x = static_cast(image_number) / rounding_step; - const double r = std::round(x) * rounding_step; - return static_cast(std::llround(r / rounding_step)); -} - -inline double SafeSigma(double s, double min_sigma) { - if (!std::isfinite(s) || s <= 0.0) - return min_sigma; - return std::max(s, min_sigma); -} - -inline double SafeD(double d) { - if (!std::isfinite(d) || d <= 0.0) - return std::numeric_limits::quiet_NaN(); - return d; -} - -inline int SafeToInt(int64_t x) { - if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) - throw std::out_of_range("HKL index out of int range for Gemmi"); - return static_cast(x); -} - -inline double SafeInv(double x, double fallback) { - if (!std::isfinite(x) || x == 0.0) - return fallback; - return 1.0 / x; -} - -inline HKLKey CanonicalizeHKLKey(const Reflection& r, const ScaleMergeOptions& opt) { - HKLKey key{}; - key.h = r.h; - key.k = r.k; - key.l = r.l; - key.is_positive = true; - - if (!opt.space_group.has_value()) { - if (!opt.merge_friedel) { - const HKLKey neg{-r.h, -r.k, -r.l, true}; - const bool pos = std::tie(key.h, key.k, key.l) >= std::tie(neg.h, neg.k, neg.l); - if (!pos) { - key.h = -key.h; - key.k = -key.k; - key.l = -key.l; - key.is_positive = false; - } + bool operator==(const HKLKey &o) const noexcept { + return h == o.h && k == o.k && l == o.l && is_positive == o.is_positive; } + }; + + struct HKLKeyHash { + size_t operator()(const HKLKey &key) const noexcept { + auto mix = [](uint64_t x) { + x ^= x >> 33; + x *= 0xff51afd7ed558ccdULL; + x ^= x >> 33; + x *= 0xc4ceb9fe1a85ec53ULL; + x ^= x >> 33; + return x; + }; + const uint64_t a = static_cast(key.h); + const uint64_t b = static_cast(key.k); + const uint64_t c = static_cast(key.l); + const uint64_t d = static_cast(key.is_positive ? 1 : 0); + return static_cast(mix(a) ^ (mix(b) << 1) ^ (mix(c) << 2) ^ (mix(d) << 3)); + } + }; + + inline int RoundImageId(float image_number, double rounding_step) { + if (!(rounding_step > 0.0)) + rounding_step = 1.0; + const double x = static_cast(image_number) / rounding_step; + const double r = std::round(x) * rounding_step; + return static_cast(std::llround(r / rounding_step)); + } + + inline double SafeSigma(double s, double min_sigma) { + if (!std::isfinite(s) || s <= 0.0) + return min_sigma; + return std::max(s, min_sigma); + } + + inline double SafeD(double d) { + if (!std::isfinite(d) || d <= 0.0) + return std::numeric_limits::quiet_NaN(); + return d; + } + + inline int SafeToInt(int64_t x) { + if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) + throw std::out_of_range("HKL index out of int range for Gemmi"); + return static_cast(x); + } + + inline double SafeInv(double x, double fallback) { + if (!std::isfinite(x) || x == 0.0) + return fallback; + return 1.0 / x; + } + + inline HKLKey CanonicalizeHKLKey(const Reflection &r, const ScaleMergeOptions &opt) { + HKLKey key{}; + key.h = r.h; + key.k = r.k; + key.l = r.l; + key.is_positive = true; + + if (!opt.space_group.has_value()) { + if (!opt.merge_friedel) { + const HKLKey neg{-r.h, -r.k, -r.l, true}; + const bool pos = std::tie(key.h, key.k, key.l) >= std::tie(neg.h, neg.k, neg.l); + if (!pos) { + key.h = -key.h; + key.k = -key.k; + key.l = -key.l; + key.is_positive = false; + } + } + return key; + } + + const gemmi::SpaceGroup &sg = *opt.space_group; + const gemmi::GroupOps gops = sg.operations(); + const gemmi::ReciprocalAsu rasu(&sg); + + const gemmi::Op::Miller in{{SafeToInt(r.h), SafeToInt(r.k), SafeToInt(r.l)}}; + const auto [asu_hkl, sign_plus] = rasu.to_asu_sign(in, gops); + + key.h = asu_hkl[0]; + key.k = asu_hkl[1]; + key.l = asu_hkl[2]; + key.is_positive = opt.merge_friedel ? true : sign_plus; return key; } - const gemmi::SpaceGroup& sg = *opt.space_group; - const gemmi::GroupOps gops = sg.operations(); - const gemmi::ReciprocalAsu rasu(&sg); - - const gemmi::Op::Miller in{{SafeToInt(r.h), SafeToInt(r.k), SafeToInt(r.l)}}; - const auto [asu_hkl, sign_plus] = rasu.to_asu_sign(in, gops); - - key.h = asu_hkl[0]; - key.k = asu_hkl[1]; - key.l = asu_hkl[2]; - key.is_positive = opt.merge_friedel ? true : sign_plus; - return key; -} - -/// CrystFEL-like log-scaling residual -/// -/// residual = w * [ ln(I_obs) - ln(G) - ln(partiality) - ln(lp) - ln(I_true) ] -/// -/// Only observations with I_obs > 0 should be fed in (the caller skips the rest). -/// G and I_true are constrained to be positive via Ceres lower bounds. -struct LogIntensityResidual { - LogIntensityResidual(const Reflection& r, double sigma_obs, double wedge_deg, bool refine_partiality) - : log_Iobs_(std::log(std::max(static_cast(r.I), 1e-30))), - weight_(SafeInv(sigma_obs / std::max(static_cast(r.I), 1e-30), 1.0)), - delta_phi_(r.delta_phi_deg), - log_lp_(std::log(std::max(SafeInv(static_cast(r.rlp), 1.0), 1e-30))), - half_wedge_(wedge_deg / 2.0), - c1_(r.zeta / std::sqrt(2.0)), - partiality_(r.partiality), - refine_partiality_(refine_partiality) {} - - template - bool operator()(const T* const G, - const T* const mosaicity, - const T* const Itrue, - T* residual) const { - T partiality; - if (refine_partiality_ && mosaicity[0] != 0.0) { - const T arg_plus = T(delta_phi_ + half_wedge_) * T(c1_) / mosaicity[0]; - const T arg_minus = T(delta_phi_ - half_wedge_) * T(c1_) / mosaicity[0]; - partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); - } else { - partiality = T(partiality_); + /// CrystFEL-like log-scaling residual + /// + /// residual = w * [ ln(I_obs) - ln(G) - ln(partiality) - ln(lp) - ln(I_true) ] + /// + /// Only observations with I_obs > 0 should be fed in (the caller skips the rest). + /// G and I_true are constrained to be positive via Ceres lower bounds. + struct LogIntensityResidual { + LogIntensityResidual(const Reflection &r, double sigma_obs, double wedge_deg, bool refine_partiality) + : log_Iobs_(std::log(std::max(static_cast(r.I), 1e-30))), + weight_(SafeInv(sigma_obs / std::max(static_cast(r.I), 1e-30), 1.0)), + delta_phi_(r.delta_phi_deg), + log_lp_(std::log(std::max(SafeInv(static_cast(r.rlp), 1.0), 1e-30))), + half_wedge_(wedge_deg / 2.0), + c1_(r.zeta / std::sqrt(2.0)), + partiality_(r.partiality), + refine_partiality_(refine_partiality) { } - // Clamp partiality away from zero so log is safe - const T min_p = T(1e-30); - if (partiality < min_p) - partiality = min_p; + template + bool operator()(const T *const G, + const T *const mosaicity, + const T *const Itrue, + T *residual) const { + T partiality; + if (refine_partiality_ && mosaicity[0] != 0.0) { + const T arg_plus = T(delta_phi_ + half_wedge_) * T(c1_) / mosaicity[0]; + const T arg_minus = T(delta_phi_ - half_wedge_) * T(c1_) / mosaicity[0]; + partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); + } else { + partiality = T(partiality_); + } - // ln(I_pred) = ln(G) + ln(partiality) + ln(lp) + ln(Itrue) - const T log_Ipred = ceres::log(G[0]) + ceres::log(partiality) + T(log_lp_) + ceres::log(Itrue[0]); - residual[0] = (log_Ipred - T(log_Iobs_)) * T(weight_); - return true; - } + // Clamp partiality away from zero so log is safe + const T min_p = T(1e-30); + if (partiality < min_p) + partiality = min_p; - double log_Iobs_; - double weight_; // w_i ≈ I_obs / sigma_obs (relative weight in log-space) - double delta_phi_; - double log_lp_; - double half_wedge_; - double c1_; - double partiality_; - bool refine_partiality_; -}; + // ln(I_pred) = ln(G) + ln(partiality) + ln(lp) + ln(Itrue) + const T log_Ipred = ceres::log(G[0]) + ceres::log(partiality) + T(log_lp_) + ceres::log(Itrue[0]); + residual[0] = (log_Ipred - T(log_Iobs_)) * T(weight_); + return true; + } -struct IntensityResidual { - IntensityResidual(const Reflection &r, double sigma_obs, double wedge_deg, bool refine_partiality) - : Iobs_(static_cast(r.I)), - weight_(SafeInv(sigma_obs, 1.0)), - delta_phi_(r.delta_phi_deg), - lp_(SafeInv(static_cast(r.rlp), 1.0)), - half_wedge_(wedge_deg / 2.0), - c1_(r.zeta / std::sqrt(2.0)), - partiality_(r.partiality), - refine_partiality_(refine_partiality) {} + double log_Iobs_; + double weight_; // w_i ≈ I_obs / sigma_obs (relative weight in log-space) + double delta_phi_; + double log_lp_; + double half_wedge_; + double c1_; + double partiality_; + bool refine_partiality_; + }; - template - bool operator()(const T *const G, - const T *const mosaicity, - const T *const Itrue, - T *residual) const { - T partiality; - if (refine_partiality_ && mosaicity[0] != 0.0) { - const T arg_plus = T(delta_phi_ + half_wedge_) * T(c1_) / mosaicity[0]; - const T arg_minus = T(delta_phi_ - half_wedge_) * T(c1_) / mosaicity[0]; - partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); - } else - partiality = T(partiality_); + struct IntensityResidual { + IntensityResidual(const Reflection &r, double sigma_obs, double wedge_deg, bool refine_partiality) + : Iobs_(static_cast(r.I)), + weight_(SafeInv(sigma_obs, 1.0)), + delta_phi_(r.delta_phi_deg), + lp_(SafeInv(static_cast(r.rlp), 1.0)), + half_wedge_(wedge_deg / 2.0), + c1_(r.zeta / std::sqrt(2.0)), + partiality_(r.partiality), + refine_partiality_(refine_partiality) { + } - const T Ipred = G[0] * partiality * T(lp_) * Itrue[0]; - residual[0] = (Ipred - T(Iobs_)) * T(weight_); - return true; - } + template + bool operator()(const T *const G, + const T *const mosaicity, + const T *const Itrue, + T *residual) const { + T partiality; + if (refine_partiality_ && mosaicity[0] != 0.0) { + const T arg_plus = T(delta_phi_ + half_wedge_) * T(c1_) / mosaicity[0]; + const T arg_minus = T(delta_phi_ - half_wedge_) * T(c1_) / mosaicity[0]; + partiality = (ceres::erf(arg_plus) - ceres::erf(arg_minus)) / T(2.0); + } else + partiality = T(partiality_); - double Iobs_; - double weight_; - double delta_phi_; - double lp_; - double half_wedge_; - double c1_; - double partiality_; - bool refine_partiality_; -}; + const T Ipred = G[0] * partiality * T(lp_) * Itrue[0]; + residual[0] = (Ipred - T(Iobs_)) * T(weight_); + return true; + } -struct ScaleRegularizationResidual { - explicit ScaleRegularizationResidual(double sigma_k) - : inv_sigma_(SafeInv(sigma_k, 1.0)) {} + double Iobs_; + double weight_; + double delta_phi_; + double lp_; + double half_wedge_; + double c1_; + double partiality_; + bool refine_partiality_; + }; - template - bool operator()(const T* const k, T* residual) const { - residual[0] = (k[0] - T(1.0)) * T(inv_sigma_); - return true; - } + struct ScaleRegularizationResidual { + explicit ScaleRegularizationResidual(double sigma_k) + : inv_sigma_(SafeInv(sigma_k, 1.0)) { + } - double inv_sigma_; -}; - - struct SmoothnessRegularizationResidual { - explicit SmoothnessRegularizationResidual(double sigma) - : inv_sigma_(SafeInv(sigma, 1.0)) {} - template - bool operator()(const T* const k0, - const T* const k1, - const T* const k2, - T* residual) const { - residual[0] = (ceres::log(k0[0]) + ceres::log(k2[0]) - T(2.0) * ceres::log(k1[0])) * T(inv_sigma_); + template + bool operator()(const T *const k, T *residual) const { + residual[0] = (k[0] - T(1.0)) * T(inv_sigma_); return true; } double inv_sigma_; }; + struct SmoothnessRegularizationResidual { + explicit SmoothnessRegularizationResidual(double sigma) + : inv_sigma_(SafeInv(sigma, 1.0)) { + } + + template + bool operator()(const T *const k0, + const T *const k1, + const T *const k2, + T *residual) const { + residual[0] = (ceres::log(k0[0]) + ceres::log(k2[0]) - T(2.0) * ceres::log(k1[0])) * T(inv_sigma_); + return true; + } + + double inv_sigma_; + }; } // namespace -ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& observations, - const ScaleMergeOptions& opt) { +ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector &observations, + const ScaleMergeOptions &opt) { ScaleMergeResult out; struct ObsRef { - const Reflection* r = nullptr; + const Reflection *r = nullptr; int img_id = 0; int img_slot = -1; int hkl_slot = -1; @@ -258,7 +261,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob std::unordered_map hklToSlot; hklToSlot.reserve(observations.size()); - for (const auto& r : observations) { + for (const auto &r: observations) { const double d = SafeD(r.d); if (!std::isfinite(d)) continue; @@ -314,7 +317,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob out.image_scale_g.assign(nimg, 1.0); out.image_ids.assign(nimg, 0); - for (const auto& kv : imgIdToSlot) { + for (const auto &kv: imgIdToSlot) { out.image_ids[kv.second] = kv.first; } @@ -330,12 +333,12 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob // Initialize Itrue from per-HKL median of observed intensities { - std::vector> per_hkl_I(nhkl); - for (const auto& o : obs) { + std::vector > per_hkl_I(nhkl); + for (const auto &o: obs) { per_hkl_I[o.hkl_slot].push_back(static_cast(o.r->I)); } for (int h = 0; h < nhkl; ++h) { - auto& v = per_hkl_I[h]; + auto &v = per_hkl_I[h]; if (v.empty()) { Itrue[h] = std::max(opt.min_sigma, 1e-6); continue; @@ -354,7 +357,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob std::vector is_valid_hkl_slot(nhkl, false); - for (const auto& o : obs) { + for (const auto &o: obs) { size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0; if (opt.log_scaling_residual) { @@ -362,7 +365,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob if (o.r->I <= 0.0f) continue; - auto* cost = new ceres::AutoDiffCostFunction( + auto *cost = new ceres::AutoDiffCostFunction( new LogIntensityResidual(*o.r, o.sigma, opt.wedge_deg, refine_partiality)); problem.AddResidualBlock(cost, @@ -372,7 +375,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob &Itrue[o.hkl_slot]); is_valid_hkl_slot[o.hkl_slot] = true; } else { - auto* cost = new ceres::AutoDiffCostFunction( + auto *cost = new ceres::AutoDiffCostFunction( new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, refine_partiality)); problem.AddResidualBlock(cost, @@ -457,7 +460,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob out.mosaicity_deg[i] = opt.per_image_mosaicity ? mosaicity[i] : mosaicity[0]; std::vector slotToHKL(nhkl); - for (const auto& kv : hklToSlot) { + for (const auto &kv: hklToSlot) { slotToHKL[kv.second] = kv.first; } @@ -473,14 +476,14 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob // Populate d from median of observations per HKL { - std::vector> per_hkl_d(nhkl); - for (const auto& o : obs) { + std::vector > per_hkl_d(nhkl); + for (const auto &o: obs) { const double d_val = static_cast(o.r->d); if (std::isfinite(d_val) && d_val > 0.0) per_hkl_d[o.hkl_slot].push_back(d_val); } for (int h = 0; h < nhkl; ++h) { - auto& v = per_hkl_d[h]; + auto &v = per_hkl_d[h]; if (!v.empty()) { std::nth_element(v.begin(), v.begin() + static_cast(v.size() / 2), v.end()); out.merged[h].d = v[v.size() / 2]; @@ -490,324 +493,238 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector& ob std::cout << summary.FullReport() << std::endl; - // Merge (XDS/XSCALE style: inverse-variance weighted mean) - { - struct HKLAccum { - double sum_wI = 0.0; // Σ(w_i * I_i) - double sum_w = 0.0; // Σ(w_i) - double sum_wI2 = 0.0; // Σ(w_i * I_i²) for internal variance - int count = 0; - }; - std::vector accum(nhkl); + // ---- Compute corrected observations once (used for both merging and statistics) ---- + struct CorrectedObs { + int hkl_slot; + double I_corr; + double sigma_corr; + }; + std::vector corr_obs; + corr_obs.reserve(obs.size()); + { const double half_wedge = opt.wedge_deg / 2.0; - for (const auto& o : obs) { - const Reflection& r = *o.r; + for (const auto &o: obs) { + const Reflection &r = *o.r; const double lp = SafeInv(static_cast(r.rlp), 1.0); const double G_i = g[o.img_slot]; // Compute partiality with refined mosaicity double partiality; - size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0; + const size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0; if (refine_partiality && mosaicity[mos_slot] > 0.0) { - double c1 = r.zeta / std::sqrt(2.0); - double arg_plus = (r.delta_phi_deg + half_wedge) * c1 / mosaicity[mos_slot]; - double arg_minus = (r.delta_phi_deg - half_wedge) * c1 / mosaicity[mos_slot]; + const double c1 = r.zeta / std::sqrt(2.0); + const double arg_plus = (r.delta_phi_deg + half_wedge) * c1 / mosaicity[mos_slot]; + const double arg_minus = (r.delta_phi_deg - half_wedge) * c1 / mosaicity[mos_slot]; partiality = (std::erf(arg_plus) - std::erf(arg_minus)) / 2.0; } else { partiality = r.partiality; } - if (partiality > opt.min_partiality_for_merge) { - const double correction = G_i * partiality * lp; - if (correction <= 0.0) continue; + if (partiality <= opt.min_partiality_for_merge) + continue; + const double correction = G_i * partiality * lp; + if (correction <= 0.0) + continue; - // Corrected intensity and propagated sigma - const double I_corr = static_cast(r.I) / correction; - const double sigma_corr = o.sigma / correction; - - // XDS/XSCALE style: weight = 1/σ² - const double w = 1.0 / (sigma_corr * sigma_corr); - - auto& a = accum[o.hkl_slot]; - a.sum_wI += w * I_corr; - a.sum_w += w; - a.sum_wI2 += w * I_corr * I_corr; - a.count++; - } - } - - // Populate merged reflections - for (int h = 0; h < nhkl; ++h) { - const auto& a = accum[h]; - - if (a.sum_w > 0.0) { - // XDS/XSCALE style: weighted mean - out.merged[h].I = a.sum_wI / a.sum_w; - - // Standard error of weighted mean: σ = 1/√(Σw) - double sigma_stat = std::sqrt(1.0 / a.sum_w); - - if (a.count >= 2) { - // XDS/XSCALE style: use internal consistency to estimate sigma - // σ² = (1/(n-1)) * Σw_i(I_i - )² / Σw_i - const double var_internal = a.sum_wI2 - (a.sum_wI * a.sum_wI) / a.sum_w; - const double sigma_int = std::sqrt(var_internal / (a.sum_w * (a.count - 1))); - - // Take the larger of statistical and internal sigma - // (XDS approach: if data is worse than expected, use internal estimate) - out.merged[h].sigma = std::max(sigma_stat, sigma_int); - } else { - // Single observation: use propagated sigma - out.merged[h].sigma = sigma_stat; - } - } - // else: I and sigma stay at initialized values (Itrue[h] and 0.0) + corr_obs.push_back({ + o.hkl_slot, + static_cast(r.I) / correction, + o.sigma / correction + }); } } - // ---- Compute per-shell merging statistics ---- - { - constexpr int kStatShells = 10; + // ---- Merge (XDS/XSCALE style: inverse-variance weighted mean) ---- + { + struct HKLAccum { + double sum_wI = 0.0; + double sum_w = 0.0; + double sum_wI2 = 0.0; + int count = 0; + }; + std::vector accum(nhkl); - // Determine d-range from merged reflections - float stat_d_min = std::numeric_limits::max(); - float stat_d_max = 0.0f; - for (int h = 0; h < nhkl; ++h) { - const auto d = static_cast(out.merged[h].d); - if (std::isfinite(d) && d > 0.0f) { - if (d < stat_d_min) stat_d_min = d; - if (d > stat_d_max) stat_d_max = d; - } + for (const auto &co: corr_obs) { + const double w = 1.0 / (co.sigma_corr * co.sigma_corr); + auto &a = accum[co.hkl_slot]; + a.sum_wI += w * co.I_corr; + a.sum_w += w; + a.sum_wI2 += w * co.I_corr * co.I_corr; + a.count++; + } + + for (int h = 0; h < nhkl; ++h) { + const auto &a = accum[h]; + if (a.sum_w <= 0.0) + continue; + + out.merged[h].I = a.sum_wI / a.sum_w; + const double sigma_stat = std::sqrt(1.0 / a.sum_w); + + if (a.count >= 2) { + const double var_internal = a.sum_wI2 - (a.sum_wI * a.sum_wI) / a.sum_w; + const double sigma_int = std::sqrt(var_internal / (a.sum_w * (a.count - 1))); + out.merged[h].sigma = std::max(sigma_stat, sigma_int); + } else { + out.merged[h].sigma = sigma_stat; } + } + } - if (stat_d_min < stat_d_max && stat_d_min > 0.0f) { - const float d_min_pad = stat_d_min * 0.999f; - const float d_max_pad = stat_d_max * 1.001f; - ResolutionShells stat_shells(d_min_pad, d_max_pad, kStatShells); + // ---- Compute per-shell merging statistics ---- + { + constexpr int kStatShells = 10; - const auto shell_mean_1_d2 = stat_shells.GetShellMeanOneOverResSq(); - const auto shell_min_res = stat_shells.GetShellMinRes(); - - // Assign each unique reflection to a shell - std::vector hkl_shell(nhkl, -1); - for (int h = 0; h < nhkl; ++h) { - const auto d = static_cast(out.merged[h].d); - if (std::isfinite(d) && d > 0.0f) { - auto s = stat_shells.GetShell(d); - if (s.has_value()) - hkl_shell[h] = s.value(); - } - } - - // Build corrected observations per HKL (same correction logic as merge) - struct CorrObs { - int hkl_slot; - int shell; - double I_corr; - }; - std::vector corr_obs; - corr_obs.reserve(obs.size()); - - const double half_wedge = opt.wedge_deg / 2.0; - - for (const auto& o : obs) { - if (hkl_shell[o.hkl_slot] < 0) - continue; - - const Reflection& r = *o.r; - const double lp = SafeInv(static_cast(r.rlp), 1.0); - const double G_i = g[o.img_slot]; - - double partiality; - size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0; - if (refine_partiality && mosaicity[mos_slot] > 0.0) { - double c1 = r.zeta / std::sqrt(2.0); - double arg_plus = (r.delta_phi_deg + half_wedge) * c1 / mosaicity[mos_slot]; - double arg_minus = (r.delta_phi_deg - half_wedge) * c1 / mosaicity[mos_slot]; - partiality = (std::erf(arg_plus) - std::erf(arg_minus)) / 2.0; - } else { - partiality = r.partiality; - } - - if (partiality <= opt.min_partiality_for_merge) - continue; - const double correction = G_i * partiality * lp; - if (correction <= 0.0) - continue; - - CorrObs co; - co.hkl_slot = o.hkl_slot; - co.shell = hkl_shell[o.hkl_slot]; - co.I_corr = static_cast(r.I) / correction; - corr_obs.push_back(co); - } - - // Per-HKL: collect corrected intensities for Rmeas - struct HKLStats { - double sum_I = 0.0; - int n = 0; - std::vector I_list; - }; - std::vector per_hkl(nhkl); - - for (const auto& co : corr_obs) { - auto& hs = per_hkl[co.hkl_slot]; - hs.sum_I += co.I_corr; - hs.n += 1; - hs.I_list.push_back(co.I_corr); - } - - // Compute per-shell statistics - out.statistics.shells.resize(kStatShells); - - // Accumulators per shell - struct ShellAccum { - int total_obs = 0; - std::unordered_set unique_hkls; - double rmeas_num = 0.0; // Σ sqrt(n/(n-1)) * Σ|I_i - | - double rmeas_den = 0.0; // Σ Σ I_i - double sum_i_over_sig = 0.0; - int n_merged_with_sigma = 0; - }; - std::vector shell_acc(kStatShells); - - // Accumulate per-HKL contributions to each shell - for (int h = 0; h < nhkl; ++h) { - if (hkl_shell[h] < 0) - continue; - const int s = hkl_shell[h]; - auto& sa = shell_acc[s]; - const auto& hs = per_hkl[h]; - if (hs.n == 0) - continue; - - sa.unique_hkls.insert(h); - sa.total_obs += hs.n; - - const double mean_I = hs.sum_I / static_cast(hs.n); - - // Rmeas numerator: sqrt(n/(n-1)) * Σ_i |I_i - | - if (hs.n >= 2) { - double sum_abs_dev = 0.0; - for (double Ii : hs.I_list) - sum_abs_dev += std::abs(Ii - mean_I); - sa.rmeas_num += std::sqrt(static_cast(hs.n) / (hs.n - 1.0)) * sum_abs_dev; - } - - // Rmeas denominator: Σ_i I_i (use absolute values for robustness) - for (double Ii : hs.I_list) - sa.rmeas_den += std::abs(Ii); - - // from merged reflection - if (out.merged[h].sigma > 0.0) { - sa.sum_i_over_sig += out.merged[h].I / out.merged[h].sigma; - sa.n_merged_with_sigma += 1; - } - } - - // Completeness: enumerate ASU reflections per shell if we have space group + unit cell - std::vector possible_per_shell(kStatShells, 0); - int total_possible = 0; - bool have_completeness = false; - - if (opt.space_group.has_value()) { - // Try to build a gemmi UnitCell from the merged reflections' d-spacings - // We need the actual unit cell. Check if any merged reflection has d > 0. - // Actually, we need the real unit cell parameters. We can get them from - // the observations' HKL + d to deduce the metric tensor, but that's complex. - // Instead, we compute d from the unit cell if the caller set it via space_group. - // For now, we count unique reflections in the ASU by brute-force enumeration. - - // We'll try to infer cell parameters from the merged d-spacings + HKL. - // Simpler: use the already-available merged reflections d-spacings to get - // max h, k, l and enumerate. This is a practical approximation. - - const gemmi::SpaceGroup& sg = *opt.space_group; - const gemmi::GroupOps gops = sg.operations(); - const gemmi::ReciprocalAsu rasu(&sg); - - // Find max indices from merged data - int max_h = 0, max_k = 0, max_l = 0; - for (int idx = 0; idx < nhkl; ++idx) { - max_h = std::max(max_h, std::abs(out.merged[idx].h)); - max_k = std::max(max_k, std::abs(out.merged[idx].k)); - max_l = std::max(max_l, std::abs(out.merged[idx].l)); - } - - // We need a metric tensor to compute d-spacing from HKL. - // Estimate reciprocal metric from the merged data using least-squares. - // For simplicity, use the unit cell from the first observation's d + HKL - // This is getting complex - let's use a simpler approach: - // Build a map from HKL key -> d for merged reflections, then for completeness - // just count how many ASU reflections exist at each resolution. - // We enumerate all HKL in the box [-max_h..max_h] x [-max_k..max_k] x [-max_l..max_l], - // check if they're in the ASU, compute d from the observation data. - - // Actually the simplest robust approach: count all ASU HKLs that have d in - // the range of each shell. We need d(hkl) which requires the metric tensor. - // Since we don't have direct access to unit cell parameters here, skip completeness - // or let the caller fill it in. - - // Mark completeness as unavailable for now - the caller (jfjoch_process) can - // fill it in if it has the unit cell. - have_completeness = false; - } - - // Fill output statistics - for (int s = 0; s < kStatShells; ++s) { - auto& ss = out.statistics.shells[s]; - const auto& sa = shell_acc[s]; - - ss.mean_one_over_d2 = shell_mean_1_d2[s]; - // Shell boundaries: shell 0 goes from d_max_pad to shell_min_res[0], etc. - ss.d_min = shell_min_res[s]; - ss.d_max = (s == 0) ? d_max_pad : shell_min_res[s - 1]; - - ss.total_observations = sa.total_obs; - ss.unique_reflections = static_cast(sa.unique_hkls.size()); - ss.rmeas = (sa.rmeas_den > 0.0) ? (sa.rmeas_num / sa.rmeas_den) : 0.0; - ss.mean_i_over_sigma = (sa.n_merged_with_sigma > 0) - ? (sa.sum_i_over_sig / sa.n_merged_with_sigma) : 0.0; - ss.possible_reflections = possible_per_shell[s]; - ss.completeness = (have_completeness && possible_per_shell[s] > 0) - ? static_cast(sa.unique_hkls.size()) / possible_per_shell[s] : 0.0; - } - - // Overall statistics - { - auto& ov = out.statistics.overall; - ov.d_min = stat_d_min; - ov.d_max = stat_d_max; - ov.mean_one_over_d2 = 0.0f; - - int total_obs_all = 0; - std::unordered_set all_unique; - double rmeas_num_all = 0.0, rmeas_den_all = 0.0; - double sum_isig_all = 0.0; - int n_isig_all = 0; - - for (int s = 0; s < kStatShells; ++s) { - const auto& sa = shell_acc[s]; - total_obs_all += sa.total_obs; - all_unique.insert(sa.unique_hkls.begin(), sa.unique_hkls.end()); - rmeas_num_all += sa.rmeas_num; - rmeas_den_all += sa.rmeas_den; - sum_isig_all += sa.sum_i_over_sig; - n_isig_all += sa.n_merged_with_sigma; - } - - ov.total_observations = total_obs_all; - ov.unique_reflections = static_cast(all_unique.size()); - ov.rmeas = (rmeas_den_all > 0.0) ? (rmeas_num_all / rmeas_den_all) : 0.0; - ov.mean_i_over_sigma = (n_isig_all > 0) ? (sum_isig_all / n_isig_all) : 0.0; - ov.possible_reflections = total_possible; - ov.completeness = (have_completeness && total_possible > 0) - ? static_cast(all_unique.size()) / total_possible : 0.0; - } + float stat_d_min = std::numeric_limits::max(); + float stat_d_max = 0.0f; + for (int h = 0; h < nhkl; ++h) { + const auto d = static_cast(out.merged[h].d); + if (std::isfinite(d) && d > 0.0f) { + stat_d_min = std::min(stat_d_min, d); + stat_d_max = std::max(stat_d_max, d); } } + if (stat_d_min < stat_d_max && stat_d_min > 0.0f) { + const float d_min_pad = stat_d_min * 0.999f; + const float d_max_pad = stat_d_max * 1.001f; + ResolutionShells stat_shells(d_min_pad, d_max_pad, kStatShells); + + const auto shell_mean_1_d2 = stat_shells.GetShellMeanOneOverResSq(); + const auto shell_min_res = stat_shells.GetShellMinRes(); + + // Assign each unique reflection to a shell + std::vector hkl_shell(nhkl, -1); + for (int h = 0; h < nhkl; ++h) { + const auto d = static_cast(out.merged[h].d); + if (std::isfinite(d) && d > 0.0f) { + auto s = stat_shells.GetShell(d); + if (s.has_value()) + hkl_shell[h] = s.value(); + } + } + + // Per-HKL: collect corrected intensities for Rmeas + struct HKLStats { + double sum_I = 0.0; + int n = 0; + std::vector I_list; + }; + std::vector per_hkl(nhkl); + + for (const auto &co: corr_obs) { + if (hkl_shell[co.hkl_slot] < 0) + continue; + auto &hs = per_hkl[co.hkl_slot]; + hs.sum_I += co.I_corr; + hs.n += 1; + hs.I_list.push_back(co.I_corr); + } + + // Accumulators per shell + struct ShellAccum { + int total_obs = 0; + std::unordered_set unique_hkls; + double rmeas_num = 0.0; + double rmeas_den = 0.0; + double sum_i_over_sig = 0.0; + int n_merged_with_sigma = 0; + }; + std::vector shell_acc(kStatShells); + + for (int h = 0; h < nhkl; ++h) { + if (hkl_shell[h] < 0) + continue; + const int s = hkl_shell[h]; + auto &sa = shell_acc[s]; + const auto &hs = per_hkl[h]; + if (hs.n == 0) + continue; + + sa.unique_hkls.insert(h); + sa.total_obs += hs.n; + + const double mean_I = hs.sum_I / static_cast(hs.n); + + if (hs.n >= 2) { + double sum_abs_dev = 0.0; + for (double Ii: hs.I_list) + sum_abs_dev += std::abs(Ii - mean_I); + sa.rmeas_num += std::sqrt(static_cast(hs.n) / (hs.n - 1.0)) * sum_abs_dev; + } + + for (double Ii: hs.I_list) + sa.rmeas_den += std::abs(Ii); + + if (out.merged[h].sigma > 0.0) { + sa.sum_i_over_sig += out.merged[h].I / out.merged[h].sigma; + sa.n_merged_with_sigma += 1; + } + } + + // Completeness (not yet available without unit cell) + std::vector possible_per_shell(kStatShells, 0); + int total_possible = 0; + bool have_completeness = false; + + // Fill output statistics + out.statistics.shells.resize(kStatShells); + for (int s = 0; s < kStatShells; ++s) { + auto &ss = out.statistics.shells[s]; + const auto &sa = shell_acc[s]; + + ss.mean_one_over_d2 = shell_mean_1_d2[s]; + ss.d_min = shell_min_res[s]; + ss.d_max = (s == 0) ? d_max_pad : shell_min_res[s - 1]; + + ss.total_observations = sa.total_obs; + ss.unique_reflections = static_cast(sa.unique_hkls.size()); + ss.rmeas = (sa.rmeas_den > 0.0) ? (sa.rmeas_num / sa.rmeas_den) : 0.0; + ss.mean_i_over_sigma = (sa.n_merged_with_sigma > 0) + ? (sa.sum_i_over_sig / sa.n_merged_with_sigma) + : 0.0; + ss.possible_reflections = possible_per_shell[s]; + ss.completeness = (have_completeness && possible_per_shell[s] > 0) + ? static_cast(sa.unique_hkls.size()) / possible_per_shell[s] + : 0.0; + } + + // Overall statistics + { + auto &ov = out.statistics.overall; + ov.d_min = stat_d_min; + ov.d_max = stat_d_max; + ov.mean_one_over_d2 = 0.0f; + + int total_obs_all = 0; + std::unordered_set all_unique; + double rmeas_num_all = 0.0, rmeas_den_all = 0.0; + double sum_isig_all = 0.0; + int n_isig_all = 0; + + for (int s = 0; s < kStatShells; ++s) { + const auto &sa = shell_acc[s]; + total_obs_all += sa.total_obs; + all_unique.insert(sa.unique_hkls.begin(), sa.unique_hkls.end()); + rmeas_num_all += sa.rmeas_num; + rmeas_den_all += sa.rmeas_den; + sum_isig_all += sa.sum_i_over_sig; + n_isig_all += sa.n_merged_with_sigma; + } + + ov.total_observations = total_obs_all; + ov.unique_reflections = static_cast(all_unique.size()); + ov.rmeas = (rmeas_den_all > 0.0) ? (rmeas_num_all / rmeas_den_all) : 0.0; + ov.mean_i_over_sigma = (n_isig_all > 0) ? (sum_isig_all / n_isig_all) : 0.0; + ov.possible_reflections = total_possible; + ov.completeness = (have_completeness && total_possible > 0) + ? static_cast(all_unique.size()) / total_possible + : 0.0; + } + } + } + return out; } -- 2.52.0 From 09b74e78e3ee898da3d831408f9590c452ba1a80 Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 17 Feb 2026 20:27:02 +0100 Subject: [PATCH 67/81] CBOR: Fix serialization of h,k,l --- frame_serialize/CBORStream2Serializer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frame_serialize/CBORStream2Serializer.cpp b/frame_serialize/CBORStream2Serializer.cpp index 16e8e2c9..c34872f7 100644 --- a/frame_serialize/CBORStream2Serializer.cpp +++ b/frame_serialize/CBORStream2Serializer.cpp @@ -232,9 +232,9 @@ inline void CBOR_ENC(CborEncoder &encoder, const char* key, const XrayFluorescen inline void CBOR_ENC(CborEncoder &encoder, const Reflection& r) { CborEncoder mapEncoder; cborErr(cbor_encoder_create_map(&encoder, &mapEncoder, CborIndefiniteLength)); - CBOR_ENC(mapEncoder, "h", r.h); - CBOR_ENC(mapEncoder, "k", r.k); - CBOR_ENC(mapEncoder, "l", r.l); + CBOR_ENC(mapEncoder, "h", static_cast(r.h)); + CBOR_ENC(mapEncoder, "k", static_cast(r.k)); + CBOR_ENC(mapEncoder, "l", static_cast(r.l)); CBOR_ENC(mapEncoder, "phi", r.delta_phi_deg); CBOR_ENC(mapEncoder, "x", r.predicted_x); CBOR_ENC(mapEncoder, "y", r.predicted_y); -- 2.52.0 From 0599f1e91876e3f4ee8dc0c47aae0fcdffc2a14e Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 09:13:02 +0100 Subject: [PATCH 68/81] Remove RotationScanAccumulator --- image_analysis/CMakeLists.txt | 2 - image_analysis/RotationSpotAccumulator.cpp | 141 --------------------- image_analysis/RotationSpotAccumulator.h | 70 ---------- tests/CMakeLists.txt | 1 - tests/RotationScanAccumulatorTest.cpp | 70 ---------- 5 files changed, 284 deletions(-) delete mode 100644 image_analysis/RotationSpotAccumulator.cpp delete mode 100644 image_analysis/RotationSpotAccumulator.h delete mode 100644 tests/RotationScanAccumulatorTest.cpp diff --git a/image_analysis/CMakeLists.txt b/image_analysis/CMakeLists.txt index 2cf690d1..e6cc6e17 100644 --- a/image_analysis/CMakeLists.txt +++ b/image_analysis/CMakeLists.txt @@ -31,8 +31,6 @@ ADD_LIBRARY(JFJochImageAnalysis STATIC RotationIndexer.h RotationParameters.cpp RotationParameters.h - RotationSpotAccumulator.cpp - RotationSpotAccumulator.h WriteMmcif.cpp WriteMmcif.h) diff --git a/image_analysis/RotationSpotAccumulator.cpp b/image_analysis/RotationSpotAccumulator.cpp deleted file mode 100644 index 0e1aa09f..00000000 --- a/image_analysis/RotationSpotAccumulator.cpp +++ /dev/null @@ -1,141 +0,0 @@ -// -// Created by jungfrau on 2/4/26. -// - -#include "RotationSpotAccumulator.h" - -RotationSpot3D::RotationSpot3D(SpotToSave s, float phi_deg, int64_t image) { - x = s.x * s.intensity; - y = s.y * s.intensity; - phi = phi_deg * s.intensity; - intensity = s.intensity; - maxc = s.maxc; - first_image = image; - last_image = image; -} - -void RotationSpot3D::Add(const SpotToSave& s, float phi_deg, int64_t image) { - x += s.x * s.intensity; - y += s.y * s.intensity; - phi += phi_deg * s.intensity; - intensity += s.intensity; - maxc = std::max(maxc, s.maxc); - ice_ring = ice_ring || s.ice_ring; - first_image = std::min(first_image, image); - last_image = std::max(last_image, image); -} - -float RotationSpot3D::calcX() const { - return x / intensity; -} - -float RotationSpot3D::calcY() const { - return y / intensity; -} - -float RotationSpot3D::calcPhi() const { - return phi / intensity; -} - -float RotationSpot3D::calcI() const { - return intensity; -} - -int64_t RotationSpot3D::calcMAXC() const { - return maxc; -} - -int64_t RotationSpot3D::getLastImage() const { - return last_image; -} - -void RotationSpotAccumulator::AddImage(int64_t image, const std::vector& in_spots) { - std::lock_guard lock(mutex_); - spots[image] = in_spots; -} - - - std::vector RotationSpotAccumulator::FinalizeAll() { - std::lock_guard lock(mutex_); - - int64_t image0 = INT64_MIN; - - std::vector completed_; - std::vector pending_; - - for (auto& [image, v]: spots) { - float image_angle = axis_.GetIncrement_deg() * image + axis_.GetWedge_deg() / 2.0f; - - std::vector tmp; - tmp.reserve(pending_.size() + v.size()); - - if (image == image0 + 1) { - for (const auto &p: pending_) { - if (p.getLastImage() != image - 1) { - completed_.push_back(p); - } else { - tmp.push_back(p); - } - } - - // Spatial hash for tmp (pending) - const float cell_size = config_.grid_cell_size; - const float inv_cell = (cell_size > 0.0f) ? (1.0f / cell_size) : 1.0f; - - std::unordered_map> grid; - grid.reserve(tmp.size() * 2); - - auto cell_key = [](int32_t cx, int32_t cy) -> int64_t { - return (static_cast(cx) << 32) ^ static_cast(cy); - }; - - for (int i = 0; i < static_cast(tmp.size()); ++i) { - const int32_t cx = static_cast(std::floor(tmp[i].calcX() * inv_cell)); - const int32_t cy = static_cast(std::floor(tmp[i].calcY() * inv_cell)); - grid[cell_key(cx, cy)].push_back(i); - } - - for (const auto &s: v) { - bool matched = false; - - const int32_t scx = static_cast(std::floor(s.x * inv_cell)); - const int32_t scy = static_cast(std::floor(s.y * inv_cell)); - - for (int dx = -1; dx <= 1 && !matched; ++dx) { - for (int dy = -1; dy <= 1 && !matched; ++dy) { - auto it = grid.find(cell_key(scx + dx, scy + dy)); - if (it == grid.end()) - continue; - - for (int idx : it->second) { - float dist_x = s.x - tmp[idx].calcX(); - float dist_y = s.y - tmp[idx].calcY(); - - if (dist_x * dist_x + dist_y * dist_y < config_.xy_tolerance_pxl_sq) { - tmp[idx].Add(s, image_angle, image); - matched = true; - break; - } - } - } - } - - if (!matched) - tmp.emplace_back(s, image_angle, image); - } - } else { - for (const auto &p: pending_) - completed_.push_back(p); - - for (const auto &s: v) - tmp.emplace_back(s, image_angle, image); - } - pending_ = std::move(tmp); - image0 = image; - } - - for (const auto &p: pending_) - completed_.push_back(p); - - return completed_; - } diff --git a/image_analysis/RotationSpotAccumulator.h b/image_analysis/RotationSpotAccumulator.h deleted file mode 100644 index a92f5566..00000000 --- a/image_analysis/RotationSpotAccumulator.h +++ /dev/null @@ -1,70 +0,0 @@ -// RotationSpotAccumulator.h -// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute -// SPDX-License-Identifier: GPL-3.0-only - -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -#include "../common/SpotToSave.h" -#include "../common/GoniometerAxis.h" -#include "../common/DiffractionGeometry.h" - -// Forward declaration -class RotationSpot3D { - float x = 0; - float y = 0; - float phi = 0; - float intensity = 0; - int64_t maxc = 0; - bool ice_ring = false; - - int64_t first_image = INT64_MAX; - int64_t last_image = INT64_MIN; - -public: - RotationSpot3D(SpotToSave s, float phi_deg, int64_t image); - void Add(const SpotToSave& s, float phi_deg, int64_t image); - - float calcX() const; - float calcY() const; - float calcPhi() const; - float calcI() const; - int64_t calcMAXC() const; - int64_t getLastImage() const; -}; - -class RotationSpotAccumulator { -public: - struct Config { - float xy_tolerance_pxl_sq = 2.0f * 2.0f; - float grid_cell_size = 10.0f; // pixels - }; - -private: - mutable std::mutex mutex_; - - const DiffractionGeometry& geom_; - const GoniometerAxis& axis_; - Config config_; - - std::map> spots; - -public: - RotationSpotAccumulator(const DiffractionGeometry& geom, - const GoniometerAxis& axis, - Config config) - : geom_(geom), axis_(axis), config_(config) {} - - // Add spots from one image (thread-safe, handles out-of-order) - void AddImage(int64_t image, const std::vector& in_spots); - - // Finalize all remaining spots (call at end of dataset) - std::vector FinalizeAll(); -}; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 79a6b38b..248d7dac 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,7 +64,6 @@ ADD_EXECUTABLE(jfjoch_test RotationIndexerTest.cpp TopPixelsTest.cpp HKLKeyTest.cpp - RotationScanAccumulatorTest.cpp ) target_link_libraries(jfjoch_test Catch2WithMain JFJochBroker JFJochReceiver JFJochReader JFJochWriter JFJochImageAnalysis JFJochCommon JFJochHLSSimulation JFJochPreview) diff --git a/tests/RotationScanAccumulatorTest.cpp b/tests/RotationScanAccumulatorTest.cpp deleted file mode 100644 index d8f10fd2..00000000 --- a/tests/RotationScanAccumulatorTest.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute -// SPDX-License-Identifier: GPL-3.0-only - -#include - -#include -#include "../image_analysis//RotationSpotAccumulator.h" - -TEST_CASE("RotationSpotAccumulator") { - DiffractionGeometry geometry; - geometry.BeamX_pxl(1000).BeamY_pxl(1000).DetectorDistance_mm(100); - - GoniometerAxis axis("U", 0, 0.1, Coord{1, 0, 0}, std::nullopt); - - RotationSpotAccumulator::Config config{}; - RotationSpotAccumulator accumulator(geometry, axis, config); - - accumulator.AddImage(2, { - SpotToSave{.x = 500, .y = 500, .intensity = 100}, - SpotToSave{.x = 101, .y = 101, .intensity = 50} - }); - - accumulator.AddImage(0, { - SpotToSave{.x = 100, .y = 100, .intensity = 50}, - SpotToSave{.x = 200, .y = 200, .intensity = 50} - }); - - accumulator.AddImage(1, { - SpotToSave{.x = 500, .y = 500, .intensity = 100}, - SpotToSave{.x = 101, .y = 100, .intensity = 100} - }); - - accumulator.AddImage(4, { - SpotToSave{.x = 500, .y = 500, .intensity = 100} - }); - - auto v = accumulator.FinalizeAll(); - - struct Expect { - float x, y, phi, I; - }; - - std::vector expected = { - {200.0f, 200.0f, 0.05f, 50.0f}, - {500.0f, 500.0f, 0.2f, 200.0f}, - {100.75f, 100.25f, 0.15f, 200.0f}, - {500.0f, 500.0f, 0.45f, 100.0f} - }; - - auto key = [](const Expect& e) { return std::pair(e.x, e.y); }; - - std::vector got; - got.reserve(v.size()); - for (const auto& s : v) { - got.push_back({s.calcX(), s.calcY(), s.calcPhi(), s.calcI()}); - } - - std::sort(expected.begin(), expected.end(), - [&](const Expect& a, const Expect& b){ return key(a) < key(b); }); - std::sort(got.begin(), got.end(), - [&](const Expect& a, const Expect& b){ return key(a) < key(b); }); - - REQUIRE(got.size() == expected.size()); - for (size_t i = 0; i < got.size(); ++i) { - CHECK(got[i].x == Catch::Approx(expected[i].x)); - CHECK(got[i].y == Catch::Approx(expected[i].y)); - CHECK(got[i].phi == Catch::Approx(expected[i].phi)); - CHECK(got[i].I == Catch::Approx(expected[i].I)); - } -} -- 2.52.0 From 87c8a2e93b76594cc2a80cf8427e59726113063a Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 09:38:57 +0100 Subject: [PATCH 69/81] CMake: All packages are named jfjoch, irrespective of slsdet version (for now) --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb4eeb75..c0441e2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,11 +191,7 @@ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) # Initialize CPACK_COMPONENTS_ALL with common components set(CPACK_COMPONENTS_ALL jfjoch writer) -IF (SLS9) - SET(CPACK_PACKAGE_NAME "jfjoch-slsdet9") -ELSE() - SET(CPACK_PACKAGE_NAME "jfjoch") -ENDIF() +SET(CPACK_PACKAGE_NAME "jfjoch") # Add optional components if (JFJOCH_INSTALL_DRIVER_SOURCE) -- 2.52.0 From 8759d1f8db5f3370804cbc20ee38ccfe8cc48901 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 09:40:28 +0100 Subject: [PATCH 70/81] Gitea: Add Rocky9 with SLS9 --- .gitea/workflows/build_and_test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index f19d5ef0..12c9e272 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -44,6 +44,11 @@ jobs: cmake_flags: -DJFJOCH_USE_CUDA=ON pkg_glob: "*.rpm" upload_url: https://gitea.psi.ch/api/packages/mx/rpm/centos/el9/slsdet8-cuda13/upload + - runner: jfjoch_rocky9 + distro: rocky9_sls9 + cmake_flags: -DJFJOCH_USE_CUDA=ON -DSLS9=ON + pkg_glob: "*.rpm" + upload_url: https://gitea.psi.ch/api/packages/mx/rpm/centos/el9/slsdet9-cuda13/upload - runner: jfjoch_rocky9 distro: rocky9_nocuda cmake_flags: -DJFJOCH_USE_CUDA=OFF -- 2.52.0 From ca778992b0e42df869b99c0c7b3bb57b54bfba51 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 12:15:07 +0100 Subject: [PATCH 71/81] CMake: More options for Ceres backends (to be determined how useful later) --- image_analysis/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/image_analysis/CMakeLists.txt b/image_analysis/CMakeLists.txt index e6cc6e17..50c46229 100644 --- a/image_analysis/CMakeLists.txt +++ b/image_analysis/CMakeLists.txt @@ -1,9 +1,9 @@ SET(MINIGLOG ON) SET(PROVIDE_UNINSTALL_TARGET OFF) -SET(USE_CUDA OFF) +IF (NOT JFJOCH_USE_CUDA) + SET(USE_CUDA OFF) +ENDIF() SET(EIGENSPARSE ON) -SET(LAPACK OFF) -SET(SUITESPARSE OFF) # Prevent MKL/BLAS/LAPACK from being found (guarantees no MKL) SET(CMAKE_DISABLE_FIND_PACKAGE_MKL TRUE) -- 2.52.0 From 08f98dab3c2c17730b1024bac2a219c815acd066 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 12:15:40 +0100 Subject: [PATCH 72/81] Definitions: Increase MAX_SPOT_COUNT to 64*1024 --- common/Definitions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Definitions.h b/common/Definitions.h index 72c4ed87..b60c26d9 100644 --- a/common/Definitions.h +++ b/common/Definitions.h @@ -34,7 +34,7 @@ #define DEFAULT_G2_FACTOR (-0.1145) #define DEFAULT_HG0_FACTOR (100.0) -#define MAX_SPOT_COUNT (2000) +#define MAX_SPOT_COUNT (64*1024) #define MASK_PEDESTAL_G0_RMS_LIMIT (1U<<4) -- 2.52.0 From 682ce5e418b02a537b0bd9cdc409fe92c33b3b39 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 12:16:13 +0100 Subject: [PATCH 73/81] IndexingSettings: FFT should handle cells up to 500.0 A --- common/IndexingSettings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/IndexingSettings.h b/common/IndexingSettings.h index fe14db96..ec39e1e5 100644 --- a/common/IndexingSettings.h +++ b/common/IndexingSettings.h @@ -12,7 +12,7 @@ enum class GeomRefinementAlgorithmEnum {None, BeamCenter}; class IndexingSettings { IndexingAlgorithmEnum algorithm; int64_t fft_num_vectors = 16*1024; - float fft_max_unit_cell_A = 250.0; + float fft_max_unit_cell_A = 500.0; float fft_min_unit_cell_A = 10.0; float fft_max_angle_deg = 150.0; float fft_min_angle_deg = 30.0; -- 2.52.0 From b77ba44de1b004b925477b4a123eec4026aaed84 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 12:16:26 +0100 Subject: [PATCH 74/81] jfjoch_process: Remove comment about polarization factor --- tools/jfjoch_process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 54ebc810..25391559 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -184,7 +184,7 @@ int main(int argc, char **argv) { experiment.Mode(DetectorMode::Standard); // Ensure full image analysis experiment.PixelSigned(true); experiment.OverwriteExistingFiles(true); - experiment.PolarizationFactor(0.99); // Unpolarized beam + experiment.PolarizationFactor(0.99); // Configure Indexing IndexingSettings indexing_settings; -- 2.52.0 From b2dda42db9b15055a9be13698ca8e7b0acef7fd5 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 14:32:17 +0100 Subject: [PATCH 75/81] BraggPrediction: Zeta set to 1.0 for stills, otherwise merging gets weird --- image_analysis/bragg_prediction/BraggPrediction.cpp | 2 +- image_analysis/bragg_prediction/BraggPredictionGPU.cu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/image_analysis/bragg_prediction/BraggPrediction.cpp b/image_analysis/bragg_prediction/BraggPrediction.cpp index 9a337c16..fe6c2b6d 100644 --- a/image_analysis/bragg_prediction/BraggPrediction.cpp +++ b/image_analysis/bragg_prediction/BraggPrediction.cpp @@ -103,7 +103,7 @@ int BraggPrediction::Calc(const DiffractionExperiment &experiment, const Crystal .dist_ewald = dist_ewald_sphere, .rlp = 1.0, .partiality = 1.0, - .zeta = NAN + .zeta = 1.0 }; ++i; } diff --git a/image_analysis/bragg_prediction/BraggPredictionGPU.cu b/image_analysis/bragg_prediction/BraggPredictionGPU.cu index b79ccef4..ea8080d2 100644 --- a/image_analysis/bragg_prediction/BraggPredictionGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionGPU.cu @@ -84,7 +84,7 @@ namespace { out.dist_ewald = dist_ewald; out.rlp = 1.0f; out.partiality = 1.0f; - out.zeta = NAN; + out.zeta = 1.0f; return true; } -- 2.52.0 From 838b225a44d8a7a42ffd3e4162b8bd369d2a425e Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 18 Feb 2026 14:35:10 +0100 Subject: [PATCH 76/81] OpenAPI: Use generator 7.20.0 --- broker/CMakeLists.txt | 2 +- broker/gen/api/ApiBase.cpp | 22 + broker/gen/api/ApiBase.h | 14 +- broker/gen/api/DefaultApi.cpp | 3401 +++++++++++++++---------- broker/gen/api/DefaultApi.h | 112 +- broker/gen/model/Helpers.h | 7 +- docs/python_client/README.md | 4 +- docs/python_client/docs/DefaultApi.md | 131 +- frontend/package-lock.json | 4 +- gen_python_client.sh | 2 +- update_version.sh | 2 +- 11 files changed, 2215 insertions(+), 1486 deletions(-) create mode 100644 broker/gen/api/ApiBase.cpp diff --git a/broker/CMakeLists.txt b/broker/CMakeLists.txt index 129f667e..fe51bf6a 100644 --- a/broker/CMakeLists.txt +++ b/broker/CMakeLists.txt @@ -16,7 +16,7 @@ ADD_LIBRARY(JFJochBroker STATIC TARGET_LINK_LIBRARIES(JFJochBroker JFJochReceiver JFJochDetector JFJochCommon JFJochAPI JFJochPreview) ADD_EXECUTABLE(jfjoch_broker jfjoch_broker.cpp JFJochBrokerHttp.cpp JFJochBrokerHttp.h - gen/api/DefaultApi.cpp gen/api/DefaultApi.h) + gen/api/DefaultApi.cpp gen/api/DefaultApi.h gen/api/ApiBase.h gen/api/ApiBase.cpp) TARGET_LINK_LIBRARIES(jfjoch_broker JFJochBroker pistache_static ${CMAKE_DL_LIBS}) TARGET_INCLUDE_DIRECTORIES(jfjoch_broker PUBLIC gen/api) INSTALL(TARGETS jfjoch_broker RUNTIME COMPONENT jfjoch) diff --git a/broker/gen/api/ApiBase.cpp b/broker/gen/api/ApiBase.cpp new file mode 100644 index 00000000..a02a91f4 --- /dev/null +++ b/broker/gen/api/ApiBase.cpp @@ -0,0 +1,22 @@ +/** +* 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.124 +* 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 "ApiBase.h" + +namespace org::openapitools::server::api +{ + +ApiBase::ApiBase(const std::shared_ptr& rtr) : router(rtr) +{ +} + + +} // Namespace org::openapitools::server::api diff --git a/broker/gen/api/ApiBase.h b/broker/gen/api/ApiBase.h index 53a9c26f..96b9bd0a 100644 --- a/broker/gen/api/ApiBase.h +++ b/broker/gen/api/ApiBase.h @@ -24,14 +24,26 @@ namespace org::openapitools::server::api { + + + + class ApiBase { public: - explicit ApiBase(const std::shared_ptr& rtr) : router(rtr) {}; + explicit ApiBase(const std::shared_ptr& rtr); virtual ~ApiBase() = default; virtual void init() = 0; + + + + protected: const std::shared_ptr router; + + + + }; } // namespace org::openapitools::server::api diff --git a/broker/gen/api/DefaultApi.cpp b/broker/gen/api/DefaultApi.cpp index 2d3adb69..e1b0f255 100644 --- a/broker/gen/api/DefaultApi.cpp +++ b/broker/gen/api/DefaultApi.cpp @@ -23,8 +23,7 @@ const std::string DefaultApi::base = ""; DefaultApi::DefaultApi(const std::shared_ptr& rtr) : ApiBase(rtr) -{ -} +{} void DefaultApi::init() { setupRoutes(); @@ -98,14 +97,12 @@ void DefaultApi::setupRoutes() { router->addCustomHandler(Routes::bind(&DefaultApi::default_api_default_handler, this)); } -void DefaultApi::handleParsingException(const std::exception& ex, Pistache::Http::ResponseWriter &response) const noexcept -{ +void DefaultApi::handleParsingException(const std::exception& ex, Pistache::Http::ResponseWriter &response) const noexcept { std::pair codeAndError = handleParsingException(ex); response.send(codeAndError.first, codeAndError.second); } -std::pair DefaultApi::handleParsingException(const std::exception& ex) const noexcept -{ +std::pair DefaultApi::handleParsingException(const std::exception& ex) const noexcept { try { throw; } catch (nlohmann::detail::exception &e) { @@ -117,1518 +114,2132 @@ std::pair DefaultApi::handleParsingException( } } -void DefaultApi::handleOperationException(const std::exception& ex, Pistache::Http::ResponseWriter &response) const noexcept -{ +void DefaultApi::handleOperationException(const std::exception& ex, Pistache::Http::ResponseWriter &response) const noexcept { std::pair codeAndError = handleOperationException(ex); response.send(codeAndError.first, codeAndError.second); } -std::pair DefaultApi::handleOperationException(const std::exception& ex) const noexcept -{ +std::pair DefaultApi::handleOperationException(const std::exception& ex) const noexcept { return std::make_pair(Pistache::Http::Code::Internal_Server_Error, ex.what()); } -void DefaultApi::cancel_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { +void DefaultApi::cancel_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { - - try { - this->cancel_post(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_azim_int_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_azim_int_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_azim_int_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param + + - Azim_int_settings azimIntSettings; + + + try { + + + + + + this->cancel_post(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_azim_int_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + - try { - nlohmann::json::parse(request.body()).get_to(azimIntSettings); - azimIntSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - try { - this->config_azim_int_put(azimIntSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + try { + + + + + + this->config_azim_int_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } -} -void DefaultApi::config_dark_mask_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_dark_mask_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } } -void DefaultApi::config_dark_mask_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_azim_int_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { - - // Getting the body param + + // Getting the body param + + Azim_int_settings azimIntSettings; + + + - Dark_mask_settings darkMaskSettings; - - try { - nlohmann::json::parse(request.body()).get_to(darkMaskSettings); - darkMaskSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - try { - this->config_dark_mask_put(darkMaskSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_detector_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_detector_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Detector_settings detectorSettings; - - try { - nlohmann::json::parse(request.body()).get_to(detectorSettings); - detectorSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_detector_put(detectorSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_file_writer_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_file_writer_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_file_writer_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - File_writer_settings fileWriterSettings; - - try { - nlohmann::json::parse(request.body()).get_to(fileWriterSettings); - fileWriterSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_file_writer_put(fileWriterSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_image_format_conversion_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_image_format_conversion_post(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_image_format_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_image_format_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_image_format_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Image_format_settings imageFormatSettings; - - try { - nlohmann::json::parse(request.body()).get_to(imageFormatSettings); - imageFormatSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_image_format_put(imageFormatSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_image_format_raw_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_image_format_raw_post(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_indexing_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_indexing_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_indexing_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Indexing_settings indexingSettings; - - try { - nlohmann::json::parse(request.body()).get_to(indexingSettings); - indexingSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_indexing_put(indexingSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_instrument_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_instrument_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_instrument_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Instrument_metadata instrumentMetadata; - - try { - nlohmann::json::parse(request.body()).get_to(instrumentMetadata); - instrumentMetadata.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_instrument_put(instrumentMetadata, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_internal_generator_image_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - try { - this->config_internal_generator_image_put(request, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_internal_generator_image_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - try { - this->config_internal_generator_image_tiff_put(request, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_mask_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_mask_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_mask_tiff_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_mask_tiff_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_roi_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_roi_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_roi_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Roi_definitions roiDefinitions; - - try { - nlohmann::json::parse(request.body()).get_to(roiDefinitions); - roiDefinitions.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_roi_put(roiDefinitions, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_select_detector_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_select_detector_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_select_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Detector_selection detectorSelection; - - try { - nlohmann::json::parse(request.body()).get_to(detectorSelection); - detectorSelection.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_select_detector_put(detectorSelection, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_spot_finding_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_spot_finding_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_spot_finding_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Spot_finding_settings spotFindingSettings; - - try { - nlohmann::json::parse(request.body()).get_to(spotFindingSettings); - spotFindingSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_spot_finding_put(spotFindingSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_user_mask_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_user_mask_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_user_mask_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - try { - this->config_user_mask_put(request, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_user_mask_tiff_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_user_mask_tiff_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_user_mask_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - try { - this->config_user_mask_tiff_put(request, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_zeromq_metadata_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_zeromq_metadata_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_zeromq_metadata_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Zeromq_metadata_settings zeromqMetadataSettings; - - try { - nlohmann::json::parse(request.body()).get_to(zeromqMetadataSettings); - zeromqMetadataSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_zeromq_metadata_put(zeromqMetadataSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_zeromq_preview_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->config_zeromq_preview_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::config_zeromq_preview_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Zeromq_preview_settings zeromqPreviewSettings; - - try { - nlohmann::json::parse(request.body()).get_to(zeromqPreviewSettings); - zeromqPreviewSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->config_zeromq_preview_put(zeromqPreviewSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::deactivate_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->deactivate_post(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::detector_status_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->detector_status_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::fpga_status_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->fpga_status_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::image_buffer_clear_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->image_buffer_clear_post(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::image_buffer_image_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the query params - auto idQuery = request.query().get("id"); - std::optional id; - if(idQuery.has_value()){ - int64_t valueQuery_instance; - if(fromStringValue(idQuery.value(), valueQuery_instance)){ - id = valueQuery_instance; + try { + nlohmann::json::parse(request.body()).get_to(azimIntSettings); + azimIntSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; } + + try { + + + + + + this->config_azim_int_put(azimIntSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + + +} + +void DefaultApi::config_dark_mask_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + - try { - this->image_buffer_image_cbor_get(id, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + + try { + + + + + + this->config_dark_mask_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + } -void DefaultApi::image_buffer_image_jpeg_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_dark_mask_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { - - // Getting the query params - auto idQuery = request.query().get("id"); - std::optional id; - if(idQuery.has_value()){ - int64_t valueQuery_instance; - if(fromStringValue(idQuery.value(), valueQuery_instance)){ - id = valueQuery_instance; - } - } - auto showUserMaskQuery = request.query().get("show_user_mask"); - std::optional showUserMask; - if(showUserMaskQuery.has_value()){ - bool valueQuery_instance; - if(fromStringValue(showUserMaskQuery.value(), valueQuery_instance)){ - showUserMask = valueQuery_instance; - } - } - auto showRoiQuery = request.query().get("show_roi"); - std::optional showRoi; - if(showRoiQuery.has_value()){ - bool valueQuery_instance; - if(fromStringValue(showRoiQuery.value(), valueQuery_instance)){ - showRoi = valueQuery_instance; - } - } - auto showSpotsQuery = request.query().get("show_spots"); - std::optional showSpots; - if(showSpotsQuery.has_value()){ - bool valueQuery_instance; - if(fromStringValue(showSpotsQuery.value(), valueQuery_instance)){ - showSpots = valueQuery_instance; - } - } - auto showBeamCenterQuery = request.query().get("show_beam_center"); - std::optional showBeamCenter; - if(showBeamCenterQuery.has_value()){ - bool valueQuery_instance; - if(fromStringValue(showBeamCenterQuery.value(), valueQuery_instance)){ - showBeamCenter = valueQuery_instance; - } - } - auto saturationQuery = request.query().get("saturation"); - std::optional saturation; - if(saturationQuery.has_value()){ - float valueQuery_instance; - if(fromStringValue(saturationQuery.value(), valueQuery_instance)){ - saturation = valueQuery_instance; - } - } - auto jpegQualityQuery = request.query().get("jpeg_quality"); - std::optional jpegQuality; - if(jpegQualityQuery.has_value()){ - int64_t valueQuery_instance; - if(fromStringValue(jpegQualityQuery.value(), valueQuery_instance)){ - jpegQuality = valueQuery_instance; - } - } - auto showResRingQuery = request.query().get("show_res_ring"); - std::optional showResRing; - if(showResRingQuery.has_value()){ - float valueQuery_instance; - if(fromStringValue(showResRingQuery.value(), valueQuery_instance)){ - showResRing = valueQuery_instance; - } - } - auto colorQuery = request.query().get("color"); - std::optional color; - if(colorQuery.has_value()){ - std::string valueQuery_instance; - if(fromStringValue(colorQuery.value(), valueQuery_instance)){ - color = valueQuery_instance; - } - } - auto showResEstQuery = request.query().get("show_res_est"); - std::optional showResEst; - if(showResEstQuery.has_value()){ - bool valueQuery_instance; - if(fromStringValue(showResEstQuery.value(), valueQuery_instance)){ - showResEst = valueQuery_instance; - } - } + + // Getting the body param + + Dark_mask_settings darkMaskSettings; + + + - try { - this->image_buffer_image_jpeg_get(id, showUserMask, showRoi, showSpots, showBeamCenter, saturation, jpegQuality, showResRing, color, showResEst, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + try { + nlohmann::json::parse(request.body()).get_to(darkMaskSettings); + darkMaskSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_dark_mask_put(darkMaskSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + } -void DefaultApi::image_buffer_image_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_detector_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { - - // Getting the query params - auto idQuery = request.query().get("id"); - std::optional id; - if(idQuery.has_value()){ - int64_t valueQuery_instance; - if(fromStringValue(idQuery.value(), valueQuery_instance)){ - id = valueQuery_instance; - } - } + + - try { - this->image_buffer_image_tiff_get(id, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + + try { + + + + + + this->config_detector_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } -} -void DefaultApi::image_buffer_start_cbor_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->image_buffer_start_cbor_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } } -void DefaultApi::image_buffer_status_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_detector_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { - - try { - this->image_buffer_status_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::initialize_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->initialize_post(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::pedestal_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->pedestal_post(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::preview_pedestal_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the query params - auto gainLevelQuery = request.query().get("gain_level"); - std::optional gainLevel; - if(gainLevelQuery.has_value()){ - int32_t valueQuery_instance; - if(fromStringValue(gainLevelQuery.value(), valueQuery_instance)){ - gainLevel = valueQuery_instance; - } - } - auto scQuery = request.query().get("sc"); - std::optional sc; - if(scQuery.has_value()){ - int32_t valueQuery_instance; - if(fromStringValue(scQuery.value(), valueQuery_instance)){ - sc = valueQuery_instance; - } - } + + // Getting the body param + + Detector_settings detectorSettings; + + + - try { - this->preview_pedestal_tiff_get(gainLevel, sc, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + try { + nlohmann::json::parse(request.body()).get_to(detectorSettings); + detectorSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_detector_put(detectorSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + } -void DefaultApi::preview_plot_bin_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_file_writer_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { - - // Getting the query params - auto typeQuery = request.query().get("type"); - std::optional type; - if(typeQuery.has_value()){ - std::string valueQuery_instance; - if(fromStringValue(typeQuery.value(), valueQuery_instance)){ - type = valueQuery_instance; - } - } - auto roiQuery = request.query().get("roi"); - std::optional roi; - if(roiQuery.has_value()){ - std::string valueQuery_instance; - if(fromStringValue(roiQuery.value(), valueQuery_instance)){ - roi = valueQuery_instance; - } - } + + - try { - this->preview_plot_bin_get(type, roi, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + + try { + + + + + + this->config_file_writer_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + } -void DefaultApi::preview_plot_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_file_writer_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { - - // Getting the query params - auto binningQuery = request.query().get("binning"); - std::optional binning; - if(binningQuery.has_value()){ - int32_t valueQuery_instance; - if(fromStringValue(binningQuery.value(), valueQuery_instance)){ - binning = valueQuery_instance; - } - } - auto compressionQuery = request.query().get("compression"); - std::optional compression; - if(compressionQuery.has_value()){ - bool valueQuery_instance; - if(fromStringValue(compressionQuery.value(), valueQuery_instance)){ - compression = valueQuery_instance; - } - } - auto typeQuery = request.query().get("type"); - std::optional type; - if(typeQuery.has_value()){ - std::string valueQuery_instance; - if(fromStringValue(typeQuery.value(), valueQuery_instance)){ - type = valueQuery_instance; - } - } - auto fillQuery = request.query().get("fill"); - std::optional fill; - if(fillQuery.has_value()){ - float valueQuery_instance; - if(fromStringValue(fillQuery.value(), valueQuery_instance)){ - fill = valueQuery_instance; - } - } - auto experimentalCoordQuery = request.query().get("experimental_coord"); - std::optional experimentalCoord; - if(experimentalCoordQuery.has_value()){ - bool valueQuery_instance; - if(fromStringValue(experimentalCoordQuery.value(), valueQuery_instance)){ - experimentalCoord = valueQuery_instance; - } - } - auto azintUnitQuery = request.query().get("azint_unit"); - std::optional azintUnit; - if(azintUnitQuery.has_value()){ - std::string valueQuery_instance; - if(fromStringValue(azintUnitQuery.value(), valueQuery_instance)){ - azintUnit = valueQuery_instance; - } - } + + // Getting the body param + + File_writer_settings fileWriterSettings; + + + - try { - this->preview_plot_get(type, binning, compression, fill, experimentalCoord, azintUnit, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::result_scan_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->result_scan_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the body param - - Dataset_settings datasetSettings; - - try { - nlohmann::json::parse(request.body()).get_to(datasetSettings); - datasetSettings.validate(); - } catch (std::exception &e) { - this->handleParsingException(e, response); - return; - } - - try { - this->start_post(datasetSettings, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::statistics_calibration_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->statistics_calibration_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::statistics_data_collection_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->statistics_data_collection_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::statistics_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the query params - auto compressionQuery = request.query().get("compression"); - std::optional compression; - if(compressionQuery.has_value()){ - bool valueQuery_instance; - if(fromStringValue(compressionQuery.value(), valueQuery_instance)){ - compression = valueQuery_instance; + try { + nlohmann::json::parse(request.body()).get_to(fileWriterSettings); + fileWriterSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; } + + try { + + + + + + this->config_file_writer_put(fileWriterSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + + +} + +void DefaultApi::config_image_format_conversion_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + - try { - this->statistics_get(compression, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + + try { + + + + + + this->config_image_format_conversion_post(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + } -void DefaultApi::status_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_image_format_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { + + + - try { - this->status_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + try { + + + + + + this->config_image_format_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } -} -void DefaultApi::trigger_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - try { - - - try { - this->trigger_post(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } } -void DefaultApi::version_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_image_format_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { + + // Getting the body param + + Image_format_settings imageFormatSettings; + + + + - try { - this->version_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } - - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); - } - -} -void DefaultApi::wait_till_done_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - - // Getting the query params - auto timeoutQuery = request.query().get("timeout"); - std::optional timeout; - if(timeoutQuery.has_value()){ - int32_t valueQuery_instance; - if(fromStringValue(timeoutQuery.value(), valueQuery_instance)){ - timeout = valueQuery_instance; + try { + nlohmann::json::parse(request.body()).get_to(imageFormatSettings); + imageFormatSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; } + + try { + + + + + + this->config_image_format_put(imageFormatSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + + +} + +void DefaultApi::config_image_format_raw_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + - try { - this->wait_till_done_post(timeout, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + + try { + + + + + + this->config_image_format_raw_post(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + } -void DefaultApi::xfel_event_code_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_indexing_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { + + + - try { - this->xfel_event_code_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + + try { + + + + + + this->config_indexing_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + } -void DefaultApi::xfel_pulse_id_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { + +void DefaultApi::config_indexing_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { try { + + // Getting the body param + + Indexing_settings indexingSettings; + + + + - try { - this->xfel_pulse_id_get(response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast(e.code()), e.what()); - return; - } catch (std::exception &e) { - this->handleOperationException(e, response); - return; - } + try { + nlohmann::json::parse(request.body()).get_to(indexingSettings); + indexingSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_indexing_put(indexingSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } } catch (std::exception &e) { response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } + } +void DefaultApi::config_instrument_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_instrument_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_instrument_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + // Getting the body param + + Instrument_metadata instrumentMetadata; + + + + + + try { + nlohmann::json::parse(request.body()).get_to(instrumentMetadata); + instrumentMetadata.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_instrument_put(instrumentMetadata, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_internal_generator_image_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + try { + this->config_internal_generator_image_put(request, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_internal_generator_image_tiff_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + try { + this->config_internal_generator_image_tiff_put(request, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_mask_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_mask_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_mask_tiff_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_mask_tiff_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_roi_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_roi_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_roi_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + // Getting the body param + + Roi_definitions roiDefinitions; + + + + + + try { + nlohmann::json::parse(request.body()).get_to(roiDefinitions); + roiDefinitions.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_roi_put(roiDefinitions, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_select_detector_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_select_detector_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_select_detector_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + // Getting the body param + + Detector_selection detectorSelection; + + + + + + try { + nlohmann::json::parse(request.body()).get_to(detectorSelection); + detectorSelection.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_select_detector_put(detectorSelection, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_spot_finding_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_spot_finding_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_spot_finding_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + // Getting the body param + + Spot_finding_settings spotFindingSettings; + + + + + + try { + nlohmann::json::parse(request.body()).get_to(spotFindingSettings); + spotFindingSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_spot_finding_put(spotFindingSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_user_mask_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_user_mask_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_user_mask_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + try { + this->config_user_mask_put(request, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_user_mask_tiff_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_user_mask_tiff_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_user_mask_tiff_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + try { + this->config_user_mask_tiff_put(request, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_zeromq_metadata_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_zeromq_metadata_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_zeromq_metadata_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + // Getting the body param + + Zeromq_metadata_settings zeromqMetadataSettings; + + + + + + try { + nlohmann::json::parse(request.body()).get_to(zeromqMetadataSettings); + zeromqMetadataSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_zeromq_metadata_put(zeromqMetadataSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_zeromq_preview_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->config_zeromq_preview_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::config_zeromq_preview_put_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + // Getting the body param + + Zeromq_preview_settings zeromqPreviewSettings; + + + + + + try { + nlohmann::json::parse(request.body()).get_to(zeromqPreviewSettings); + zeromqPreviewSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->config_zeromq_preview_put(zeromqPreviewSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::deactivate_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->deactivate_post(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::detector_status_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->detector_status_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::fpga_status_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->fpga_status_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::image_buffer_clear_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->image_buffer_clear_post(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::image_buffer_image_cbor_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + // Getting the query params + auto idQuery = request.query().get("id"); + std::optional id; + if (idQuery.has_value()) { + int64_t valueQuery_instance; + if (fromStringValue(idQuery.value(), valueQuery_instance)) { + id = valueQuery_instance; + } + } + + + + try { + + + + + + this->image_buffer_image_cbor_get(id, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::image_buffer_image_jpeg_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + // Getting the query params + auto idQuery = request.query().get("id"); + std::optional id; + if (idQuery.has_value()) { + int64_t valueQuery_instance; + if (fromStringValue(idQuery.value(), valueQuery_instance)) { + id = valueQuery_instance; + } + } + auto showUserMaskQuery = request.query().get("show_user_mask"); + std::optional showUserMask; + if (showUserMaskQuery.has_value()) { + bool valueQuery_instance; + if (fromStringValue(showUserMaskQuery.value(), valueQuery_instance)) { + showUserMask = valueQuery_instance; + } + } + auto showRoiQuery = request.query().get("show_roi"); + std::optional showRoi; + if (showRoiQuery.has_value()) { + bool valueQuery_instance; + if (fromStringValue(showRoiQuery.value(), valueQuery_instance)) { + showRoi = valueQuery_instance; + } + } + auto showSpotsQuery = request.query().get("show_spots"); + std::optional showSpots; + if (showSpotsQuery.has_value()) { + bool valueQuery_instance; + if (fromStringValue(showSpotsQuery.value(), valueQuery_instance)) { + showSpots = valueQuery_instance; + } + } + auto showBeamCenterQuery = request.query().get("show_beam_center"); + std::optional showBeamCenter; + if (showBeamCenterQuery.has_value()) { + bool valueQuery_instance; + if (fromStringValue(showBeamCenterQuery.value(), valueQuery_instance)) { + showBeamCenter = valueQuery_instance; + } + } + auto saturationQuery = request.query().get("saturation"); + std::optional saturation; + if (saturationQuery.has_value()) { + float valueQuery_instance; + if (fromStringValue(saturationQuery.value(), valueQuery_instance)) { + saturation = valueQuery_instance; + } + } + auto jpegQualityQuery = request.query().get("jpeg_quality"); + std::optional jpegQuality; + if (jpegQualityQuery.has_value()) { + int64_t valueQuery_instance; + if (fromStringValue(jpegQualityQuery.value(), valueQuery_instance)) { + jpegQuality = valueQuery_instance; + } + } + auto showResRingQuery = request.query().get("show_res_ring"); + std::optional showResRing; + if (showResRingQuery.has_value()) { + float valueQuery_instance; + if (fromStringValue(showResRingQuery.value(), valueQuery_instance)) { + showResRing = valueQuery_instance; + } + } + auto colorQuery = request.query().get("color"); + std::optional color; + if (colorQuery.has_value()) { + std::string valueQuery_instance; + if (fromStringValue(colorQuery.value(), valueQuery_instance)) { + color = valueQuery_instance; + } + } + auto showResEstQuery = request.query().get("show_res_est"); + std::optional showResEst; + if (showResEstQuery.has_value()) { + bool valueQuery_instance; + if (fromStringValue(showResEstQuery.value(), valueQuery_instance)) { + showResEst = valueQuery_instance; + } + } + + + + try { + + + + + + this->image_buffer_image_jpeg_get(id, showUserMask, showRoi, showSpots, showBeamCenter, saturation, jpegQuality, showResRing, color, showResEst, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::image_buffer_image_tiff_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + // Getting the query params + auto idQuery = request.query().get("id"); + std::optional id; + if (idQuery.has_value()) { + int64_t valueQuery_instance; + if (fromStringValue(idQuery.value(), valueQuery_instance)) { + id = valueQuery_instance; + } + } + + + + try { + + + + + + this->image_buffer_image_tiff_get(id, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::image_buffer_start_cbor_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->image_buffer_start_cbor_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::image_buffer_status_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->image_buffer_status_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::initialize_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->initialize_post(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::pedestal_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->pedestal_post(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::preview_pedestal_tiff_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + // Getting the query params + auto gainLevelQuery = request.query().get("gain_level"); + std::optional gainLevel; + if (gainLevelQuery.has_value()) { + int32_t valueQuery_instance; + if (fromStringValue(gainLevelQuery.value(), valueQuery_instance)) { + gainLevel = valueQuery_instance; + } + } + auto scQuery = request.query().get("sc"); + std::optional sc; + if (scQuery.has_value()) { + int32_t valueQuery_instance; + if (fromStringValue(scQuery.value(), valueQuery_instance)) { + sc = valueQuery_instance; + } + } + + + + try { + + + + + + this->preview_pedestal_tiff_get(gainLevel, sc, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::preview_plot_bin_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + // Getting the query params + auto typeQuery = request.query().get("type"); + std::optional type; + if (typeQuery.has_value()) { + std::string valueQuery_instance; + if (fromStringValue(typeQuery.value(), valueQuery_instance)) { + type = valueQuery_instance; + } + } + auto roiQuery = request.query().get("roi"); + std::optional roi; + if (roiQuery.has_value()) { + std::string valueQuery_instance; + if (fromStringValue(roiQuery.value(), valueQuery_instance)) { + roi = valueQuery_instance; + } + } + + + + try { + + + + + + this->preview_plot_bin_get(type, roi, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::preview_plot_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + // Getting the query params + auto binningQuery = request.query().get("binning"); + std::optional binning; + if (binningQuery.has_value()) { + int32_t valueQuery_instance; + if (fromStringValue(binningQuery.value(), valueQuery_instance)) { + binning = valueQuery_instance; + } + } + auto compressionQuery = request.query().get("compression"); + std::optional compression; + if (compressionQuery.has_value()) { + bool valueQuery_instance; + if (fromStringValue(compressionQuery.value(), valueQuery_instance)) { + compression = valueQuery_instance; + } + } + auto typeQuery = request.query().get("type"); + std::optional type; + if (typeQuery.has_value()) { + std::string valueQuery_instance; + if (fromStringValue(typeQuery.value(), valueQuery_instance)) { + type = valueQuery_instance; + } + } + auto fillQuery = request.query().get("fill"); + std::optional fill; + if (fillQuery.has_value()) { + float valueQuery_instance; + if (fromStringValue(fillQuery.value(), valueQuery_instance)) { + fill = valueQuery_instance; + } + } + auto experimentalCoordQuery = request.query().get("experimental_coord"); + std::optional experimentalCoord; + if (experimentalCoordQuery.has_value()) { + bool valueQuery_instance; + if (fromStringValue(experimentalCoordQuery.value(), valueQuery_instance)) { + experimentalCoord = valueQuery_instance; + } + } + auto azintUnitQuery = request.query().get("azint_unit"); + std::optional azintUnit; + if (azintUnitQuery.has_value()) { + std::string valueQuery_instance; + if (fromStringValue(azintUnitQuery.value(), valueQuery_instance)) { + azintUnit = valueQuery_instance; + } + } + + + + try { + + + + + + this->preview_plot_get(type, binning, compression, fill, experimentalCoord, azintUnit, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::result_scan_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->result_scan_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::start_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + // Getting the body param + + Dataset_settings datasetSettings; + + + + + + try { + nlohmann::json::parse(request.body()).get_to(datasetSettings); + datasetSettings.validate(); + } catch (std::exception& e) { + this->handleParsingException(e, response); + return; + } + + try { + + + + + + this->start_post(datasetSettings, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::statistics_calibration_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->statistics_calibration_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::statistics_data_collection_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->statistics_data_collection_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::statistics_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + // Getting the query params + auto compressionQuery = request.query().get("compression"); + std::optional compression; + if (compressionQuery.has_value()) { + bool valueQuery_instance; + if (fromStringValue(compressionQuery.value(), valueQuery_instance)) { + compression = valueQuery_instance; + } + } + + + + try { + + + + + + this->statistics_get(compression, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::status_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->status_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::trigger_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->trigger_post(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::version_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->version_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::wait_till_done_post_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + // Getting the query params + auto timeoutQuery = request.query().get("timeout"); + std::optional timeout; + if (timeoutQuery.has_value()) { + int32_t valueQuery_instance; + if (fromStringValue(timeoutQuery.value(), valueQuery_instance)) { + timeout = valueQuery_instance; + } + } + + + + try { + + + + + + this->wait_till_done_post(timeout, response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::xfel_event_code_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->xfel_event_code_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + +void DefaultApi::xfel_pulse_id_get_handler(const Pistache::Rest::Request& request, Pistache::Http::ResponseWriter response) { + try { + + + + + + + try { + + + + + + this->xfel_pulse_id_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + this->handleOperationException(e, response); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + + +} + + void DefaultApi::default_api_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); } diff --git a/broker/gen/api/DefaultApi.h b/broker/gen/api/DefaultApi.h index e37dfcda..983cf838 100644 --- a/broker/gen/api/DefaultApi.h +++ b/broker/gen/api/DefaultApi.h @@ -165,14 +165,14 @@ private: /// /// Command will inform FPGA network card to stop pedestal or data collection at the current stage. Any frame that is currently being processed by CPU will be finished and sent to writer. Given the command is making sure to gracefully stop data acquisition and detector, it might take some time to switch back after command finished to `Idle` state. If data collection is not running, the command has no effect. /// - virtual void cancel_post(Pistache::Http::ResponseWriter &response) = 0; + virtual void cancel_post( Pistache::Http::ResponseWriter &response) = 0; /// /// Get azimuthal integration configuration /// /// /// Can be done anytime /// - virtual void config_azim_int_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_azim_int_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Configure azimuthal integration /// @@ -180,14 +180,14 @@ private: /// Can be done when detector is Inactive or Idle /// /// (optional) - virtual void config_azim_int_put(const org::openapitools::server::model::Azim_int_settings &azimIntSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_azim_int_put( const org::openapitools::server::model::Azim_int_settings &azimIntSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Get settings for dark data collection to calculate mask /// /// /// /// - virtual void config_dark_mask_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_dark_mask_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Set configuration for dark data collection to calculate mask /// @@ -195,14 +195,14 @@ private: /// This is only possible when operating DECTRIS detectors at the moment; it will be also available for PSI EIGER at some point. This can only be done when detector is `Idle`, `Error` or `Inactive` states. /// /// (optional) - virtual void config_dark_mask_put(const org::openapitools::server::model::Dark_mask_settings &darkMaskSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_dark_mask_put( const org::openapitools::server::model::Dark_mask_settings &darkMaskSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Get detector configuration /// /// /// Can be done anytime /// - virtual void config_detector_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_detector_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Change detector configuration /// @@ -210,14 +210,14 @@ private: /// Detector settings are ones that have effect on calibration, i.e., pedestal has to be collected again after changing these settings. This can only be done when detector is `Idle`, `Error` or `Inactive` states. If detector is in `Idle` state , pedestal procedure will be executed automatically - there must be no X-rays on the detector during the operation. If detector is in `Inactive` or `Error` states, new settings will be saved, but no calibration will be executed. /// /// (optional) - virtual void config_detector_put(const org::openapitools::server::model::Detector_settings &detectorSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_detector_put( const org::openapitools::server::model::Detector_settings &detectorSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Get file writer settings /// /// /// Can be done anytime /// - virtual void config_file_writer_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_file_writer_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Change file writer settings /// @@ -225,21 +225,21 @@ private: /// This can only be done when detector is `Idle`, `Error` or `Inactive` states. /// /// (optional) - virtual void config_file_writer_put(const org::openapitools::server::model::File_writer_settings &fileWriterSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_file_writer_put( const org::openapitools::server::model::File_writer_settings &fileWriterSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Configure format for data collection with full conversion /// /// /// This can only be done when detector is `Idle`, `Error` or `Inactive` states. /// - virtual void config_image_format_conversion_post(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_image_format_conversion_post( Pistache::Http::ResponseWriter &response) = 0; /// /// Get image output format /// /// /// Can be done anytime /// - virtual void config_image_format_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_image_format_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Change image output format /// @@ -247,21 +247,21 @@ private: /// This can only be done when detector is `Idle`, `Error` or `Inactive` states. /// /// (optional) - virtual void config_image_format_put(const org::openapitools::server::model::Image_format_settings &imageFormatSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_image_format_put( const org::openapitools::server::model::Image_format_settings &imageFormatSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Configure format for raw data collection /// /// /// This can only be done when detector is `Idle`, `Error` or `Inactive` states. /// - virtual void config_image_format_raw_post(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_image_format_raw_post( Pistache::Http::ResponseWriter &response) = 0; /// /// Get indexing configuration /// /// /// Can be done anytime /// - virtual void config_indexing_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_indexing_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Change indexing algorithm settings /// @@ -269,14 +269,14 @@ private: /// This can only be done when detector is `Idle`, `Error` or `Inactive` states. /// /// (optional) - virtual void config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_indexing_put( const org::openapitools::server::model::Indexing_settings &indexingSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Get instrument metadata /// /// /// Can be done anytime /// - virtual void config_instrument_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_instrument_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Change instrument metadata /// @@ -284,7 +284,7 @@ private: /// This can only be done when detector is `Idle`, `Error` or `Inactive` states. /// /// (optional) - virtual void config_instrument_put(const org::openapitools::server::model::Instrument_metadata &instrumentMetadata, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_instrument_put( const org::openapitools::server::model::Instrument_metadata &instrumentMetadata, Pistache::Http::ResponseWriter &response) = 0; /// /// Load binary image for internal FPGA generator /// @@ -305,21 +305,21 @@ private: /// /// Detector must be Initialized. Get full pixel mask of the detector. See NXmx standard for meaning of pixel values. /// - virtual void config_mask_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_mask_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Get mask of the detector (TIFF) /// /// /// Should be in `Idle` state. Get full pixel mask of the detector See NXmx standard for meaning of pixel values /// - virtual void config_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_mask_tiff_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Get ROI definitions /// /// /// /// - virtual void config_roi_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_roi_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Upload ROI definitions /// @@ -327,14 +327,14 @@ private: /// /// /// (optional) - virtual void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_roi_put( const org::openapitools::server::model::Roi_definitions &roiDefinitions, Pistache::Http::ResponseWriter &response) = 0; /// /// List available detectors /// /// /// Configured detectors that can be selected by used /// - virtual void config_select_detector_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_select_detector_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Select detector /// @@ -342,14 +342,14 @@ private: /// Jungfraujoch allows to control multiple detectors and/or region-of-interests. The command allows to choose one detector from the list (ID has to be consistent with one provided by GET response). Changing detector will set detector to `Inactive` state and will require reinitialization. /// /// (optional) - virtual void config_select_detector_put(const org::openapitools::server::model::Detector_selection &detectorSelection, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_select_detector_put( const org::openapitools::server::model::Detector_selection &detectorSelection, Pistache::Http::ResponseWriter &response) = 0; /// /// Get data processing configuration /// /// /// Can be done anytime /// - virtual void config_spot_finding_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_spot_finding_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Configure spot finding /// @@ -357,14 +357,14 @@ private: /// Can be done anytime, also while data collection is running /// /// (optional) - virtual void config_spot_finding_put(const org::openapitools::server::model::Spot_finding_settings &spotFindingSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_spot_finding_put( const org::openapitools::server::model::Spot_finding_settings &spotFindingSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Detector must be Initialized. Get user mask of the detector (binary) /// /// /// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked /// - virtual void config_user_mask_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_user_mask_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Upload user mask of the detector (binary) /// @@ -378,7 +378,7 @@ private: /// /// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked /// - virtual void config_user_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_user_mask_tiff_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Upload user mask of the detector /// @@ -392,7 +392,7 @@ private: /// /// /// - virtual void config_zeromq_metadata_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_zeromq_metadata_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Set ZeroMQ metadata settings /// @@ -400,14 +400,14 @@ private: /// Jungfraujoch can generate metadata message stream on ZeroMQ PUB socket. This stream covers all images. Here settings of the socket can be adjusted. While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request. /// /// (optional) - virtual void config_zeromq_metadata_put(const org::openapitools::server::model::Zeromq_metadata_settings &zeromqMetadataSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_zeromq_metadata_put( const org::openapitools::server::model::Zeromq_metadata_settings &zeromqMetadataSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Get ZeroMQ preview settings /// /// /// /// - virtual void config_zeromq_preview_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void config_zeromq_preview_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Set ZeroMQ preview settings /// @@ -415,35 +415,35 @@ private: /// Jungfraujoch can generate preview message stream on ZeroMQ SUB socket. Here settings of the socket can be adjusted. While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request. Options set with this PUT request have no effect on HTTP based preview. /// /// (optional) - virtual void config_zeromq_preview_put(const org::openapitools::server::model::Zeromq_preview_settings &zeromqPreviewSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void config_zeromq_preview_put( const org::openapitools::server::model::Zeromq_preview_settings &zeromqPreviewSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Prepare detector to turn off /// /// /// Should be in `Idle` or `Error` state. Command deactivates data acquisition and turns off detector high voltage and ASIC. Should be used always before turning off power from the detector. /// - virtual void deactivate_post(Pistache::Http::ResponseWriter &response) = 0; + virtual void deactivate_post( Pistache::Http::ResponseWriter &response) = 0; /// /// Get detector status /// /// /// Status of the JUNGFRAU detector /// - virtual void detector_status_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void detector_status_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Get status of FPGA devices /// /// /// /// - virtual void fpga_status_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void fpga_status_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Clear image buffer /// /// /// Turns off image buffer for the last data collection. Can be only run when Jungfraujoch is not collecting data. /// - virtual void image_buffer_clear_post(Pistache::Http::ResponseWriter &response) = 0; + virtual void image_buffer_clear_post( Pistache::Http::ResponseWriter &response) = 0; /// /// Get image message in CBOR format /// @@ -451,7 +451,7 @@ private: /// Contains full image data and metadata. The image must come from the latest data collection. /// /// Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L) - virtual void image_buffer_image_cbor_get(const std::optional &id, Pistache::Http::ResponseWriter &response) = 0; + virtual void image_buffer_image_cbor_get( const std::optional &id, Pistache::Http::ResponseWriter &response) = 0; /// /// Get preview image in JPEG format using custom settings /// @@ -468,7 +468,7 @@ private: /// Show resolution ring, provided in Angstrom (optional, default to 0.1f) /// Color scale for preview image (optional, default to "indigo") /// Show resolution estimation as a ring (optional, default to false) - virtual void image_buffer_image_jpeg_get(const std::optional &id, const std::optional &showUserMask, const std::optional &showRoi, const std::optional &showSpots, const std::optional &showBeamCenter, const std::optional &saturation, const std::optional &jpegQuality, const std::optional &showResRing, const std::optional &color, const std::optional &showResEst, Pistache::Http::ResponseWriter &response) = 0; + virtual void image_buffer_image_jpeg_get( const std::optional &id, const std::optional &showUserMask, const std::optional &showRoi, const std::optional &showSpots, const std::optional &showBeamCenter, const std::optional &saturation, const std::optional &jpegQuality, const std::optional &showResRing, const std::optional &color, const std::optional &showResEst, Pistache::Http::ResponseWriter &response) = 0; /// /// Get preview image in TIFF format /// @@ -476,35 +476,35 @@ private: /// /// /// Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L) - virtual void image_buffer_image_tiff_get(const std::optional &id, Pistache::Http::ResponseWriter &response) = 0; + virtual void image_buffer_image_tiff_get( const std::optional &id, Pistache::Http::ResponseWriter &response) = 0; /// /// Get Start message in CBOR format /// /// /// Contains metadata for a dataset (e.g., experimental geometry) /// - virtual void image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void image_buffer_start_cbor_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Get status of the image buffers /// /// /// Can be run at any stage of Jungfraujoch operation, including during data collection. The status of the image buffer is volatile during data collection - if data collection goes for more images than available buffer slots, then image might be replaced in the buffer between calling /images and /image.cbor. /// - virtual void image_buffer_status_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void image_buffer_status_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Initialize detector and data acquisition /// /// /// Should be used in two cases: - Detector is in `Inactive` state - Detector is in `Error` state X-ray shutter must be closed. This operation will reconfigure network interface of the detector. During operation of the detector it is recommended to use the `POST /pedestal` operation instead. If storage cells are used, the execution time might be few minutes. This is async function - one needs to use `POST /wait_till_done` to ensure operation is done. /// - virtual void initialize_post(Pistache::Http::ResponseWriter &response) = 0; + virtual void initialize_post( Pistache::Http::ResponseWriter &response) = 0; /// /// Collect dark current for the detector /// /// /// Updates calibration of the JUNGFRAU detector. Must be in `Idle` state. X-ray shutter must be closed. Recommended to run once per hour for long integration times (> 100 us). This is async function - one needs to use `POST /wait_till_done` to ensure operation is done. /// - virtual void pedestal_post(Pistache::Http::ResponseWriter &response) = 0; + virtual void pedestal_post( Pistache::Http::ResponseWriter &response) = 0; /// /// Get pedestal in TIFF format /// @@ -513,7 +513,7 @@ private: /// /// Gain level (0, 1, 2) /// Storage cell number (optional, default to 0) - virtual void preview_pedestal_tiff_get(const std::optional &gainLevel, const std::optional &sc, Pistache::Http::ResponseWriter &response) = 0; + virtual void preview_pedestal_tiff_get( const std::optional &gainLevel, const std::optional &sc, Pistache::Http::ResponseWriter &response) = 0; /// /// Generate 1D plot from Jungfraujoch and send in raw binary format. Data are provided as (32-bit) float binary array. This format doesn't transmit information about X-axis, only values, so it is of limited use for azimuthal integration. /// @@ -522,7 +522,7 @@ private: /// /// Type of requested plot /// Name of ROI for which plot is requested (optional, default to "") - virtual void preview_plot_bin_get(const std::optional &type, const std::optional &roi, Pistache::Http::ResponseWriter &response) = 0; + virtual void preview_plot_bin_get( const std::optional &type, const std::optional &roi, Pistache::Http::ResponseWriter &response) = 0; /// /// Generate 1D plot from Jungfraujoch /// @@ -535,14 +535,14 @@ private: /// Fill value for elements that were missed during data collection (optional, default to 0.0f) /// If measurement has goniometer axis defined, plot X-axis will represent rotation angle If measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value For still measurement the number is ignored (optional, default to false) /// Unit used for azim int. (optional, default to "Q_recipA") - virtual void preview_plot_get(const std::optional &type, const std::optional &binning, const std::optional &compression, const std::optional &fill, const std::optional &experimentalCoord, const std::optional &azintUnit, Pistache::Http::ResponseWriter &response) = 0; + virtual void preview_plot_get( const std::optional &type, const std::optional &binning, const std::optional &compression, const std::optional &fill, const std::optional &experimentalCoord, const std::optional &azintUnit, Pistache::Http::ResponseWriter &response) = 0; /// /// Get full scan result /// /// /// /// - virtual void result_scan_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void result_scan_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Start detector /// @@ -550,21 +550,21 @@ private: /// Start data acquisition. Detector must be in `Idle` state. Doesn't run calibration procedure. When the function returns, detector is ready to accept soft/TTL triggers. /// /// (optional) - virtual void start_post(const org::openapitools::server::model::Dataset_settings &datasetSettings, Pistache::Http::ResponseWriter &response) = 0; + virtual void start_post( const org::openapitools::server::model::Dataset_settings &datasetSettings, Pistache::Http::ResponseWriter &response) = 0; /// /// Get calibration statistics /// /// /// Statistics are provided for each module/storage cell separately /// - virtual void statistics_calibration_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void statistics_calibration_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Get data collection statistics /// /// /// Results of the last data collection /// - virtual void statistics_data_collection_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void statistics_data_collection_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Get general statistics /// @@ -572,28 +572,28 @@ private: /// /// /// Enable DEFLATE compression of output data. (optional, default to false) - virtual void statistics_get(const std::optional &compression, Pistache::Http::ResponseWriter &response) = 0; + virtual void statistics_get( const std::optional &compression, Pistache::Http::ResponseWriter &response) = 0; /// /// Get Jungfraujoch status /// /// /// Status of the data acquisition /// - virtual void status_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void status_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Send soft trigger to the detector /// /// /// Generate soft trigger /// - virtual void trigger_post(Pistache::Http::ResponseWriter &response) = 0; + virtual void trigger_post( Pistache::Http::ResponseWriter &response) = 0; /// /// Get Jungfraujoch version of jfjoch_broker /// /// /// /// - virtual void version_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void version_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Wait for acquisition done /// @@ -601,21 +601,21 @@ private: /// Block execution of external script till initialization, data collection or pedestal is finished. Running this command does not affect (cancel) running data collection, it is only to ensure synchronous execution of other software. To not block web server for a indefinite period of time, the procedure is provided with a timeout. Extending timeout is possible, but requires to ensure safety that client will not close the connection and retry the connection. /// /// Timeout in seconds (0 == immediate response) (optional, default to 60) - virtual void wait_till_done_post(const std::optional &timeout, Pistache::Http::ResponseWriter &response) = 0; + virtual void wait_till_done_post( const std::optional &timeout, Pistache::Http::ResponseWriter &response) = 0; /// /// Return XFEL event codes for the current data acquisition /// /// /// Return array of XFEL event codes /// - virtual void xfel_event_code_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void xfel_event_code_get( Pistache::Http::ResponseWriter &response) = 0; /// /// Return XFEL pulse IDs for the current data acquisition /// /// /// Return array of XFEL pulse IDs - (-1) if image not recorded /// - virtual void xfel_pulse_id_get(Pistache::Http::ResponseWriter &response) = 0; + virtual void xfel_pulse_id_get( Pistache::Http::ResponseWriter &response) = 0; }; diff --git a/broker/gen/model/Helpers.h b/broker/gen/model/Helpers.h index 7fe6abfb..907a557f 100644 --- a/broker/gen/model/Helpers.h +++ b/broker/gen/model/Helpers.h @@ -18,12 +18,13 @@ #ifndef Helpers_H_ #define Helpers_H_ +#include #include -#include -#include -#include #include #include +#include +#include +#include namespace org::openapitools::server::helpers { diff --git a/docs/python_client/README.md b/docs/python_client/README.md index 57736bc2..91b8b019 100644 --- a/docs/python_client/README.md +++ b/docs/python_client/README.md @@ -24,12 +24,12 @@ This Python package is automatically generated by the [OpenAPI Generator](https: - API version: 1.0.0-rc.124 - Package version: 1.0.0-rc.124 -- Generator version: 7.8.0 +- Generator version: 7.20.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. -Python 3.7+ +Python 3.9+ ## Installation & Usage ### pip install diff --git a/docs/python_client/docs/DefaultApi.md b/docs/python_client/docs/DefaultApi.md index c54db9ef..fdcc7ef4 100644 --- a/docs/python_client/docs/DefaultApi.md +++ b/docs/python_client/docs/DefaultApi.md @@ -71,7 +71,12 @@ Method | HTTP request | Description Cancel running data collection -Command will inform FPGA network card to stop pedestal or data collection at the current stage. Any frame that is currently being processed by CPU will be finished and sent to writer. Given the command is making sure to gracefully stop data acquisition and detector, it might take some time to switch back after command finished to `Idle` state. If data collection is not running, the command has no effect. +Command will inform FPGA network card to stop pedestal or data collection at the current stage. +Any frame that is currently being processed by CPU will be finished and sent to writer. +Given the command is making sure to gracefully stop data acquisition and detector, it might take some time to switch back after command finished to `Idle` state. + +If data collection is not running, the command has no effect. + ### Example @@ -326,7 +331,9 @@ No authorization required Set configuration for dark data collection to calculate mask -This is only possible when operating DECTRIS detectors at the moment; it will be also available for PSI EIGER at some point. This can only be done when detector is `Idle`, `Error` or `Inactive` states. +This is only possible when operating DECTRIS detectors at the moment; it will be also available for PSI EIGER at some point. +This can only be done when detector is `Idle`, `Error` or `Inactive` states. + ### Example @@ -458,7 +465,11 @@ No authorization required Change detector configuration -Detector settings are ones that have effect on calibration, i.e., pedestal has to be collected again after changing these settings. This can only be done when detector is `Idle`, `Error` or `Inactive` states. If detector is in `Idle` state , pedestal procedure will be executed automatically - there must be no X-rays on the detector during the operation. If detector is in `Inactive` or `Error` states, new settings will be saved, but no calibration will be executed. +Detector settings are ones that have effect on calibration, i.e., pedestal has to be collected again after changing these settings. +This can only be done when detector is `Idle`, `Error` or `Inactive` states. +If detector is in `Idle` state , pedestal procedure will be executed automatically - there must be no X-rays on the detector during the operation. +If detector is in `Inactive` or `Error` states, new settings will be saved, but no calibration will be executed. + ### Example @@ -590,7 +601,8 @@ No authorization required Change file writer settings -This can only be done when detector is `Idle`, `Error` or `Inactive` states. +This can only be done when detector is `Idle`, `Error` or `Inactive` states. + ### Example @@ -658,7 +670,8 @@ No authorization required Configure format for data collection with full conversion -This can only be done when detector is `Idle`, `Error` or `Inactive` states. +This can only be done when detector is `Idle`, `Error` or `Inactive` states. + ### Example @@ -784,7 +797,8 @@ No authorization required Change image output format -This can only be done when detector is `Idle`, `Error` or `Inactive` states. +This can only be done when detector is `Idle`, `Error` or `Inactive` states. + ### Example @@ -852,7 +866,8 @@ No authorization required Configure format for raw data collection -This can only be done when detector is `Idle`, `Error` or `Inactive` states. +This can only be done when detector is `Idle`, `Error` or `Inactive` states. + ### Example @@ -978,7 +993,8 @@ No authorization required Change indexing algorithm settings -This can only be done when detector is `Idle`, `Error` or `Inactive` states. +This can only be done when detector is `Idle`, `Error` or `Inactive` states. + ### Example @@ -1110,7 +1126,8 @@ No authorization required Change instrument metadata -This can only be done when detector is `Idle`, `Error` or `Inactive` states. +This can only be done when detector is `Idle`, `Error` or `Inactive` states. + ### Example @@ -1178,7 +1195,10 @@ No authorization required Load binary image for internal FPGA generator -Load image for internal FPGA generator. This can only happen in Idle state of the detector. Requires binary blob with 16-bit integer numbers of size of detector in raw/converted coordinates (depending on detector settings). +Load image for internal FPGA generator. This can only happen in Idle state of the detector. +Requires binary blob with 16-bit integer numbers of size of detector in raw/converted coordinates +(depending on detector settings). + ### Example @@ -1246,7 +1266,10 @@ No authorization required Load TIFF image for internal FPGA generator -Load image for internal FPGA generator. This can only happen in Idle state of the detector. Requires TIFF with 16-bit integer numbers of size of detector in raw/converted coordinates (depending on detector settings). +Load image for internal FPGA generator. This can only happen in Idle state of the detector. +Requires TIFF with 16-bit integer numbers of size of detector in raw/converted coordinates +(depending on detector settings). + ### Example @@ -1314,7 +1337,10 @@ No authorization required Get mask of the detector (binary) -Detector must be Initialized. Get full pixel mask of the detector. See NXmx standard for meaning of pixel values. +Detector must be Initialized. +Get full pixel mask of the detector. +See NXmx standard for meaning of pixel values. + ### Example @@ -1377,7 +1403,10 @@ No authorization required Get mask of the detector (TIFF) -Should be in `Idle` state. Get full pixel mask of the detector See NXmx standard for meaning of pixel values +Should be in `Idle` state. +Get full pixel mask of the detector +See NXmx standard for meaning of pixel values + ### Example @@ -1632,7 +1661,10 @@ No authorization required Select detector -Jungfraujoch allows to control multiple detectors and/or region-of-interests. The command allows to choose one detector from the list (ID has to be consistent with one provided by GET response). Changing detector will set detector to `Inactive` state and will require reinitialization. +Jungfraujoch allows to control multiple detectors and/or region-of-interests. +The command allows to choose one detector from the list (ID has to be consistent with one provided by GET response). +Changing detector will set detector to `Inactive` state and will require reinitialization. + ### Example @@ -1894,7 +1926,14 @@ No authorization required Upload user mask of the detector (binary) -Should be in `Idle` state. Upload user mask of the detector - this is for example to account for beam stop shadow or misbehaving regions. If detector is conversion mode the mask can be both in raw (1024x512; stacked modules) or converted coordinates. In the latter case - module gaps are ignored and don't need to be assigned value. Mask is expected as binary array (4-byte; unsigned). 0 - good pixel, other value - masked User mask is stored in NXmx pixel mask (bit 8), as well as used in spot finding and azimuthal integration. +Should be in `Idle` state. +Upload user mask of the detector - this is for example to account for beam stop shadow or misbehaving regions. +If detector is conversion mode the mask can be both in raw (1024x512; stacked modules) or converted coordinates. +In the latter case - module gaps are ignored and don't need to be assigned value. +Mask is expected as binary array (4-byte; unsigned). +0 - good pixel, other value - masked +User mask is stored in NXmx pixel mask (bit 8), as well as used in spot finding and azimuthal integration. + ### Example @@ -2023,7 +2062,15 @@ No authorization required Upload user mask of the detector -Should be in `Idle` state. Upload user mask of the detector - this is for example to account for beam stop shadow or misbehaving regions. If detector is conversion mode the mask can be both in raw (1024x512; stacked modules) or converted coordinates. In the latter case - module gaps are ignored and don't need to be assigned value. Mask is expected as TIFF (4-byte; unsigned). 0 - good pixel, other value - masked User mask is stored in NXmx pixel mask (bit 8), as well as used in spot finding and azimuthal integration. User mask is not automatically applied - i.e. pixels with user mask will have a valid pixel value in the images. +Should be in `Idle` state. +Upload user mask of the detector - this is for example to account for beam stop shadow or misbehaving regions. +If detector is conversion mode the mask can be both in raw (1024x512; stacked modules) or converted coordinates. +In the latter case - module gaps are ignored and don't need to be assigned value. +Mask is expected as TIFF (4-byte; unsigned). +0 - good pixel, other value - masked +User mask is stored in NXmx pixel mask (bit 8), as well as used in spot finding and azimuthal integration. +User mask is not automatically applied - i.e. pixels with user mask will have a valid pixel value in the images. + ### Example @@ -2151,7 +2198,10 @@ No authorization required Set ZeroMQ metadata settings -Jungfraujoch can generate metadata message stream on ZeroMQ PUB socket. This stream covers all images. Here settings of the socket can be adjusted. While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request. +Jungfraujoch can generate metadata message stream on ZeroMQ PUB socket. This stream covers all images. +Here settings of the socket can be adjusted. +While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request. + ### Example @@ -2281,7 +2331,11 @@ No authorization required Set ZeroMQ preview settings -Jungfraujoch can generate preview message stream on ZeroMQ SUB socket. Here settings of the socket can be adjusted. While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request. Options set with this PUT request have no effect on HTTP based preview. +Jungfraujoch can generate preview message stream on ZeroMQ SUB socket. +Here settings of the socket can be adjusted. +While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request. +Options set with this PUT request have no effect on HTTP based preview. + ### Example @@ -2349,7 +2403,10 @@ No authorization required Prepare detector to turn off -Should be in `Idle` or `Error` state. Command deactivates data acquisition and turns off detector high voltage and ASIC. Should be used always before turning off power from the detector. +Should be in `Idle` or `Error` state. +Command deactivates data acquisition and turns off detector high voltage and ASIC. +Should be used always before turning off power from the detector. + ### Example @@ -2887,7 +2944,10 @@ No authorization required Get status of the image buffers -Can be run at any stage of Jungfraujoch operation, including during data collection. The status of the image buffer is volatile during data collection - if data collection goes for more images than available buffer slots, then image might be replaced in the buffer between calling /images and /image.cbor. +Can be run at any stage of Jungfraujoch operation, including during data collection. +The status of the image buffer is volatile during data collection - if data collection goes for more images than available buffer slots, +then image might be replaced in the buffer between calling /images and /image.cbor. + ### Example @@ -2952,7 +3012,16 @@ No authorization required Initialize detector and data acquisition -Should be used in two cases: - Detector is in `Inactive` state - Detector is in `Error` state X-ray shutter must be closed. This operation will reconfigure network interface of the detector. During operation of the detector it is recommended to use the `POST /pedestal` operation instead. If storage cells are used, the execution time might be few minutes. This is async function - one needs to use `POST /wait_till_done` to ensure operation is done. +Should be used in two cases: + - Detector is in `Inactive` state + - Detector is in `Error` state +X-ray shutter must be closed. +This operation will reconfigure network interface of the detector. +During operation of the detector it is recommended to use the `POST /pedestal` operation instead. +If storage cells are used, the execution time might be few minutes. + +This is async function - one needs to use `POST /wait_till_done` to ensure operation is done. + ### Example @@ -3014,7 +3083,12 @@ No authorization required Collect dark current for the detector -Updates calibration of the JUNGFRAU detector. Must be in `Idle` state. X-ray shutter must be closed. Recommended to run once per hour for long integration times (> 100 us). This is async function - one needs to use `POST /wait_till_done` to ensure operation is done. +Updates calibration of the JUNGFRAU detector. Must be in `Idle` state. + +X-ray shutter must be closed. Recommended to run once per hour for long integration times (> 100 us). + +This is async function - one needs to use `POST /wait_till_done` to ensure operation is done. + ### Example @@ -3353,7 +3427,11 @@ No authorization required Start detector -Start data acquisition. Detector must be in `Idle` state. Doesn't run calibration procedure. When the function returns, detector is ready to accept soft/TTL triggers. +Start data acquisition. +Detector must be in `Idle` state. +Doesn't run calibration procedure. +When the function returns, detector is ready to accept soft/TTL triggers. + ### Example @@ -3802,7 +3880,12 @@ No authorization required Wait for acquisition done -Block execution of external script till initialization, data collection or pedestal is finished. Running this command does not affect (cancel) running data collection, it is only to ensure synchronous execution of other software. To not block web server for a indefinite period of time, the procedure is provided with a timeout. Extending timeout is possible, but requires to ensure safety that client will not close the connection and retry the connection. +Block execution of external script till initialization, data collection or pedestal is finished. +Running this command does not affect (cancel) running data collection, it is only to ensure synchronous execution of other software. + +To not block web server for a indefinite period of time, the procedure is provided with a timeout. +Extending timeout is possible, but requires to ensure safety that client will not close the connection and retry the connection. + ### Example diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 83908720..ef76b27e 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "jungfraujoch-frontend", - "version": "1.0.0-rc.123", + "version": "1.0.0-rc.124", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "jungfraujoch-frontend", - "version": "1.0.0-rc.123", + "version": "1.0.0-rc.124", "license": "GPL-3.0", "dependencies": { "@emotion/react": "^11.10.4", diff --git a/gen_python_client.sh b/gen_python_client.sh index 63307335..87492a55 100644 --- a/gen_python_client.sh +++ b/gen_python_client.sh @@ -3,7 +3,7 @@ mkdir -p dist VERSION=$( Date: Wed, 18 Feb 2026 14:48:47 +0100 Subject: [PATCH 77/81] VERSION: 1.0.0-rc.125 --- VERSION | 2 +- broker/gen/api/ApiBase.cpp | 2 +- broker/gen/api/ApiBase.h | 2 +- broker/gen/api/DefaultApi.cpp | 2 +- broker/gen/api/DefaultApi.h | 2 +- broker/gen/model/Azim_int_settings.cpp | 2 +- broker/gen/model/Azim_int_settings.h | 2 +- broker/gen/model/Broker_status.cpp | 2 +- broker/gen/model/Broker_status.h | 2 +- broker/gen/model/Calibration_statistics_inner.cpp | 2 +- broker/gen/model/Calibration_statistics_inner.h | 2 +- broker/gen/model/Dark_mask_settings.cpp | 2 +- broker/gen/model/Dark_mask_settings.h | 2 +- broker/gen/model/Dataset_settings.cpp | 2 +- broker/gen/model/Dataset_settings.h | 2 +- .../gen/model/Dataset_settings_xray_fluorescence_spectrum.cpp | 2 +- .../gen/model/Dataset_settings_xray_fluorescence_spectrum.h | 2 +- broker/gen/model/Detector.cpp | 2 +- broker/gen/model/Detector.h | 2 +- broker/gen/model/Detector_list.cpp | 2 +- broker/gen/model/Detector_list.h | 2 +- broker/gen/model/Detector_list_element.cpp | 2 +- broker/gen/model/Detector_list_element.h | 2 +- broker/gen/model/Detector_module.cpp | 2 +- broker/gen/model/Detector_module.h | 2 +- broker/gen/model/Detector_module_direction.cpp | 2 +- broker/gen/model/Detector_module_direction.h | 2 +- broker/gen/model/Detector_power_state.cpp | 2 +- broker/gen/model/Detector_power_state.h | 2 +- broker/gen/model/Detector_selection.cpp | 2 +- broker/gen/model/Detector_selection.h | 2 +- broker/gen/model/Detector_settings.cpp | 2 +- broker/gen/model/Detector_settings.h | 2 +- broker/gen/model/Detector_state.cpp | 2 +- broker/gen/model/Detector_state.h | 2 +- broker/gen/model/Detector_status.cpp | 2 +- broker/gen/model/Detector_status.h | 2 +- broker/gen/model/Detector_timing.cpp | 2 +- broker/gen/model/Detector_timing.h | 2 +- broker/gen/model/Detector_type.cpp | 2 +- broker/gen/model/Detector_type.h | 2 +- broker/gen/model/Error_message.cpp | 2 +- broker/gen/model/Error_message.h | 2 +- broker/gen/model/File_writer_format.cpp | 2 +- broker/gen/model/File_writer_format.h | 2 +- broker/gen/model/File_writer_settings.cpp | 2 +- broker/gen/model/File_writer_settings.h | 2 +- broker/gen/model/Fpga_status_inner.cpp | 2 +- broker/gen/model/Fpga_status_inner.h | 2 +- broker/gen/model/Geom_refinement_algorithm.cpp | 2 +- broker/gen/model/Geom_refinement_algorithm.h | 2 +- broker/gen/model/Grid_scan.cpp | 2 +- broker/gen/model/Grid_scan.h | 2 +- broker/gen/model/Helpers.cpp | 2 +- broker/gen/model/Helpers.h | 2 +- broker/gen/model/Image_buffer_status.cpp | 2 +- broker/gen/model/Image_buffer_status.h | 2 +- broker/gen/model/Image_format_settings.cpp | 2 +- broker/gen/model/Image_format_settings.h | 2 +- broker/gen/model/Image_pusher_type.cpp | 2 +- broker/gen/model/Image_pusher_type.h | 2 +- broker/gen/model/Indexing_algorithm.cpp | 2 +- broker/gen/model/Indexing_algorithm.h | 2 +- broker/gen/model/Indexing_settings.cpp | 2 +- broker/gen/model/Indexing_settings.h | 2 +- broker/gen/model/Instrument_metadata.cpp | 2 +- broker/gen/model/Instrument_metadata.h | 2 +- broker/gen/model/Jfjoch_settings.cpp | 2 +- broker/gen/model/Jfjoch_settings.h | 2 +- broker/gen/model/Jfjoch_settings_ssl.cpp | 2 +- broker/gen/model/Jfjoch_settings_ssl.h | 2 +- broker/gen/model/Jfjoch_statistics.cpp | 2 +- broker/gen/model/Jfjoch_statistics.h | 2 +- broker/gen/model/Measurement_statistics.cpp | 2 +- broker/gen/model/Measurement_statistics.h | 2 +- broker/gen/model/Pcie_devices_inner.cpp | 2 +- broker/gen/model/Pcie_devices_inner.h | 2 +- broker/gen/model/Pixel_mask_statistics.cpp | 2 +- broker/gen/model/Pixel_mask_statistics.h | 2 +- broker/gen/model/Plot.cpp | 2 +- broker/gen/model/Plot.h | 2 +- broker/gen/model/Plot_unit_x.cpp | 2 +- broker/gen/model/Plot_unit_x.h | 2 +- broker/gen/model/Plots.cpp | 2 +- broker/gen/model/Plots.h | 2 +- broker/gen/model/Roi_azim_list.cpp | 2 +- broker/gen/model/Roi_azim_list.h | 2 +- broker/gen/model/Roi_azimuthal.cpp | 2 +- broker/gen/model/Roi_azimuthal.h | 2 +- broker/gen/model/Roi_box.cpp | 2 +- broker/gen/model/Roi_box.h | 2 +- broker/gen/model/Roi_box_list.cpp | 2 +- broker/gen/model/Roi_box_list.h | 2 +- broker/gen/model/Roi_circle.cpp | 2 +- broker/gen/model/Roi_circle.h | 2 +- broker/gen/model/Roi_circle_list.cpp | 2 +- broker/gen/model/Roi_circle_list.h | 2 +- broker/gen/model/Roi_definitions.cpp | 2 +- broker/gen/model/Roi_definitions.h | 2 +- broker/gen/model/Rotation_axis.cpp | 2 +- broker/gen/model/Rotation_axis.h | 2 +- broker/gen/model/Scan_result.cpp | 2 +- broker/gen/model/Scan_result.h | 2 +- broker/gen/model/Scan_result_images_inner.cpp | 2 +- broker/gen/model/Scan_result_images_inner.h | 2 +- broker/gen/model/Spot_finding_settings.cpp | 2 +- broker/gen/model/Spot_finding_settings.h | 2 +- broker/gen/model/Standard_detector_geometry.cpp | 2 +- broker/gen/model/Standard_detector_geometry.h | 2 +- broker/gen/model/Unit_cell.cpp | 2 +- broker/gen/model/Unit_cell.h | 2 +- broker/gen/model/Zeromq_metadata_settings.cpp | 2 +- broker/gen/model/Zeromq_metadata_settings.h | 2 +- broker/gen/model/Zeromq_preview_settings.cpp | 2 +- broker/gen/model/Zeromq_preview_settings.h | 2 +- broker/gen/model/Zeromq_settings.cpp | 2 +- broker/gen/model/Zeromq_settings.h | 2 +- broker/jfjoch_api.yaml | 2 +- broker/redoc-static.html | 4 ++-- docs/conf.py | 2 +- docs/python_client/README.md | 4 ++-- fpga/hdl/action_config.v | 2 +- fpga/pcie_driver/dkms.conf | 2 +- fpga/pcie_driver/install_dkms.sh | 2 +- fpga/pcie_driver/jfjoch_drv.c | 2 +- fpga/pcie_driver/postinstall.sh | 2 +- fpga/pcie_driver/preuninstall.sh | 2 +- frontend/package.json | 2 +- frontend/src/openapi/core/OpenAPI.ts | 2 +- frontend/src/version.ts | 2 +- 130 files changed, 132 insertions(+), 132 deletions(-) diff --git a/VERSION b/VERSION index 00dfc992..1e1bbbc9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0-rc.124 +1.0.0-rc.125 diff --git a/broker/gen/api/ApiBase.cpp b/broker/gen/api/ApiBase.cpp index a02a91f4..f2beb934 100644 --- a/broker/gen/api/ApiBase.cpp +++ b/broker/gen/api/ApiBase.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/api/ApiBase.h b/broker/gen/api/ApiBase.h index 96b9bd0a..7681ddd8 100644 --- a/broker/gen/api/ApiBase.h +++ b/broker/gen/api/ApiBase.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/api/DefaultApi.cpp b/broker/gen/api/DefaultApi.cpp index e1b0f255..8d3bb5d7 100644 --- a/broker/gen/api/DefaultApi.cpp +++ b/broker/gen/api/DefaultApi.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/api/DefaultApi.h b/broker/gen/api/DefaultApi.h index 983cf838..508a8edb 100644 --- a/broker/gen/api/DefaultApi.h +++ b/broker/gen/api/DefaultApi.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Azim_int_settings.cpp b/broker/gen/model/Azim_int_settings.cpp index 0f7990f6..2af158fd 100644 --- a/broker/gen/model/Azim_int_settings.cpp +++ b/broker/gen/model/Azim_int_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Azim_int_settings.h b/broker/gen/model/Azim_int_settings.h index f2713c35..5d5f12de 100644 --- a/broker/gen/model/Azim_int_settings.h +++ b/broker/gen/model/Azim_int_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Broker_status.cpp b/broker/gen/model/Broker_status.cpp index 2b845274..22fc38fd 100644 --- a/broker/gen/model/Broker_status.cpp +++ b/broker/gen/model/Broker_status.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Broker_status.h b/broker/gen/model/Broker_status.h index 8c03a071..8fa34405 100644 --- a/broker/gen/model/Broker_status.h +++ b/broker/gen/model/Broker_status.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Calibration_statistics_inner.cpp b/broker/gen/model/Calibration_statistics_inner.cpp index 0ae44b96..77b7b6eb 100644 --- a/broker/gen/model/Calibration_statistics_inner.cpp +++ b/broker/gen/model/Calibration_statistics_inner.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Calibration_statistics_inner.h b/broker/gen/model/Calibration_statistics_inner.h index 590a55a6..83ed40be 100644 --- a/broker/gen/model/Calibration_statistics_inner.h +++ b/broker/gen/model/Calibration_statistics_inner.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dark_mask_settings.cpp b/broker/gen/model/Dark_mask_settings.cpp index 923f0a9a..504bd4ea 100644 --- a/broker/gen/model/Dark_mask_settings.cpp +++ b/broker/gen/model/Dark_mask_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dark_mask_settings.h b/broker/gen/model/Dark_mask_settings.h index 93a398ab..aa7356e1 100644 --- a/broker/gen/model/Dark_mask_settings.h +++ b/broker/gen/model/Dark_mask_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings.cpp b/broker/gen/model/Dataset_settings.cpp index 5ee4000a..076a6a94 100644 --- a/broker/gen/model/Dataset_settings.cpp +++ b/broker/gen/model/Dataset_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings.h b/broker/gen/model/Dataset_settings.h index 7951acbd..32ed1d75 100644 --- a/broker/gen/model/Dataset_settings.h +++ b/broker/gen/model/Dataset_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings_xray_fluorescence_spectrum.cpp b/broker/gen/model/Dataset_settings_xray_fluorescence_spectrum.cpp index 5cb0d2fb..f1b6218c 100644 --- a/broker/gen/model/Dataset_settings_xray_fluorescence_spectrum.cpp +++ b/broker/gen/model/Dataset_settings_xray_fluorescence_spectrum.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Dataset_settings_xray_fluorescence_spectrum.h b/broker/gen/model/Dataset_settings_xray_fluorescence_spectrum.h index 5e942ecc..4b81b920 100644 --- a/broker/gen/model/Dataset_settings_xray_fluorescence_spectrum.h +++ b/broker/gen/model/Dataset_settings_xray_fluorescence_spectrum.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector.cpp b/broker/gen/model/Detector.cpp index 98d2dd7a..1f30bea2 100644 --- a/broker/gen/model/Detector.cpp +++ b/broker/gen/model/Detector.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector.h b/broker/gen/model/Detector.h index 2a96221d..1b74b4c1 100644 --- a/broker/gen/model/Detector.h +++ b/broker/gen/model/Detector.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list.cpp b/broker/gen/model/Detector_list.cpp index 1d9dcc36..f0dcd05b 100644 --- a/broker/gen/model/Detector_list.cpp +++ b/broker/gen/model/Detector_list.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list.h b/broker/gen/model/Detector_list.h index 5ec2793f..1ea73eff 100644 --- a/broker/gen/model/Detector_list.h +++ b/broker/gen/model/Detector_list.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list_element.cpp b/broker/gen/model/Detector_list_element.cpp index a44d047b..a405077a 100644 --- a/broker/gen/model/Detector_list_element.cpp +++ b/broker/gen/model/Detector_list_element.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_list_element.h b/broker/gen/model/Detector_list_element.h index f217a34c..022501f2 100644 --- a/broker/gen/model/Detector_list_element.h +++ b/broker/gen/model/Detector_list_element.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_module.cpp b/broker/gen/model/Detector_module.cpp index 8a5a9120..7b5ca79c 100644 --- a/broker/gen/model/Detector_module.cpp +++ b/broker/gen/model/Detector_module.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_module.h b/broker/gen/model/Detector_module.h index 0889e97a..6d15b1f8 100644 --- a/broker/gen/model/Detector_module.h +++ b/broker/gen/model/Detector_module.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_module_direction.cpp b/broker/gen/model/Detector_module_direction.cpp index 3d45485b..b2d4ba40 100644 --- a/broker/gen/model/Detector_module_direction.cpp +++ b/broker/gen/model/Detector_module_direction.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_module_direction.h b/broker/gen/model/Detector_module_direction.h index 74ec9914..1c7c6136 100644 --- a/broker/gen/model/Detector_module_direction.h +++ b/broker/gen/model/Detector_module_direction.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_power_state.cpp b/broker/gen/model/Detector_power_state.cpp index e153f3b8..46f9236c 100644 --- a/broker/gen/model/Detector_power_state.cpp +++ b/broker/gen/model/Detector_power_state.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_power_state.h b/broker/gen/model/Detector_power_state.h index 10e7596b..8d3b1b56 100644 --- a/broker/gen/model/Detector_power_state.h +++ b/broker/gen/model/Detector_power_state.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_selection.cpp b/broker/gen/model/Detector_selection.cpp index 0ab420a1..690935a3 100644 --- a/broker/gen/model/Detector_selection.cpp +++ b/broker/gen/model/Detector_selection.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_selection.h b/broker/gen/model/Detector_selection.h index aafa816f..4c28c7f9 100644 --- a/broker/gen/model/Detector_selection.h +++ b/broker/gen/model/Detector_selection.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_settings.cpp b/broker/gen/model/Detector_settings.cpp index 841a229e..d1e9825b 100644 --- a/broker/gen/model/Detector_settings.cpp +++ b/broker/gen/model/Detector_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_settings.h b/broker/gen/model/Detector_settings.h index 02a8c4a0..cf6ffd1a 100644 --- a/broker/gen/model/Detector_settings.h +++ b/broker/gen/model/Detector_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_state.cpp b/broker/gen/model/Detector_state.cpp index 7fdc6a2e..4a11a187 100644 --- a/broker/gen/model/Detector_state.cpp +++ b/broker/gen/model/Detector_state.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_state.h b/broker/gen/model/Detector_state.h index 1baa9161..bdfcb9bb 100644 --- a/broker/gen/model/Detector_state.h +++ b/broker/gen/model/Detector_state.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_status.cpp b/broker/gen/model/Detector_status.cpp index 6734a7d7..046bc3ea 100644 --- a/broker/gen/model/Detector_status.cpp +++ b/broker/gen/model/Detector_status.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_status.h b/broker/gen/model/Detector_status.h index 3c05c956..bdc54ee1 100644 --- a/broker/gen/model/Detector_status.h +++ b/broker/gen/model/Detector_status.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_timing.cpp b/broker/gen/model/Detector_timing.cpp index db9c94e0..0e1b3964 100644 --- a/broker/gen/model/Detector_timing.cpp +++ b/broker/gen/model/Detector_timing.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_timing.h b/broker/gen/model/Detector_timing.h index 49bb54bc..30db299a 100644 --- a/broker/gen/model/Detector_timing.h +++ b/broker/gen/model/Detector_timing.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_type.cpp b/broker/gen/model/Detector_type.cpp index 3844da99..930b5c9c 100644 --- a/broker/gen/model/Detector_type.cpp +++ b/broker/gen/model/Detector_type.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Detector_type.h b/broker/gen/model/Detector_type.h index dfdd5cb9..a8a5a7a8 100644 --- a/broker/gen/model/Detector_type.h +++ b/broker/gen/model/Detector_type.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Error_message.cpp b/broker/gen/model/Error_message.cpp index 43195ce8..0ae11a23 100644 --- a/broker/gen/model/Error_message.cpp +++ b/broker/gen/model/Error_message.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Error_message.h b/broker/gen/model/Error_message.h index a7170f64..59fe4770 100644 --- a/broker/gen/model/Error_message.h +++ b/broker/gen/model/Error_message.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/File_writer_format.cpp b/broker/gen/model/File_writer_format.cpp index 69c92d71..2af5a7ad 100644 --- a/broker/gen/model/File_writer_format.cpp +++ b/broker/gen/model/File_writer_format.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/File_writer_format.h b/broker/gen/model/File_writer_format.h index 2f7efe6f..7000283c 100644 --- a/broker/gen/model/File_writer_format.h +++ b/broker/gen/model/File_writer_format.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/File_writer_settings.cpp b/broker/gen/model/File_writer_settings.cpp index 51e129e4..1f72271f 100644 --- a/broker/gen/model/File_writer_settings.cpp +++ b/broker/gen/model/File_writer_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/File_writer_settings.h b/broker/gen/model/File_writer_settings.h index 2c5029af..0477bb26 100644 --- a/broker/gen/model/File_writer_settings.h +++ b/broker/gen/model/File_writer_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Fpga_status_inner.cpp b/broker/gen/model/Fpga_status_inner.cpp index 1a0c1977..78eec54d 100644 --- a/broker/gen/model/Fpga_status_inner.cpp +++ b/broker/gen/model/Fpga_status_inner.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Fpga_status_inner.h b/broker/gen/model/Fpga_status_inner.h index 826b3b2b..f75837e5 100644 --- a/broker/gen/model/Fpga_status_inner.h +++ b/broker/gen/model/Fpga_status_inner.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Geom_refinement_algorithm.cpp b/broker/gen/model/Geom_refinement_algorithm.cpp index c232e2b0..d5df77ea 100644 --- a/broker/gen/model/Geom_refinement_algorithm.cpp +++ b/broker/gen/model/Geom_refinement_algorithm.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Geom_refinement_algorithm.h b/broker/gen/model/Geom_refinement_algorithm.h index 2cd18857..3873c973 100644 --- a/broker/gen/model/Geom_refinement_algorithm.h +++ b/broker/gen/model/Geom_refinement_algorithm.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Grid_scan.cpp b/broker/gen/model/Grid_scan.cpp index ab812a68..6e72b31d 100644 --- a/broker/gen/model/Grid_scan.cpp +++ b/broker/gen/model/Grid_scan.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Grid_scan.h b/broker/gen/model/Grid_scan.h index 1635a6f2..9aa72908 100644 --- a/broker/gen/model/Grid_scan.h +++ b/broker/gen/model/Grid_scan.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Helpers.cpp b/broker/gen/model/Helpers.cpp index 0bd7cecc..b2ce06ff 100644 --- a/broker/gen/model/Helpers.cpp +++ b/broker/gen/model/Helpers.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Helpers.h b/broker/gen/model/Helpers.h index 907a557f..c33ee1b0 100644 --- a/broker/gen/model/Helpers.h +++ b/broker/gen/model/Helpers.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_buffer_status.cpp b/broker/gen/model/Image_buffer_status.cpp index 5ee8e454..73151284 100644 --- a/broker/gen/model/Image_buffer_status.cpp +++ b/broker/gen/model/Image_buffer_status.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_buffer_status.h b/broker/gen/model/Image_buffer_status.h index a23ac9e3..614e0777 100644 --- a/broker/gen/model/Image_buffer_status.h +++ b/broker/gen/model/Image_buffer_status.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_format_settings.cpp b/broker/gen/model/Image_format_settings.cpp index 47668373..44bd65da 100644 --- a/broker/gen/model/Image_format_settings.cpp +++ b/broker/gen/model/Image_format_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_format_settings.h b/broker/gen/model/Image_format_settings.h index 233a6103..6a92fc4f 100644 --- a/broker/gen/model/Image_format_settings.h +++ b/broker/gen/model/Image_format_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_pusher_type.cpp b/broker/gen/model/Image_pusher_type.cpp index 68accbcd..7a0d909f 100644 --- a/broker/gen/model/Image_pusher_type.cpp +++ b/broker/gen/model/Image_pusher_type.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Image_pusher_type.h b/broker/gen/model/Image_pusher_type.h index 10567246..93d21273 100644 --- a/broker/gen/model/Image_pusher_type.h +++ b/broker/gen/model/Image_pusher_type.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Indexing_algorithm.cpp b/broker/gen/model/Indexing_algorithm.cpp index 7b2f0e2c..0b50f576 100644 --- a/broker/gen/model/Indexing_algorithm.cpp +++ b/broker/gen/model/Indexing_algorithm.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Indexing_algorithm.h b/broker/gen/model/Indexing_algorithm.h index 174847c8..e876a2cb 100644 --- a/broker/gen/model/Indexing_algorithm.h +++ b/broker/gen/model/Indexing_algorithm.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Indexing_settings.cpp b/broker/gen/model/Indexing_settings.cpp index afe96daf..09ba2cdb 100644 --- a/broker/gen/model/Indexing_settings.cpp +++ b/broker/gen/model/Indexing_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Indexing_settings.h b/broker/gen/model/Indexing_settings.h index 814517f6..524f3222 100644 --- a/broker/gen/model/Indexing_settings.h +++ b/broker/gen/model/Indexing_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Instrument_metadata.cpp b/broker/gen/model/Instrument_metadata.cpp index b002398f..2d1a57d6 100644 --- a/broker/gen/model/Instrument_metadata.cpp +++ b/broker/gen/model/Instrument_metadata.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Instrument_metadata.h b/broker/gen/model/Instrument_metadata.h index d115af3b..bc97c657 100644 --- a/broker/gen/model/Instrument_metadata.h +++ b/broker/gen/model/Instrument_metadata.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Jfjoch_settings.cpp b/broker/gen/model/Jfjoch_settings.cpp index 1dfa1b53..ff25303a 100644 --- a/broker/gen/model/Jfjoch_settings.cpp +++ b/broker/gen/model/Jfjoch_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Jfjoch_settings.h b/broker/gen/model/Jfjoch_settings.h index dad14cdd..13f53cb9 100644 --- a/broker/gen/model/Jfjoch_settings.h +++ b/broker/gen/model/Jfjoch_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Jfjoch_settings_ssl.cpp b/broker/gen/model/Jfjoch_settings_ssl.cpp index 0d06e0f2..b51614a1 100644 --- a/broker/gen/model/Jfjoch_settings_ssl.cpp +++ b/broker/gen/model/Jfjoch_settings_ssl.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Jfjoch_settings_ssl.h b/broker/gen/model/Jfjoch_settings_ssl.h index 82be7695..553d853b 100644 --- a/broker/gen/model/Jfjoch_settings_ssl.h +++ b/broker/gen/model/Jfjoch_settings_ssl.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Jfjoch_statistics.cpp b/broker/gen/model/Jfjoch_statistics.cpp index d63624d5..f4403fa0 100644 --- a/broker/gen/model/Jfjoch_statistics.cpp +++ b/broker/gen/model/Jfjoch_statistics.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Jfjoch_statistics.h b/broker/gen/model/Jfjoch_statistics.h index 3108d0ad..82434386 100644 --- a/broker/gen/model/Jfjoch_statistics.h +++ b/broker/gen/model/Jfjoch_statistics.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Measurement_statistics.cpp b/broker/gen/model/Measurement_statistics.cpp index f122290e..78917671 100644 --- a/broker/gen/model/Measurement_statistics.cpp +++ b/broker/gen/model/Measurement_statistics.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Measurement_statistics.h b/broker/gen/model/Measurement_statistics.h index 44a8fea6..f42dd4b3 100644 --- a/broker/gen/model/Measurement_statistics.h +++ b/broker/gen/model/Measurement_statistics.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Pcie_devices_inner.cpp b/broker/gen/model/Pcie_devices_inner.cpp index 1a830308..7d1f1a5c 100644 --- a/broker/gen/model/Pcie_devices_inner.cpp +++ b/broker/gen/model/Pcie_devices_inner.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Pcie_devices_inner.h b/broker/gen/model/Pcie_devices_inner.h index 93b465d8..2eade039 100644 --- a/broker/gen/model/Pcie_devices_inner.h +++ b/broker/gen/model/Pcie_devices_inner.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Pixel_mask_statistics.cpp b/broker/gen/model/Pixel_mask_statistics.cpp index 3fb53d62..f33e5824 100644 --- a/broker/gen/model/Pixel_mask_statistics.cpp +++ b/broker/gen/model/Pixel_mask_statistics.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Pixel_mask_statistics.h b/broker/gen/model/Pixel_mask_statistics.h index 6ce18107..b8bd18d7 100644 --- a/broker/gen/model/Pixel_mask_statistics.h +++ b/broker/gen/model/Pixel_mask_statistics.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plot.cpp b/broker/gen/model/Plot.cpp index 5711ed92..db53cc72 100644 --- a/broker/gen/model/Plot.cpp +++ b/broker/gen/model/Plot.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plot.h b/broker/gen/model/Plot.h index 97856aa5..81ab6ca8 100644 --- a/broker/gen/model/Plot.h +++ b/broker/gen/model/Plot.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plot_unit_x.cpp b/broker/gen/model/Plot_unit_x.cpp index 3d72fd6e..e7fd6cbe 100644 --- a/broker/gen/model/Plot_unit_x.cpp +++ b/broker/gen/model/Plot_unit_x.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plot_unit_x.h b/broker/gen/model/Plot_unit_x.h index de8f4172..06ca2767 100644 --- a/broker/gen/model/Plot_unit_x.h +++ b/broker/gen/model/Plot_unit_x.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plots.cpp b/broker/gen/model/Plots.cpp index 5cbad676..6ba1bdb5 100644 --- a/broker/gen/model/Plots.cpp +++ b/broker/gen/model/Plots.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Plots.h b/broker/gen/model/Plots.h index 71c9c05c..2d868ba1 100644 --- a/broker/gen/model/Plots.h +++ b/broker/gen/model/Plots.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_azim_list.cpp b/broker/gen/model/Roi_azim_list.cpp index e2ee20ae..b23f59a8 100644 --- a/broker/gen/model/Roi_azim_list.cpp +++ b/broker/gen/model/Roi_azim_list.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_azim_list.h b/broker/gen/model/Roi_azim_list.h index 03f436e3..35fc644f 100644 --- a/broker/gen/model/Roi_azim_list.h +++ b/broker/gen/model/Roi_azim_list.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_azimuthal.cpp b/broker/gen/model/Roi_azimuthal.cpp index 5c903e0b..9ccf9d58 100644 --- a/broker/gen/model/Roi_azimuthal.cpp +++ b/broker/gen/model/Roi_azimuthal.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_azimuthal.h b/broker/gen/model/Roi_azimuthal.h index 943a6f77..4b15ca25 100644 --- a/broker/gen/model/Roi_azimuthal.h +++ b/broker/gen/model/Roi_azimuthal.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box.cpp b/broker/gen/model/Roi_box.cpp index b1664b7d..90c278be 100644 --- a/broker/gen/model/Roi_box.cpp +++ b/broker/gen/model/Roi_box.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box.h b/broker/gen/model/Roi_box.h index 3bc1b72f..f82e666b 100644 --- a/broker/gen/model/Roi_box.h +++ b/broker/gen/model/Roi_box.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box_list.cpp b/broker/gen/model/Roi_box_list.cpp index 36460062..2ecf27a9 100644 --- a/broker/gen/model/Roi_box_list.cpp +++ b/broker/gen/model/Roi_box_list.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_box_list.h b/broker/gen/model/Roi_box_list.h index 81117e51..4c426549 100644 --- a/broker/gen/model/Roi_box_list.h +++ b/broker/gen/model/Roi_box_list.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle.cpp b/broker/gen/model/Roi_circle.cpp index 75666ff1..d7b1ea37 100644 --- a/broker/gen/model/Roi_circle.cpp +++ b/broker/gen/model/Roi_circle.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle.h b/broker/gen/model/Roi_circle.h index 486530ef..01e59c74 100644 --- a/broker/gen/model/Roi_circle.h +++ b/broker/gen/model/Roi_circle.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle_list.cpp b/broker/gen/model/Roi_circle_list.cpp index e256becf..56a14528 100644 --- a/broker/gen/model/Roi_circle_list.cpp +++ b/broker/gen/model/Roi_circle_list.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_circle_list.h b/broker/gen/model/Roi_circle_list.h index 3e336566..35c7c17b 100644 --- a/broker/gen/model/Roi_circle_list.h +++ b/broker/gen/model/Roi_circle_list.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_definitions.cpp b/broker/gen/model/Roi_definitions.cpp index a08ed980..57391bf2 100644 --- a/broker/gen/model/Roi_definitions.cpp +++ b/broker/gen/model/Roi_definitions.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Roi_definitions.h b/broker/gen/model/Roi_definitions.h index 2a5dd498..3ff811af 100644 --- a/broker/gen/model/Roi_definitions.h +++ b/broker/gen/model/Roi_definitions.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Rotation_axis.cpp b/broker/gen/model/Rotation_axis.cpp index cddb5981..2a8a29af 100644 --- a/broker/gen/model/Rotation_axis.cpp +++ b/broker/gen/model/Rotation_axis.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Rotation_axis.h b/broker/gen/model/Rotation_axis.h index f31fec6f..81b09304 100644 --- a/broker/gen/model/Rotation_axis.h +++ b/broker/gen/model/Rotation_axis.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Scan_result.cpp b/broker/gen/model/Scan_result.cpp index b2061adc..07f7cb20 100644 --- a/broker/gen/model/Scan_result.cpp +++ b/broker/gen/model/Scan_result.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Scan_result.h b/broker/gen/model/Scan_result.h index 96be9c34..565b63a3 100644 --- a/broker/gen/model/Scan_result.h +++ b/broker/gen/model/Scan_result.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Scan_result_images_inner.cpp b/broker/gen/model/Scan_result_images_inner.cpp index 918225ed..d4e708bc 100644 --- a/broker/gen/model/Scan_result_images_inner.cpp +++ b/broker/gen/model/Scan_result_images_inner.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Scan_result_images_inner.h b/broker/gen/model/Scan_result_images_inner.h index d52c7d0e..490d9c4f 100644 --- a/broker/gen/model/Scan_result_images_inner.h +++ b/broker/gen/model/Scan_result_images_inner.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Spot_finding_settings.cpp b/broker/gen/model/Spot_finding_settings.cpp index 5ecb3efb..9f4dc43d 100644 --- a/broker/gen/model/Spot_finding_settings.cpp +++ b/broker/gen/model/Spot_finding_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Spot_finding_settings.h b/broker/gen/model/Spot_finding_settings.h index 0a9fee6c..e7596234 100644 --- a/broker/gen/model/Spot_finding_settings.h +++ b/broker/gen/model/Spot_finding_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Standard_detector_geometry.cpp b/broker/gen/model/Standard_detector_geometry.cpp index b07099e7..12570ceb 100644 --- a/broker/gen/model/Standard_detector_geometry.cpp +++ b/broker/gen/model/Standard_detector_geometry.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Standard_detector_geometry.h b/broker/gen/model/Standard_detector_geometry.h index 0f60f7a4..577f138b 100644 --- a/broker/gen/model/Standard_detector_geometry.h +++ b/broker/gen/model/Standard_detector_geometry.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Unit_cell.cpp b/broker/gen/model/Unit_cell.cpp index 9e9a2550..55d091aa 100644 --- a/broker/gen/model/Unit_cell.cpp +++ b/broker/gen/model/Unit_cell.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Unit_cell.h b/broker/gen/model/Unit_cell.h index cf0be3ba..3a3f1b90 100644 --- a/broker/gen/model/Unit_cell.h +++ b/broker/gen/model/Unit_cell.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Zeromq_metadata_settings.cpp b/broker/gen/model/Zeromq_metadata_settings.cpp index 205da034..4ccacf5a 100644 --- a/broker/gen/model/Zeromq_metadata_settings.cpp +++ b/broker/gen/model/Zeromq_metadata_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Zeromq_metadata_settings.h b/broker/gen/model/Zeromq_metadata_settings.h index 2f35ccc0..26db873b 100644 --- a/broker/gen/model/Zeromq_metadata_settings.h +++ b/broker/gen/model/Zeromq_metadata_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Zeromq_preview_settings.cpp b/broker/gen/model/Zeromq_preview_settings.cpp index 38d65781..616e9daf 100644 --- a/broker/gen/model/Zeromq_preview_settings.cpp +++ b/broker/gen/model/Zeromq_preview_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Zeromq_preview_settings.h b/broker/gen/model/Zeromq_preview_settings.h index 27a2eb48..e3c826a2 100644 --- a/broker/gen/model/Zeromq_preview_settings.h +++ b/broker/gen/model/Zeromq_preview_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Zeromq_settings.cpp b/broker/gen/model/Zeromq_settings.cpp index 96361b6c..28d3615a 100644 --- a/broker/gen/model/Zeromq_settings.cpp +++ b/broker/gen/model/Zeromq_settings.cpp @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/gen/model/Zeromq_settings.h b/broker/gen/model/Zeromq_settings.h index b674ba2a..5dbe4bd9 100644 --- a/broker/gen/model/Zeromq_settings.h +++ b/broker/gen/model/Zeromq_settings.h @@ -2,7 +2,7 @@ * 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.124 +* The version of the OpenAPI document: 1.0.0-rc.125 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 07dba754..fb33fc07 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -22,7 +22,7 @@ info: requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms. - version: 1.0.0-rc.124 + version: 1.0.0-rc.125 contact: name: Filip Leonarski (Paul Scherrer Institute) email: filip.leonarski@psi.ch diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 61880b22..1b343aed 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -411,7 +411,7 @@ This format doesn't transmit information about X-axis, only values, so it i 55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864 -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688, -104.0616 -231.873,-231.248 z - " fill="currentColor">

Jungfraujoch (1.0.0-rc.124)

Download OpenAPI specification:

Filip Leonarski (Paul Scherrer Institute): filip.leonarski@psi.ch License: GPL-3.0

Jungfraujoch (1.0.0-rc.125)

Download OpenAPI specification:

Filip Leonarski (Paul Scherrer Institute): filip.leonarski@psi.ch License: GPL-3.0

API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). @@ -1424,7 +1424,7 @@ then image might be replaced in the buffer between calling /images and /image.cb " class="sc-eVqvcJ sc-fszimp kIppRw drqpJr">

Test Jungfraujoch system

http://localhost:5232/version