Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

MaXrd

Guides

  • MaXrd – Mathematica X-ray diffraction package

Tech Notes

  • Applying crystal data
  • Basic computations
  • Computations on reflections
  • Formulas in crystallography
  • Importing crystal data
  • Quick guide to conditions
  • References
  • Symmetry calculations
  • The association structure of crystallographic data
  • Using the rotation options

Symbols

  • AttenuationCoefficient
  • BraggAngle
  • ConstructDomains
  • CrystalDensity
  • CrystalFormulaUnits
  • CrystalPlot
  • DarwinWidth
  • DistortStructure
  • DomainPlot
  • EmbedStructure
  • ExpandCrystal
  • ExportCrystalData
  • ExtinctionLength
  • FindPixelClusters
  • GetAtomCoordinates
  • GetAtomicScatteringFactors
  • GetCrystalMetric
  • GetElements
  • GetLatticeParameters
  • GetLaueClass
  • GetScatteringCrossSections
  • GetSymmetryData
  • GetSymmetryOperations
  • ImportCrystalData
  • InputCheck
  • InterplanarSpacing
  • MergeDomains
  • MergeSymmetryEquivalentReflections
  • MillerNotationToList
  • MillerNotationToString
  • ReciprocalImageCheck
  • ReciprocalSpaceSimulation
  • ReflectionList
  • RelatedFunctionsGraph
  • ResetCrystalData
  • ResizeStructure
  • SimulateDiffractionPattern
  • StructureFactor
  • StructureFactorTable
  • SymmetryEquivalentPositions
  • SymmetryEquivalentReflections
  • SymmetryEquivalentReflectionsQ
  • SynthesiseStructure
  • SystematicAbsentQ
  • ToStandardSetting
  • TransformAtomicDisplacementParameters
  • UnitCellTransformation
  • $CrystalData
  • $GroupSymbolRedirect
  • $LaueClasses
  • $MaXrdPath
  • $MaXrdVersion
  • $PeriodicTable
  • $PointGroups
  • $SpaceGroups
  • $TransformationMatrices
