4.7.2 - Crystallographic Calculations - JdlCrystalCalculations

John W. Campbell

4.7.2.1 Introduction

This class provides some static methods to perform selected crystallographic calculations. These include methods for converting between detector and reciprocal lattice coordinates, setting up crystallographic matrices and predicting reflections for Rotation and Laue images.

Note: Other useful crystallographic calculation methods are included in the crystallographic objects with which they are associated e.g.
JdlCell - Reciprocal/real cell conversions
JdlSymmetry - Handling space group symmetry
JdlDistortionCorrections - Making detector coordinate distortion corrections

Class and methods:

Class Details
Accessible Fields
Detector and Reciprocal Lattice
Crystal Setting Methods
Get nodal indices
Predict Rotation Reflections
Unique Reflections
Predict Laue Spots
Cell Parameters

4.7.2.2 Class Details

Package:
Jdl.JdlPX;
Class name:
JdlCrystalCalculations
Class definition:
public class JdlCrystalCalculations
Extends:
Object
Implements:
none
Actions:
none

4.7.2.3 Accessible Fields

The following accessible fields have been defined:

public final static int FLAT
Detector geometry definition: flat.
public final static int CYLINDRICAL
Detector geometry definition: cylindrical.
public final static double DTOR
Conversion factor - degrees to radians.
public final static double RTOD
Conversion factor - radians to degrees.

4.7.2.4 Detector and Reciprocal Lattice

4.7.2.4.1 Introduction

This section has methods to convert between detector coordinates and reciprocal lattice coordinates. Note that the JdlPositionedDetector class has versions of these methods which make use of some internally stored data.

Methods:

Reciprocal lattice to detector - reciprocalLatticeToDetector
Detector to reciprocal lattice - detectorToReciprocalLattice
Convert mm to rasters - mmToRasters
Convert rasters to mm - rastersToMM

4.7.2.4.2 Reciprocal lattice to detector - reciprocalLatticeToDetector

This method calculates ideal detector coordinates (xd, yd MOSFLM convention) in mm from the pattern centre from a set of reciprocal lattice coordinates for a reflection. Methods for applying distortion corrections may be found in the JdlDistortionCorrections class.

Method Definition:
public static JdlXY reciprocalLatticeToDetector (double[] xr, double ctod, JdlVec s0, Jdl3x3 ddinv, JdlVec dn, int dgeom)
Parameters List:
xr
The reciprocal lattice coordinates xr[3].
ctod
The crystal to detector distance in mm.
s0
The beam vector.
ddinv
The inverse of the detector orientation matrix.
dn
The detector normal vector.
dgeom
Detector geometry:
= 0, Flat
= 1, Cylindrical (cylinder axis along second local axis)
(May use FLAT or CYLINDRICAL)
Method Return:
The ideal detector coordinates in mm (from the centre) JdlXY.x is coordinate along first local axis (e.g. xd), JdlXY.y is coordinate along the second local axis (e.g. yd). Note: For a flat detector it may return null if reflection could not be recorded on even a very large detector. It will also return null for an unknown detector geometry.

4.7.2.4.3 Detector to reciprocal lattice - detectorToReciprocalLattice

This method calculates reciprocal lattice coordinates for a reflection from the ideal dectector coordinates in mm from the pattern centre. To get 'ideal' detector coordinates from 'real' coordinates see the JdlDistortionCorrections class.

Method Definition:
public static JdlVec detectorToReciprocalLattice(double xd, double yd, JdlVec s0, Jdl3x3 dd, double dst2)
Parameters List:
xf
The ideal detector 'x' coordinate in mm. (MOSFLM convention).
yf
The ideal detector 'y' coordinate in mm.
s0
The beam vector.
dd
The detector orientation matrix.
dst2
(d*)**2 for the reflection. Required for the Laue case but may give zero for the monochromatic case.
Method Return:
Returns the reciprocal lattice coordinates in a 3 element vector.

