Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A separate utility to compute structure factor #234

Closed
qzhu2017 opened this issue Oct 11, 2023 · 1 comment
Closed

A separate utility to compute structure factor #234

qzhu2017 opened this issue Oct 11, 2023 · 1 comment

Comments

@qzhu2017
Copy link
Owner

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

@qzhu2017
Copy link
Owner Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant