xrayutilities 1.4.0 was released (2017-02-09)
During the last month several important improvements, changes, and
additions were made to xrayutilities. As usual every user is advised to
upgrade. In order to obtain the new version go to sourceforge [1] or use
PyPI [2]. Windows binaries and wheel packages are found on PyPI for 64-bit
Python in versions 2.7 and 3.5 and 3.6.
With the change to version 1.4.0 there might be some code changes in your
scripts required. Please check the list of changes below and see if you are
likely to be affected.
New simulation capabilities were added to xrayutilities. Notable are a
dynamical multibeam formalism for symmetric crystal truncation rods and
powder diffraction code based on the fundamental parameters approach. The
core of the powder diffraction code was submitted by Marcus H. Mendenhall <
mar...@ni...> and is documented in Journal of Research of
NIST 120, 223 (2015) http://dx.doi.org/10.6028/jres.120.014 . Example
scripts for powder diffraction (simpack_powdermodel.py) and the new
dynamical diffraction simulation (simpack_xrd_Darwin_AlGaAs.py) can be
found in the example folder [3].
Further changes include a complete redesign of how materials or better
their lattices are defined. The new way of defining materials is more
flexible and closer to the way most other software treats lattices. A
crystalline material is now specified by its space group number and the
Wyckoff position of atoms within the unit cell.
For example a zincblende material one defines by:
import xrayutilities as xu
InP = xu.materials.Crystal("InP", xu.materials.SGLattice(216, 5.8687,
atoms=[xu.materials.elements.In, xu.materials.elements.P], pos=['4a',
'4c']))
InAs = xu.materials.Crystal("InAs", xu.materials.SGLattice(216, 6.0583,
atoms=['In', 'As'], pos=['4a', '4c']))
The definition of the lattice takes a variable number of parameters
depending on the symmetry of the given space group. A more complex
definition is for example used for ferroelectric GeTe which is rhombohedral
and its atomic positions have several degrees of freedom which need to be
specified:
GeTe = Crystal("GeTe",
SGLattice('160:R', 5.996, 88.18, atoms=[e.Ge, e.Ge, e.Te, e.Te],
pos=[('1a', -0.237), ('3b', (0.5-0.237, -0.237)),
('1a', 0.237), ('3b', (0.5+0.237, +0.237))]))
Many more examples of material definitions can be found seen in the list of
predefined materials [4].
With the new changes the definition of alloyed materials is much more
straight forward since alloying is now automatically performed also within
the unit cell. The only requirement is that both materials have the same
space group! To create an InAs_{1-x} P_x alloy whose lattice parameter
follows Vegard's rule one uses:
InAsP = xu.materials.Alloy(InAs, InP, 0.4)
print(InAsP)
Alloy: InAs(0.60)InP(0.40)
Lattice:
216 cubic F-43m: a = 5.9825, b = 5.9825 c= 5.9825
alpha = 90.000, beta = 90.000, gamma = 90.000
Lattice base:
0: In (49) 4a occ=0.600 b=0.000
1: As (33) 4c occ=0.600 b=0.000
2: In (49) 4a occ=0.400 b=0.000
3: P (15) 4c occ=0.400 b=0.000
Currently the old Lattice code is still included and can be used to make a
primitive conversion of your old materials and help you convert your
material definitions. If you for example had defined your own zincblende
lattice/material you can convert it with:
zb = xu.materials.ZincBlendeLattice(xu.materials.elements.In,
xu.materials.elements.P, 5.8687)
new_zb = xu.materials.SGLattice.fromLattice(zb)
print(new_zb)
...
As you will see from the output this conversion always uses the P1
space-group. This conversion code and all old Lattice definitions will be
removed in the next major release.
For a more exhaustive list of changes in version 1.4.0 see the CHANGES.txt
file or the GIT log. Test coverage of this version is at 60%.
[1] https://sourceforge.net/projects/xrayutilities
[2] https://pypi.python.org/pypi/xrayutilities
[3] https://github.com/dkriegner/xrayutilities/tree/master/examples
[4]
https://github.com/dkriegner/xrayutilities/blob/master/xrayutilities/materials/predefined_materials.py
|