The association structure of crystallographic data
Examples of queries
Auxiliary tools
An
Association
is a list structure with entries being a pair of elements, referred to as
keys
and
values
. Each
key
is associated with a certain
value
using the notation
keyvalue
. One can think of the structure as a one-way dictionary.
Associations can be nested with both lists and associations. This feature, along with a fast and easy way of inquiring values, makes it useful for storing information about point groups and space group in an hierarchical form.
The package must be loaded:
In[1]:=
<<MaXrd`
$PointGroups
["group"]
returns information on the given point
group
$SpaceGroups
["group"]
returns information on the given space
group
$GroupSymbolRedirect
["group"]
redirects group to the appropriate entry of
$PointGroups
or
$SpaceGroups
Looking up point- and space group information.
Examples of queries
First a point group example:
Let us inquire information on the point group
4/m
:
In[2]:=
$PointGroups
["4/m"]
Out[2]=
Symbol4/m,PointGroupNumber11,CrystalSystemTetragonal,LaueClass4/m,SchoenfliesSymbol
C
4h
,Setting,ClassNamesGrothdipyramidal,Friedelparahemihedry,PropertiesCentrosymmetricTrue,EnantiomorphicFalse,PolarFalse,SymmetryOperationsMatrixOperations{{{1,0,0},{0,1,0},{0,0,1}},{{-1,0,0},{0,-1,0},{0,0,1}},{{0,-1,0},{1,0,0},{0,0,1}},{{0,1,0},{-1,0,0},{0,0,1}},{{-1,0,0},{0,-1,0},{0,0,-1}},{{1,0,0},{0,1,0},{0,0,-1}},{{0,1,0},{-1,0,0},{0,0,-1}},{{0,-1,0},{1,0,0},{0,0,-1}}},SymmetryOperationsITA1,
2
[001]
,
​+
4
[001]
,
​-
4
[001]
,
1
,
m
[001]
,
​+
4
[001]
,
​-
4
[001]
,SymmetryOperationsSeitz1,
2
z
,
4
z
,
​3
4
z
,
1
,
m
z
,
​
4
z
,
​3
4
z
,SubgroupsSubgroupClassType1,SubgroupSymmetry1,SubgroupList{1},SubgroupClassType
1
,SubgroupSymmetry
1
,SubgroupList{1,5},SubgroupClassType2,SubgroupSymmetry
2
z
,SubgroupList{1,2},SubgroupClassTypem,SubgroupSymmetry
m
z
,SubgroupList{1,6},SubgroupClassType2/m,SubgroupSymmetry
2
z

m
z
,SubgroupList{1,2,5,6},SubgroupClassType4,SubgroupSymmetry
4
z
,SubgroupList{1,2,3,4},SubgroupClassType
4
,SubgroupSymmetry
4
z
,SubgroupList{1,2,7,8},SubgroupClassType4/m,SubgroupSymmetry
4
z

m
z
,SubgroupList{1,2,3,4,5,6,7,8}
Notice how the output is itself an association, with the values of
"Properties"
and
"SymmetryOperations"
being "sub-associations". Read more about the output structure on the documentation page for
$PointGroups
.
Now a little more advanced:
Selecting all centrosymmetric point groups:
In[4]:=
centr=Keys@Select
$PointGroups
,#"Properties","Centrosymmetric"&
Out[4]=
{-1,2/m,mmm,4/m,4/mmm,-3,-3m,6/m,6/mmm,m-3,m-3m}
Verify that the set of centrosymmetric point groups is the same set as the Laue classes:
In[5]:=
centr===Keys@
$LaueClasses
Out[5]=
True
Find the 13 alternative settings of point groups (and obtain the formatted symbols):
In[6]:=
pgWithAlt=Keys@DeleteMissing@
$PointGroups
All,"AlternativeSettings"
Out[6]=
{2,m,2/m,-42m,3,-3,32,3m,-3m,-62m}
In[7]:=
$PointGroups
[#,"Symbol"]&/@pgWithAlt
Out[7]=
{2,m,2/m,
4
2m,3,
3
,32,3m,
3
m,
6
2m}
To get an overview of the data stored with a single point group, try
Dataset
:
In[8]:=
Dataset@
$PointGroups
["3m"]
Out[8]=
Symbol
3m
FullSymbol
3m1
SymbolAlt
3m:h
FullSymbolAlt
3m1:h
PointGroupNumber
19
CrystalSystem
Trigonal
LaueClass
3
m
SchoenfliesSymbol
C
3v
Setting
HexagonalAxes
ClassNames

…
2

Properties
CentrosymmetricFalse,EnantiomorphicFalse,PolarTrue
SymmetryOperations

…
3

Subgroups
{
…
6
}
AlternativeSettings

…
2

Auxiliary tools
In this section we will learn more about the two functions
$GroupSymbolRedirect
and
SymmetryData
, which are built-in to the MaXrd package and help query data from point groups, space groups and crystal data.
Associations only support a single key for each entry. The associations
$PointGroups
and
$SpaceGroups
only have one “main entry” for each group,
In[1]:=
Length/@
$PointGroups
,
$SpaceGroups

Out[1]=
{32,230}
All data concerned with the alternative settings are stored as sub-entries. For example, the orthorhombic space group
Pbcn
has five alternative settings: one with an
"ba
c
"
-permutation of the axes, and one with a
"cab"
-permutation, and the remaining versions with
"
c
ba"
,
"bca"
and
"a
c
b"
permutations.
In[2]:=
Keys@
$SpaceGroups
["Pbcn","AlternativeSettings"]
Out[2]=
{AxisPermutationBA-C,AxisPermutationCAB,AxisPermutation-CBA,AxisPermutationBCA,AxisPermutationA-CB}
Let us look at three different ways to access the data of, say the
"bca"
-version:
1. Look up the entry directly in
$SpaceGroups
:
In[3]:=
$SpaceGroups
["Pbcn","AlternativeSettings","AxisPermutationBCA"]
Out[3]=
NameSymbolPbna,HermannMauguinShortP b n a,HermannMauguinFullP 2/b 21/n 21/a,HallString-P 2ac 2b,SettingAxisPermutationbca,SymmetryOperations{{{1,0,0},{0,1,0},{0,0,1}},{0,0,0}},{{-1,0,0},{0,-1,0},{0,0,1}},
1
2
,0,
1
2
,{{1,0,0},{0,-1,0},{0,0,-1}},0,
1
2
,0,{{-1,0,0},{0,1,0},{0,0,-1}},
1
2
,
1
2
,
1
2
,{{{-1,0,0},{0,-1,0},{0,0,-1}},{0,0,0}},{{1,0,0},{0,1,0},{0,0,-1}},-
1
2
,0,-
1
2
,{{-1,0,0},{0,1,0},{0,0,1}},0,-
1
2
,0,{{1,0,0},{0,-1,0},{0,0,1}},-
1
2
,-
1
2
,-
1
2

2. Let
$GroupSymbolRedirect
look up the entry automatically (it works almost like a “switchboard” for the point- and space groups). You would need to know the space group symbol in advance:
In[4]:=
$GroupSymbolRedirect
["Pbna"]
Out[4]=
NameSymbolPbna,HermannMauguinShortP b n a,HermannMauguinFullP 2/b 21/n 21/a,HallString-P 2ac 2b,SettingAxisPermutationbca,SymmetryOperations{{{1,0,0},{0,1,0},{0,0,1}},{0,0,0}},{{-1,0,0},{0,-1,0},{0,0,1}},
1
2
,0,
1
2
,{{1,0,0},{0,-1,0},{0,0,-1}},0,
1
2
,0,{{-1,0,0},{0,1,0},{0,0,-1}},
1
2
,
1
2
,
1
2
,{{{-1,0,0},{0,-1,0},{0,0,-1}},{0,0,0}},{{1,0,0},{0,1,0},{0,0,-1}},-
1
2
,0,-
1
2
,{{-1,0,0},{0,1,0},{0,0,1}},0,-
1
2
,0,{{1,0,0},{0,-1,0},{0,0,1}},-
1
2
,-
1
2
,-
1
2

3. Use
SymmetryData
to extract the data you want (see valid commands in the documentation). Say we want to know the space group number or whether the space group is a “main entry” or not. A similar function (
SymmetryOperations
) can also extract the symmetry operations:
In[5]:=
GetSymmetryData
["Pbna","SpaceGroupNumber"]
Out[5]=
60
In[6]:=
GetSymmetryData
["Pbna","MainEntryQ"]
Out[6]=
False
In[7]:=
GetSymmetryOperations
["Pbna"]
Out[7]=
TransformationFunction
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
,TransformationFunction
-1
0
0
1
2
0
-1
0
0
0
0
1
1
2
0
0
0
1
,TransformationFunction
1
0
0
0
0
-1
0
1
2
0
0
-1
0
0
0
0
1
,TransformationFunction
-1
0
0
1
2
0
1
0
1
2
0
0
-1
1
2
0
0
0
1
,TransformationFunction
-1
0
0
0
0
-1
0
0
0
0
-1
0
0
0
0
1
,TransformationFunction
1
0
0
-
1
2
0
1
0
0
0
0
-1
-
1
2
0
0
0
1
,TransformationFunction
-1
0
0
0
0
1
0
-
1
2
0
0
1
0
0
0
0
1
,TransformationFunction
1
0
0
-
1
2
0
-1
0
-
1
2
0
0
1
-
1
2
0
0
0
1


© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com