gpp4
1.3.1
|
From CCP4 5.0, the core handling of symmetry information is done by a set of C functions. Separate CSYM library documentation describes the structures and functions used, and the API for C/C++ programs.
For Fortran programs, the original set of subroutines (held in symlib.f
) has been replaced by an CSYM library interface to the C library. From the point of view of an application programmer, this interface should be identical to the original set of subroutines. This document originates from the original Fortran library, but should be applicable to the new library.
The available Fortran calls have been arranged as much as possible into groups by function. There are often several versions of calls apparently performing the same or very similar tasks, reflecting the policy of never removing existing functionality in order to maintain compatibility with programs written using older versions of the library.
In CCP4, the primary symmetry information is held in a library data file defined by the logical name SYMINFO. In the standard configuration of CCP4 this is the file syminfo.lib which normally resides in $CLIBD. This file replaces the previous data file SYMOP (i.e. $CLIBD/symop.lib).
syminfo.lib
holds information for all the standard spacegroups in the International Tables. For each spacegroup, several alternative settings are included (e.g. "P 1 2 1", "P 1 1 2" (a.k.a. 1003) and "P 2 1 1" for spacegroup 3).
Each setting of a spacegroup is delimited by begin_spacegroup / end_spacegroup records, and contains the following items:
number = standard spacegroup number basisop = change of basis operator symbol ccp4 = CCP4 spacegroup number e.g. 1003 (0 if not a CCP4 group) symbol Hall = Hall symbol symbol xHM = extended Hermann Mauguin symbol symbol old = CCP4 spacegroup name (blank if not a CCP4 group) symbol laue = Laue group symbol symbol patt = Patterson group symbol symbol pgrp = Point group symbol hklasu ccp4 = reciprocal space asymmetric unit (with respect to standard setting) mapasu ccp4 = CCP4 real space asymmetric unit (with respect to standard setting) (negative ranges if not a CCP4 group) mapasu zero = origin based real space asymmetric unit (with respect to current setting) mapasu nonz = non-origin based real space asymmetric unit (with respect to current setting) cheshire = Cheshire cell (with respect to standard setting) symop = list of primitive symmetry operators cenop = list of centering operators
For example:
begin_spacegroup number 3 basisop z,x,y symbol ccp4 1003 symbol Hall ' P 2y (z,x,y)' symbol xHM 'P 1 1 2' symbol old 'P 1 1 2' symbol laue '-P 2' '2/m' symbol patt '-P 2' '2/m' symbol pgrp ' P 2' '2' hklasu ccp4 'k>=0 and (l>0 or (l=0 and h>=0))' mapasu ccp4 0\<=x\<=1/2; 0\<=y\<1; 0\<=z\<1 mapasu zero 0\<=x\<1; 0\<=y\<=1/2; 0\<=z\<1 mapasu nonz 0\<=x\<1; 0\<=y\<=1/2; 0\<=z\<1 cheshire 0\<=x\<=1/2; 0\<=y\<=0; 0\<=z\<=1/2 symop x,y,z symop -x,-y,z cenop x,y,z end_spacegroup
A call to Subroutine MSYMLB3(IST,LSPGRP,NAMSPG_CIF,NAMSPG_CIFS,NAMPG,NSYMP,NSYM,RlSymmMatrx) MSYMLB3 should be used to retrieve information from the symmetry library. Note that not all the data items are compulsory for MSYMLB3, although older versions of the routine (MSYMLB2, MSYMLB, MSYGET) still need them.
In syminfo.lib the symmetry operations in each spacegroup are listed as strings, for example X,Y,Z or -Y,X-Y,Z+1/3 etc. To be useful within a program these string representations have to be converted to some mathematical representation.
Typically a symmetry operation RSym will consist of a rotation operation R and a translation operation T (basically a vector). These are applied to a vector x to obtain x':
It is convenient to represent the rotation by a 3*3 matrix:
( R11 R12 R13 ) [R] = ( R21 R22 R23 ) ( R31 R32 R33 )
and the translation by a column vector with 3 elements:
( T1 ) [T] = ( T2 ) ( T3 ).
CCP4 uses 4x4 arrays to store these symmetry operations as follows:
RSym = ( R11 R12 R13 T1 ) ( R21 R22 R23 T2 ) ( R31 R32 R33 T3 ) ( 0 0 0 1 )
or
RSym = ( [R] | [T] ) ( 0 0 0 | 1 )
Essentially this is a 4x4 matrix holding 3x3 transformation matrix in the "top-left-hand corner", the 3-element column (translation) vector in the "top-right-hand corner", and then (0 0 0 1) in the bottom row.
The subroutine Subroutine MSYMLB3(IST,LSPGRP,NAMSPG_CIF,NAMSPG_CIFS,NAMPG,NSYMP,NSYM,RlSymmMatrx) MSYMLB3 will obtain the set of symmetry matrices in this representation for a given spacegroup, whilst Subroutine SYMFR2(ICOL,I1,NS,ROT) SYMFR2 or Subroutine SYMFR3(ICOL,I1,NS,ROT,EFLAG) SYMFR3 will obtain individual matrices from the string representation mentioned above. (Subroutine SYMTR4(NSYM,RSM,SYMCHS) SYMTR4 will perform the inverse operation, converting matrices to string representation.)
Using the convention outlined above, post-multiplying the 4x4 matrix by a column vector as follows:
RSym . [xf] [yf] [zf] [1 ]
will apply both the symmetry and the translation operations to real space coordinates with a single matrix multiplication. The CCP4 modlib MODLIB library provides matrix_vector_ops matrix-vector routines MATVEC4 and TRANSFRM which can be used to perform this operation.
The inverse of real-space symmetry matrices are applied to reflection indices by pre-multiplying them by a row vector representing hkl,
or,
Note that only the operations in the appropriate Laue group are applied to reflection indices, so there are no translational components (i.e. the vector part of the operation, [T], is zero). The subroutine Subroutine INVSYM(S,ST) INVSYM will invert a 4x4 matrix stored in this representation, for the purpose of applying symmetry operations to reflection indices.
Real space axis vectors are transformed like reciprocal space vectors, i.e.
while reciprocal space axis vectors are transformed like real space coordinates, i.e.
(See also the REINDEX documentation.)
The routines have been broken down into groups according to function.
This group contains routines for obtaining the lists of symmetry operators from the library, and converting between the string (eg Y,X,-Z etc) and matrix representations of symmetry operators.
x+z,z,-y
), reciprocal space operations (e.g. h,l-h,-k
) and reciprocal- and real-space axis vector operations (e.g. a*+c*,c*,-b*
and a,c-a,-b
respectively). SYMFR3 only translates real space coordinate operations. Use MSYMLB3 to obtain the set of symmetry operator matrices given the spacegroup name or number. SYMFR2/3 will generate individual symmetry operator matrices from their string representation (useful if the operators are a subset of a spacegroup). SYMTR4 performs the opposite action, and generates string representations of individual symmetry operations from the matrices.
INVSYM will generate the inverse matrix of a real space symmetry operation, to be applied to reflection indices as described in HOW SYMMETRY OPERATIONS ARE STORED AND APPLIED section 2.
These routines all derive additional information from the symmetry operators or the spacegroup name. The subroutine HKLRANGE returns the information stored in the common block which it shares with PGNLAU
Nb: routines Logical Function CENTRC(KHKL,ICENT) CENTRC and CENPHS both appear to be unused.
Call CENTRIC once to set up the symmetry elements in common blocks shared with CENTR. This defines the set of centric reflections. Then for each reflection, a call to CENTR will return whether it is centric.
Call EPSLN once to generate the epsilon zones (general sets of reflections eg 00l or 0k0) and determine the multiplicity/fold. For each reflection a call to EPSLON returns the zone and if the reflection is systematically absent. SYSAB is not called directly.
Logical Function HKLEQ(IH,KH) HKLEQ - used in SCALA to test if two reflections have equal indices.
Remember that the choice of asymmetric unit is NOT UNIQUE. These routines define the set of CCP4 asymmetric units. The limits for these definitions are given in DEFINITION OF THE CCP4 ASYMMETRIC UNIT section 3.
Call ASUSET first to set up symmetry operations in common blocks shared with the other routines. For each reflection calls can then be made to ASUPUT (return the unique hkl indices in the asymmetric unit and symmetry number) or ASUGET (obtain real space indices given unique hkl's and symmetry number). INASU will determine whether a given reflection lies in the asymmetric unit and ASUPHP will convert the phase.
Both these routines are called from within other routines, although they can also be called independently. ASUSET must be called before INASU can be used.
Neither of the routines XSPECIALS or KROT appear to be used in supported CCP4 programs.
Three subroutines for permuting symmetry operations. They do not really belong here in symlib, but are widely used invisibly in FFT routines using symmetry operations to permute axes for easier fast fourier calculations.
A set of routines used in SCALA, POSTREF and REBATCH.
These routines are not directly related to symmetry operations. Hashing is a method of storing data value pairs in such a way that they can be be efficiently retreived later on; the hash table is the resulting data structure.
These three routines share the common block RECPLT. SETRSL and STHLSQ are used only in CAD, whilst STS3R4 does not appear in any supported program.
This is how the routines are used in CAD. A call to SETRSL with the cell dimensions and angles sets up coefficients in RECPLT, which are then used by the function STHLSQ to calculate the quantity "(sin(theta)/lamba)**2" for any given set of h, k, l indices. From Bragg's Law, this quantity is equal to 1/(4*d**2), that is, one-quarter of the resolution. Within CAD, multiplication by 4 yields the resolution 1/d**2.
The exact function of this routine is unclear and it does not appear in any supported program.
The following calls are available to Fortran programs. They are arranged alphabetically.
Get original indices of reflection from asymmetric unit, i.e. reverse operation of ASUPUT. Symmetry defined by call to ASUSET.
On input:
On output:
The real-space symmetry matrices are applied in ASUPUT by premultiplying them by a row vector hkl, ie (h'k'l') = (hkl)R. So here we calculate (hkl) = (h'k'l') R**-1
Generate phase of symmetry equivalent JHKL from that of IHKL.
On input:
On output:
Put reflection into asymmetric unit defined by call to ASUSET
On input:
On output:
The real-space symmetry matrices are applied by premultiplying them by a row vector hkl, ie (h'k'l') = (hkl)R
Set up & store symmetry informtion for later use in ASUPUT or ASUGET
On input:
On output:
Creates a list of equivalent origins for the named spacegroup.
ARGUMENTS
Taken from Alexei Vagin
The function CCP4_HASH_LOOKUP returns the value NFIND (which was input when setting up the function in the subroutine CCP4_HASH_SETUP) for the large range variable NSER. Uses hashing. (see comments for CCP4_HASH_SETUP for description of hashing method).
This subroutine sets up a value for the function ccp4_hash_lookup.
When ccp4_hash_lookup(nser) is later evaluated it will return nfind
This function will allow the efficient retrieval of an identifier for a large range variable (such as a crystal number). The values of the function ccp4_hash_lookup(nser) are stored in the array it(2, kpri) where kpri is the prime number used to generate the function.
The array 'it' lives in the common block which is shared by ccp4_hash_setup and the function ccp4_hash_lookup
NOTES: A hash table is a way of storing information so that it easily be retrieved without the need for indexing or long searches. NSER is referred to as the "key", which is "hashed" (computer- science speak for "messed up") by the hashing function (in this case MOD(NSER4,KPRI) + 1) to determine where the value pair will be stored. The function LOOKUP can then search on the same basis when supplied with the key, to retreive the pair in (at most) 3 calculations. Note that KPRI (the table size) MUST BE A PRIME in order for this method to work.
Initialises elements of array 'it' used in ccp4_hash_setup and ccp4_hash_lookup to zero.
Input IH(3) - reflection indices
Returns IC
Determine whether a reflection is centric (return IC=1) or not (IC=0). If none of the zone tests is satisfied, the reflection is non-centric.
Returns value as true if reflection khkl is centric, false otherwise. It is general for all point groups - but only for the unique set of indices which conforms to the criterion of maximising the value of
as produced by e.g. subroutine turnip in protin and ulysses.
In this case the required tests are controlled by 7 flags in icent for
(the last is needed in pg312)
This is Randy Read's method of defining centric reflections. It uses NSM and the symmetry operators stored in RSMT(4,4,NSM)
It decides how many centric zones there are, and flags them.
set up tests for 0kl h0l hk0 hhl hkh hkk h,-hl hk-h hk-k -h 2h l 2h -h l hkl
Zones are encoded using an idea from a program by Bricogne. If h*zone(1) + k*zone(2) + l*zone(3) is equal to 0.0, that reflection is in that zone. All that is needed is the most general conditions - a reflection is either centric or not.
Gets determinant of a matrix
It works out the epsilon cards using NSM and the symmetry operators stored in RSMT(4,4,NSM).
This is Randys program description:
Input IH(3) - reflection indices
Returns EPSI ( epsilon zone) , and ISYSAB flag. Systematic absences flagged with ISYSAB = 1
Find the zone a reflection falls into, and return the appropriate value for the reflection multiplicity factor. Each reflection must have a zone.
Returns true if N has all prime factors <= 19
Find suitable grid sample, approximately = SAMPLE/2 * maximum index, with required factor, and no prime factor > 19
On entry:
On exit:
Checks if indices are equal.
Returns true if indices ih = kh
Return HKL ranges chosen in PGNLAUE
Arguments: (INTEGER) HRNG0,HRNG1,KRNG0,KRNG1,LRNG0,LRNG1
Arguments:
Returns:
INASU = +1 if h k l chosen
INASU = -1 if -h-k-l chosen
INASU = 0 if reflection is out-of-bounds
Inverts a 4*4 matrix. Used here to get inverse symmetry operation for generating equivalent h k l, i.e.
Arguments:
Apply NS'th symmetry operation to JP to get LP, check if lies in asymmetric unit given by NAU.
Returns KROT=0 correct operation, =1 if not.
Get symmetry operations for space-group LSPGRP from library file, logical name SYMINFO.
Arguments:
Get symmetry operations from library file, logical name SYMINFO. Space group defined by LSPGRP - spacegroup number or NAMSPG - spacegroup name.
Arguments:
Identical to MSYMLB, except that on output NAMSPG_CIF has correct CIF format, e.g. 'P 21 21 21'
NAMSPG_CIF should be as in _symmetry.space_group_name_H-M
Another version of MSYMLB, with the following changes:
The routine will try first to match the assigned NAMSPG_CIF to ANY name given on the spacegroup line:
It is satisfied by the first fit it finds:
eg: 47 8 8 Pmmm PGmmm ORTHORHOMBIC 'P 2/m 2/m 2/m' 'P m m m'
You could call the subroutine with NAMSPG_CIF = 'Pmmm' or 'P 2/m 2/m 2/m' or 'P m m m'
But it will always return the LONGEST possible name. ie 'P 2/m 2/m 2/m'
In the library file, the header for each entry may contain (Order not guaranteed, but must start with)
LSPGRP NLINS and contain either NAMSPG or NAMSPG_CIF
LSPGRP NLINS NLINP NAMSPG NAMPG CRYSTAL NAMSPG_CIF
where:
On entry:
Returns:
Determine Patterson spacegroup from true space-group
On entry:
On exit:
Arguments:
This subroutine chooses the primitive set of symmetry operators.
If necessary it re-orders the symmetry operators to give the primitive ones first.
This subroutine works out the point group name NAMPG. That is ; it checks rotation axes, etc etc and recognises these point groups. (It DOES NOT cope with mirror planes etc)
Gronigen MDF stuff: It now sets up the common block MDFPAR for MDF file mods and fills in the symmetry info. See subroutine for details.
Gronigen subroutine.
Use this subroutine to transfer information to and from MDFPAR.
If JLASS eq 0 then fill JLASS JCENTR JSCREW from common block.
If JLASS gt 0 then fill KLASS ICENTR ISCREW in common block.
Choose Laue group from PG name.
On entry:
On exit:
This subroutine returns a laue code number used to choose the unique region of reciprocal space for each point group.
The number nlaue is the same as the one set in CAD for this purpose.
Pointgroup Laue group Limits 3 pg1 1bar hkl:l>=0 hk0:h>=0 0k0:k>=0 1,2 pg1bar 4 pg2 (b) 2/m hkl:k>=0, l>=0 hk0:h>=0 3/b,4/b.... pgm pg2/m 5 pg2 (c) 2/m hkl:k>=0, l>=0 h0l:h>=0 1003,1004 6 pg222 mmm hkl:h>=0, k>=0, l>=0 16 ... pgmm2 pgmmm 7 pg4 4/m hkl:h>=0, l>=0 with k>=0 if h=0 and pg4bar pg4/m k>0 if h>0 8 pg422 4/mmm hkl:h>=0, k>=0, l>=0 89.. pg4mm pg4bar2m pg4barm2 pg4/mmm 9 pg3 3bar hkl:h>=0, k>0 00l:l>0 143.. pg3bar 10 pg312 3/m hkl:h>=0, k>=0 with k\<=h for all l. pg32 pg3m pg3m1 pg3barm1 if k = 0 l>=0 Space group numbers : 149-151-153 157 159 162 163 11 pg321 3bar1m hkl:h>=0, k>=0 with k\<=h for all l. pg31m pg3bar1m if h = k l>=0 Space group numbers : 150-152-154 12 pg6 6/m hkl:h>=0, k>=0, l>=0 with k>=0 if h=0 pg6bar 6/m and k> 0 if h>0 13 pg622 6/mmm hkl:h>=0, k>=0, l>=0 with h>=k 177.. pg6mm pg6barm2 pg6bar2m pg 6/mmm 14 pg23 m3 hkl:h>=0, k>=0, l>=0 with l>=h, k>=h pgm3bar 15 pg432 m3m hkl:h>=0, k>=0, l>=0 with k>=l pg4bar3m pgm3barm
This has been modified by permuting the Nth column by matrix PERM.
Here is the code for clarity:
See PRMVCI - this routine is its real equivalent.
Print reciprocal space symmetry operations
The real-space symmetry matrices are applied by premultiplying them by a row vector hkl, ie (h'k'l') = (hkl)R
Convert PSIX,PSIY,PSIZ (= epsx,epsy,epsz) to PHIX,PHIY,PHIZ, using AVPHI
All angles in radians
Permutes inverse symmetry operations
Matrices passed in Common block ATSYM
Set up a suitable sampling grid for FFT
Input:
Output:
The sampling intervals must satisfy the following conditions:
This is ALL the point groups.
PG1 PG1bar PG2 PGm PG2/m PG222 PGmm2 PGmmm PG4 PG4bar PG4/m PG422 PG4mm PG4bar2m PG4/mmm PG3 PG3bar PG32 PG3m PG3barm PG6 PG6bar PG6/m PG622 PG6mm PG6bar2m PG6/mmm PG23 PGm/3bar PG432 PG4bar3m PGm3bar m
We use:
PG1 PG1bar PG2 PG2/m PG222 PGmmm PG4 PG4/m PG422 PG4/mmm PG3 PG3bar PG32 PG3bar/m PG6 PG6/m PG622 PG6/mmm PG23 PGm/3bar PG432 PGm3barm
For grid restrictions we only need to know the laue number. Here is the table:
3 pg1 1bar hkl:l>=0 hk0:h>=0 0k0:k>=0 1,2 4 pg2 2/m hkl:k>=0, l>=0 hk0:h>=0 3/b,4/b.... 5 pg2(c) 2/m hkl:k>=0, l>=0 h0l:h>=0 1003,1004 6 pg222 mmm hkl:h>=0, k>=0, l>=0 16 ... 7 pg4 4/m hkl:h>=0, l>=0 with k>=0 if h=0 and 8 pg422 4/mmm hkl:h>=0, k>=0, l>=0 89.. 9 pg3 3bar hkl:h>=0, k>0 00l:l>0 143.. 10 pg312 3/m hkl:h>=0, k>=0 with k\<=h for all l. if k = 0 l>=0 Space group numbers : 149-151-153 11 pg321 3/m hkl:h>=0, k>=0 with k\<=h for all l. if h = k l>=0 Space group numbers : 150-152-154 12 pg6 6/m hkl:h>=0, k>=0, l>=0 with k=0 if h=0 13 pg622 6/mmm 14 pg23 m3 15 pg432 m3m
Set appropriate box (asymmetric unit) for spacegroup (true spacegroup rather than FFT spacegroup) LSPGRP. For cubic symmetry spacegroups, this will be more than one asymmetric unit.
On entry:
On exit:
Set appropriate box (asymmetric unit) for spacegroup (true spacegroup rather than FFT spacegroup) LSPGRP. For cubic symmetry spacegroups, this will be more than one asymmetric unit.
NB This s/r differs from SETLIM in that the limits are taken from cctbx via CCP4's syminfo.lib file.
On entry:
On exit:
Routine to calculate coefficients for (sin(theta)/lambda)**2 from h,k,l for general axes.
First calculates the components of input axes in an orthonormal basis, then calculate components of reciprocal axes in same basis.
The input angles are in degrees.
Calculate (sin(theta)/lambda)**2 from h,k,l. The coefficients are set by a previous call to SETRSL. Works for any kind of axes.
Calculate (sin(theta)/lambda)**2 from h,k,l. The coefficients are set by a call to SETRSL. Works for any kind of axes.
Read and interpret symmetry operations
SYMFR2 recognises the following types of input:
real space symmetry operations, e.g. X+1/2,Y-X,Z reciprocal space operations, e.g. h,l-h,-k reciprocal axis vectors, e.g. a*+c*,c*,-b* real space axis vectors, e.g. a,c-a,-b
The subroutine returns the appropriate 4x4 transformation matrix for each operation. The calling program must interpret the resulting matrix(ces) correctly.
On entry I1 is the first character of ICOL to look at (say after keyword 'SYMM')
NS is the number of the first symmetry operation to be read, & returns with the number of the last one read.
On exit, ROT(4,4,NS) contains the real-space symmetry matrices, in standard convention, i.e.
Input:
Output:
Read and interpret symmetry operations.
Arguments:
Symmetry translation from matrix back to characters
This translates the symmetry matrices RSM(4,4,NSM) into INT TAB character strings
It gives the real and reciprocal space operations.
eg X,Y,Z H , K, L eg -Y,X-Y, Z -H-K, H, L etc
That is more complicated than you might think!!
Symmetry translation from matrix back to characters
This translates the symmetry matrices RSM(4,4,NSM) into INT TAB character strings
It gives the real and reciprocal space operations.
eg X,Y,Z H , K, L eg -Y,X-Y, Z -H-K, H, L etc
That is more complicated than you might think!!
Arguments :
Symmetry translation from matrix back to characters
This translates the symmetry matrices RSM(4,4,NSM) into INT TAB character strings
It gives the real and reciprocal space operations.
eg X,Y,Z H , K, L eg -Y,X-Y, Z -H-K, H, L etc
That is more complicated than you might think!!
Arguments :
Input IN(3) - reflection indices
Returns ISYSAB flag. Systematic absences flagged with ISYSAB = 1 Only reflns with EPSI > 1 need be considered.
This subroutine finds what coordinates occupy special positions i.e. have occupancies less than 1.0 from consideration of the symmetry operations.
There is no standard defined asymmetric unit so the definitions are arbitrary and may differ between differ packages. The subroutines in a) Subroutines for choosing asymmetric units for reflection data group 3.a are used to define the CCP4 asymmetric unit, and to determine whether a reflection falls within this definition.
Below are the definitions of the a. Reciprocal Space Asymmetric Unit Definitions reciprocal space and the b. Real Space Asymmetric Unit Definitions real space asymmetric units under the CCP4 convention.
The reciprocal space asymmetric unit is defined in the subroutine ASUSET from the Laue group using calls to the s/r's PGDEFN and PGNLAU. The limits of the CCP4 asymmetric unit are (from Subroutine PGNLAU(NAMPG,NLAUE,LAUNAM) PGNLAU):
Pointgroup | Laue group | Limits | Spacegroup Nos | |
---|---|---|---|---|
3 | pg1 pg1bar | 1bar | hkl:l>=0 hk0:h>=0 0k0:k>=0 | 1,2 |
4 | pg2 (b) pgm pg2/m | 2/m | hkl:k>=0, l>=0 hk0:h>=0 | 3,4.... |
5 | pg2 (c) | 2/m | hkl:k>=0, l>=0 h0l:h>=0 | 1003, 1004 |
6 | pg222 pgmm2 pgmmm | mmm | hkl:h>=0, k>=0, l>=0 | 16 ... |
7 | pg4 pg4bar pg4/m | 4/m | hkl:h>=0, l>=0 with k>=0 if h=0 and k>0 if h>0 | 75,.. |
8 | pg422 pg4mm pg4bar2m pg4barm2 pg4/mm | 4/mmm | hkl:h>=0, k>=0, l>=0 | 89,.. |
9 | pg3 pg3bar | 3bar | hkl:h>=0, k>0 00l:l>0 | 143,.. |
10 | pg312 pg32 pg3m pg3m1 pg3barm1 | 3/m | hkl:h>=0, k>=0 with k<=h for all l. if k=0 l>=0 | 149 151 153 157 159 162 163 |
11 | pg321 pg31m pg3bar1m | 3bar1m | hkl:h>=0, k>=0 with k<=h for all l. if k=h l>=0 | 150 152 154 |
12 | pg6 pg6bar | 6/m | hkl:h>=0, k>=0, l>=0 with k>=0 if h=0 and k>0 if h>0 | 168.. |
13 | pg622 pg6mm pg6barm2 pg6bar2m pg6/mmm | 6/mmm | hkl:h>=0, k>=0, l>=0 with h>=k | 177.. |
14 | pg23 pgm3bar | m3 | hkl:h>=0, k>=0, l>=0 with l>=h, k>=h | 195.. |
15 | pg432 pg4bar3m pgm3barm | m3m | hkl:h>=0, k>=0, l>=0 with k\=1 | 209.. |
The subroutine Subroutine SETLIM(LSPGRP,XYZLIM) SETLIM contains the definitions of the real space asymmetric unit. Note that not all of the spacegroups have a definition within SETLIM.
No. | Spacegroup | Upper limits on x, y, z asterisk (*) |
---|---|---|
1 | P 1 | x < 1, y < 1, z < 1, |
2 | P -1 | x < 1, y <= 1/2, z < 1, |
3 | P 1 2 1 | x <= 1/2, y < 1, z < 1, |
4 | P 1 21 1 | x < 1, y < 1/2, z < 1, |
5 | C 1 2 1 | x <= 1/2, y < 1/2, z < 1, |
10 | P 1 2/M 1 | x <= 1/2, y <= 1/2, z < 1, |
16 | P 2 2 2 | x <= 1/2, y <= 1/2, z < 1, |
17 | P 2 2 21 | x <= 1/2, y <= 1/2, z < 1, |
18 | P 21 21 2 | x < 1, y <= 1/4, z < 1, |
19 | P 21 21 21 | x < 1, y < 1, z <= 1/4, |
20 | C 2 2 21 | x <= 1/2, y <= 1/4, z < 1, |
21 | C 2 2 2 | x <= 1/2, y <= 1/4, z < 1, |
22 | F 2 2 2 | x <= 1/4, y <= 1/4, z < 1, |
23 | I 2 2 2 | x <= 1/2, y <= 1/4, z <= 1, |
24 | I 21 21 21 | x <= 1/2, y <= 1/4, z < 1, |
47 | P 2/M 2/M 2/M | x <= 1/2, y <= 1/2, z <= 1/2, |
65 | C 2/M 2/M 2/M | x <= 1/2, y <= 1/4, z <= 1/2, |
69 | F 2/M 2/M 2/M | x <= 1/4, y <= 1/4, z <= 1/2, |
71 | I 2/M 2/M 2/M | x <= 1/2, y <= 1/4, z <= 1/2, |
75 | P 4 | x <= 1/2, y <= 1/2, z < 1, |
76 | P 41 | x < 1, y < 1, z < 1/4, |
77 | P 42 | x <= 1/2, y < 1, z < 1/2, |
78 | P 43 | x < 1, y < 1, z < 1/4, |
79 | I 4 | x <= 1/2, y <= 1/2, z <= 1/2, |
80 | I 41 | x <= 1/2, y < 1, z < 1/4, |
83 | P 4/M | x <= 1/2, y <= 1/2, z <= 1/2, |
87 | I 4/M | x <= 1/2, y <= 1/2, z <= 1/4, |
89 | P 4 2 2 | x <= 1/2, y <= 1/2, z <= 1/2, |
90 | P 4 21 2 | x <= 1/2, y <= 1/2, z <= 1/2, |
91 | P 41 2 2 | x < 1, y < 1, z <= 1/8, |
92 | P 41 21 2 | x < 1, y < 1, z <= 1/8, |
93 | P 42 2 2 | x <= 1/2, y < 1, z <= 1/4, |
94 | P 42 21 2 | x <= 1/2, y <= 1/2, z <= 1/2, |
95 | P 43 2 2 | x < 1, y < 1, z <= 1/8, |
96 | P 43 21 2 | x < 1, y < 1, z <= 1/8, |
97 | I 4 2 2 | x <= 1/2, y <= 1/2, z <= 1/4, |
98 | I 41 2 2 | x <= 1/2, y < 1, z <= 1/8, |
123 | P 4/M 2/M 2/M | x <= 1/2, y <= 1/2, z <= 1/2, |
139 | I 4/M 2/M 2/M | x <= 1/2, y <= 1/2, z <= 1/4, |
143 | P 3 | x <= 2/3, y <= 2/3, z < 1, |
144 | P 31 | x < 1, y < 1, z < 1/3, |
145 | P 32 | x < 1, y < 1, z < 1/3, |
146 | H 3 | x <= 2/3, y <= 2/3, z < 1/3, |
147 | P -3 | x <= 2/3, y <= 2/3, z <= 1/2, |
148 | R -3 | x <= 2/3, y <= 2/3, z <= 1/6, |
149 | P 3 1 2 | x <= 2/3, y <= 2/3, z <= 1/2, |
150 | P 3 2 1 | x <= 2/3, y <= 2/3, z <= 1/2, |
151 | P 31 1 2 | x < 1, y < 1, z <= 1/6, |
152 | P 31 2 1 | x < 1, y < 1, z <= 1/6, |
153 | P 32 1 2 | x < 1, y < 1, z <= 1/6, |
154 | P 32 2 1 | x < 1, y < 1, z <= 1/6, |
155 | H 3 2 | x <= 2/3, y <= 2/3, z <= 1/6, |
162 | P -31 2/M | x <= 2/3, y <= 1/2, z <= 1/2, |
164 | P -3 2/M 1 | x <= 2/3, y <= 1/3, z <= 1, |
166 | R -3 2/M | x <= 2/3, y <= 2/3, z <= 1/6, |
168 | P 6 | x <= 2/3, y <= 1/2, z < 1, |
169 | P 61 | x < 1, y < 1, z < 1/6, |
170 | P 65 | x < 1, y < 1, z < 1/6, |
171 | P 62 | x < 1, y < 1, z < 1/3, |
172 | P 64 | x < 1, y < 1, z < 1/3, |
173 | P 63 | x <= 2/3, y <= 2/3, z < 1/2, |
175 | P 6/M | x <= 2/3, y <= 2/3, z <= 1/2, |
177 | P 6 2 2 | x <= 2/3, y <= 1/2, z <= 1/2, |
178 | P 61 2 2 | x < 1, y < 1, z <= 1/12, |
179 | P 65 2 2 | x < 1, y < 1, z <= 1/12, |
180 | P 62 2 2 | x < 1, y < 1, z <= 1/6, |
181 | P 64 2 2 | x < 1, y < 1, z <= 1/6, |
182 | P 63 2 2 | x <= 2/3, y <= 2/3, z <= 1/4, |
191 | P 6/M 2/M 2/M | x <= 2/3, y <= 1/3, z <= 1/2, |
195 | P 2 3 | x < 1, y < 1, z <= 1/2, |
196 | F 2 3 | x <= 1/4, y <= 1/4, z < 1, |
197 | I 2 3 | x < 1, y < 1, z <= 1/2, |
198 | P 21 3 | x <= 1/2, y <= 1/2, z < 1, |
199 | I 21 3 | x <= 1/2, y <= 1/2, z <= 1/2, |
200 | P 2/M -3 | x <= 1/2, y <= 1/2, z <= 1/2, |
202 | F 2/M -3 | x <= 1/2, y <= 1/2, z <= 1/4, |
204 | I 2/M -3 | x <= 1/2, y <= 1/2, z <= 1/2, |
207 | P 4 3 2 | x < 1, y <= 1/2, z <= 1/2, |
208 | P 42 3 2 | x <= 1/2, y < 1, z <= 1/4, |
209 | F 4 3 2 | x <= 1/2, y <= 1/2, z <= 1/2, |
210 | F 41 3 2 | x <= 1/2, y < 1, z <= 1/8, |
211 | I 4 3 2 | x <= 1/2, y <= 1/2, z <= 1/4, |
212 | P 43 3 2 | x < 1, y < 1, z <= 1/8, |
213 | P 41 3 2 | x < 1, y < 1, z <= 1/8, |
214 | I 41 3 2 | x <= 1/2, y < 1, z <= 1/8, |
221 | P 4/M -3 2/M | x <= 1/2, y <= 1/2, z <= 1/2, |
225 | F 4/M -3 2/M | x <= 1/2, y <= 1/4, z <= 1/4, |
229 | I 4/M -3 2/M | x <= 1/2, y <= 1/2, z <= 1/4, |
(*) The limits are in fractional coordinates, and the lower limits are always x=0, y=0, z=0.
This library consists of a set of wrappers to the CSYM library giving the same API as the original symlib.f For details of the API, see the original documentation. This document covers some peculiarities of the C implementation.
The set of Fortran calls which mimic the original symlib.f assume you are working within a single spacegroup. All calls access the same spacegroup data structure, in analogy with the COMMON blocks of symlib.f For cases where you wish to work with multiple spacegroups (e.g. in the program REINDEX, a different set of calls is provided (the names of which generally start with "CCP4SPG_F_"). These identify the spacegroup of interest via an index "sindx" (by analogy with the "mindx" of mtzlib).
MTZ file headers contain 2 types of symmetry records:
Note that the spacegroup name is likely to be ambiguous at best, with no indication of the particular setting used. The primary source of symmetry information is therefore taken to be the list of symmetry operators. Note also that the order of operators is important if an ISYM column is present.