+ c + "," + alpha + "," + beta + "," + gamma);
Logger.info("grid parameters: mapc,mapr,maps: " + mapc + "," + mapr + ","
+ maps);
Logger.info("grid parameters: originX,Y,Z: " + origin);
SimpleUnitCell unitCell = new SimpleUnitCell( new float[] { a / na, b / nb, c / nc, alpha,
beta, gamma });
/*
Many thanks to Eric Martz for helping get this right.
Basically we have:
Three principal crystallographic axes: a, b, and c...
...also referred to as x, y, and z
...also referred to as directions 1, 2, and 3
...a mapping of "sheets" "rows" and "columns" of data
set in the file as
s1r1c1...s1r1c9.....
s1r2c1...s1r2c9.....
s2r1c1...s2r1c9.....
s2r2c1...s2r2c9.....
etc.
In Jmol, we always have x (our [0]) running slowest, so we
ultimately must make the following assignment:
MRC "maps" maps to .x or [0]
MRC "mapr" maps to .y or [1]
MRC "mapc" maps to .z or [2]
We really don't care if this is actually physical "x" "y" or "z".
In fact, for a hexagonal cell these will be combinations of xyz.
So it goes something like this:
scale the (a) vector by 1/mx and call that vector[0]
scale the (b) vector by 1/my and call that vector[1]
scale the (c) vector by 1/mz and call that vector[2]
Now map these vectors to Jmol volumetricVectors using
our x: volVector[0] = vector[maps - 1] (slow)
our y: volVector[1] = vector[mapr - 1]
our z: volVector[2] = vector[mapc - 1] (fast)
This is because our x is the slowest running variable.
*/
vectors[0] = new Point3f(1, 0, 0);
vectors[1] = new Point3f(0, 1, 0);
vectors[2] = new Point3f(0, 0, 1);
unitCell.toCartesian(vectors[0], false);
unitCell.toCartesian(vectors[1], false);
unitCell.toCartesian(vectors[2], false);
Logger.info("Jmol unit cell vectors:");
Logger.info(" a: " + vectors[0]);
Logger.info(" b: " + vectors[1]);
Logger.info(" c: " + vectors[2]);