v1.0.0-rc.166 (#76)
Build Packages / Unit tests (push) Successful in 1h22m15s
Build Packages / build:windows:nocuda (push) Successful in 18m0s
Build Packages / build:windows:cuda (push) Successful in 20m30s
Build Packages / build:viewer-tgz:cpu (push) Successful in 10m32s
Build Packages / build:viewer-tgz:cuda (push) Successful in 11m39s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 8m55s
Build Packages / build:rugnux:windows (push) Successful in 11m25s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 20m6s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 16m27s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 20m19s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 15m34s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 20m25s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m36s
Build Packages / build:rpm (rocky8) (push) Successful in 17m43s
Build Packages / build:rpm (rocky9) (push) Successful in 13m34s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 21m28s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 18m19s
Build Packages / DIALS test (push) Successful in 12m36s
Build Packages / XDS test (durin plugin) (push) Successful in 6m56s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m48s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m7s
Build Packages / Generate python client (push) Successful in 11s
Build Packages / Build documentation (push) Successful in 36s
Build Packages / Create release (push) Skipped
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 5m11s
Build Packages / Unit tests (push) Successful in 1h22m15s
Build Packages / build:windows:nocuda (push) Successful in 18m0s
Build Packages / build:windows:cuda (push) Successful in 20m30s
Build Packages / build:viewer-tgz:cpu (push) Successful in 10m32s
Build Packages / build:viewer-tgz:cuda (push) Successful in 11m39s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 8m55s
Build Packages / build:rugnux:windows (push) Successful in 11m25s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 20m6s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 16m27s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 20m19s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 15m34s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 20m25s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m36s
Build Packages / build:rpm (rocky8) (push) Successful in 17m43s
Build Packages / build:rpm (rocky9) (push) Successful in 13m34s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 21m28s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 18m19s
Build Packages / DIALS test (push) Successful in 12m36s
Build Packages / XDS test (durin plugin) (push) Successful in 6m56s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m48s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m7s
Build Packages / Generate python client (push) Successful in 11s
Build Packages / Build documentation (push) Successful in 36s
Build Packages / Create release (push) Skipped
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 5m11s
* `rugnux --mode calibration` writes `<prefix>.json` beside the `.poni`, whose `dataset_settings` member is a `jfjoch_broker` `dataset_settings` body as it stands. * `rugnux` and `jfjoch_viewer` read PILATUS miniCBF sweeps natively, without conversion. * Masters written by other facilities open, including Eiger 1.x and third-party NXmx variants. * `rugnux` measures the beam centre on every run, and indexes with it when the file's value indexes nothing. * A detector swung out on a 2theta arm is placed where the file says it stands, and the calibration can hold the tilt fixed. * `rugnux` writes the unmerged MTZ by default, and a P1 merge beside it, so a wrong space group can be re-merged without reprocessing. * Significant improvements to symmetry handling in `rugnux`: the lattice, the point group, the setting and the systematic absences. * The `rugnux` report gives the resolution the CC1/2 fit reached, beside the range the reflections were written to. * The `rugnux` report gives the twinning statistics measured before the space group was decided, beside the ones measured after. * The `rugnux` report gives the strong-direction diffraction limit, and warns when CC1/2 is not monotone with resolution. * `rugnux` ranks screw axes on the evidence their absences carry, rather than on how many control reflections a candidate happens to have. * Twinning is no longer reported when the L-test contradicts it. * The `rugnux` report gives the detector tilt, the measured tilt and the direct beam beside the beam centre, and a post-refined beam centre is judged against the run's own measurement rather than the file's. * `--no-refine-tilt` holds the detector tilt at the value in the file, instead of zeroing it, when the calibration starts from the spots. * The `jfjoch_viewer` grid scan view draws the cells in the proportion of the scan steps, so the map has the shape of the scanned area. Reviewed-on: #76 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #76.
This commit is contained in:
@@ -257,6 +257,38 @@ TEST_CASE("LatticeSearch - orthorhombic I - permutation2") {
|
||||
check_uc(uc, c, a, b, 90.0, 90.0, 90.0, 1e-2, 1e-2);
|
||||
}
|
||||
|
||||
// A character states its scalar products as fractions of A, B and C, and the three C-centred
|
||||
// monoclinic ones (28, 29, 30) state one of them as 2*D or 2*E - twice a cosine. The cosine that
|
||||
// implies leaves [-1,1] as soon as the cell's own angle is far enough from 90, and the character is
|
||||
// then geometrically impossible for that metric. This cell is triclinic; character 28 asks it for a
|
||||
// gamma whose cosine is 1.127.
|
||||
TEST_CASE("LatticeSearch - an impossible character is not a match") {
|
||||
CrystalLattice L(30.0, 35.0, 40.0, 65.0, 70.0, 70.0);
|
||||
|
||||
auto res = LatticeSearch(L, 1e-6);
|
||||
|
||||
CHECK(res.system == gemmi::CrystalSystem::Triclinic);
|
||||
}
|
||||
|
||||
// An exact I-centred orthorhombic lattice whose reduced cell comes out all-acute with gamma at 90 -
|
||||
// ON the boundary between the two Niggli types, where the reduction may present either. Character 42
|
||||
// is stated for the obtuse setting, and only the flip that keeps gamma reaches it. Both defects have
|
||||
// to be gone: without the impossible-character fix this metric matches character 28 and never gets
|
||||
// as far as the retry, and without the gamma flip the retry does not have the setting it needs.
|
||||
TEST_CASE("LatticeSearch - orthorhombic I on the type boundary in gamma") {
|
||||
const double a = 45.0, b = 50.0, c = 80.0;
|
||||
CrystalLattice conv(a, b, c, 90.0, 90.0, 90.0);
|
||||
CrystalLattice L = conv.ToPrimitive('I');
|
||||
|
||||
auto res = LatticeSearch(L, 1e-6);
|
||||
|
||||
CHECK(res.system == gemmi::CrystalSystem::Orthorhombic);
|
||||
CHECK(res.centering == 'I');
|
||||
|
||||
auto uc = res.conventional.GetUnitCell();
|
||||
check_uc(uc, a, b, c, 90.0, 90.0, 90.0, 1e-2, 1e-2);
|
||||
}
|
||||
|
||||
// Orthorhombic P: all angles 90, unequal edges, P-centering
|
||||
TEST_CASE("LatticeSearch - orthorhombic P") {
|
||||
const double a = 35.0, b = 41.0, c = 57.0;
|
||||
@@ -512,3 +544,55 @@ TEST_CASE("LatticeSearchForClass - asking for what the plain search found return
|
||||
CHECK(filtered->niggli_class == plain.niggli_class);
|
||||
check_uc(filtered->conventional.GetUnitCell(), a, a, a, 90, 90, 90, 1e-4, 1e-4);
|
||||
}
|
||||
|
||||
// The reduction epsilon. An exactly body-centred tetragonal lattice with c > a*sqrt(2) reduces to a
|
||||
// character whose gamma is 90 EXACTLY, so the scalar product that decides the Niggli type is
|
||||
// structurally zero and what a float lattice carries there is rounding. Axis-aligned that rounding
|
||||
// happens to vanish - which is why the two tetragonal-I cases above pass - but every lattice the
|
||||
// pipeline classifies is a refined, ROTATED one, and rotating this one about its own 4-fold is
|
||||
// enough to lose the 4-fold on 38 of 60 rotations.
|
||||
TEST_CASE("LatticeSearch - a body-centred tetragonal lattice keeps its 4-fold once it is rotated") {
|
||||
CrystalLattice L(Coord(40, 0, 0), Coord(0, 40, 0), Coord(0, 0, 90));
|
||||
L = L.ToPrimitive('I').Multiply(RotMatrix(0.3f, Coord(0, 0, 1)));
|
||||
const auto res = LatticeSearch(L, 1e-6);
|
||||
CHECK(res.system == gemmi::CrystalSystem::Tetragonal);
|
||||
CHECK(res.centering == 'I');
|
||||
}
|
||||
|
||||
// ITA character 43, the mI form. An ordinary centred-monoclinic crystal that happens to reduce into
|
||||
// the form the table names mI - the same Bravais lattice in another setting, there is no fifteenth
|
||||
// type. With that row absent the walk reaches character 44 and the centring is lost outright. The
|
||||
// three monoclinic-C cases above reduce to characters 14, 39 and 14, so none of them samples it.
|
||||
TEST_CASE("LatticeSearch - a centred monoclinic lattice that reduces to the mI form keeps its centring") {
|
||||
const CrystalLattice L = CrystalLattice(35, 60, 30, 90, 120, 90).ToPrimitive('C');
|
||||
const auto res = LatticeSearch(L, 1e-6);
|
||||
CHECK(res.system == gemmi::CrystalSystem::Monoclinic);
|
||||
CHECK(res.centering == 'I');
|
||||
const auto uc = res.conventional.GetUnitCell();
|
||||
CHECK(std::fabs(uc.alpha - 90.0) < 1e-3);
|
||||
CHECK(std::fabs(uc.gamma - 90.0) < 1e-3);
|
||||
CHECK(std::fabs(res.conventional.CalcVolume())
|
||||
== Catch::Approx(2 * std::fabs(L.CalcVolume())).epsilon(1e-4));
|
||||
}
|
||||
|
||||
// The change of basis to a primitive cell is stated by gemmi as an operator on COORDINATES, while
|
||||
// CrystalLattice::Multiply combines BASIS VECTORS, so it has to be transposed. A, B, C, I and F are
|
||||
// symmetric and never showed the omission; R and H are not. An R-centred lattice is the case that
|
||||
// matters, because it is the centring whose setting most often has to be re-seated.
|
||||
TEST_CASE("CrystalLattice::ToPrimitive gives an R-centred lattice its rhombohedral primitive cell") {
|
||||
const double a = 50.0, c = 120.0;
|
||||
const CrystalLattice hex(a, a, c, 90, 90, 120);
|
||||
const auto prim = hex.ToPrimitive('R').GetUnitCell();
|
||||
// A rhombohedral primitive cell: three equal edges, three equal angles, a third of the volume.
|
||||
CHECK(prim.a == Catch::Approx(prim.b).epsilon(1e-5));
|
||||
CHECK(prim.b == Catch::Approx(prim.c).epsilon(1e-5));
|
||||
CHECK(prim.alpha == Catch::Approx(prim.beta).epsilon(1e-5));
|
||||
CHECK(prim.beta == Catch::Approx(prim.gamma).epsilon(1e-5));
|
||||
CHECK(std::fabs(hex.ToPrimitive('R').CalcVolume())
|
||||
== Catch::Approx(std::fabs(hex.CalcVolume()) / 3.0).epsilon(1e-4));
|
||||
// ...and it goes back to the hexagonal cell it came from.
|
||||
const auto back = hex.ToPrimitive('R').FromPrimitive('R').GetUnitCell();
|
||||
CHECK(back.a == Catch::Approx(a).epsilon(1e-4));
|
||||
CHECK(back.c == Catch::Approx(c).epsilon(1e-4));
|
||||
CHECK(back.gamma == Catch::Approx(120.0).epsilon(1e-4));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user