4.7.2.4.4 Convert mm to rasters - mmToRasters

This method converts a set of detector coordinates in mm relative to the pattern centre to rasters in the image.

Method Definition:
public static JdlXY mmToRasters (JdlXY xy, double ax1_cen, double ax2_cen, double pixsiz_ax1, double pixsiz_ax2)
Parameters List:
xy
The coordinates in mm from the pattern along the first local axis in xy.x and second local axis xy.y.
ax1_cen
Image centre position in rasters along local axis 1.
ax2_cen
Image centre position in rasters along local axis 2.
pixsiz_ax1
Pixel size in mm along local axis 1.
pixsiz_ax2
Pixel size in mm along local axis 2.
Method Return:
The coordinates converted to rasters.

4.7.2.4.5 Convert rasters to mm - rastersToMM

This method converts a set of detector coordinates from image rasters to mm relative to the pattern centre.

Method Definition:
public static JdlXY rastersToMM (JdlXY xy, double ax1_cen, double ax2_cen, double pixsiz_ax1, double pixsiz_ax2)
Parameters List:
xy
The coordinates in image rasters along the first local axis in xy.x and second local axis xy.y.
ax1_cen
Image centre position in rasters along local axis 1.
ax2_cen
Image centre position in rasters along local axis 2.
pixsiz_ax1
Pixel size in mm along local axis 1.
pixsiz_ax2
Pixel size in mm along local axis 2.
Method Return:
The coordinates converted to mm from the pattern centre.

4.7.2.5 Crystal Setting Methods

4.7.2.5.1 Introduction

This section has methods to set up a B-matrix or an Orienatation Matrix and to perform cell and setting related functions.

Methods:

Set B-matrix - setBMatrix
Set B-matrix - setBMatrix
Set orientation matrix - setOrientationMatrix
Set orientation matrix - setOrientationMatrix
Cell orthogonalisation - setOrthogonalisationMatrix
Get cell vectors - getCellVectors
Get third vector - getThirdVector
Get missetting angles - getMissettingAngles

4.7.2.5.2 Set B-matrix - setBMatrix

Set up a crystallographic B-Matrix.

Method Definition:
public static Jdl3x3 setBMatrix (JdlCell cell, double wavelength)
Parameters List:
cell
The real cell parameters.
wavelength
The wavelength in Angstroms.
Method Return:
The B-Matrix.

4.7.2.5.3 Set B-matrix - setBMatrix

Set up a crystallographic B-Matrix.

Method Definition:
public static Jdl3x3 setBMatrix (double[] cell, double wavelength)
Parameters List:
cell
A six element array containing the real cell parameters in Angstroms and degrees.
wavelength
The wavelength in Angstroms.
Method Return:
The B-Matrix.

4.7.2.5.4 Set orientation matrix - setOrientationMatrix

Set up crystal orientation matrix.

Method Definition:
public static Jdl3x3 setOrientationMatrix (JdlCell cell, double wavelength, double[][] umat, double phi1, double phi2, double phi3)
Parameters List:
cell
The cell as a JdlCell Object.
wavelength
The wavelength in Angstroms.
umat
The 3x3 U-matrix.
phi1
Rotation around the laboratory 'X' axis - missetting angle.
phi2
Rotation around the laboratory 'Y' axis - missetting angle.
phi3
Rotation around the laboratory 'Z' axis - missetting angle.
Method Return:
Returns the required orientation matrix.

4.7.2.5.5 Set orientation matrix - setOrientationMatrix

Set up crystal orientation matrix.

Method Definition:
public static Jdl3x3 setOrientationMatrix (double[] cell, double wavelength, double[][] umat, double phi1, double phi2, double phi3)
Parameters List:
cell
A six element array containing the real cell parameters in Angstroms and degrees.
wavelength
The wavelength in Angstroms.
umat
The 3x3 U-matrix.
phi1
Rotation around the laboratory 'X' axis - missetting angle.
phi2
Rotation around the laboratory 'Y' axis - missetting angle.
phi3
Rotation around the laboratory 'Z' axis - missetting angle.
Method Return:
Returns the required orientation matrix.

4.7.2.5.6 Cell orthogonalisation - setOrthogonalisationMatrix

This method returns the standard orthogonalisation matrix for a real unit cell.

Method Definition:
public static Jdl3x3 setOrthogonalisationMatrix(JdlCell cell)
Parameters List:
cell
The real cell.
Method Return:
The standard orthogonalisation matrix.

4.7.2.5.7 Get cell vectors - getCellVectors

This method gets the cell vectors in the standard orthogonal frame and also returns additional cell based vectors if required.

Method Definition:
public static JdlVec[] getCellVectors(JdlCell cell, int latt)
Parameters List:
cell
The real cell.
latt
Lattice type (1-7 for P, A, B, C, I, F, R) or 0 for cell vectors only. Give 1 for primitive cell or to return main cell vectors + vectors, 011, 101, 110, and 111. For values 2-6, vectors from the origin to the centered positions will also be returned.
Method Return:
Array of three vectors for the real cell parameters a, b and c respectively + related vectors.

4.7.2.5.8 Get third vector - getThirdVector

This method calculates a third cell vector given two cell vectors, the length of the third vector and the angles between the third vector and the first two cell vectors. </br> If vectors for A and B are known then vect1 = the A vector, vect2 = the B vector, ang1 = beta, ang2 = alpha </br> If vectors for B and C are known then vect1 = the B vector, vect2 = the C vector, ang1 = gamma, ang2 = beta </br> If vectors for A and C are known then (reverse order to get right handed set) vect1 = the C vector, vect2 = the A vector, ang1 = gamma, ang2 = alpha </br>

Method Definition:
public static JdlVec getThirdVector(JdlVec vec1, JdlVec vec2, double ang1, double ang2, double vlen, double tol)
Parameters List:
vect1
The vector for the first cell axis.
vect2
The vector for the second cell axis.
ang1
The required angle between the third vector and the first vector.
ang1
The required angle between the third vector and the second vector.
vlen
The length of third vector.
tol
The first angle is used explicitly in the calculation of the third vector but then a rotation around vect1 is determined by an iterative procedure to within 'tol' degrees (e.g. 0.001).
Method Return:
Returns the required third vector.

4.7.2.5.9 Get missetting angles - getMissettingAngles

Get the crystal missetting angles from the standard setting for a crystal given a set of found cell vectors with respect to the laboratory axes (assumes a* along X and b* in XY plane (Wonacott convention). The method incorporates coding by M. Elder

Method Definition:
public static double[] getMissettingAngles(JdlVec vec1, JdlVec vec2, JdlVec vec3, Jdl3x3 umat)
Parameters List:
vec1
First cell vector
vec2
Second cell vector
vec3
Third cell vector
umat
The 'U' matrix
Method Return:
Array containing the three missetting angles PHI_X, PHI_Y and PHI_Z in degrees.

4.7.2.6 Get nodal indices

4.7.2.6.1 Introduction

This section has a method to calculate a set of nodal indices for a (Laue) reflection.

Methods:

Get nodal indices - getNodalIndices

4.7.2.6.2 Get nodal indices - getNodalIndices

Calculate a set of nodal indices from a set of reflection indices.

Method Definition:
public static void getNodalIndices(int[] ihkl, int[] nhkl)
Parameters List:
ihkl
3 element array containing the input indices.
nhkl
3 element array in which the nodal indices will be returned.

4.7.2.7 Predict Rotation Reflections

4.7.2.7.1 Introduction

This section has methods to predict reflections for a rotation image for the monochromatic rotation method. It is closely based on code from Oscgen & Madnes by Peter Brick, Andrew Leslie, Jean Claude Thierry, Alan J. Wonacott and J. W. Pflugrath from the Reeke prediction coded by R.M. Sweet. The input parameters may be derived from a Diffraction Data Module object, objects containing the required detector and crystal data or from a full and explicit list of the required parameters. In each case, the actual output is handled using an object implementing the JdlRotReflOutputHandler interface so that the method is not tied to any particular output reflection list format. Note that the prediction methods handle systematic absences as determined by the lattice type but the user supplied output object should handle any additional absences. Quick options are available which predict reflections but do not distinguish between fully and partially recorded reflections.

Methods:

Predict using DDM - predictRotationReflections
Predict using DDM - predictRotationReflections
Predict reflections - predictRotationReflections
Predict reflections - predictRotationReflections
Predict single reflection - predictSingleReflection

4.7.2.7.2 Predict using DDM - predictRotationReflections

This is the first of two methods to predict rotation reflections from the parameters stored in a JdlDiffractionDataModule object. The required image is selected via the set number and image number.

Method Definition:
public static boolean predictRotationReflections ( JdlDiffractionDataModule ddm, int iset, int irange, int imgnum, boolean quick, JdlRotReflOutputHandler refout)
Parameters List:
ddm
The JdlDiffractionDataModule object containing the detector and crystal data.
iset
The set number within the Diffraction Data Module.
irange
The rotation range number.
imgnum
The number of the image (within the requested rotation range) for which the prediction is to be carried out.
quick
If set to true a quick prediction will be carried out with fewer details being calculated for each reflection. If false the full detailed prediction will be performed (see the parameters of the JdlRotReflOutputHandler outputPredictedReflection(..) method for details of the items which are calculated.
refout
An object implementing the JdlRotReflOutputHandler interface to output the reflection data and handle systematic absences other than those determined from the lattice type.
Method Return:
Returns the error flag set by the 'refout' object.

4.7.2.7.3 Predict using DDM - predictRotationReflections

This is the second of two methods to predict rotation reflections from the parameters stored in a JdlDiffractionDataModule object. The required image is selected via the set number and a rotation angle range.

Method Definition:
public static boolean predictRotationReflections ( JdlDiffractionDataModule ddm, int iset, int imgnum, double rotimg_start, double rotimg_end, boolean quick, JdlRotReflOutputHandler refout)
Parameters List:
ddm
The JdlDiffractionDataModule object containing the detector and crystal data.
iset
The set number within the Diffraction Data Module.
imgnum
The number of the image (within the requested rotation range) for which the prediction is to be carried out.
rotimg_start
The start angle for the rotation range in degrees.
rotimg_end
The end angle for the rotation range in degrees.
quick
If set to true a quick prediction will be carried out with fewer details being calculated for each reflection. If false the full detailed prediction will be performed (see the parameters of the JdlRotReflOutputHandler outputPredictedReflection(..) method for details of the items which are calculated.
refout
An object implementing the JdlRotReflOutputHandler interface to output the reflection data and handle systematic absences other than those determined from the lattice type.
Method Return:
Returns the error flag set by the 'refout' object.

4.7.2.7.4 Predict reflections - predictRotationReflections

This method predicts reflections using data stored in objects containing details of the detector and crystal. The rotation range is also specified.

Method Definition:
public static boolean predictRotationReflections ( JdlPositionedDetector posdet, JdlPositionedCrystal poscrys, double rotimg_start, double rotimg_end, boolean quick, JdlRotReflOutputHandler refout)
Parameters List:
posdet
A JdlPositionedDetector object containing details of the positioned detector, gonioneter and X-ray source.
poscrys
A JdlPositionedCrystal containing details of the crystal cell, symmetry and setting.
rotimg_start
The start angle for the rotation range in degrees.
rotimg_end
The end angle for the rotation range in degrees.
quick
If set to true a quick prediction will be carried out with fewer details being calculated for each reflection. If false the full detailed prediction will be performed (see the parameters of the JdlRotReflOutputHandler outputPredictedReflection(..) method for details of the items which are calculated.
refout
An object implementing the JdlRotReflOutputHandler interface to output the reflection data and handle systematic absences other than those determined from the lattice type.
Method Return:
Returns the error flag set by the 'refout' object.

4.7.2.7.5 Predict reflections - predictRotationReflections

This version specifies the individual parameters explicitly.

Method Definition:
public static boolean predictRotationReflections (double rots, double rote, double[][] aprs, double[][] apre, double[][] aprsx, double[][] aprex, double[] s0, double[] scax, double dst2mx, double dstpl2, int nwmax, int latt, int isyn, double divh_half, double divv_half, double eta_half, double delamb, double delcor_half, int iax_h, int iax_v, boolean quick, JdlRotReflOutputHandler refout)
Parameters List:
rots
Rotation start angle in degrees.
rote
Rotation end angle in degrees.
aprs[3][3]
Orientation matrix at start of rotation range.
apre[3][3]
Orientation matrix at end of rotation range.
aprsx[3][3]
Orientation matrix at start of range extended (in negative direction) by maximum possible reflection width.
aprex[3][3]
Orientation matrix at end of range extended (in positive direction) by maximum possible reflection width.
s0[3]
Beam direction vector wrt laboratory axes.
scax[3]
Scan axis direction vector wrt laboratory axes.
dst2mx
Maximum value of (dstar)**2.
dstpl2
Maximum value of (dstar)**2 allowing for a bit extra for determining overlaps at edge of image.
nwmax
Maximum no. of images over which a spot may be spread.
latt
Lattice type flag 1-7 for p, a, b, c, i, f, r for lattice based systematic absences. User must handle other space group specific absences in user supplied reflection output object.
isyn
Source type flag =0 lab source, =1 synchrotron.
divh_half
Horizontal beam divergence (half-width, radians).
divv_half
Vertical beam divergence (half-width, radians).
eta_half
Mosaicity (half_width, radians).
delamb
Dispersion (delta(lambda)/lambda).
delcor_half
Correlated dispersion term (only used for synchrotron) (half-width, radians).
iax_h
No. of horizontal axis in laborarory system (1=x, 2=y, 3=z).
iax_v
No. of vertical axis in laborarory system (1=x, 2=y, 3=z).
quick
Logical flag; If true, do a quick analysis which does not distinguish between fulls & partials and which does not calculate relection widths; If false, do the full detailed prediction.
refout
An object implementing the JdlRotReflOutputHandler interface to output the reflection data and handle systematic absences other than those determined from the lattice type.
Method Return:
Returns the error flag set by the 'refout' object.

4.7.2.7.6 Predict single reflection - predictSingleReflection

This method predicts the position for a single reflection (rotation method) based on the detector parameters and crystal setting.

Method Definition:
public static JdlPredictedReflection predictSingleReflection ( int h, int k, int l, JdlPositionedDetector posdet, Jdl3x3 mat, double rotmid, JdlDistortionCorrections distor)
Parameters List:
h
The 'h' index.
k
the 'k' index.
l
the 'l' index.
posdet
The positioned dectector object for the detector setting.
mat
The crystal orientation matrix.
rotmid
The mid angle of the rotation range.
distor
A distortions corrections object (may be null if distortion corrections are not to be applied).
Method Return:
A JdlPredictedReflection object with details of the predicted reflection (details set as described for a 'quick' prediction).

4.7.2.8 Unique Reflections

4.7.2.8.1 Introduction

This section has a method to generate a list of the unique reflections for a given cell and space group.

Method:

Find unique limits - getUniqueIndexLimits
Generate unique reflections - generateUniqueReflections
Generate unique reflections - generateUniqueReflections

4.7.2.8.2 Find unique limits - getUniqueIndexLimits

This method finds the limits for h, k and l for a Laue group, cell and resolution limit (From CCP4 code).

Method Definition:
public static void getUniqueIndexLimits(int nlaue, JdlCell cell, double resmax, int[] hkl_lims)
Parameters List:
nlaue
The Laue group number.
cell
The cell.
resmax
Resolution limit.
hkl_lims
A six element array returning hmin, hmax, kmin, kmax, lmin and lmax limits.

4.7.2.8.3 Generate unique reflections - generateUniqueReflections

This method generates the unique list of reflections for a given cell, space group and wavelength within given resolution limits. The resolution limits may be given in either order.

Method Definition:
public static int generateUniqueReflections(JdlSymmetry symm, JdlCell cell, double wave, double resmin, double resmax, JdlUnqReflOutputHandler refout)
Parameters List:
symm
The symmetry (full symmetry must be defined)
cell
The real cell parameters.
wave
The wavelength in Angstroms.
resmin
The minimum resolution in Angstroms.
resmax
The maximum resolution in Angstroms (or 0.0 if no limit).
refout
An object implementing the JdlUnqReflOutputHandler interface to output the reflection data.
Method Return:
The number of reflections generated (0 if symmetry not defined or other invalid parameters given)

4.7.2.8.4 Generate unique reflections - generateUniqueReflections

This method generates the unique list of reflections for a given cell, space group and wavelength within given resolution limits. The resolution limits may be given in either order and the other parameters are derived, in this version of the method, from a Diffraction Data module object.

Method Definition:
public static int generateUniqueReflections(JdlDiffractionDataModule ddm, int iset, int img, double resmin, double resmax, JdlUnqReflOutputHandler refout)
Parameters List:
ddm
JdlDiffractionDataModule object containing the cell, symmetry and wavelength.
iset
Set number within the JdlDiffractionDataModule object.
img
The (reference) image number - normally 1.
resmin
The minimum resolution in Angstroms.
resmax
The maximum resolution in Angstroms (or 0.0 if no limit).
refout
An object implementing the JdlUnqReflOutputHandler interface to output the reflection data.
Method Return:
The number of reflections generated (0 if symmetry not defined or other invalid parameters given)

4.7.2.9 Predict Laue Spots

4.7.2.9.1 Introduction

This section has methods to predict spots for Laue image.

Methods:

Predict Laue using DDM - predictLaueSpots
Predict Laue using DDM - predictLaueSpots
Predict Laue spots - predictLaueSpots
Predict Laue spots - predictLaueSpots

4.7.2.9.2 Predict Laue using DDM - predictLaueSpots

This is the first of two methods to predict Laue spots from the parameters stored in a JdlDiffractionDataModule object. The required image is selected via the set number and image number.

Method Definition:
public static boolean predictLaueSpots (JdlDiffractionDataModule ddm, int iset, int irange, int imgnum, JdlLaueSpotOutputHandler refout)
Parameters List:
ddm
The JdlDiffractionDataModule object containing the detector and crystal data.
iset
The set number within the Diffraction Data Module.
irange
The rotation range number.
imgnum
The number of the image (within the requested range) for which the prediction is to be carried out.
refout
An object implementing the JdlLaueSpotOutputHandler interface to output the spot data and handle systematic absences other than those determined from the lattice type.
Method Return:
Returns the error flag set by the 'refout' object.

4.7.2.9.3 Predict Laue using DDM - predictLaueSpots

This is the second of two methods to predict Laue spots from the parameters stored in a JdlDiffractionDataModule object. The required image is selected via the set number and a rotation angle.

Method Definition:
public static boolean predictLaueSpots (JdlDiffractionDataModule ddm, int iset, int imgnum, double rot_ang, JdlLaueSpotOutputHandler refout)
Parameters List:
ddm
The JdlDiffractionDataModule object containing the detector and crystal data.
iset
The set number within the Diffraction Data Module.
imgnum
The number of the image (within the requested range) for which the prediction is to be carried out.
rot_ang
The rotation angle for the image in degrees.
refout
An object implementing the JdlLaueSpotOutputHandler interface to output the spot data and handle systematic absences other than those determined from the lattice type.
Method Return:
Returns the error flag set by the 'refout' object.

4.7.2.9.4 Predict Laue spots - predictLaueSpots

This method predicts Laue spots using data stored in objects containing details of the detector and crystal. The rotation (spindle) angle is also specified.

Method Definition:
public static boolean predictLaueSpots (JdlPositionedDetector posdet, JdlPositionedCrystal poscrys, double rot_ang, JdlLaueSpotOutputHandler refout)
Parameters List:
posdet
A JdlPositionedDetector object containing details of the positioned detector, gonioneter and X-ray source.
poscrys
A JdlPositionedCrystal containing details of the crystal cell, symmetry and setting.
rot_ang
The start angle for the rotation range in degrees.
refout
An object implementing the JdlLaueSpotOutputHandler interface to output the spot data and handle systematic absences other than those determined from the lattice type.
Method Return:
Returns the error flag set by the 'refout' object.

4.7.2.9.5 Predict Laue spots - predictLaueSpots

This version specifies the individual parameters explicitly.

Method Definition:
public static boolean predictLaueSpots(double[][] a, double wmin, double wmax, double dmin, int latt, JdlLaueSpotOutputHandler refout)
Parameters List:
a[3][3]
The orientation matrix for the curre3nt crystal setting.
wmin
The minimum wavelength for the prediction.
wmax
The maximum wavelength for the prediction.
dmin
The minimum 'd' spacing limit.
latt
Lattice type flag 1-7 for p, a, b, c, i, f, r for lattice based systematic absences. User must handle other space group specific absences in user supplied reflection output object.
refout
An object implementing the JdlLaueSpotOutputHandler interface to output the spot data and handle systematic absences other than those determined from the lattice type.
Method Return:
Returns the error flag set by the 'refout' object.

4.7.2.10 Cell Parameters

4.7.2.10.1 Introduction

This section has methods to set convert a set of cell parameters between the full set of six and a contracted set containing a single entry for each unique variable cell parameter.

Methods:

Contract cell - contractCell
Expand cell - expandCell
Unique cell parameters - numberUniqueCellParameters

4.7.2.10.2 Contract cell - contractCell

This method converts the full set of cell parameters (real or reciprocal) to a contracted set.

Method Definition:
public static double[] contractCell(double[] cell, int isys)
Parameters List:
cell
The six cell parameters (a, b, c, alpha, beta, gamma.
isys
The crystal system number 1-7.
Method Return:
Returns an array of six values being the unique variable cell parameters folowed by zeroes for unused entries. e.g. For a monoclinic cell a, b, c, beta, 0, 0 will be returned; for a tetragonal cell a, c, 0, 0, 0, 0 will be returned.

4.7.2.10.3 Expand cell - expandCell

This method converts the contracted set cell of cell parameters (real or reciprocal) to the full set (see also contractCell(..) method).

Method Definition:
public static double[] expandCell(double[] cell, int isys, boolean recip)
Parameters List:
cell
An array of the contracted cell parameters (need only be of the length required to hold the unique variable parameters)
isys
The crystal system number 1-7.
recip
Set to true if a reciprocal cell or false if a real cell. (required to set the correct angle for a hexagonal cell)
Method Return:
An array of the six full cell parameters.

4.7.2.10.4 Unique cell parameters - numberUniqueCellParameters

This method returns the number of unique variable cell parameters (see also contractCell(..) method). for a given crystal system.

Method Definition:
public static int numberUniqueCellParameters(int isys)
Parameters List:
isys
Crystal system 1-7.
Method Return:
The number of unique variable cell parameters.

⇑ Up 2   ⇑ Up 1   ⇑ Top of this