includes update for PyMOL labels and measurements
bug fix: SHELX reader LATT 1 does not add "x,y,z" so does not also add "-x,-y,-z"
bug fix: DRAW ARROW can produce very long head
-- now limited to 1.5 * width of arrowhead (4.5 * width of arrow shaft)
bug fix: PyMOLReader does not recognize default label position (skips labels and measurements)
bug fix: PyMOLReader assigns wrong background color
bug fix: PyMOLReader fails to read file when it includes a default (null) measurement dash setting
bug fix: PyMOLReader creates measurement dots that are too large
bug fix: CIFReader fails to read multiple structures if _shelx_hkl_file is found
bug fix: MODELKIT SPACEGROUP 10:bca not reversion any prior nonstandard setting
bug fix: MODELKIT SPACEGROUP 145:a-b,a+2b,c fails
-- had not completed implementation of expanded unit cells for settings
# new features from the Denver 2024 ACA meeting:
# see https://github.com/BobHanson/CLEG/tree/main/presentations
# for the presentation "A Concise Linear Encoding of Crystallographic Space Group Settings
# and Group-Subgroup Relationships"
#
# also see https://crystals.symotter.org/ for
# the new Jmol Space Group Visualizer. https://spacegroups.symotter.org
# presented by Dean Johnston at the ACA meeting
new feature: CIFReader filter "StopOnSHELXHKL"
-- stops reading file when _shelx_hkl_file is found
-- should not be used with multiple structures
-- default FALSE; prior version this was (effectively) default TRUE
but that causes problems for multiple-stucture CIF files
new feature: SHELX reader and CIFReader by default assign translucent 0.5 to symmetry-related disorder
-- PART -n
-- for example, when a solvent is alternatively on one side or another of a C2 rotation
new feature: matrix("!b,c,a>a-c,b,2c;0,0,1/2>a,-a-c,b")
-- calculates the transformation from a CLEG chain
-- same as matrix("!b,c,a")*matrix(">a-c,b,2c;0,0,1/2")*matrix("a,-a-c,b")
-- also works for operations expressed in x,y,z
feature change: DRAW SPACEGROUP ALL glide arrows thicker and colored green
-- the thin yellow lines were hard to see on slides in Denver
scripting note: algorithm for generating operations from generators:
// start with the array of "x,y,z" generators
function getGeneralPositions(gen) {
var a = [];
var b = [matrix("x,y,z")];
var s= ""
for (var i = 1; i <= gen.length; i++) {
for (var j = 1; j <= b.length; j++) {
var m = matrix(gen[i])*matrix(b[j]);
// normalize to positive ("unitary") translations only
// by pulling the translation out, turning it into cartesians, and then unifying it,
// then adding it back into the 3x3 to regenerate a 4x4 operation
m = m%1 + (m%2).xyz.uxyz
var xyz = matrix(m,"xyz");
var key = ";"+xyz+";";
if (s.find(key) == 0) {
// only add already-unfound operations
s += key;
b.push(m);
a.push(xyz);
}
}
}
return a;
}
scripting note: Using CLEG notation; showing the 3D model of Figure 1.5.1.8 based on
matrices in Table 1.5.1.1, p. 79
Primitive hexagonal cell P with a, b, c and the three triple hexagonal
cells H with a1; b1; c; a2; b2; c; a3; b3; c. The origin for all cells is the same.
International Tables for Crystallography (2016). Vol. A, Section 1.5.1.2, p. 82.
https://onlinelibrary.wiley.com/iucr/itc/Ac/ch1o5v0001/sec1o5o1o2.pdf
modelkit zap spacegroup 145
draw u0 unitcell color white
draw s0 spacegroup all
modelkit spacegroup 145:a-b,a+2b,c
draw u1 unitcell color pink
draw s1 spacegroup all
modelkit spacegroup 145:2a+b,-a+b,c
draw u2 unitcell color red
draw s2 spacegroup all
modelkit spacegroup 145:a+2b,-2a-b,c
draw u3 unitcell color purple
draw s3 spacegroup all
modelkit spacegroup 145