qzhu2017 / PyXtal

A code to generate atomic structure with symmetry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A separate utility to compute structure factor

qzhu2017 opened this issue · comments

Operate on the ASE.atoms level,
But can also be accessed from pyxtal.

from pyxtal import pyxtal
from ase.build import bulk
a1 = bulk('Cu', 'fcc', a=3.6, cubic=True)
x = pyxtal()
x.from_seed(a1)
for hkl in [(1,0,0), (0,1,0), (1, 1, 0), (2, 2, 0), (1, 1, 1), (2, 2, 2), (2, 0, 0)]:
    print(hkl, x.get_structure_factor(hkl))
(1, 0, 0) -2.4492935982947064e-16j
(0, 1, 0) -2.4492935982947064e-16j
(1, 1, 0) 0j
(2, 2, 0) (4+9.797174393178826e-16j)
(1, 1, 1) (4+7.347880794884119e-16j)
(2, 2, 2) (4+1.4695761589768238e-15j)
(2, 0, 0) (4+4.898587196589413e-16j)