Description | Perl tools for X-ray Absorption Spectroscopy |
Xray::Crystal::SpaceGroup - An object interface to the International Tables of Crystallography
This documentation refers to Demeter version 0.9.26.
use Xray::Crystal;
my $sg = Xray::Crystal::SpaceGroup->new;
$sg -> group("pm3m");
print $sg -> report;
This provides an interface to the tables of space group symmetries from the International Tables of Crystallography.
This class uses Moose. Like all Moose-y objects, each attribute shares a name with its accessor method.
group
The space group symbol. This is your point of entry into this class and this should be the only attribute you ever need to explicitly set. When you do so, the space group symbol will be canonicalized and all other attributes will be set with data from the sapce groups database. Once that is done, this attribute will contain the canonicalized Hermann-Maguin symbol for the requested space group.
given
This is the symbol that was given to the group
accessor.
number
This is the number of the space group as listed in the International Tables.
full
This is the full Hermann-Maguin symbol for this space group, which, for some groups, is the same as canonical symbol.
schoenflies
This is the Schoenflies symbol for this space group.
thirtyfive
For groups that had a different symbol in the 1935 edition of the International Tables, that symbol is contained in this attribute. For other groups, this is an empty string.
newsymbol
For groups that have a new symbol (for instance to indicate a glide plane), that symbol is contained in this attribute. For other groups, this is an empty string.
class
The crystal class -- one of triclinic, monoclinic, orthorhombic, trigonal, tetragonal, hexagonal, or cubic.
setting
A string indicating the crystal setting as determined from the space group symbol. For groups without alternate setting choices, this is "positions". For others, the string indicates the setting choice, which is used to fill the positions
attribute.
warning
If the symbol supplied can be interpreted, this is filled with a text string indicating the reason. Under normal conditions this is an empty string.
data
This is filled with a hash reference containing all information about this group taken from the space groups database.
nicknames
This is an array reference containing any nicknames by which this group can be recognized. For example I m -3 m
has BCC
(for body-centered cubic) as a nickname.
bravais
This is an array reference containing the Bravais translations associated with this space group.
shiftvec
This is an array reference containing the vector that shifts an alternate centering in the International Tables to the "centre at origin" entry. Only a few space groups have such alternate entries -- for those groups this returns an empty array reference.
positions
This is an array reference containing array refernces to the symmetry positions associated with this space group. This is the information used, along with the Bravais translations, to populate a unit cell.
is_rhomb
, is_hex
, is_first
, is_second
(boolean)Occassionally, modifiers to the space group symbol are used to explicitly specify the setting of the crystal.
Trigonal space groups with symbols beginning with R
(numbers 146, 148, 155, 160, 161, 166, and 167) can be expressed in rhombohedral or hexagonal settings. While it is possible to figure out the setting from the specified parameters -- the rhombohedral setting has a=b=c, alpha!=90, and alpha=beta=gamma, while the hexagonal setting has a=b!=c, alpha=beta=90, and gamma=120 -- CIF file authors and others may modify the space group symbol with :R
or :H
to indicated the setting.
Some orthoganal groups (numbers 48, 50, 59, 68, 70), tetragonal groups (85, 86, 88, 125, 126, 129, 130, 133, 134, 137, 138, 141, 142), and cubic groups (201, 203, 222, 224, 227, 228) are given in the International Tables referenced to two centers of symmetry. In general, it is difficult to know which center is used before expanding the unit cell and examining its contents. To remove this ambiguity some CIF file authors and others will modify the space group symbol with :1
or :2
to indicated which center has been used. Demeter assumes the second setting, so if :1
is specified, it is likely that a shift vector will be needed.
When a space group symbol uses one of these modifiers, the corresponding boolean parameter will be set to 1
.
If your trigonal group is specified with just the A
lattice constant and all angles of equal value, then you are using the rhombohedral setting. Use this method to set the setting
and positions attributes correctly. If the space group is not an R
group, then this method does nothing.
Print out a simple textual summary of a space group.
my $sg=Xray::Crystal::SpaceGroup->new;
$sg -> group('p63mc');
print $sg->report;
Space group: p 63 m c (#186)
supplied symbol : p63mc
crystal class : hexagonal
Schoenflies symbol : c_6v^4
full symbol : p 63 m c
nicknames : graphite, gra
crystal setting : positions
Bravais translations :
none
Positions :
$x $y $z
-$y $x-$y $z
-$x+$y -$x $z
-$x -$y $z+1/2
$y -$x+$y $z+1/2
$x-$y $x $z+1/2
-$y -$x $z
-$x+$y $y $z
$x $x-$y $z
$y $x $z+1/2
$x-$y -$y $z+1/2
-$x -$x+$y $z+1/2
Please report problems to the Ifeffit Mailing List (http://cars9.uchicago.edu/mailman/listinfo/ifeffit/)
Patches are welcome.
Bruce Ravel, http://bruceravel.github.io/home
http://bruceravel.github.io/demeter/
Copyright (c) 1999-2018 Bruce Ravel (http://bruceravel.github.io/home). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlgpl.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.