# Changes between Version 3 and Version 4 of LatticeComputations

Ignore:
Timestamp:
Jul 6, 2010 1:51:02 PM (11 years ago)
Comment:

--

Unmodified
Removed
Modified
• ## LatticeComputations

 v3 For these routines, a variety of transformation routines are provided to convert between the unit cell constants and many other commonly used values. The unit cell is specified as a tuple of 6 values, corresponding to a, b, c in angstroms and alpha, beta and gamma as angles in degrees. Also used for these computations are the real and reciprocal lattice metric tensor (g and G, respectively) which are 3x3 tensors. Also used is an "A" tensor, which is closely related to the G tensor and is used to compute d-spacings from h,k,l values The unit cell is specified as a tuple of 6 values, corresponding to a, b, c in angstroms and alpha, beta and gamma as angles in degrees. Also used for these computations are the real and reciprocal lattice metric tensor (g and G, respectively) which are 3x3 tensors. Also used is an "A" vector, which is closely related to the G tensor and is used to compute d-spacings from h,k,l values using: 1/D^2^ = ''h''^2^*A(1) + ''k''^2^*A(2) + ''l''^2^*A(3) + ''h''*''k''*A(4) + ''h''*''l''*A(5) + ''k''*''l''*A(6) Somewhat confusingly, A and B are used to define a pair of 3x3 transformation matrices, where A*x converts Cartesian coordinates x into fractional ones and B does the inverse transform. In addition, A and B are used to define a pair of 3x3 transformation matrices, where A*x converts Cartesian coordinates x into fractional ones and B does the inverse transform. Routine '''GenHBravais''' is used to compute the unique reflection positions for a given Bravais lattice type. This is indended to provide a list of unique d-spacings for a given unit cell and centering setting. If two crystallographically distinct reflections, for example the (300) and the (122) reflections in a cubic cell, Routine '''GenHBravais''' is used to compute the unique reflection positions for a given Bravais lattice type. This is intended to provide a list of unique d-spacings for a given unit cell and centering setting. If two crystallographically distinct reflections, for example the (300) and the (122) reflections in a cubic cell, only one of the two will be returned. Routine !GetBraviasNum is provided to translate output from GSASIIspc to the Bravais lattice numbers (0-13) used in GenHBravais. Note that only the standard settings for centering are accepted by this routine (C-centering, monoclinic b-unique). A sample code fragment that uses these routines is: