import matplotlib.pyplot as plt import xrayutilities as xu # 1. xu はある程度の物質は知っている。xu の materials のライブラリから取り出せる。 GaAs_1 = xu.materials.GaAs InP_1 = xu.materials.InP # 2. xu が持っている原子の情報を使って結晶を組み立てる In = xu.materials.elements.In P = xu.materials.elements.P elastictensor = xu.materials.CubicElasticTensor( 10.11e+10, 5.61e+10, 4.56e+10 ) InP_2 = xu.materials.Crystal( "InP", xu.materials.SGLattice( 216, 5.8687, # 結晶の対称性を指定する群の番号、格子定数 atoms=[In, P], # 指定した対称性で実際に配列する原子 pos=['4a', '4c']), # 原子の位置 elastictensor ) # 弾性定数 # 3. cif ファイルを使う、cif ファイルから情報を読む # 対称性の指定とか考えなくていいので楽。但し、弾性定数は cif ファイルにはないので必要なら後で指定する # GaAs_2 = xu.materials.Crystal.fromCIF( "GaAs.cif" ) # InAs_1 = xu.materials.Crystal.fromCIF( "InAs.cif" ) # InP_3 = xu.materials.Crystal.fromCIF( "InP.cif" ) # SiC4H_1 = xu.materials.Crystal.fromCIF( "SiC-4H.cif" ) # GaN_1 = xu.materials.Crystal.fromCIF( "GaN-Hex.cif" ) # AlN_1 = xu.materials.Crystal.fromCIF( "AlN-Hex.cif" ) # 試しに 3D 表示 f = plt.figure() InP_1.show_unitcell(fig=f) # InP_1 を他のものに変えて試して見て下さい plt.show()