#!/usr/bin/env python3 # # 結晶構造の設定と表示 # https://xrayutilities.sourceforge.io/examples.html より # import matplotlib.pyplot as plt import xrayutilities as xu # xrayUtilities が持つ materials.elements の定義を使って原子を定義する # (これは原子のX線光学的な性質を保持している) In = xu.materials.elements.In P = xu.materials.elements.P # この In 原子、P 原子 を使って # 閃亜鉛鉱と六方晶の InP を作ってみる。 ## ここでは使わないが閃亜鉛鉱型の InP については弾性定数も設定してみるのでその準備 elastictensor = xu.materials.CubicElasticTensor(10.11e+10, 5.61e+10, 4.56e+10) # 閃亜鉛鉱の InP の定義 InP = xu.materials.Crystal( "InP", xu.materials.SGLattice(216, 5.8687, atoms=[In, P], pos=['4a', '4c']), elastictensor) # ここでは不要だが、弾性定数も追加で設定(設定しなくても良い) # 六方晶の InP の定義 InPWZ = xu.materials.Crystal( "InP(WZ)", xu.materials.SGLattice(186, 4.1423, 6.8013, atoms=[In, P], pos=[('2b', 0), ('2b', 3/8.)])) # 以下は、定義した InP の 3D 表示 f = plt.figure() InP.show_unitcell(fig=f, subplot=121) plt.title('InP zincblende') InPWZ.show_unitcell(fig=f, subplot=122) plt.title('InP wurtzite') plt.show()